[antlr-interest] (unknown)

Matthew Ford Matthew.Ford at forward.com.au
Tue Jun 10 05:15:19 PDT 2003


Have a look at the linkChecker example in the 2.7.2 distribution.
It has a catch all rule using filter.
matthew
----- Original Message -----
From: "franck_antibes_fr" <caronfranck at yahoo.fr>
To: <antlr-interest at yahoogroups.com>
Sent: Tuesday, June 10, 2003 6:52 PM
Subject: [antlr-interest] (unknown)


> Hi all.
>
>
>
>
> I have a problem with the lexer :
>
>
>
>
> I have several lexer rules to detect some tokens. that's OK
>
>
> but I want to create a rules for any token that do not match
>
>
> the previous rules. In PCCTS there was a "precedence" in lexer rules
>
>
> so that I could have a rule (.)  at the end of all the rule and
>
>
> if none of the previous one matched this one will.
>
>
> I tryed to use the filter=OTHERTOKEN option (OTHERTOKEN is a private
> rule) in the antlr parser but this prevent the lexer to throw
> exception if the char do not match any rules and match OTHERTOKEN but
> do not create token in the token stream
>
>
>
>
>
>
> Is there a way to handle this without writing an long complex rule for
> OTHERTOKEN?
>
>
>
>
>
>
> TIA,
>
>
> Franck
>
>
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list