[antlr-interest] added attributes/dynamic scoping blog entry
Loring Craymer
Loring.G.Craymer at jpl.nasa.gov
Thu Feb 3 20:00:07 PST 2005
> -----Original Message-----
> From: John D. Mitchell [mailto:johnm-antlr at non.net]
> Sent: Thursday, February 03, 2005 7:18 PM
> To: Loring Craymer
> Cc: ANTLR Interest
> Subject: Re: [antlr-interest] added attributes/dynamic scoping blog entry
>
> >>>>> "Loring" == Loring Craymer <Loring.G.Craymer at jpl.nasa.gov> writes:
> >>>>>> At 05:43 PM 2/3/2005, Terence Parr writes:
> [...]
>
> >> I'm not opposed to an exit action...is this easy to code in C? I guess
> >> so.
>
> Can always use gotos. :-)
>
> >> So it's mainly for C and free() operations, right?
>
> Or any resource management that requires precision.
>
>
> > init() doesn't really fit with the other 3.0 improvements--especially
> > when you have output grammars/templates to encapsulate most actions.
> > What would be useful is support for actions which set semantic state
> > information coupled with a complementary set of rollback() actions.
> > These would operate in guessing mode and the state information would be
> > used by semantic predicates.
>
> Interesting. Do you have a (pseudo-code) example to make this clear?
Two obvious examples:
1.) Enter/remove symbol table entries which are used for semantic decisions
within the guessing scope.
2.) Loops with fixed number of repeats--sem preds would be used to detect
the exit condition.
>
> Also, note that it's not just rollback, release is also needed.
Rollback is "restore previous state" in fault tolerance parlance. Previous
state includes memory and other resource usage as a part of state.
Cheers!
--Loring
>
> Take care,
> John
More information about the antlr-interest
mailing list