zaach / jison

Bison in JavaScript.
http://jison.org
4.34k stars 448 forks source link

[feature req] add `%precedence` support #347

Open GerHobbelt opened 7 years ago

GerHobbelt commented 7 years ago

Cf. https://www.gnu.org/software/bison/manual/html_node/Precedence-Decl.html

The classic %left, %right and %nonassoc encode associativity and thus implicitly drive precedence decisions in an otherwise ambiguous grammar, which is to be frowned upon as it does hide some error types. Hence a direct precedence-only specifying instruction is called for. A bit akin to the %prec modifier.

See also: