[antlr-interest] 3.0 multiple language support
Sebastian Kaliszewski
sk at z.pl
Tue Aug 3 08:08:32 PDT 2004
Tiller, Michael (M.M.) wrote:
>>>The problem of maintaining one grammar with language
>>>dependent actions may be partly due to our inclination
>>>to think of grammars as simple text files. Imagine that
>>>we used a text editor which could maintain multiple
>>>versions of a file. Such things exist for technical
>>>documentation. I remember reading that this was used
>>>for airplane maintenance manuals so that common
>>>features were updated for all airplanes, while
>>>new models could have custom sections. A printout
>>>was customized according to the model selected.
>>
>>Yes, this is what we've considered for an IDE: use revision control
>>not
>>inheritance to change actions. You are essentially forking a new
>>branch. Changes can be pushed forward with diff3 like behavior. :)
>
>
> Is it April 1st already? Geez, I guess it isn't. Well in that case I
> have to assume you are serious so I'd like to cast a vote against using
> version control to handle language-independence. Apart from the fact
> that inheritance and/or macros are a much better solution, consider how
> you would do *real version control* under such circumstances...branches
> on branches?!? Yikes!
>
How about allowing different language versions of the same action in the
same file? Something like:
my_prod
: my_subpod %C{ /* here C action comes */ }
%J{ /* here java action goes */ }
%P{ /* here python action goes */ }
???
Just my 0,03PLN
rgds
--
Sebastian Kaliszewski
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list