[antlr-interest] Regarding handling of special characters

Simon, Peter sp at metrohm.com
Tue Apr 28 22:18:21 PDT 2009


Hi,

you can specify the special characters in your lexer rules as Unicode.

For example: '\u00dc' for 'Ü'

It's also possible to define ranges like: '\u00a0'..'\u00ff'

 

http://jrgraphix.net/research/unicode_blocks.php?block=1

 

Greetings

Peter

 

 

Von: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] Im Auftrag von Raghavendra Anjana (RBEI/EMT2)
Gesendet: Mittwoch, 29. April 2009 06:15
An: antlr-interest at antlr.org
Betreff: [antlr-interest] Regarding handling of special characters

 

Hello,

 

I am new to antlr.  I have a peculiar problem working with special characters in my grammar.

 

I have some special characters to be parsed by my grammar. 

 

I am getting an error like "line 18685:2 no viable alternative at character 'Ü'". Which I assume is because my parser is unable to identify the special character.  I came to know that I have to specify charVocabulary in my options block of the grammar. But that didn't work.

 

 

Can you please help me with this.. I am using Antlr v3 -- Java.

 

Thanks and Regards

Raghavendra

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20090429/b71c312b/attachment.html 


More information about the antlr-interest mailing list