[antlr-interest] Re: summary of trip to Montreal/SableCC land

Terence Parr parrt at cs.usfca.edu
Mon Nov 15 17:28:29 PST 2004



On Nov 15, 2004, at 5:15 PM, lgcraymer wrote:
>> This is a very interesting discussion. Forgive me for interrupting
>> with what may be a beginners question. :-)
>> I understand that a stack is sometimes needed to retrieve information
>> from nested context. What's not clear to me is how Antlr in particular
>> makes it easier to access or manage this stack.
>> Is this something that is currently already available in antlr 2.x? Or
>> is this something new that will be added in 3.x? If it's the latter,
>> then I'll just eagerly wait its release, if it's the latter, could you
>> point me to an example that implements this?
>
> Actually, the answer is "neither", although it is still possible that
>  stacks could creep into 3.0 (i. e.:  3.0 is still in development and
> anything could happen).  For ANTLR 2, context is provided by passing
> arguments to rules.  For ANTLR 3, dynamic scoping of attributes is
> planned to provide somewhat more functionality, but this approach is
> still under exploration so don't look for Ter to have a definitive
> answer (defined syntax with clearly defined behavior for attributes) 
> soon.

Actually, I held off my answer as I'm still writing up that discussion 
this very second. ;)

3.0 will have exactly this stack mechanism; "remote attribution" it was 
originally called.  We'll call it dynamic scoping of attributes and 
perhaps add a new twist.  I'll have something for you to read in a few 
hours.

As Loring say, however, anything can happen before the release ;)  I'm 
cranking away at the moment though because I'm very comfortable with 
the decisions I'm making given past experience (for example SORCERER 
had these stacked attributes).  It's only when we get into new stuff 
that I need to ponder stuff and get everybody's feedback/experience. :)

Ter
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!





 
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