[antlr-interest] Java API for checking ambiguity in grammars using ANLTR

sathya moorthy brsmoorthy at gmail.com
Mon Jun 11 20:13:40 PDT 2012


I want to know whether the grammar is ambiguous by calling some ANTLR API
but I want to know is there such API?
The purpose is not to generate files from the grammar if it is ambiguous.

Antlr generates files even if it is ambiguous(in some cases)

On Mon, Jun 11, 2012 at 2:53 PM, Loring Craymer <lgcraymer at yahoo.com> wrote:

> You want code generated even if the grammar is reported to be ambiguous.
>  ANTLR tells you how it handles ambiguity (some alternatives are disabled);
> if this is not what you want, fix your grammar.
>
> --Loring
>
>
>   ------------------------------
> *From:* sathya moorthy <brsmoorthy at gmail.com>
> *To:* antlr-interest at antlr.org
> *Sent:* Monday, June 11, 2012 1:54 AM
> *Subject:* Re: [antlr-interest] Java API for checking ambiguity in
> grammars using ANLTR
>
> Guys any help would be great
> thanks
> Sathya
>
> On Sat, Jun 9, 2012 at 1:40 PM, sathya moorthy <brsmoorthy at gmail.com>
> wrote:
>
> > Hi,
> >
> > When i use ANTLR IDE, it suggests that the grammar is ambiguous but still
> > i am able to generate code using that grammar.
> > Is there a specific API in ANTLR which will tell whether the grammar is
> > ambiguous?
> > If the grammar is ambiguous i dont want to generate the code for that
> > specific file.
> >
> > Regards,
> > Sathya
> >
> >
>
> 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