[antlr-interest] ANTLR v4 planning stages

Scott Stanchfield scott at javadude.com
Tue Jan 19 13:19:22 PST 2010

>> If you keep the actions to strictly method calls passing
>> attribute-expressions as values (and don't allow anything else) I'd
>> think it would keep things simple for use and code generation.
> i was thinking something like  arbitrary code in some simple imperative language and then any call to @foo() or whatever would call foo in the target language.

The thing I'd worry about would be feature creep in that language.
Everyone would want "just one more feature" so it could better support
their target language. You'd need to nail down that simple language so
the generators for it could be written - if any new features were
added all generators would be hit.

If you kept it to simple method calls, they could do whatever logic
they want inside the called method. This would force them to keep the
grammar cleaner as well, actions just being calls to the strategy.

Anyway, that's my 3c. I know you like writing languages ;) but my
recommendation would be keep it simple and small, and anything more
complex can be done inside the called methods.

Chew on it a bit and see if anything interesting gets spit up or swallowed...

>> I assume you'd still allow target-language-specific actions, too, eh?
>> Perhaps an option to specify NIL actions (wow - that might be a
>> confusing name ;) or target-language actions - might be best not to
>> mix 'em...
> we'd use language=Java for the target language as we do now and then add perhaps actions=NIL to specify what the actions look like. The default would be actions=language.

Cool - best of both worlds.

> Perhaps ALE or AIL=ANTLR imperative language? :)

Not bad... (though "AIL" conjures images of sickness)

ANTLRScript?  (shudder)

-- Scott

More information about the antlr-interest mailing list