[antlr-interest] Errors in code generated by the ANTLR C target
Wincent Colaiuta
win at wincent.com
Mon Jun 4 14:09:00 PDT 2007
El 4/6/2007, a las 22:45, troy runkel escribió:
> Greetings,
>
> I'm using version (ANTLR Parser Generator Version 3.0 (May 17, 2007)
> 1989-2007) of ANTLR and the grammar I'm working on has the following
> options set.
>
> language = C;
> output = AST;
> backtrack = true;
> memoize = true;
>
> I'm seeing a number of errors in the generated C code when I try to
> compile in using Visual Studio 2005.
>
> 1) The REWINDLAST macro expands to
> INPUT->istream->REWINDLAST(INPUT->istream), but REWINDLAST doesn't
> exist in ANTLR3_INT_STREAM_struct. I'm assuming it's supposed to
> expand to INPUT->istream->rewindLast(INPUT->istream).
I saw the same error when I added backtrack = true and memoize = true
to my grammar, just for testing purposes.
WikiTextParser.c:778: error: ‘struct ANTLR3_INT_STREAM_struct’ has no
member named ‘REWINDLAST’
That's with:
i686-apple-darwin8-gcc-4.0.1 (GCC) 4.0.1 (Apple Computer, Inc. build
5367)
Darwin cuzco.local 8.9.1 Darwin Kernel Version 8.9.1: Thu Feb 22
20:55:00 PST 2007; root:xnu-792.18.15~1/RELEASE_I386 i386 i386
Cheers,
Wincent
More information about the antlr-interest
mailing list