3 ms·
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
by tlack 11y ago
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 https://github.com/alexwarth/ometa-js
- PeCaN 11y agoFor 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.