[antlr-interest] Problem with Special Char

Premkumar Rathanavelu rprememail at yahoo.com
Tue Jul 26 04:13:48 PDT 2005


Hi.,
  Thanks Martin.
After reading your reply i came to know about the charVocabulary
option and now when i added the following lines to my LEXER
 
options{
charVocabulary = '\u0000'..'\uFFFE';
}
its working pretty fine.
 
HATS OFF Martin.
 
I have another question..consider the following rule
 
in PARSER
 
testPragmaRule:
 MacroPragma testLine ;
 
testLine:
(~(EndOfLine)*);
 
in LEXER
 
MacroPragma : "#pragma";
EndOfLine:
 ( options{generateAmbigWarnings = false;}:
   "\r\n"  // WIN
  | '\r'    // Mac
  | '\n'    // Unix
  )  {newline();} 
 ;
 
Line to be Parsed:
#pragma Computer Software – Restricted
 
now i'm getting the error 

unexpected char: 0x2013 (this is the hyphen)
 
Could you please tell me why this happens?
 
Eager to get your reply.
 
Thanks.,
Prem


		
---------------------------------
Yahoo! Mail for Mobile
 Take Yahoo! Mail with you! Check email on your mobile phone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20050726/c46ecac4/attachment.html


More information about the antlr-interest mailing list