Next: , Previous: precedence Decl, Up: Declarations


2.3.8 default-prec Decl

— %-Decl: %default-prec
— %-Decl: %no-default-prec

See also %prec in Grammar Rules.

%no-default-prec declares that you must specify precedence for all rules that participate in precedence conflict resolution. The default %default-prec indicates to use the precedence of the last terminal symbol mentioned in the rule.

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.