4 ms·
I've recently discovered PEG.js [0] and prototyped a small DSL in the browser [1]. Amazing stuff! I've dealt with ANTLR [2] before, but PEG.js feels so much nic
by kolev 12y ago
I've recently discovered PEG.js [0] and prototyped a small DSL in the browser [1]. Amazing stuff! I've dealt with ANTLR [2] before, but PEG.js feels so much nicer although it may not be as powerful!
[0] http://pegjs.org/ http://pegjs.org/
[1] http://pegjs.org/online http://pegjs.org/online
[2] http://www.antlr.org/ http://www.antlr.org/
- arcatek 12y agoRelated side-project : http://peg.arcanis.fr http://peg.arcanis.fr Like the demo version, but doesn't lock your browser with infinite recursion, and supports Ctrl+S! PegJS is a really great/fun tool.
- munro 12y agoPEG.js is definitely fun to prototype ideas in the browser. My new love is Parsec [1] + doctest [2]. You start building simple little parsers, and build on top of them, plus inline testing makes it easy to write the parsers correctly. Also Haskell's algebraic datatypes and pattern matching make it nice to build and work with the AST. <3 [1] https://wiki.haskell.org/Parsec https://wiki.haskell.org/Parsec [2] https://hackage.haskell.org/package/doctest https://hackage.haskell.org/package/doctest