zaach / jison

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

[feature req] add `%initial-action` support #346

Open GerHobbelt opened 7 years ago

GerHobbelt commented 7 years ago

Cf. https://www.gnu.org/software/bison/manual/html_node/Initial-Action-Decl.html#Initial-Action-Decl

Currently I hack around this by pushing a special Unicode character into the input stream via an initial %epsilon: this hack-character would thus end up at input index -1. %initial-action is way cleaner when you want to accomplish the same or similar.