-
Notifications
You must be signed in to change notification settings - Fork 170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ANTLR3 C++ Target HPUX error #182
Comments
I'm seeing a related issue in even the very simple demo grammar distributed with the Cpp runtime, when building on OSX with a modern clang.
This was using ANTLR 3.5.2, which while purportedly non supported by the Cpp target is distributed with it, and I can't seem to track down an earlier release to test with. I may have to abandon ANTLR entirely given the very sorry state of C/C++ support (I just backported my grammar from v4 since the claim was that v3 had just fine support). |
Try it with this branch: https://github.com/ibre5041/antlr3 (the tool and runtime). I think I fixed it several months ago. |
If you try to build the C++ Target in HPUX, somehow the pair <ANTLR_MARKER, TokenType> in the TokensType::iterator has a different value than the reference... the ANTLR_MARKER becomes const-qualified, and therefore you can't dereference the pair, breaking any instances with TokensType::iterators being dereferenced.
I don't know why this is happening, but I was able to get it to build by const qualifying the UnOrderedMapType and OrderedMapType in antlr3memory.h:
Here's a bit more thorough discussion:
https://groups.google.com/forum/#!topic/antlr-discussion/3OU9s4mfXgk
The text was updated successfully, but these errors were encountered: