[antlr-interest] C++ Target updates

Gokulakannan Somasundaram gokul007 at gmail.com
Tue Feb 21 03:04:01 PST 2012


Hi,
   I have uploaded the latest version of C++ Target with some enhancements
and bug-fixes into the wiki
http://www.antlr.org/wiki/pages/viewpage.action?pageId=29130826

a) The C++ Target now has a TokenStream which significantly reduces the
memory usage of the parsing operation, as it tries to delete the tokens
after the tokens are condensed into a rule. Right now the start and stop
tokens are not deleted, as they are part of the rule attributes.
b) The Traits definition and overriding has been made more user-friendly.
Previously in order to override a particular trait, we need to copy the
entire Traits file and override those types which are required. Now we can
just inherit from the CustomTraitsBase and override only the required.
There is also a @Traits section available, which can be used for
convenience purposes. Both are shown in the examples.
c) There was a bug fix in the Exception handling, which was reported by Oliver
Kowalke
d) Also the rule return variables now have a copy constructor and operator=
overload, that should help people define c++ objects as return values.


-- a request has been made to have an input stream that uses std::iostream
as input. I will implement this in the next pacakge.

Please let me know, if you face any issues/bugs.

Thanks,
Gokul.


More information about the antlr-interest mailing list