[antlr-interest] How to get difference set between two sets?
Terence Parr
parrt at jguru.com
Fri Apr 12 10:23:54 PDT 2002
On Friday, April 12, 2002, at 09:17 AM, yhhf_dy wrote:
> Hi,
>
> There are two set described as following rules :
>
> IDENTIFIER:('a'..'z'|'A'..'Z'|'_') ('a'..'z'|'A'..'Z'|'_'|'0'..'9')*
> keyword : "class" | "public" | "private" | etc.
>
> I want to get difference between IDENTIFIER set and keyword set, that
> is difference set = IDENTIFIER set - keyword set
>
> Would you please help me how to implement this in ANTLR.
That set is infinite. No way to delineate on a finite computer.
Are you asking how to get ANTLR to return IDENTIFIER and CLASS, PUBLIC
etc...? That's just a literals issue. See the doc or FAQ.
Regards,
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list