[antlr-interest] Error reporting
Matthias Schnelte
mschnelte at gmx.de
Tue Aug 14 01:44:16 PDT 2007
No ideas? anybody?
I have tried the same grammar with javacc and it reports all the three
possibilities as error message.
Any idea how to implement this in ANTLR?
Matthias
> ----- Ursprüngliche Nachricht -----
> Von: mschnelte at gmx.de
> Gesendet: 13.08.07 13:38 Uhr
> An: antlr-interest at antlr.org
> Betreff: [antlr-interest] Error reporting
>
> Hi everyone,
>
> I have the following grammar:
>
> ===
> sp2: WENN condition DANN;
>
>
> condition : simpleCondition (('und' ^|'oder' ^)
> simpleCondition)*;
>
> simpleCondition : ie iv 'ist';
>
> ie : QUOTE! .+ QUOTE!;
> iv : QUOTE! .+ QUOTE!;
>
>
> If the parser reads the following string: "wenn "bla" "blub" ist" it
> reports as error:
>
> "mismatched input '<EOF>' expecting DANN"
>
> Ok, "DANN" would produce a correct statement but "und" or "oder" can
> follow a simpleCondition as well.
> How can I get the parser to print out all possible inputs on a decision
> point?
> I want to implement a code completion and such thing would of course be
> very useful.
>
> Matthias
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20070814/78eaa244/attachment.html
More information about the antlr-interest
mailing list