[antlr-interest] meaning of #xxx

Sam Harwell sharwell at pixelminegames.com
Thu May 12 14:11:16 PDT 2011


I think it translates to the following in ANTLR 3:

sql_literal :
    (NUMBER | QUOTED_STRING | 'null')
    -> ^(SQL_LITERAL["sql_literal"] NUMBER? QUOTED_STRING? 'null'?)
;

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Philippe Frankson
Sent: Thursday, May 12, 2011 9:51 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] meaning of #xxx

Hi,
In a grammar done with ANTLR 2.x, I have seen the following expression:

sql_literal:
        ( NUMBER | QUOTED_STRING | "null" )
        { #sql_literal = #([SQL_LITERAL, "sql_literal"], #sql_literal); }
    ;

Anybody can explain the meaning of the code inside the  { } ? (or send a
link where I can find the doc).
#sql_literal ?
#(x,y) ?

I could not find relevant documentation explaining that.

Thx a lot.
Philippe


List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list