[antlr-interest] Supergrammar error.
Bharath Sundararaman
bharath at starthis.com
Tue Jul 20 14:05:05 PDT 2004
Hi all,
I'm trying to extend my tree walking grammar to create a symbol table but
I'm getting a "grammar not found" error. The tree walking grammar works just
fine, though. I read from ANTLR doc that supergrammars of a grammar "P" are
either
1) Grammars in the same file as P (If I add my symbol table grammar to the
end of tree walking grammar, I get a "panic" error saying two grammars can't
exist in the same file).
Or 2) Any grammar listed with the -glib option. I have an ANT TASK with an
ANTLR TARGET. There is an option of choosing glib = "yes" when compiling the
grammar too. I compiled my tree walker grammar using glib = "yes" option but
my symbol table still cannot extend the tree walking grammar.
Any ideas?
Thanks!
Bharath.
-----Original Message-----
From: Monty Zukowski [mailto:monty at codetransform.com]
Sent: Monday, July 19, 2004 11:18 AM
To: antlr-interest at yahoogroups.com
Cc: Monty Zukowski
Subject: Re: [antlr-interest] bug: invalid "Syntactic predicate superfluous"
warning
This is a known bug.
Thanks,
Monty
On Jul 16, 2004, at 3:18 PM, thrutchy wrote:
> I used a syntactic predicate in a loop to solve an ambiguity:
>
> ( (a) => a )*
>
> but, it still gave the ambiguity warning plus a new one:
>
> warning:nondeterminism upon
> ...
> between alt 1 and exit branch of block
> warning:Syntactic predicate superfluous for single alternative
>
> The syntactic predicate did solve my problem and thus wasn't
> superfluous. Effectively there are always effectively at least two
> alternatives in a loop because of the exit condition.
>
> ( (a) => a )+ also exhibits the same problem. ( (a) => a )? gives no
> warning.
>
> Eric
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit --
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html
Yahoo! Groups Links
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list