[antlr-interest] NoViableAltException.expecting ?
Terence Parr
parrt at cs.usfca.edu
Wed Nov 16 11:21:43 PST 2005
On Nov 16, 2005, at 11:02 AM, Sebastien Boving wrote:
> why can't you generate
>
> antlr.NoViableAltException(self.LT(1).self.getFilename(),
> [LITERAL_show, LITERAL_no, LITERAL_set])
>
> to be raised instead? ANTLR should be able to build this list as
> it just constructed the flow control displayed above the error
> handling, right?
Well, ANTLR can figure out the LL(1) FIRST set of course but it will
not always makes sense:
a : A B
| A C
;
upon A D you'd get "missing A" found A. ;)
I'm just saying it's not obvious what you want and it wasn't
convenient to generate this when I was doing it so I left it out.
Sorry about that...lots of little holes like that. Trivial to add to
new system. Bug me in a few months when I get back to error stuff.
Ter
More information about the antlr-interest
mailing list