[antlr-interest] Error reporting
mschnelte at gmx.de
mschnelte at gmx.de
Mon Aug 13 05:38:06 PDT 2007
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/20070813/e22d2470/attachment-0001.html
More information about the antlr-interest
mailing list