[antlr-interest] antlr-interest Digest, Vol 27, Issue 49

Terence Parr parrt at cs.usfca.edu
Mon Feb 26 17:58:54 PST 2007


On Feb 26, 2007, at 3:48 PM, Martin d'Anjou wrote:

>> Why do you wish to have filter lexer though? Why not just have a  
>> catch
>> all rule at the end that matches anything and just assigns the  
>> channel
>> to hidden? It seems you might be using filters for something that
>> doesn't want to be done with a filter ;-)
>
> I don't understand why the lexer does not try the longest match  
> before declaring the token type when filter=true.

Hi, [I'm back from my trip but still behind]

filter mode by definition does things in order specified.  The order  
is the precedence.  It uses backtracking when needed.

Ter


More information about the antlr-interest mailing list