[antlr-interest] LT(0)
Terence Parr
parrt at jguru.com
Sat Apr 5 18:56:57 PST 2003
On Saturday, April 5, 2003, at 01:20 PM, Braden McDaniel wrote:
> On Thu, 2003-04-03 at 17:53, Terence Parr wrote:
>> On Thursday, April 3, 2003, at 02:47 PM, mwwickline wrote:
>>
>>> I can't find anything in the documentation that explicitly states
>>> whether you can do "LT(0)" and where it's allowed. I'm getting a
>>> core
>>
>> LT(0) is meaningless, I'm afraid. First symbol of lookahead is LT(1)
>> :)
>
> Hm... I've been using "LT(0)->getLine()" to get the current line
> number.
Is there a getLine() method in the lexer? You could use that :)
Or LT(1).getLine().
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list