[antlr-interest] new action syntax proposal

Kay Roepke kroepke at classdump.org
Fri Jul 13 18:28:00 PDT 2007


On Jul 14, 2007, at 3:13 AM, Wincent Colaiuta wrote:

> Of all the proposals so far, I instantly liked the one to prefix  
> the action like this: @{ ... }
>
> I think it fits in very nicely with the existing uses of @ in  
> @init, @after etc.
>
> And @ almost looks like "a", and "a" is for "always" so there's a  
> nice mnemonic too.

true enough. but given that this kind of action should be rather  
rare, I can see an argument for @always{ ... }
It's wordier, but instantly recognizable. It clearly communicates the  
intention and also follows the same scheme
as the other uses of @ (it's always followed by a word defining a  
special section, @lexer::, @init, @after etc)

cheers,
-k
-- 
Kay Röpke
http://classdump.org/






More information about the antlr-interest mailing list