3 ms·
Here's a complete C frontend that uses the lex/yacc approach - https://github.com/eliben/pycparser https://github.com/eliben/pycparser (the Python ports of them
by eliben 11y ago
Here's a complete C frontend that uses the lex/yacc approach - https://github.com/eliben/pycparser https://github.com/eliben/pycparser (the Python ports of them, that is)
FWIW, if I had to do this again today I would certainly go for hand-written recursive descent. lex/yacc charm you in but eventually prove to be much more difficult to tweak and reason about.