Sorry, i made a mistake in explaining the problem here. I will try to re-word it a) pANTLR3_UINT8 is a pointer to unsigned char. b) But say i get a const char* to be parsed, but when i try the antlr3NewAsciiStringInPlaceStream, it only accepts pANTLR3_UINT8, so we have to do a cast here. In c++, this requires a const_cast + reinterpret_cast.
If we can take care const correctness in probably the next version, then such unnecessary casts can be avoided. Thanks, Gokul. On Thu, Jul 29, 2010 at 3:25 PM, Gokulakannan Somasundaram < [email protected]> wrote: > Hi, > A small suggestion for improvement on ANTLR C Runtime would be to, make > sure the const correctness is present in the code. While this is not very > important, it helps a lot while getting integrated into a already > standardized code. I found it difficult especially in the places where it > takes the query for processing. It can be pANTLR3_UINT8 const, instead > of pANTLR3_UINT8. > > Thanks, > Gokul. > 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.
