[antlr-interest] C# @members

Benjamin Niemann pink at odahoda.de
Fri Oct 26 19:40:52 PDT 2007


Gavin Lambert wrote:

> At 18:52 26/10/2007, de Jong, Ron wrote:
>  >@members { // hello }
>  >
>  >Basically nothing after this is correctly interpreted. I have
>  >tried every variation but the @members just doesn't seem to
> work.
> 
> I would be surprised if it did.  That's a line comment you've got
> there, and you're putting everything all on the same line.  Don't
> do that.
> 
> @members {
>    // hello
> }
> 
> will work.

Suprising that this make a difference. ANTLR does not now that // in an
action section has any special meaning, so it should not influence the way
the rest of the grammar is interpreted.
Or did the OP refer to the generated code being broken, which may be the
case when the template adds some significant code directly after it without
an additional LF.




More information about the antlr-interest mailing list