Hi César,
SableCC 3's lexer returns all matched tokens, regardless of their
"ignore" status. It's the parser that discards ignored tokens in its
Parser.parse() loop. So, you're problem is unlikely due to ignored tokens.
Effectively, I downloaded your code and commented the " Token t =
l.next(); while ... " debug part. I get the following syntax error:
[1,1] expecting: 'class'
Looking at your grammar, it looks like your grammar only accepts
protected/private at the start of a "class_decl".
Have fun!
Etienne
On 2011-09-01 12:00, César wrote:
Indeed I changed the code to use getText() and no space is appended at
the end of the token. But,
I still get tokens that are " " (space) and even new lines, this
shouldn't be ignored -- because is match a blank clause and that is
added in Ignored Tokens?
[...]
--
Etienne M. Gagnon, Ph.D.
SableCC: http://sablecc.org
_______________________________________________
SableCC-Discussion mailing list
[email protected]
http://lists.sablecc.org/listinfo/sablecc-discussion