[antlr-interest] ST 4.0 planning

Terence Parr parrt at cs.usfca.edu
Mon Sep 8 11:52:26 PDT 2008


Actually,I pass in lots of aggregate objects like User and FAQEntry  
and Grammar. We need field access I'm afraid.

Ter
On Sep 8, 2008, at 11:45 AM, Loring Craymer wrote:

> Ter--
>
> I think that the reflection requirement is unnecessary and  
> undesireable.  An attribute is usually one of:  1.) a String, 2.) a  
> StringTemplate, or 3.) Boolean, and you could probably avoid  
> Booleans as well with a bit of judicious design (single-valued  
> "true" or "false" strings, for example).  On rare occasion, it may  
> make sense to support an esoteric data type, but that can be handled  
> via wrapper:  the wrapper, after all, only needs to know how to do  
> "toString()", and it is trivial to implement subclass wrappers for  
> each esoteric type.  For that matter, you could support a generic  
> Java wrapper that used reflection, but subclass a base wrapper class  
> in languages that do not support reflection.



More information about the antlr-interest mailing list