[antlr-interest] antlr 3 stuff

Monty Zukowski monty at codetransform.com
Sun Apr 11 19:58:11 PDT 2004


Actually there are two completely separate reasons.  On the antlr side 
it could help with code generation or with specialized uses of antlr 
that couldn't be handled by code generation.  It's hard to explain what 
those might be and I haven't come up with an example, but it's a 
solution that I will consider if we run into something nasty that can't 
easily be handled by a specialized code generator.  This is, however, a 
big deal for antlr and I'm not sure I'll be able to convince Terence 
and Loring that it is the appropriate thing to do.  It may be an 
experimental branch I'll have to make myself.

But the main thing I would like to see is this support for antlr 
grammars.  For instance, people could download my C grammar and extend 
it syntactically with safe pointers or whatever domain specific 
extensions they would like to add.  And because they are extending the 
grammar, antlr will enforce certain rules differently so the programmer 
doesn't make a huge blunder because they are unfamiliar with 
disambiguation.

However we do it I think the important idea is that building a grammar 
and extending a grammar are two different modes of development which 
antlr could handle in different ways to make each mode of development 
easier.  And if we go with the metamorphic syntactical macro idea then 
we would be a natural choice for developers making domain specific 
languages.

Monty

On Apr 11, 2004, at 4:22 PM, matthew ford wrote:

> Hi Monty,
> I started reading this paper today.  I got lost in the syntax.
> It looks powerful, perhaps too powerful for the average user (me).
>
> I could think of two uses for this in Antlr 3
> i) use this type of macro expansions to support multiple output 
> languages.
> It should make it easier for the power user to add support for another
> language
> by replacing the macro files without touching the Antlr parser
> ii) use the pretty printer idea to improve the error reporting in 
> Antlr and
> to tie the final code to the input grammar.
>
> Is this what you had in mind.
> all the best
> matthew
>
> ----- Original Message -----
> From: <mzukowski at yci.com>
> To: <antlr-interest at yahoogroups.com>
> Sent: Thursday, March 18, 2004 9:58 AM
> Subject: [antlr-interest] antlr 3 stuff
>
>
>> I'd like to explore the 'language extension' space for antlr 3.  To me
>> developing a grammar and extending a grammar are very distinct phases 
>> of
>> antlr coding.  Plenty of people download grammars and just want to 
>> tweak
>> them with actions or a small bit of new syntax.  In "Growing Languages
> with
>> Metamorphic Syntax Macros" by Claus Brabrand and Michael I. 
>> Schwartzbach
> at
>> http://www.brics.dk/bigwig/publications/#macro they present a system 
>> that
>> makes it safe for people to extend languages by not letting them do 
>> stupid
>> things that have huge side effects.  When the time comes I'll re-read 
>> the
>> paper again and try and convince Ter & Loring.
>>
>> Monty
>> www.codetransform.com
>>
>>
>>
>> Yahoo! Groups Links
>>
>>
>>
>>
>>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>



 
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