3 ms·
You should take a look at Bison - http://www.gnu.org/software/bison/ http://www.gnu.org/software/bison/ - it takes a while to understand how to use it, but is w
by iamflimflam1 11y ago
You should take a look at Bison - http://www.gnu.org/software/bison/ http://www.gnu.org/software/bison/ - it takes a while to understand how to use it, but is well worth the effort.
- oldmanhorton 11y agoHaving used Bison as well has my own hand-written compilers, I personally would suggest that Bison is not worth it. With recursive descent, you end up writing the same BNF structure anyways, but you don't have to fight the Bison file structure just to decorate the tree and you can much more easily work around syntax errors.
- pklausler 11y agoWhether one uses a parser generator's output as part of a compiler is one thing, but one should at least pass the grammar of the language through a parser generator to let it check the grammar for ambiguity.