4 ms·
Is there a reason you didn't just handcode a recursive descent parser?
by munificent 16y ago
Is there a reason you didn't just handcode a recursive descent parser?
- scott_s 16y agoYes. It's a waste of time. Why should I hand-code a parser for C when it's a solved problem? Note that the source code I linked to calls into an already existing Spirit grammar for C (which I made some modifications to, mainly so I could get more information back from the parse tree). Hand coding a parser is generally not a good use of your time. There are many tools available to generate a parser based on a BNF grammar. I used my project as an opportunity to learn one of them.