Closed Krantz-XRF closed 6 years ago
Makes sense to support Bison's C++ code. I'll work on supporting this feature for the next release.
The new feature to support Bison 3.0 C++ %skeleton "lalr1.cc" parsers is now available with reflex 1.0.6. User reflex option --bison-cc and --bison-locations (optional). See also the updated documentation.
Let me know if this is what you wanted. Thanks for starring and for rating our project at SourceForge https://sourceforge.net/projects/re-flex/
Thanks for this update. That's just what I meant. I'll go to try out this new feature.
Wonderful tool! It saved me from struggling in the broken C++ implementation of Flex!
I have just quickly looked through the manual, but I did not find a way to make the scanner compatible with Bison's C++ interface. Since the scanner is in C++, I would prefer the parser to be in C++, too.
The Bison's C++ interface expects the
lex
function to receive ayylval
and alocation
(in the Split Symbols version), or receive only alocation
but return a "Complete Symbol" instead of anint
, so I find it quite difficult to achieve this.Is there any way to make it work with Bison's C++ interface? Perhaps with some command line options, or I have to write some code myself? Can you give me a clue?