[antlr-interest] Question on the protected keyword in lexer

Bryan Ewbank ewbank at gmail.com
Mon Jul 4 11:40:37 PDT 2005


INT and FLOAT are "protected", meaning that they are not considered in 
determining what may be returned from the lexer. That's all it means.
 Said another way, if I see the token "0' following by ".", the lexer cannot 
know if it is supposed to use rule INT, or rule FLOAT_OR_INT. Making INT 
protected means that it is not visible outside the lexer, and therefore it's 
not considered when determining ambiguity.
 Hope this helps,
- Bryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050704/ddf3fc00/attachment.html


More information about the antlr-interest mailing list