[antlr-interest] How to set a Token within the Filterrule (wa s 'Understanding $setType; how to use')

mzukowski at bco.com mzukowski at bco.com
Tue Dec 18 08:50:39 PST 2001


A filter will filter tokens out of the stream going to the parser, so that's
not what you want.

Rename your filter rule to TAG, make it unprotected, set the
testLiterals=true option, and remove the OTITLE rule and instead make
<title> a literal.

Monty

> -----Original Message-----
> From: Andre Moll [mailto:amoll-mailer at libp.com]
> Sent: Tuesday, December 18, 2001 1:46 AM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] How to set a Token within the 
> Filterrule (was
> 'Understanding $setType; how to use')
> 
> 
> Meanwhile I understood that it is not that I misunderstood 
> the usage of
> $setType, but I wasn't aware that the Filter Rule doesn't 
> return a Token
> (which is obviosly clear).
> 
> How can I force the FILTER rule to set a Token which is 
> recognized by the
> Parser.
> 
> What I want to do is just set a general GEN_OTAG/GEN_CTAG for 
> every TAG
> which is not particular specified in any previous lexical 
> rule. Is there
> maybe another way (without using filtermechanism) to realise this?
> 
> I would be very grateful if somebody could send me an example 
> how to make
> this.
> 
> Thx Andre
> 
> 
>  
> 
> 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