[antlr-interest] Token position 0, -1

Ale Strooisma alestrooisma at gmx.net
Fri Jul 6 04:09:36 PDT 2012


Correction: you are absolutely right.
I thought you were referring to UP and DOWN etcetera, but now I see the 
problem, thanks!

Ale

On 07/06/2012 12:58 PM, Bart Kiers wrote:
> On Fri, Jul 6, 2012 at 11:47 AM, Ale Strooisma <alestrooisma at gmx.net 
> <mailto:alestrooisma at gmx.net>> wrote:
>
>     Hello,
>
>     if I try to get the position of a token in the file with getLine and
>     getCharPositionInLine, many of my tokens give the coördinates 0, -1,
>     which obviously is wrong. Why is this the case, and how can I fix it?
>
>
> Hi Ale,
>
> Are the tokens that return -1 imaginary tokens? These (imaginary) 
> tokens don't have a real position in the input after all.
>
> Regards,
>
> Bart.



More information about the antlr-interest mailing list