What is the best way to handle multiple Flex / Bison parsers within a project?
I wrote a parser, and now I need a second one in the same project. So far, in the third section of parser1.y I have inserted the main(..) method and called yyparse from there.
What I want to get consists of two different parsers ( parser1.y and parser2.y ) and can use them from an external function (let's say main in main.cpp ).
What precautions should I use to export yyparse functions outside of .y files and how should I handle two parsers?
PS. I use g ++ for compilation, but not for C ++ versions of Flex and Bison, and I would like to save them that way (avoiding encapsulation of the parser inside the object).
lex bison yacc parser-generator
Jack
source share