Next: , Previous: type Decl, Up: Declarations


2.3.7 precedence Decl

— %-Decl: %left [<type-name>] token1 ...
— %-Decl: %right [<type-name>] token1 ...
— %-Decl: %nonassoc [<type-name>] token1 ...

See also %prec in Grammar Rules.

Specify the precedence and associativity of grammar terminals.

For more details, see Grammar format, PRECEDENCE.

Please note:
This information has meaning only in LALR grammars. Defining precedence in a grammar that provides tagging information for semantic isn't usually necessary.