[stringtemplate-interest] RE: [antlr-interest] Antlr 3beta2 and
StringTemplate
Kay Roepke
kroepke at classdump.org
Tue Aug 8 06:51:10 PDT 2006
Moin Scott!
On 8. Aug 2006, at 15:36 Uhr, Scott Amort wrote:
> I'm quite keen on a C++ version, and have been hacking away at it
> for the past week or so. I haven't reached any of the really hairy
> bits yet, but I think it is definitely possible. However, like
> Michael suggested, the major headaches will come with cross-
> platform and cross-compiler support.
Yes, those are always the biggies. The code problem will probably
come when you reach the parts of setting the actual attributes and
try to figure
out how to support multi-valued attributes. The Java version tries to
convert anything to an iterable structure so that later parts do not
need to know anything about the actual datastructures passed in. I
don't think it is impossible, but could be tricky. Maybe this is just a
limitation C++ users would have to live with, but probably they will
not be surprised to have to pass in STL containers only (or whatever
you choose to support) since they are used to the strict typing in
their language.
> Regarding a C++/Obj-C hybrid, although I'm all for saving doing the
> same work twice, I would suggest that in the long run it is likely
> easiest (and more maintainable) to focus on a single language
> choice (i.e., make a C++ port *and* make an Obj-C port).
Yes, again ;) I will definitely have the Obj-C port standalone,
because I do not gain anything by using C++ under the hood. Quite the
contrary.
I avoid Obj-C++ whenever possible since it tends to clutter the code
and sometimes has some sharp edges which can be surprising. Though
I'm told
it has gotten much better these days.
Of course there will be a couple of plain C places in the code, maybe
we can discuss possible common code and try to share it, maybe not.
I don't mind doing the port by myself, but sharing is always
nice...esp. if it speeds up development, we'll see.
After I finish the AST support for ANTLR-ObjC I will take a look at
the ST port, what needs to be done, what parts are the most important
etc.
I have some of the ST grammars in v3 already (one ANTLR bug is
currently being investigated by Ter), so I will try to base it on v3
completely.
That of course is also a limiting factor on the timeframe I'm doing
the port in.
Regards,
-k
--
Kay Röpke <kroepke at classdump.org>
classdump Software
More information about the antlr-interest
mailing list