Following Boost.Spirit compiler examples I am migrating my Flex/Bison based calculator-like grammar to Spirit based. I want to add a feature #include<another_input.inp>
. I have defined the include_statement grammar successfully. Should I follow the way error handling was doing: on_success(include_statement, annotation_function(...))
, i.e. for each successful matching of include_statement, get the new input file name and call phrase_parse()
again ? or like the Flex/Bison to push/pop the input stack?
Thanks.