ANTLR3 C++ Target HPUX error
- Dominant language
- Java
- Stars
- 253
- Forks
- 178
- PR merge metrics
- No merged PRs in 30d
Description
If you try to build the C++ Target in HPUX, somehow the pair 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 UnOrderedMapType : public std::map< KeyType, ValueType, std::less,
AllocatorType > >
{
};
template
class OrderedMapType : public std::map< KeyType, ValueType, std::less,
AllocatorType > >
{
};
```
Here's a bit more thorough discussion:
https://groups.google.com/forum/#!topic/antlr-discussion/3OU9s4mfXgk
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with antlr3memory.h and the C++ target build on HP-UX. Review the linked ANTLR discussion and inspect how UnOrderedMapType, OrderedMapType, and their iterators instantiate std::map and AllocatorType. Done means the C++ target builds on HP-UX and dereferencing TokensType iterators works without the const-qualification error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100