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-boun...@antlr.org [mailto:antlr-interest-boun...@antlr.org] 
Im Auftrag von Raghavendra Anjana (RBEI/EMT2)
Gesendet: Mittwoch, 29. April 2009 06:15
An: antlr-inter...@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

 

 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to il-antlr-interest@googlegroups.com
To unsubscribe from this group, send email to 
il-antlr-interest+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en
-~----------~----~----~----~------~----~------~--~---

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

Reply via email to