Why all the tokens return line number = 1 using getLine()?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   sun_set
Posted On:   Wednesday, February 6, 2002 07:57 AM


When I do this:




parser.toStringList();



all the tokens return 1 when getLine() is called. I tried with some of the examples in Java directory. All of them return 1 too, when the input data file obviously have nice indentations and definitely more than 1 line.



Does anyone have experience in this problem?

Re: Why all the tokens return line number = 1 using getLine()?

Posted By:   Terence_Parr  
Posted On:   Tuesday, February 12, 2002 12:12 AM

You have to call newline() at the appropriate time. Normally this consists of calling newline() from within a lexer rule that matching
.
About | Sitemap | Contact