An alternative to flex and bison duo?
Is there any alternative 开发者_JS百科to flex and bison (lex/yacc) combo? Any other tools that let specify a language grammar in BNF?
A couple of options:
Antlr: http://www.antlr.org/
If you're using C++, Boost::Spirit: http://www.boost.org/doc/libs/1_41_0/libs/spirit/doc/html/index.html
There's ANTLR
Two in one, no deps, usable from c or c++, reentrant. I like: https://www.piumarta.com/software/peg/ Understand the whole thing just reading: https://www.piumarta.com/software/peg/peg.1.html
精彩评论