[antlr-interest] Check the next token in Hidden Channel
Alexander Gängel
alexander at gaengel.de
Mon Apr 14 00:23:27 PDT 2008
I hace to check in my Parser once if the next Token is a Whitspace.
I tried the code from:
http://www.antlr.org/wiki/pages/viewpage.action?pageId=557063
So is copied it to my Grammar:
@members{
protected int skipOffTokenChannels(int i) {
int n = tokens.size();
while ( i<n && ((Token)tokens.get(i)).getChannel()!=channel ) {
i++;
}
return i;
}
}
But the Code compains that tokens cannot be resolved?
I use 3.1 so I think there is something changed sice 3.0.
Can anybody give me an hint how to do this ?
Alexander
More information about the antlr-interest
mailing list