Closed consultit closed 6 years ago
What about other parser/lexer libraries:
I mainly used flex/bison tools in my projects and I know them quite well. Antlr, afaik, is java biased, and "boost karma", I think, should correspond to boost::Spirit. In any case, here is a (partial) list of open source, pure c++ (ie written in and generating c++ code) lexer and parser generators, which use various kinds of notations and grammar algorithms and that I've met/tried in the past and that are worthy to mention:
-lexer generators: https://github.com/BenHanson/lexertl https://fbb-git.github.io/flexcpp/ https://sourceforge.net/projects/quex/ http://www.colm.net/open-source/ragel/
-parser generators https://fbb-git.github.io/bisoncpp/ https://github.com/ColinH/PEGTL http://cppcc.sourceforge.net/main.php http://csparser.sourceforge.net/ http://scottmcpeak.com/elkhound/ https://code.google.com/archive/p/yardparser/ http://jetpag.sourceforge.net/ https://github.com/KDE/kdevelop-pg-qt https://github.com/MathiasVP/Parse http://fossil.wanderinghorse.net/repos/parsepp/index.cgi/wiki/parsepp https://github.com/preusser/wisent http://www.boost.org/doc/libs/1_63_0/libs/spirit/doc/html/index.html https://github.com/TheLartians/Parser http://users.utu.fi/aleokh/whalecalf/
Why does the tool have to be written in c++? Ragel is a c program, and had no real C++ target when i played with it .
Antlr is a platform agnostic parser generator, where you can build a grammar and compile it for multiple target languages. Antlr3 and Antlr4 has a C++ target. It has a large selection of portable pre-made grammars too.
You're right, boost::spirit is the parser, boost::karma is the generator that is coupled to spirit, as an output stage.
ok
Compiler construction tools for c++: https://fbb-git.github.io/bisoncpp/ https://fbb-git.github.io/flexcpp/