[antlr-interest] outputting whole source line on error

Micha micha-1 at fantasymail.de
Fri Nov 28 17:18:51 PST 2008


On Saturday 29 November 2008 00:53:09 Randall R Schulz wrote:
> On Friday 28 November 2008 04:30, micha wrote:
>
> So the answer is basically "no."
>
> However, the TokenStream interface can reconstruct the text of one or a
> sub-sequence of the tokens it has produced (based on ordinal indexes or
> particular Token instances produced by that TokenStream). You may be
> able to find a way to use that to reconstruct an input line or, more
> probably, a fragment of the input corresponding to some syntactically
> significant entity.
>

o.k., thanks. Maybe I just buffer the lines myself, not elegant but simple and 
fast (for a few thousend lines) 

 Michael



More information about the antlr-interest mailing list