[antlr-interest] new action syntax proposal

Gavin Lambert antlr at mirality.co.nz
Fri Jul 13 17:04:22 PDT 2007


At 11:51 14/07/2007, Kay Roepke wrote:
 >I suppose this is a bit paranoid, but in most languages we 
target
 >the curlies are the block delimiters. There's a minimal chance
 >that someone writes double curlies to introduce a different
 >automatic scope in the C-based targets. (this notion of 
automatic
 >vars doesn't really apply to Java, right? There was something 
with
 >everything being set up on method entry, IIRC. Don't quote me on 

 >this, though.)

Well, the last I recall ANTLR didn't handle nested {}s anyway, 
meaning that if you wanted to use them you had to use \{ and 
\}.  So that would look different, and wouldn't be a problem.

Or am I thinking of nested []s for parameters?  Or possibly I'm 
just going mad :)


Anyway, another option could be to use a magic prefix 
symbol.  @{...} springs to mind for some reason, though I don't 
know why ;)  {Maybe it's from literal strings in C#.]



More information about the antlr-interest mailing list