Hi

I'm a bit puzzled with ANTLR API for ANTLR3_STRING... I need few
operations on strings and I could do it either by converting
ANTLR3_STRING into std::string (or std::wstring) or do it directly.
Well, I can't figure out either. So, let's say I want to create a copy
of some already existing ANTLR3_STRING. Is this the proper way of
doing it, so it doesn't leak memory:

pANTLR3_STRING_FACTORY sFact = antlr3StringFactoryNew();
pANTLR3_STRING str = sFact->newRaw(sFact);
// ... do some work with str
sFact->close();

The more important thing I'm puzzled about is hoe to make whole string
lowercase... I see that I can iterate over it, but what to do with
each ANTLR3_UCHAR? How do I make it lowercase?

Well, I was thinking of using suplied toUTF8 function, then converting
resulting UTF8 string to some string class that has more complete
implementation and then use this class to lowercase the string and
work with it... This seems like overkill, so is there a better way?

Oh, yes, I haven't mentioned it, I'm using anlr3c from C++ program...

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

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

Reply via email to