文件名称:Antlr4 JAVA 语法解析器
文件大小:21KB
文件格式:G4
更新时间:2019-01-26 08:18:35
Antlr4 JAVA
解析java语法 grammar Java; // starting point for parsing a java file compilationUnit : packageDeclaration? importDeclaration* typeDeclaration* EOF ; packageDeclaration : annotation* 'package' qualifiedName ';' ; importDeclaration : 'import' 'static'? qualifiedName ('.' '*')? ';' ; typeDeclaration : classOrInterfaceModifier* classDeclaration | classOrInterfaceModifier* enumDeclaration | classOrInterfaceModifier* interfaceDeclaration | classOrInterfaceModifier* annotationTypeDeclaration | ';' ; .....