C++ parser generator

Salvatore picture Salvatore · Mar 21, 2013 · Viewed 11k times · Source

I'm writing my own scripting language and I need a software tool which generates C++ code for parsing my language. I need a lexical analyzer and a parser generator which generates C++ code. It would be nice for me to be able also to generate a Visual C++ 2010 project. Suggestions?

Answer

fen picture fen · Mar 21, 2013

http://en.wikipedia.org/wiki/Comparison_of_parser_generators

for C/C++: http://epaperpress.com/lexandyacc/

Or look at: Boost.Spirit:

"Spirit is a set of C++ libraries for parsing and output generation implemented as Domain Specific Embedded Languages (DSEL) using Expression templates and Template Meta-Programming."

Dou you really need new language? maybe it would be better to use some well known like Lua, Python?