[antlr-interest] -trace is broken for C target?

Jim Idle jimi at temporal-wave.com
Mon Mar 28 16:03:41 PDT 2011


I don't really support the trace as using the C debugger is usually lots
better, but I will take a look.

Thanks.

Jim

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Kevin J. Cummings
> Sent: Monday, March 28, 2011 3:01 PM
> To: antlr-interest at antlr.org
> Subject: [antlr-interest] -trace is broken for C target?
>
> I tried to use the -trace command line option to ANTLR 3.2 and found
> that the resulting Lexer.c and Parser.c files don't compile due to
> missing arguments or missing references.  After looking at the C.stg
> template file that produces the tracing lines, I came up with the
> following patch that I think will correct the problem.
>
> This patch should be applied to the:
>
> 	tool/src/main/resources/org/antlr/codegen/templates/C/C.stg
>
> file for ANTLR 3.2.  If this is the wrong place, or the wrong fix for
> this problem, I apologize, but by applying the fixed ANTLR3_PRINTFs
> directly into actions in my grammar, has helped me see some trace
> output and helped me debug my current grammar.
>
> If this has already been fixed in ANTLR 3.3 or ANTLR 3.4, I also
> apologize, but I'm currently running on Fedora 14, and the last pre-
> packaged version of the ANTLR RPMs is 3.2:
>
> antlr3-C-devel-3.2-11.fc14.x86_64
> antlr3-C-docs-3.2-11.fc14.noarch
> antlr3-javascript-3.1-11.fc14.noarch
> antlr3-python-3.1.2-11.fc14.noarch
> antlr3-tool-3.2-11.fc14.noarch
> antlr3-java-3.2-11.fc14.noarch
> antlr3-gunit-3.2-11.fc14.noarch
> antlr3-C-3.2-11.fc14.x86_64
>
> --
> Kevin J. Cummings
> kjchome at verizon.net
> cummings at kjchome.homeip.net
> cummings at kjc386.framingham.ma.us
> Registered Linux User #1232 (http://counter.li.org)


More information about the antlr-interest mailing list