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

Debugging lexers (Was: Simple Question)



Hi Tyrone,

Try using the debugging customized lexer in:
http://www.sable.mcgill.ca/listarchives/sablecc-list/msg00134.html

This might reveals that you are not getting the tokens you expected
(e.g. there's probably a bug in your Tokens section).

If this doesn't work, try sending us your grammar and a test file which
exhibits the problem.

Good luck,

Etienne

Tyrone Grandison wrote:
> 
> I am developing a simple language using SableCC. I have generated all the
> Node, Lexer and Parser files from my specification file.
> 
> Upon trying to test it, both from keyboard input and text files, I get a
> "EOF expected." error at the very first line.
> 
> I have made sure that the files are trminated correctly and I know for
> certain that the creation of the Lexer and Parser objects goes smoothly. It
> is when the parse() method is called that the error appears.
> 
> Does anyone know what the problem could be?

-- 
----------------------------------------------------------------------
Etienne M. Gagnon, M.Sc.                     e-mail: egagnon@j-meg.com
Author of SableCC:                             http://www.sablecc.org/
and SableVM:                                   http://www.sablevm.org/