[antlr-interest] Re: how useful would a generic grammar "action" language be?

parrt2000 parrt at cs.usfca.edu
Mon Oct 27 18:21:59 PST 2003


--- In antlr-interest at yahoogroups.com, Matthew Ford <Matthew.Ford at f...> wrote:
> Hi All,
> I personally only output to one language Java and I would find writing
> method code like
> 
> declare(name="t", type="int")
> assign(lhs="t", rhs="3+4)
> functioncall(name="foo", args="t")
> 
> obtuse.

Totally.  Sorry for the lack of clarity.  I would abstract a generic statement/
expression language from the C derivatives and then call that the language.  I was 
merely showing off my internal form.  So assignment would be

a = b;

etc...  No pointers probably.  I'd call them object-references instead and do away with 
the '*' so they look like smalltalk, java, C#, etc...

Anyway, it would look like legal code for most common languages, but would actually 
be translated specifically to the target by ANTLR. :)
Ter


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 




More information about the antlr-interest mailing list