[antlr-interest] issue with 3.1 C-target

Corno Schraverus antlr-interest at schraverus.com
Sat Aug 30 16:50:47 PDT 2008


Hi All,

I've just migrated to the latest version of ANTLR (3.1) and I am using the C
-target.
The transition was smooth except for 1 minor issue;
I create tokens with custom code and if I set the text (setText) to an empty
string, something goes wrong. I get garbage back when I use getText.
I've looked around a bit and commenting out line 450 of antlr3string.c seems
to fix the issue;
	if	(size <= 0)
	{
		//return	string;
	}
I don't know if that would break anything else.


greetings,

Corno





More information about the antlr-interest mailing list