- Revision
- 1074
- Author
- rfscholte
- Date
- 2011-02-23 14:16:21 -0600 (Wed, 23 Feb 2011)
Log Message
Using TypeDeclaration according to JLS
Modified Paths
Diff
Modified: trunk/qdox/src/grammar/parser.y (1073 => 1074)
--- trunk/qdox/src/grammar/parser.y 2011-02-23 20:01:37 UTC (rev 1073) +++ trunk/qdox/src/grammar/parser.y 2011-02-23 20:16:21 UTC (rev 1074) @@ -77,11 +77,19 @@ file: | file { line = lexer.getLine(); } filepart; // And a filepart is a package/import statement, javadoc comment, or class declaration. -filepart: annotation | package | ImportDeclaration | javadoc | class | enum | SEMI; +filepart: annotation | package | ImportDeclaration | javadoc | TypeDeclaration; +// 7.3 Compilation Units + +////TypeDeclarations: TypeDeclaration +//// | TypeDeclarations TypeDeclaration; + + // Package statement package: PACKAGE fullidentifier SEMI { builder.addPackage(new PackageDef($2, line)); }; + + ////ImportDeclarations: ImportDeclaration //// | ImportDeclarations ImportDeclaration; @@ -103,6 +111,16 @@ // 7.5.4 Static-Import-on-Demand Declaration StaticImportOnDemandDeclaration: IMPORT STATIC fullidentifier DOT STAR SEMI { builder.addImport( "static " + $3 + ".*" ); }; +// 7.6 Top Level Type Declarations +TypeDeclaration: ClassDeclaration + | InterfaceDeclaration + | SEMI; + +//// for migration +ClassDeclaration: class; +InterfaceDeclaration: enum; + + // ----- JAVADOC javadoclist:
To unsubscribe from this list please visit:
