Hacker News new | ask | show | jobs
by bd82 2378 days ago
Luckily there are many Parsing Libraries in the JavaScript eco-system, So we won't have to find out if this convoluted approach is worthwhile :)

- https://tomassetti.me/parsing-in-javascript/

1 comments

BNF sounds like the standard approach. Are there any BNF parsers + generators usable from Javascript?
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.