[antlr-interest] lexical set calculation

孙纪刚 Jigang (Robert) Sun sunjigang1965 at yahoo.com.cn
Thu Sep 28 11:15:58 PDT 2006


I want a char set defined by v3 grammar:

MyChar: MyChar:'a'..'m'|'o'..'q'|'s'..'z';  //'a'..'z' except 'n' and 'r'

How can I describe it with an equivelant grammar like
 
MyChar:LowerCaseChar ~ SpecialChar; //'a'..'z' except 'n' and 'r'
fragment LowerCaseChar:'a'..'z';
fragment SpecialChar:'n'|'r';

Cheers.

Jigang



	

	
		
___________________________________________________________ 
Mp3疯狂搜-新歌热歌高速下
http://music.yahoo.com.cn/?source=mail_mailbox_footer


More information about the antlr-interest mailing list