In formal grammar and compiler theory, a classic expression grammar is a context-free grammar that specifies the syntactic structure of arithmetic expressions by separating expression components into grammatical categories corresponding to different operator-precedence levels [1]. In its conventional form, the grammar distinguishes expressions involving addition and subtraction, terms involving multiplication and division, and factors involving parenthesized expressions or operands. This hierarchical organization encodes operator precedence and, through recursive production rules, associativity, allowing expressions to be parsed into a structured representation without treating all operators as having equal precedence [1]. The term refers to a grammar used to describe expression syntax, rather than to a general theory of natural-language grammar.
Linguistics and Language Analysis • Language and Linguistics • Arts and Humanities • Social Sciences