[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Wrong line number

I built a parser with SableCC and noticed that the default error handling
messages give wrong line number of source file, where error occured.
For example 

com.intel.itp.mof.lexer.LexerException: [5523,36] Unknown token: 0)
        at com.intel.itp.mof.lexer.Lexer.getToken(Lexer.java, Compiled Code)
        at com.intel.itp.mof.lexer.Lexer.peek(Lexer.java, Compiled Code)
        at com.intel.itp.mof.parser.Parser.parse(Parser.java, Compiled Code)
        at com.intel.itp.mof.parserTest.main(parserTest.java:21)

While error is in line 3100.

Why ?

Paweł Szymański - mailto:Pawel.Szymanski@intel.com
Software Engineer
Intel Corp. - http://www.intel.com
Intel Technology Poland Sp. z o.o.
ul. Slowackiego 173; 80-298 Gdansk; Poland
Tel. (PL) +48 58 34-81-601; Fax: +48 58 34-81-501;