jison icon indicating copy to clipboard operation
jison copied to clipboard

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

Open GerHobbelt opened this issue 10 years ago • 0 comments

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.

GerHobbelt avatar Oct 26 '15 18:10 GerHobbelt