[antlr-interest] 2.7.2, unicode, and VC++
Albert Huh
albert.huh at embarcadero.com
Tue Oct 21 08:08:51 PDT 2003
Ooops,
Sorry everybody. I guess I didn't dig deep enough into the archives. Found the relevant posts =)
Anyways, I suppose a BETTER question is:
Is there a patch available for 2.7.2 to support VC++ 6.0 and unicode? If so, does anybody have experience using this patch in a production environment?
Thanks,
Albert
-----Original Message-----
From: Albert Huh
Sent: Tuesday, October 21, 2003 11:04 AM
To: Antlr (E-mail)
Subject: [antlr-interest] 2.7.2, unicode, and VC++
Hi,
I'm trying to get the unicode example supplied with antlr 2.7.2 to work in visual c++ 6.0.
If I compile the grammar, then try to compile the generated code, I get the following errors:
C:\antlr-2.7.2\examples\cpp\unicode\unicode\L.cpp(172) : warning C4129: 'u' : unrecognized character escape sequence
C:\antlr-2.7.2\examples\cpp\unicode\unicode\L.cpp(172) : error C2015: too many characters in constant
C:\antlr-2.7.2\examples\cpp\unicode\unicode\L.cpp(173) : warning C4129: 'u' : unrecognized character escape sequence
C:\antlr-2.7.2\examples\cpp\unicode\unicode\L.cpp(173) : error C2015: too many characters in constant
FYI, the generated code is:
if (((LA(1) >= static_cast<unsigned short>('\200') && LA(1) <= static_cast<unsigned char>('\ufffe')))) {
matchRange(static_cast<unsigned char>('\200'),static_cast<unsigned char>('\ufffe'));
}
Has anybody managed to get the unicode example to work in VC++ 6.0?
Anyhow, I've read in the archives that unicode is accepted, although not fully supported (i.e. feeding in UTF-8 text should be okay). At the same time, antlr in C++ mode doesn't support unicode of the of box? Sorry, I'm confused by these two ideas.
Thanks,
Albert
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list