yeah, I was wondering how we would integrate a generic language (NIL? neutral
imperative language? chuckle) with the surrounding code in whatever language.
Named method calls like this could work well.
Ter
On Jan 19, 2010, at 12:49 PM, Scott Stanchfield wrote:
> RE Language-agnostic actions - if you treat this as a strategy pattern
> (like I seem to recall you did in the antlr 2 code base) this could
> work really well. What would be really cool IMNSHO:
>
> grammar Foo;
> foo : xxxxxx {...@dox(...); } ;
> fee : xxxxxx {...@doy(...); } ;
>
> and the generators could generate a spec/interface/abstract class for
> the action methods, like in Java:
>
> public interface FooActionStrategy {
> void doX(...);
> void doY(...);
> }
>
> and generate
>
> setActionStrategy(FooActionStrategy x) {...}
>
> that would be used in the code. All that's needed is an implementation.
>
> If all of the action code were simple action-strategy calls, this
> should be generatable in pretty much any target language. (Of course I
> haven't given this much thought, but it feels pretty good OTTOMH)
>
> -- Scott
>
> ----------------------------------------
> Scott Stanchfield
> http://javadude.com
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address
List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address
--
You received this message because you are subscribed to the Google Groups
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/il-antlr-interest?hl=en.