[antlr-interest] antlr3, international symbols

Andrew Gaydenko a at gaydenko.com
Fri Oct 5 16:07:08 PDT 2007


Sorry for noise! - please, ignore the question - have found own error.


Andrew

======= On Saturday 06 October 2007, Andrew Gaydenko wrote: =======
> Hi!
> 
> I have such tokens defenitions (fragment):
> 
> ------------------
> fragment FOO
> 	:	'$' KEY ';' { doSomethingWith($KEY.text); }
> 	;
> 	
> fragment KEY
> 	:	 ~( ' ' | '\t' | '\r' | '\n' | '\f' | '$' | ';' )+
> 	;
> ------------------
> 
> 
> When KEY is "normal" word (say, '123.456' or 'a.b.c.d.'), all works fine.
> But when KEY contains international symbols, $KEY.text returns "something
> else" (abracadabra). A project works inside UTF8 enviroment (Linux/Eclipse).
> 
> On the contrary, such RAW token works fine with international symbols:
> 
> ------------------
> BAR
> 	:	(
> 			(BLA)=> BLA
> 		|	RAW  { doSomethingWith($RAW.text); }
> 		)*
> 	;
> 
> fragment RAW 
> 	:	.
> 	;
> ------------------
> 
> Have I missed something?
> 
> 
> Andrew
> 




More information about the antlr-interest mailing list