[antlr-interest] C++ Target - Second Version - (works with all the examples in Windows and Linux)

Terence Parr parrt at cs.usfca.edu
Wed Feb 15 12:53:49 PST 2012

sure. maybe put into wiki. just make an account.
On Feb 14, 2012, at 10:58 PM, Gokulakannan Somasundaram wrote:

> I tried sending this mail yesterday, but it has been stopped, as it has
> crossed allowed mail size limit.  So i am sending the files without the
> antlr-3.4.jar
> Thanks,
> Gokul
> ---------- Forwarded message ----------
> From: Gokulakannan Somasundaram <gokul007 at gmail.com>
> Date: Wed, Feb 15, 2012 at 4:56 AM
> Subject: C++ Target - Second Version - (works with all the examples in
> Windows and Linux)
> To: antlr-interest at antlr.org
> Hi,
>   I am attaching the updated C++ Target files. I have checked with all the
> examples except the first one "C". I am attaching the files for two -
> dynamic_scope and composite_java. Of Course it won't work with TreeParsers.
> I have tested it on a 64 bit system on Windows and Linux. (Visual Studio
> 2010 and g++ 4.4.6).
>   I have also attached the antlr-3.4.jar built with the modified Cpp.stg
> and CppTarget.java. You can use it for testing. As previously said you need
> to define a Traits file. There is a second restriction that has added. In
> the generated Parser, the lexer has to get included. So in all the
> grammars, you have to write
> @parser::include { #include <lexer.h> }
> I cannot get away with it, because of the filtering mode option, which
> becomes a compile time parameter. But its available only for the Lexer. So
> i define it as a trait in the Lexer and in order for Parser to invoke
> nextToken method, it has to access that Trait.
> The C++ Target also supports island grammars. Anyone can find it how it has
> been done by looking at Traits.hpp. Feel free to contact me to ask for any
> other examples / help.  Looking forward for the feedback.
> Terence,
>      Can you please let me know, whether its possible to put it out in the
> website as a C++ Target? Please let me know, the stuffs i have to complete
> in order to be there. I know i have to write some readme.txt docs.
> Thanks,
> Gokul.
> <Cpp.7z>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address

More information about the antlr-interest mailing list