3 ms·
You mention specifically that it this is true for compilers. What about smaller applications. From my browsing of the FreeBSD tree most programs that have a syn
by Dobbs 17y ago
You mention specifically that it this is true for compilers. What about smaller applications. From my browsing of the FreeBSD tree most programs that have a syntax use yacc/lex to parse the input. Awk for example, among others.
As you are much more experienced in this area, any opinions?
- scottdw2 17y agoYou should be weary of using Lex for unicode, because the tables can get large. As far as Bison goes, I guess that's up to you. My preference is against it, mainly because I don't think it buys you much (if the grammar is small, the code for the parser should be small to). The biggest driver should be user experience. If you care a lot about how errors are reported (i.e. you want to avoid cascading errors, while trying to report as many errors as possible up front) , then I say you should definitely not use bison. If you don't care about error reporting much, then its really just based on your personal preference.