Index: src/main/org/codehaus/groovy/antlr/groovy.g
===================================================================
--- src/main/org/codehaus/groovy/antlr/groovy.g	(Revision 798)
+++ src/main/org/codehaus/groovy/antlr/groovy.g	(Revision 829)
@@ -2274,7 +2274,8 @@
  *  and the member selection is done only at runtime.  This forces a statically unchecked member access.
  */
 dynamicMemberName  {Token first = LT(1);}
-    :   (   parenthesizedExpression
+    :   (   pe:parenthesizedExpression!
+            {#dynamicMemberName = #(create(EXPR,"EXPR",first,LT(1)),pe);}
         |   stringConstructorExpression
         )
         { #dynamicMemberName = #(create(DYNAMIC_MEMBER, "DYNAMIC_MEMBER",first,LT(1)), #dynamicMemberName); }
@@ -2552,7 +2553,7 @@
 // TODO:  Move pathExpression to this point in the file.
 
 // the basic element of an expression
-primaryExpression
+primaryExpression {Token first = LT(1);}
     :   IDENT
         /*OBS*  //keywords can follow dot in Groovy; no need for this special case
         ( options {greedy=true;} : DOT^ "class" )?
@@ -2561,7 +2562,8 @@
     |   newExpression
     |   "this"
     |   "super"
-    |   parenthesizedExpression             // (general stuff...)
+    |   pe:parenthesizedExpression!             // (general stuff...)
+        {#primaryExpression = #(create(EXPR,"EXPR",first,LT(1)),pe);}
     |   closableBlockConstructorExpression
     |   listOrMapConstructorExpression
     |   stringConstructorExpression         // "foo $bar baz"; presented as multiple tokens

