- Revision
- 1099
- Author
- rfscholte
- Date
- 2011-03-03 16:26:57 -0600 (Thu, 03 Mar 2011)
Log Message
Use ClassBody and ClassBodyDeclarations according to JLS
Modified Paths
Diff
Modified: trunk/qdox/src/grammar/parser.y (1098 => 1099)
--- trunk/qdox/src/grammar/parser.y 2011-03-02 22:52:07 UTC (rev 1098) +++ trunk/qdox/src/grammar/parser.y 2011-03-03 22:26:57 UTC (rev 1099) @@ -475,11 +475,6 @@ // ----- CLASS class: - classdefinition BRACEOPEN members BRACECLOSE { - builder.endClass(); - }; - -classdefinition: modifiers classorinterface IDENTIFIER opt_typeparams opt_extends Interfaces_opt { cls.lineNumber = line; cls.modifiers.addAll(modifiers); modifiers.clear(); @@ -487,8 +482,23 @@ cls.typeParams = typeParams; builder.beginClass(cls); cls = new ClassDef(); - }; + } + ClassBody; +// 8.1.6 Class Body and Member Declarations +ClassBody: BRACEOPEN ClassBodyDeclarations_opt BRACECLOSE { + builder.endClass(); + }; + +ClassBodyDeclarations_opt: + | ClassBodyDeclarations; + +ClassBodyDeclarations: ClassBodyDeclaration + | ClassBodyDeclarations ClassBodyDeclaration; + +ClassBodyDeclaration: { line = lexer.getLine(); } member; + + classorinterface: CLASS { cls.type = ClassDef.CLASS; } | INTERFACE { cls.type = ClassDef.INTERFACE; } |
To unsubscribe from this list please visit:
