[antlr-interest] Using unicode characters in .g files
Ric Klaren
ric.klaren at gmail.com
Mon Jul 4 10:45:04 PDT 2005
Hi,
xiaogao at mails.tsinghua.edu.cn wrote:
> Hello, everyone!
> I am a newcomer to the mailing list. I have a problem. How can I use unicode
> characters in .g files so that I can comment it using my native language?
You should be able to change antlr/antlr.g in the distribution find the
part reading:
class ANTLRLexer extends Lexer;
options {
k=2;
exportVocab=ANTLR;
testLiterals=false;
interactive=true;
charVocabulary='\003'..'\377';
}
and change the charVocabulary option to:
charVocabulary='\u0000'..'\uFFFE';
Then build antlr according to the instructions.
Cheers,
Ric
More information about the antlr-interest
mailing list