zaach / jison

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

Production names clash with terminal names #378

Open ericprud opened 6 years ago

ericprud commented 6 years ago

It's a mild pain that a lexer rule like:

"P1"     return 'P1'

conflicts with a grammar rule like:

P1: 'P1' ;

The symbols_ map would show the conflict:

symbols_: {"error":2,…,"P1":4,"EOF":5,"P1":7,…,"$accept":0,"$end":1},

but in fact it fails during compilation so it doesn't get as far as generating such a conflicting map.