Re:Making a Mini-Lisp: Introduction to Transpilers in JavaSc...
by tlack on Thursday December 24, 2015 @01:07PM
(#10789024)
Great article! Really accessible for a newbie. I'd love to see a comparison between using a manual lexer/parser like the one seen here and using OMeta/JS, which seems like a real time saver for people playing around with languages. https://github.com/alexwarth/ometa-js
[ Parent
| on HN ]
Re:Making a Mini-Lisp: Introduction to Transpilers in JavaSc...
by PeCaN on Thursday December 24, 2015 @02:26PM
(#10789308)
For playing around with languages I'd actually recommend writing your own lexer and parser. It isn't hard, and writing a recursive descent parser really helps understanding grammars and BNF. Before you have a solid grasp of how context-free grammars work, parser generators aren't much of a time saver IMO.
In my experience getting a BNF grammar right is something of an art which you pick up after having written a few parsers.