[antlr-interest] Fragments and setText appear to not work at all - not even with code from the book

Harald Mueller harald_m_mueller at gmx.de
Wed Nov 21 13:52:54 PST 2007


> I think the underlying source of your angst is the fact that setText() 
> works against a non-scoped (effectively: global) object. 

It's not so much "angst" or something like that - it's the fact that ANTLR 2 has a well-defined and fully working feature for doing this; and that ANTLR 3 promises (even if only through an example in "the book") the same (and, implicitly, even more); and that I have non-trivial grammars using the ANTLR 2 feature - so I expect ANTLR 3 to provide the same.

Terrence should simply make this work (and for those you fear performance penalities: Simply declaring a local name for the fragment token will create a new object anyway - having the changed text assembled in it does not cost anything [if done through a suitable lazy-write obejct]).

I'm waiting for a design+bug fix on this ...

Regards & thx for the support
Harald

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger


More information about the antlr-interest mailing list