2011-06-23 10:04:29 +08:00
|
|
|
parser grammar T;
|
2011-06-27 05:20:02 +08:00
|
|
|
options {output=AST;}
|
2011-06-28 03:33:40 +08:00
|
|
|
a : A^ ;
|
2011-06-27 05:20:02 +08:00
|
|
|
/*
|
2011-06-23 10:04:29 +08:00
|
|
|
r[int a] returns [int b]
|
2011-06-24 09:29:51 +08:00
|
|
|
scope {int qq;}
|
|
|
|
: x=ID y=r[34] z+=b {$b = 99;}
|
2011-06-23 10:04:29 +08:00
|
|
|
;
|
2011-06-15 08:29:02 +08:00
|
|
|
|
2011-06-24 09:29:51 +08:00
|
|
|
b : r[34] {$r::qq = 3;} ;
|
2011-06-27 05:20:02 +08:00
|
|
|
*/
|