Hacker News new | ask | show | jobs
by asdasdasdasdwd 2377 days ago
BNF sounds like the standard approach. Are there any BNF parsers + generators usable from Javascript?
3 comments

Some of the top of my Head:

  - Antlr (https://github.com/antlr/antlr4/blob/master/doc/javascript-target.md)

  - PegJS (https://github.com/pegjs/pegjs)

  - Nearley (https://github.com/kach/nearley)
PEG is another popular approach
jison works fairly well, and is mostly compatible with bison.