[antlr-interest] C++ Parsers - charVocabulary option

therealtootalltimmy therealtootalltimmy at yahoo.com
Mon Jan 7 13:11:37 PST 2002


I have a simple grammar that just handles comments.

When I generate a Java parser and feed it a comment with a copyright symbol in it, it works (does not complain about unexpected tokens).

When I generate a C++ parser and feed it a comment with a copyright symbol in it, it complains about an unexpected token.

In my Lexer options, I have set charVocabulary to:
charVocabulary='\u0003'..'\uFFFF';

My testLiterals Lexer option is unspecified (the default).  I have also tried True and False for the testLiterals option.

I have also tried: 
charVocabulary='\003'..'\377';


I'm sure that copyright symbols are not the only characters I will have problems with.

How can I make the copyright symbol acceptable to ANTLR generated parsers?

Thanks!

Tim


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list