zaach / jison

Bison in JavaScript.
http://jison.org
4.36k stars 450 forks source link

[GerHobbelt fork] latest master doesn't allow dashes '-' in grammar rules anymore, while Bison does allow them #309

Open GerHobbelt opened 9 years ago

GerHobbelt commented 9 years ago

See also the Bison docs

Example from their docs; note the if-stmt (and the then.stmt ! jison never supported that one in any way):

if-stmt: "if" '(' expr ')' "then" then.stmt ';'
  { $[if-stmt] = new_if_stmt ($expr, $[then.stmt]); }

That's what I get from updating a bit of doc: then I find bugs in my own stuff :-1: while those edits were meant to kill the trouble deeper down and I never used bison/yacc/whathaveya that way: no dashes for this guy.

Anyway, bison's way of coping with those is also suitable for JavaScript so do we feel the need to be that compatible? Guess so.