[antlr-interest] line 0:0: expecting

Ric Klaren ric.klaren at gmail.com
Fri Mar 31 05:53:28 PST 2006


On 3/31/06, karl wettin <kalle at snigel.net> wrote:
> 30 mar 2006 kl. 01.14 skrev karl wettin:
> > Ok, I think the grammar is working now. No nondeterminism or anything.
> >
> > Running main in the parser below now produce this:
> >
> >> season 1 jo men visst
> >> line 0:0: expecting EN_NATURAL_SEASON, found ''
> >>
> >> s1e1
> >> line 0:0: expecting EN_NATURAL_SEASON, found ''
> >
> > Have I misunderstood how to combine a parser and a lexer? Too me
> > that error sounds like there is no input.
>
> Nobody? I'm really stuck here. Can't find any references to this on
> the net, and I can't figure out the Antlr code that throws the
> exception. :(

(sorry haven't had time to look at previous posts/grammars)

Try generating the parser with -traceParser and rebuild then see if
the trace output gives you some insight. You can also enable tracing
for the other parts of the antlr generated code see the documentation
on the options (or antlr --help)

Cheers,

Ric


More information about the antlr-interest mailing list