[antlr-interest] Re: is this a bug?
Xue Yong Zhi
seclib at seclib.com
Wed Mar 1 08:03:41 PST 2006
What's your charVocabulary option?
Please do not include FFFF(EOF for antlr) in charVocabulary.
You can use something like this:
class MCPPLexer extends Lexer;
options
{
exportVocab=MCPP;
k = 3;
charVocabulary='\u0003'..'\uFFFE';
}
>
> generate an incorrect MCPPLexer.cpp, here is the nextToken() (function), you can see clearly that this function does not deal with EOF, so it can never stop.
>
--
Xue Yong Zhi
http://seclib.blogspot.com
More information about the antlr-interest
mailing list