4 ms·
This is a cool use case that probably saved you some time, but writing a recursive descent parser is something freshman CS students do for a lab assignment. It
by LPisGood 2y ago
This is a cool use case that probably saved you some time, but writing a recursive descent parser is something freshman CS students do for a lab assignment.
It isn’t exactly breaking new ground or doing anything you couldn’t find with a quick google search.
- wrs 2y agoYou want me to do a Google search for a parser for the language that I just invented? If you have a parser generator tool that can go from zero to parser based on a few examples rather than a grammar, I’d love to hear about it.
- kuschku 2y ago> If you have a parser generator tool that can go from zero to parser based on a few examples rather than a grammar, I’d love to hear about it. That's the part where the LLM would be useful. Turn the examples into a grammar, verify the grammar, and use a parser generator for the rest. You know the code does what it should and you get there in minutes.
- wrs 2y agoI'm pretty sure it could have done that equally easily, but this grammar is small enough that a parser generator is overkill. (I made that decision before I asked the LLM to write the parser.)