Title: [1113] trunk/qdox/src/grammar/parser.y: replace arrayidentifier with VariableDeclaratorId according to JLS
Revision
1113
Author
rfscholte
Date
2011-03-10 06:51:58 -0600 (Thu, 10 Mar 2011)

Log Message

replace arrayidentifier with VariableDeclaratorId according to JLS

Modified Paths


Diff

Modified: trunk/qdox/src/grammar/parser.y (1112 => 1113)

--- trunk/qdox/src/grammar/parser.y	2011-03-09 19:54:36 UTC (rev 1112)
+++ trunk/qdox/src/grammar/parser.y	2011-03-10 12:51:58 UTC (rev 1113)
@@ -65,7 +65,7 @@
 %type <annoval> PostfixExpression CastExpression
 %type <ival> dims Dims_opt
 %type <sval> fullidentifier typedeclspecifier typename memberend
-%type <type> type arrayidentifier classtype typearg
+%type <type> type VariableDeclaratorId classtype typearg
 
 %%
 // Source: Java Language Specification - Third Edition
@@ -174,11 +174,6 @@
     IDENTIFIER { $$ = $1; } |
     fullidentifier DOT IDENTIFIER { $$ = $1 + '.' + $3; };
 
-arrayidentifier: 
-    IDENTIFIER Dims_opt {
-        $$ = new TypeDef($1,$2);
-    };
-
 // Modifiers to methods, fields, classes, interfaces, parameters, etc...
 modifier:
 	annotation |
@@ -585,7 +580,7 @@
 // ----- FIELD
 
 fields: 
-    modifiers type arrayidentifier {
+    modifiers type VariableDeclaratorId {
         fieldType = $2;
         makeField($3, lexer.getCodeBody());
     }
@@ -594,13 +589,18 @@
     };
   
 extrafields: | 
-    extrafields COMMA { line = lexer.getLine(); } arrayidentifier {
+    extrafields COMMA { line = lexer.getLine(); } VariableDeclaratorId {
         makeField($4, lexer.getCodeBody());
     } | 
-    extrafields COMMA javadoc { line = lexer.getLine(); } arrayidentifier {
+    extrafields COMMA javadoc { line = lexer.getLine(); } VariableDeclaratorId {
         makeField($5, lexer.getCodeBody());
     };
 
+// 8.3 Field Declarations...
+VariableDeclaratorId: IDENTIFIER Dims_opt 
+                      {
+                        $$ = new TypeDef($1,$2);
+                      };
 
 // ----- METHOD
 
@@ -689,7 +689,7 @@
 FormalParameters: FormalParameter
                 | FormalParameters COMMA FormalParameter;
                 
-FormalParameter:  VariableModifiers_opt type /* =Type */ arrayidentifier /* =VariableDeclaratorId */
+FormalParameter:  VariableModifiers_opt type /* =Type */ VariableDeclaratorId
                   {
                     param.name = $3.name;
                     param.type = $2;
@@ -700,7 +700,7 @@
                     param = new FieldDef();
                   };
 
-LastFormalParameter: VariableModifiers_opt type /* =Type */ DOTDOTDOT arrayidentifier  /* =VariableDeclaratorId */
+LastFormalParameter: VariableModifiers_opt type /* =Type */ DOTDOTDOT VariableDeclaratorId  /* =VariableDeclaratorId */
                      {
                        param.name = $4.name; 
                        param.type = $2;


To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to