[antlr-interest] Re: bug: invalid "Syntactic predicate superfluous" warning
thrutchy
eric_mahurin at yahoo.com
Mon Jul 19 14:58:39 PDT 2004
For those that are overwelmed with these invalid warnings, here is a
little filtering script:
#!/usr/bin/perl
use IPC::Open3;
open3( "<&STDIN", ">&STDOUT", \*ERR , 'antlr', @ARGV );
$/=undef;
$_=<ERR>;
s/
^(.*) \Qwarning:nondeterminism upon\E\n
(\1 .* \n)*
\1 \Qwarning:Syntactic predicate superfluous for single alternative\E\n
//gmx;
print(STDERR "$_");
--- In antlr-interest at yahoogroups.com, Monty Zukowski <monty at c...> wrote:
> 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
<*> 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