You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
template<class KeyType, class ValueType>
class UnOrderedMapType : public std::map< KeyType, ValueType, std::less<KeyType>,
AllocatorType<std::pair<const KeyType, ValueType> > >
{
};
template<class KeyType, class ValueType>
class OrderedMapType : public std::map< KeyType, ValueType, std::less<KeyType>,
AllocatorType<std::pair<const KeyType, ValueType> > >
{
};
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).
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: