Eagle Legacy Modernization, LLC

Java Grammar

Main program: Java_Program

 Count  Terminals:
3,074 Java_Character_Literal: A string enclosed in quotes
10,640 Java_Class_Definition: An identifier
235,515 Java_Comment: Comment
3,961 Java_Current_Class_Reference: An identifier
355 Java_HexNumber: A hex number
160,538 Java_Identifier: An identifier
410,583 Java_Identifier_Reference: An identifier
  Java_Label_Definition: An identifier
47,425 Java_Literal: A string enclosed in quotes
15,650 Java_Method_Definition: An identifier
25,364 Java_Number: A number
78,254 Java_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
12,412 (15% | 85%) Java_Annotation: (Java_AnnotationCall | Java_AnnotationCall2)
1,850 all all all 1.00(all) all |   Java_AnnotationCall: '@' Java_Variable '(' [Java_Expression]* ')'
10,562 all all 1.00(0%) |   Java_AnnotationCall2: '@' Java_Identifier [Java_Comment]*
67,721 all 1.00(0%) 1.92(35%) 0% Java_ArgumentList: Java_Expression [Java_Comment]* [Java_MoreArguments]* [',']
45,325 all 1.03(1%) all 1.00(0%) |   Java_MoreArguments: ',' [Java_Comment]* Java_Expression [Java_Comment]*
10,640 99% all all all 1% 86% 6% 1.00(0%) all 5.54(99%) all 1.53(6%) none Java_Class: [Java_ClassModifierList] ['@'] ("class"|"interface") Java_Class_Definition [Java_GenericType] [Java_ClassExtends] [Java_ClassImplements] [Java_Comment]* '{' [Java_ClassElement]* '}' [Java_Comment]* [';']
58,102 (65% | 1% | 27% | 7% | none) |   Java_ClassElement: (Java_StaticStatement | Java_Comment | Java_Method | Java_Constructor | ';')
37,983 all all |   |   Java_StaticStatement: ["static"] Java_Statement
9,167 all 1.03 0% none |   Java_ClassExtends: "extends" Java_Identifier_Reference* [Java_GenericType] [Java_MoreExtends]*
    |   |   Java_MoreExtends: ',' Java_Identifier_Reference* [Java_GenericType]
668 all 1.20 7% 1.39(14%) |   Java_ClassImplements: "implements" Java_Identifier_Reference* [Java_GenericType] [Java_MoreImplements]*
129 all all 1.29 none |   |   Java_MoreImplements: ',' [Java_Comment] Java_Identifier_Reference* [Java_GenericType]
18,106 (0% | 12% | 88%) |   Java_ClassModifier: (Java_Comment | Java_Annotation | ("abstract"|"final"|"native"|"private"|"protected"|"public"|"static"|"synchronized"|"transient"|"volatile"))
10,570 1.71 |   Java_ClassModifierList: Java_ClassModifier*
55,781 1.00(1%) 1.23(57%) 1.06(13%) all all 1.00(1%) 69% 1.15(0%) all 1.32(4%) Java_Data: [Java_Annotation]* [Java_DataModifier]* [Java_Annotation]* Java_Type Java_Variable_Definition [Java_DataSubscript]* [Java_DataInitialValue] [Java_MoreIdentifiers]* ';' [Java_Comment]*
38,284 all all |   Java_DataInitialValue: '=' Java_Expression
39,368 all |   Java_DataModifier: ("abstract"|"final"|"native"|"private"|"protected"|"public"|"static"|"synchronized"|"transient"|"volatile")
432 all all |   Java_DataSubscript: '[' ']'
203 all all 3% 3% 5% |   Java_MoreIdentifiers: ',' Java_Variable_Definition ['['] [']'] [Java_DataInitialValue]
44 none 1.14(all) all all none all all all none none none none 5% all 1.00(5%) 16% Java_Enum: [Java_Annotation]* [Java_DataModifier]* "enum" Java_Variable_Definition [Java_ClassImplements] '{' [Java_Comment] [Java_EnumConstants] [','] [Java_Comment]* [Java_EnumDeclarations] [Java_Comment]* [';'] '}' [Java_Comment]* [';']
161 none all none none |   Java_EnumConstant: [Java_Annotation]* Java_Variable_Definition [Java_EnumInitializer] [Java_EnumClassBody]
    |   |   Java_EnumClassBody: '{' [Java_EnumClassBodyDeclaration]* '}'
44 all 2.66(all) none |   Java_EnumConstants: Java_EnumConstant [Java_MoreEnumConstants]* [Java_Comment]*
117 all none all |   |   Java_MoreEnumConstants: ',' [Java_Comment]* Java_EnumConstant
    |   Java_EnumDeclarations: ';' Java_EnumClassBodyDeclaration*
    |   |   Java_EnumClassBodyDeclaration: (Java_ClassElement)
    |   Java_EnumInitializer: '(' [Java_Expression]* ')'
392,353 (0% | 6% | 12% | 1% | none | 1% | 0% | 0% | 5% | 0% | 0% | 18% | 0% | none | 1% | 0% | 0% | none | 1% | 4% | 33% | 1% | none | 0% | 1% | 0% | 6% | 0% | 2% | 0% | 2% | 0% | 0% | 0% | 1% | 0% | 5% | 0%) Java_Expression: (Java_HexNumber | Java_Number | Java_Literal | Java_Character_Literal | Java_DotClass | Java_CastExpression | Java_ExpressionList | Java_InterfaceCreationWithMethod | Java_ClassCreationExpression | Java_ClassCreationWithInitializers | Java_ClassCreationWithSubscript | Java_MethodInvocation | Java_PreIncrementExpression | Java_PreDecrementExpression | Java_PostIncrementExpression | Java_PostDecrementExpression | Java_NegativeExpression | Java_LogicalNotExpression | Java_NotExpression | Java_BuiltIn | Java_VariableExpression | Java_ParenthesizedExpression | Java_CommentExpression | Java_SubscriptExpression | Java_Subfield | Java_MultiplicativeExpression | Java_AdditiveExpression | Java_ShiftExpression | Java_RelationalExpression | Java_InstanceOfExpression | Java_EqualityExpression | Java_AndExpression | Java_ExclusiveOrExpression | Java_InclusiveOrExpression | Java_ConditionalAndExpression | Java_ConditionalOrExpression | Java_AssignmentExpression | Java_TrueFalseExpression)
22,592 all all all |   Java_AdditiveExpression: Java_Expression ("+"|"-") Java_Expression
193 all all all |   Java_AndExpression: Java_Expression '&' Java_Expression
19,897 all all all |   Java_AssignmentExpression: Java_Expression ("="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|">>>="|"&="|"^="|"|=") Java_Expression
16,296 all |   Java_BuiltIn: ("false"|"true"|"null"|"this"|"super")
3,117 all all all all |   Java_CastExpression: '(' Java_Type ')' Java_Expression
19,689 all all all none 72% all 0% |   Java_ClassCreationExpression: "new" Java_Type '(' [Java_Comment]* [Java_ArgumentList] ')' [Java_ClassOverride]
4 all 1.25 all |   |   Java_ClassOverride: '{' Java_ClassElement* '}'
386 all all all all all |   Java_ClassCreationWithInitializers: "new" Java_Type '{' [Java_ArgumentList] '}'
617 all all 1.02 |   Java_ClassCreationWithSubscript: "new" Java_Type Java_Subscript*
    |   Java_CommentExpression: Java_Comment Java_Expression
2,174 all all all |   Java_ConditionalAndExpression: Java_Expression "&&" Java_Expression
1,223 all all all |   Java_ConditionalOrExpression: Java_Expression "||" Java_Expression
    |   Java_DotClass: Java_Type '.' "class"
7,619 all all all |   Java_EqualityExpression: Java_Expression ("=="|"!=") Java_Expression
18 all all all |   Java_ExclusiveOrExpression: Java_Expression '^' Java_Expression
177 all 1.50(3%) 95% all |   Java_ExpressionList: '{' [Java_Comment]* [Java_ArgumentList] '}'
25 all all all |   Java_InclusiveOrExpression: Java_Expression '|' Java_Expression
1,720 all all all |   Java_InstanceOfExpression: Java_Expression "instanceof" Java_Type
20 all all all all all all all |   Java_InterfaceCreationWithMethod: "new" ("Runnable"|"ActionListener"|"WindowAdapter") '(' ')' '{' Java_Method '}'
    |   Java_LogicalNotExpression: '~' Java_Expression
70,875 all all 71% all |   Java_MethodInvocation: Java_Variable '(' [Java_ArgumentList] ')'
1,570 all all all |   Java_MultiplicativeExpression: Java_Expression ("*"|"/"|"%") Java_Expression
181 all all |   Java_NegativeExpression: ("-"|"+") Java_Expression
2,117 all all |   Java_NotExpression: '!' Java_Expression
2,388 all all all |   Java_ParenthesizedExpression: '(' Java_Expression ')'
145 all all |   Java_PostDecrementExpression: Java_Variable "--"
3,337 all all |   Java_PostIncrementExpression: Java_Variable "++"
    |   Java_PreDecrementExpression: "--" Java_Variable
125 all all |   Java_PreIncrementExpression: "++" Java_Variable
6,418 all all all |   Java_RelationalExpression: Java_Expression ("<"|">"|"<="|">=") Java_Expression
102 all all all |   Java_ShiftExpression: Java_Expression (">>>"|"<<"|">>") Java_Expression
3,747 all all none all |   Java_Subfield: Java_Expression '.' [Java_GenericType] Java_Expression
54 all all 96% all |   Java_SubscriptExpression: Java_Expression '[' [Java_Expression] ']'
426 all all all all all |   Java_TrueFalseExpression: Java_Expression '?' Java_Expression ':' Java_Expression
128,888 all |   Java_VariableExpression: Java_Variable
    Java_Label: Java_Label_Definition ':'
15,650 none 1.29(98%) 0% all all all 68% 1.58(28%) all none 22% all all Java_Method: [Java_Comment]* [Java_MethodModifier]* [Java_GenericType] Java_Type Java_Method_Definition '(' [Java_MethodParameter] [Java_MoreParameters]* ')' [Java_MethodDefault] [Java_MethodThrows] [Java_Comment] Java_MethodBody
3,961 1.00(0%) 1.00(100%) all all 57% 1.86(33%) all 1% all all |   Java_Constructor: [Java_Annotation]* [Java_MethodModifier]* Java_Current_Class_Reference '(' [Java_MethodParameter] [Java_MoreParameters]* ')' [Java_MethodThrows] [Java_Comment] Java_MethodBody
19,611 (95% | 5%) |   Java_MethodBody: (Java_MethodImplementation | ';')
18,649 none all 2.06(9%) 0% |   |   Java_MethodImplementation: [Java_Comment]* Java_StatementBlock [Java_Comment]* [';']
    |   Java_MethodDefault: "default" [Java_Expression]
23,707 (0% | 90% | 10%) |   Java_MethodModifier: (Java_Comment | ("abstract"|"final"|"native"|"private"|"protected"|"public"|"static"|"synchronized"|"transient"|"volatile") | Java_Annotation)
22,065 1.00(0%) all all all all |   Java_MethodParameter: [Java_MethodParameterPrefix]* Java_Type ["..."] Java_Variable_Definition ["[]"]
17 (none | 6% | 94%) |   |   Java_MethodParameterPrefix: (Java_MethodNullable | Java_MethodSuppress | "final")
    |   |   |   Java_MethodNullable: '@' "Nullable"
1 all all all all all |   |   |   Java_MethodSuppress: '@' "SuppressWarnings" '(' Java_Literal ')'
3,502 all 1.02 |   Java_MethodThrows: "throws" Java_Variable*
9,260 all all |   Java_MoreParameters: ',' Java_MethodParameter
4,322 2.06(93%) none none 98% 7.16(93%) 1.00(all) Java_Program: [Java_Comment]* [Java_Annotation] [Java_Comment]* [Java_Package] [Java_ImportOrComment]* [Java_ClassOrEnum]*
4,334 (all | none) |   Java_ClassOrEnum: (Java_Class | Java_Enum)
28,294 all all all 3.63(100%) all |   Java_Import: "import" ["static"] Java_Identifier [Java_DotIdentifierStar]* ';'
102,532 all all |   |   Java_DotIdentifierStar: '.' Java_IdentifierStar
102,532 (100% | 0%) |   |   |   Java_IdentifierStar: (Java_Identifier | '*')
28,703 (1% | 99%) |   Java_ImportOrComment: (Java_Comment | Java_Import)
4,227 all all 3.35(98%) all |   Java_Package: "package" Java_Identifier [Java_MorePackageIds]* ';'
13,822 all all |   |   Java_MorePackageIds: '.' Java_Identifier
175,891 (0% | 11% | 32% | 4% | 0% | 0% | 0% | 1% | 0% | 0% | 2% | 9% | 7% | 1% | 0% | 0% | 1% | 1% | 1% | 30%) Java_Statement: (Java_AnnotationDefinition | Java_StatementBlock | Java_Data | Java_Class | Java_Enum | ';' | Java_AssertStatement | Java_BreakStatement | Java_ContinueStatement | Java_DoStatement | Java_ForStatement | Java_IfStatement | Java_ReturnStatement | Java_SuperStatement | Java_SwitchStatement | Java_SynchronizedStatement | Java_ThrowStatement | Java_TryStatement | Java_WhileStatement | Java_ExpressionStatement)
29 all 1.00 all all all all 1.40(86%) 28% all |   Java_AnnotationDefinition: [Java_Annotation] Java_MethodModifier* '@' "interface" Java_Identifier '{' [Java_Comment]* [Java_AnnotationParameter] '}'
8 all all all all all |   |   Java_AnnotationParameter: Java_Type Java_Identifier '(' ')' ';'
37,736 all 2.91(99%) none all |   Java_StatementBlock: '{' [Java_StatementOrComment]* [';'] '}'
119,126 (6% | 94%) |   |   Java_StatementOrComment: (Java_Comment | Java_Statement)
4,526 all all all Java_Subscript: '[' Java_Expression ']'
131,470 all all 3% 1.01(2%) Java_Type: [Java_Comment] Java_TypeName [Java_GenericType] [Java_ArrayType]*
2,304 all all |   Java_ArrayType: '[' ']'
1,013 all all |   Java_ExtendsType: ("extends"|"super") Java_Identifier_Reference
4,575 all 100% all 3.05(24%) all |   Java_GenericType: '<' [Java_Type] ["[]"] [Java_MoreTypes]* '>'
3,378 all all |   |   Java_MoreTypes: ',' Java_Type
133,500 (0% | 79% | 21%) |   Java_TypeName: (Java_GenericTypeQuestion | Java_IdList | ("void"|"boolean"|"byte"|"short"|"int"|"long"|"char"|"float"|"double"|"String"|"class"))
516 all 58% |   |   Java_GenericTypeQuestion: '?' [Java_ExtendsType]
105,483 all 1% 1.00(2%) none |   |   Java_IdList: Java_Identifier_Reference [Java_ExtendsType] [Java_MoreIds]* [Java_ExtendsMultiple]
    |   |   |   Java_ExtendsMultiple: '&' Java_Identifier_Reference [Java_ExtendsType] [Java_MoreIds]*
2,030 all all |   |   |   Java_MoreIds: '.' Java_TypeName
209,789 all 1.09(38%) 1.03(2%) Java_Variable: Java_VariableIdentifier [Java_DotVariable]* [Java_Subscript]*
86,742 all all |   Java_DotVariable: '.' Java_VariableIdentifier
296,531 (0% | 1% | 99%) |   Java_VariableIdentifier: (Java_CastedVariable | ("this"|"class"|"super") | Java_Identifier_Reference)
525 all all all all all all |   |   Java_CastedVariable: '(' '(' Java_Type ')' Java_Identifier_Reference ')'
2 all all all all Java_AssertStatement: "assert" Java_Expression [Java_AssertMessage] ';'
2 all all |   Java_AssertMessage: ':' Java_Expression
1,581 all none all Java_BreakStatement: "break" [Java_Identifier_Reference] ';'
769 all none all Java_ContinueStatement: "continue" [Java_Identifier_Reference] ';'
23 none all all all all all all all all Java_DoStatement: [Java_Label] "do" [Java_Comment] Java_Statement "while" '(' Java_Expression ')' ';'
52,218 all all all Java_ExpressionStatement: Java_Expression ';' [Java_Comment]
2,740 (38% | 62%) Java_ForStatement: (Java_ForCollectionStatement | Java_ForLoopStatement)
1,039 none all all all all all all all all all all |   Java_ForCollectionStatement: [Java_Label] "for" '(' ["final"] Java_Type Java_Variable ':' Java_Expression ')' [Java_Comment] Java_Statement
1,701 none all all all all all all all all all all |   Java_ForLoopStatement: [Java_Label] "for" '(' [Java_ForInit] ';' [Java_Expression] ';' [Java_Expression] ')' [Java_Comment] Java_Statement
1,701 all 1.00 |   |   Java_ForInit: ["final"] Java_ForWhat*
1,701 (89% | 11%) |   |   |   Java_ForWhat: (Java_ForWithType | Java_Expression)
1,518 all all |   |   |   |   Java_ForWithType: Java_Type Java_Expression
16,674 all all all none all 1.00(1%) all 22% Java_IfStatement: "if" '(' Java_Expression [Java_Comment]* ')' [Java_Comment]* Java_Statement [Java_IfElseClause]
3,661 1.55(1%) all all all |   Java_IfElseClause: [Java_Comment]* "else" [Java_Comment] Java_Statement
12,841 all 93% all Java_ReturnStatement: "return" [Java_Expression] ';'
2,512 all all 94% all all Java_SuperStatement: "super" '(' [Java_ArgumentList] ')' ';'
445 all all all all all 4.62 all Java_SwitchStatement: "switch" '(' Java_Expression ')' '{' Java_SwitchClause* '}'
2,057 (84% | 16% | none) |   Java_SwitchClause: (Java_CaseClause | Java_DefaultClause | Java_Comment)
1,733 all all all 1.81(94%) |   |   Java_CaseClause: "case" Java_Expression ':' [Java_StatementOrComment]*
324 all all 1.10(96%) |   |   Java_DefaultClause: "default" ':' [Java_StatementOrComment]*
8 all all all all all Java_SynchronizedStatement: "synchronized" '(' Java_Expression ')' Java_Statement
2,182 all all all Java_ThrowStatement: "throw" Java_Expression ';'
1,401 all none all 4.69 all none 1.01(100%) 1% Java_TryStatement: "try" [Java_TryResources] '{' Java_StatementOrComment* '}' [Java_Comment]* [Java_CatchBlock]* [Java_FinallyBlock]
1,409 all all all all none all all all |   Java_CatchBlock: "catch" '(' ["final"] Java_Type [Java_MoreExceptions]* Java_Identifier ')' Java_Statement
    |   |   Java_MoreExceptions: '|' Java_Type
9 all all |   Java_FinallyBlock: "finally" Java_Statement
    |   Java_TryResources: '(' Java_TryResource* ')'
    |   |   Java_TryResource: Java_Type Java_Variable_Definition Java_DataInitialValue
1,246 all all all all all all Java_WhileStatement: "while" '(' Java_Expression ')' [Java_Comment] Java_Statement

Terminals = 12 (instances=991,359)
Tokens = 133 (instances=2,958,020)

(*) Statistics are shown in the same order as the Tokens.
Percentages are rounded; 'all' and 'none' mean 100% and 0% before rounding.
For lists, it shows the average number of occurrences, excluding empty lists.