- Revision
- 1105
- Author
- rfscholte
- Date
- 2011-03-05 07:59:21 -0600 (Sat, 05 Mar 2011)
Log Message
remove duplicate dimensions
Modified Paths
Diff
Modified: trunk/qdox/src/grammar/parser.y (1104 => 1105)
--- trunk/qdox/src/grammar/parser.y 2011-03-05 13:26:06 UTC (rev 1104) +++ trunk/qdox/src/grammar/parser.y 2011-03-05 13:59:21 UTC (rev 1105) @@ -65,7 +65,6 @@ %type <annoval> PostfixExpression CastExpression %type <ival> dims Dims_opt %type <sval> fullidentifier typedeclspecifier typename memberend -%type <ival> dimensions %type <bval> varargs %type <type> type arrayidentifier classtype typearg @@ -161,16 +160,10 @@ fullidentifier DOT IDENTIFIER { $$ = $1 + '.' + $3; }; arrayidentifier: - IDENTIFIER dimensions { + IDENTIFIER Dims_opt { $$ = new TypeDef($1,$2); }; -dimensions: - /* empty */ { $$ = 0; } - | dimensions SQUAREOPEN SQUARECLOSE { - $$ = $1 + 1; - }; - // Modifiers to methods, fields, classes, interfaces, parameters, etc... modifier: annotation | @@ -372,7 +365,7 @@ // ----- TYPES type: - classtype dimensions { + classtype Dims_opt { TypeDef td = $1; td.dimensions = $2; $$ = td; @@ -601,7 +594,7 @@ mth.typeParams = typeParams; mth.returnType = $3; mth.name = $4; - } methoddef dimensions Throws_opt memberend { + } methoddef Dims_opt Throws_opt memberend { mth.dimensions = $7; mth.body = $9; builder.endMethod(mth); @@ -613,7 +606,7 @@ mth.modifiers.addAll(modifiers); modifiers.clear(); mth.returnType = $2; mth.name = $3; - } methoddef dimensions Throws_opt memberend { + } methoddef Dims_opt Throws_opt memberend { mth.dimensions = $6; mth.body = $8; builder.endMethod(mth);
To unsubscribe from this list please visit:
