Eagle Legacy Modernization, LLC

Java Grammar

Main program: Java_Program

 Count  Terminals:
  Java_BinaryNumber: A binary number
1,870 Java_Character_Literal: A string enclosed in quotes
6,000 Java_Class_Definition: An identifier
148,034 Java_Comment: Comment
2,552 Java_Current_Class_Reference: An identifier
  Java_HexFloatingNumber: A hex floating number
241 Java_HexNumber: A hex number
87,599 Java_Identifier: An identifier
262,299 Java_Identifier_Reference: An identifier
  Java_Label_Definition: An identifier
31,094 Java_Literal: A string enclosed in quotes
10,294 Java_Method_Definition: An identifier
16,963 Java_Number: A number
48,190 Java_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
6,155 (16% | 84%) Java_Annotation: (Java_AnnotationCall | Java_AnnotationCall2)
989 all all all 1.00(all) all |   Java_AnnotationCall: '@' Java_Variable '(' [Java_Expression]* ')'
5,166 all 1.00 1.00(0%) |   Java_AnnotationCall2: '@' Java_Identifier* [Java_Comment]*
43,350 all 1.00(0%) 1.91(36%) 0% Java_ArgumentList: Java_Expression [Java_Comment]* [Java_MoreArguments]* [',']
29,571 all 1.04(1%) all 1.00(0%) |   Java_MoreArguments: ',' [Java_Comment]* Java_Expression [Java_Comment]*
6,000 99% all all all 1% 84% 7% 1.00(0%) all 5.89(99%) all 1.67(8%) none Java_Class: [Java_ClassModifierList] ['@'] ("class"|"interface") Java_Class_Definition [Java_GenericType] [Java_ClassExtends] [Java_ClassImplements] [Java_Comment]* '{' [Java_ClassElement]* '}' [Java_Comment]* [';']
34,853 (62% | 1% | 30% | 7% | none) |   Java_ClassElement: (Java_StaticStatement | Java_Comment | Java_Method | Java_Constructor | ';')
21,691 all all |   |   Java_StaticStatement: ["static"] Java_Statement
5,044 all 1.03 0% none |   Java_ClassExtends: "extends" Java_Identifier_Reference* [Java_GenericType] [Java_MoreExtends]*
    |   |   Java_MoreExtends: ',' Java_Identifier_Reference* [Java_GenericType]
390 all 1.25 6% 1.41(16%) |   Java_ClassImplements: "implements" Java_Identifier_Reference* [Java_GenericType] [Java_MoreImplements]*
86 all all 1.28 none |   |   Java_MoreImplements: ',' [Java_Comment] Java_Identifier_Reference* [Java_GenericType]
9,880 (0% | 11% | 89%) |   Java_ClassModifier: (Java_Comment | Java_Annotation | ("abstract"|"default"|"final"|"native"|"private"|"protected"|"public"|"static"|"strictfp"|"synchronized"|"transient"|"volatile"))
5,942 1.66 |   Java_ClassModifierList: Java_ClassModifier*
33,424 1.00(0%) 1.28(55%) 1.06(11%) all all 1.01(1%) 71% 1.15(0%) all 1.28(4%) Java_Data: [Java_Annotation]* [Java_DataModifier]* [Java_Annotation]* Java_Type Java_Variable_Definition [Java_DataSubscript]* [Java_DataInitialValue] [Java_MoreIdentifiers]* ';' [Java_Comment]*
23,651 all all |   Java_DataInitialValue: '=' Java_Expression
23,352 all |   Java_DataModifier: ("abstract"|"default"|"final"|"native"|"private"|"protected"|"public"|"static"|"strictfp"|"synchronized"|"transient"|"volatile")
300 all all |   Java_DataSubscript: '[' ']'
189 all all 3% 3% 4% |   Java_MoreIdentifiers: ',' Java_Variable_Definition ['['] [']'] [Java_DataInitialValue]
25 none 1.16(all) all all none all all all none none none none 4% all 1.00(4%) 24% Java_Enum: [Java_Annotation]* [Java_DataModifier]* "enum" Java_Variable_Definition [Java_ClassImplements] '{' [Java_Comment] [Java_EnumConstants] [','] [Java_Comment]* [Java_EnumDeclarations] [Java_Comment]* [';'] '}' [Java_Comment]* [';']
94 none all none none |   Java_EnumConstant: [Java_Annotation]* Java_Variable_Definition [Java_EnumInitializer] [Java_EnumClassBody]
    |   |   Java_EnumClassBody: '{' [Java_EnumClassBodyDeclaration]* '}'
25 all 2.76(all) none |   Java_EnumConstants: Java_EnumConstant [Java_MoreEnumConstants]* [Java_Comment]*
69 all none all |   |   Java_MoreEnumConstants: ',' [Java_Comment]* Java_EnumConstant
    |   Java_EnumDeclarations: ';' Java_EnumClassBodyDeclaration*
    |   |   Java_EnumClassBodyDeclaration: (Java_ClassElement)
    |   Java_EnumInitializer: '(' [Java_Expression]* ')'
259,448 (none | 0% | none | 7% | 12% | 1% | none | none | 1% | 0% | 0% | 4% | 0% | 0% | 18% | 0% | none | 1% | 0% | 0% | none | 1% | 4% | 33% | 1% | none | 0% | 1% | none | none | 0% | 6% | 0% | 2% | 0% | 2% | 0% | 0% | 0% | 1% | 0% | 5% | 0%) Java_Expression: (Java_HexFloatingNumber | Java_HexNumber | Java_BinaryNumber | Java_Number | Java_Literal | Java_Character_Literal | Java_DotClass | Java_LambdaExpression | 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_ColonColon | Java_ColonColonNew | 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)
15,949 all all all |   Java_AdditiveExpression: Java_Expression ("+"|"-") Java_Expression
133 all all all |   Java_AndExpression: Java_Expression '&' Java_Expression
13,359 all all all |   Java_AssignmentExpression: Java_Expression ("="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|">>>="|"&="|"^="|"|=") Java_Expression
10,180 all |   Java_BuiltIn: ("false"|"true"|"null"|"this"|"super")
1,940 all 1.00 all all |   Java_CastExpression: '(' Java_Type* ')' Java_Expression
11,352 all all all none 74% all 0% |   Java_ClassCreationExpression: "new" Java_Type '(' [Java_Comment]* [Java_ArgumentList] ')' [Java_ClassOverride]
3 all 1.33 all |   |   Java_ClassOverride: '{' Java_ClassElement* '}'
253 all all all all all |   Java_ClassCreationWithInitializers: "new" Java_Type '{' [Java_ArgumentList] '}'
440 all all 1.02 |   Java_ClassCreationWithSubscript: "new" Java_Type Java_Subscript*
    |   Java_ColonColon: Java_Expression "::" Java_Expression
    |   Java_ColonColonNew: Java_Expression "::" "new"
    |   Java_CommentExpression: Java_Comment Java_Expression
1,428 all all all |   Java_ConditionalAndExpression: Java_Expression "&&" Java_Expression
814 all all all |   Java_ConditionalOrExpression: Java_Expression "||" Java_Expression
    |   Java_DotClass: Java_Type '.' "class"
4,982 all all all |   Java_EqualityExpression: Java_Expression ("=="|"!=") Java_Expression
14 all all all |   Java_ExclusiveOrExpression: Java_Expression '^' Java_Expression
123 all 1.50(3%) 96% all |   Java_ExpressionList: '{' [Java_Comment]* [Java_ArgumentList] '}'
17 all all all |   Java_InclusiveOrExpression: Java_Expression '|' Java_Expression
1,050 all all all |   Java_InstanceOfExpression: Java_Expression "instanceof" Java_Type
9 all all all all all all all |   Java_InterfaceCreationWithMethod: "new" ("Runnable"|"ActionListener"|"WindowAdapter") '(' ')' '{' Java_Method '}'
    |   Java_LambdaExpression: Java_LambdaVariables "->" Java_LambdaValue
    |   |   Java_LambdaValue: (Java_LambdaBlock | Java_Expression)
    |   |   |   Java_LambdaBlock: '{' [Java_StatementOrComment]* '}'
    |   |   Java_LambdaVariables: (Java_LambdaTypedVariableList | Java_LambdaVariableList | Java_Identifier)
    |   |   |   Java_LambdaTypedVariableList: '(' [Java_TypedIdentifier]* ')'
    |   |   |   |   Java_TypedIdentifier: Java_Type Java_Identifier
    |   |   |   Java_LambdaVariableList: '(' [Java_Identifier]* ')'
    |   Java_LogicalNotExpression: '~' Java_Expression
46,352 all all 71% all |   Java_MethodInvocation: Java_Variable '(' [Java_ArgumentList] ')'
1,243 all all all |   Java_MultiplicativeExpression: Java_Expression ("*"|"/"|"%") Java_Expression
154 all all |   Java_NegativeExpression: ("-"|"+") Java_Expression
1,387 all all |   Java_NotExpression: '!' Java_Expression
1,564 all all all |   Java_ParenthesizedExpression: '(' Java_Expression ')'
105 all all |   Java_PostDecrementExpression: Java_Variable "--"
2,371 all all |   Java_PostIncrementExpression: Java_Variable "++"
    |   Java_PreDecrementExpression: "--" Java_Variable
106 all all |   Java_PreIncrementExpression: "++" Java_Variable
4,493 all all all |   Java_RelationalExpression: Java_Expression ("<"|">"|"<="|">=") Java_Expression
75 all all all |   Java_ShiftExpression: Java_Expression (">>>"|"<<"|">>") Java_Expression
2,495 all all none all |   Java_Subfield: Java_Expression '.' [Java_GenericType] Java_Expression
29 all all 93% all |   Java_SubscriptExpression: Java_Expression '[' [Java_Expression] ']'
299 all all all all all |   Java_TrueFalseExpression: Java_Expression '?' Java_Expression ':' Java_Expression
86,564 all |   Java_VariableExpression: Java_Variable
    Java_Label: Java_Label_Definition ':'
10,294 none 1.24(98%) none all all all none none 22% all all Java_Method: [Java_Comment]* [Java_MethodModifier]* [Java_GenericType] Java_Type Java_Method_Definition Java_ParameterList [Java_EmptyBrackets]* [Java_MethodDefault] [Java_MethodThrows] [Java_Comment] Java_MethodBody
2,552 1.00(0%) 1.00(100%) all all 2% all all |   Java_Constructor: [Java_Annotation]* [Java_MethodModifier]* Java_Current_Class_Reference Java_ParameterList [Java_MethodThrows] [Java_Comment] Java_MethodBody
    |   Java_EmptyBrackets: '[' ']'
12,846 (95% | 5%) |   Java_MethodBody: (Java_MethodImplementation | ';')
12,206 none all 2.00(9%) 0% |   |   Java_MethodImplementation: [Java_Comment]* Java_StatementBlock [Java_Comment]* [';']
    |   Java_MethodDefault: "default" [Java_Expression]
15,081 (none | 92% | 8%) |   Java_MethodModifier: (Java_Comment | ("abstract"|"default"|"final"|"native"|"private"|"protected"|"public"|"static"|"strictfp"|"synchronized"|"transient"|"volatile") | Java_Annotation)
2,335 all 1.01 |   Java_MethodThrows: "throws" Java_Variable*
12,846 all 66% 1.63(29%) all Java_ParameterList: '(' [Java_MethodParameter] [Java_MoreParameters]* ')'
14,458 1.00(0%) all all all 1.00(1%) |   Java_MethodParameter: [Java_MethodParameterPrefix]* Java_Type ["..."] Java_Variable_Definition [Java_EmptySubscript]*
92 all |   |   Java_EmptySubscript: "[]"
9 (none | none | all) |   |   Java_MethodParameterPrefix: (Java_MethodNullable | Java_MethodSuppress | "final")
    |   |   |   Java_MethodNullable: '@' "Nullable"
    |   |   |   Java_MethodSuppress: '@' "SuppressWarnings" '(' Java_Literal ')'
6,030 all all |   Java_MoreParameters: ',' Java_MethodParameter
2,493 1.99(91%) none none 96% 7.04(92%) 1.00(all) Java_Program: [Java_Comment]* [Java_Annotation] [Java_Comment]* [Java_Package] [Java_ImportOrComment]* [Java_ClassOrEnum]*
2,505 (all | none) |   Java_ClassOrEnum: (Java_Class | Java_Enum)
15,923 all all all 3.51(100%) all |   Java_Import: "import" ["static"] Java_Identifier [Java_DotIdentifierStar]* ';'
55,864 all all |   |   Java_DotIdentifierStar: '.' Java_IdentifierStar
55,864 (100% | 0%) |   |   |   Java_IdentifierStar: (Java_Identifier | '*')
16,225 (2% | 98%) |   Java_ImportOrComment: (Java_Comment | Java_Import)
2,404 all all 3.24(97%) all |   Java_Package: "package" Java_Identifier [Java_MorePackageIds]* ';'
7,553 all all |   |   Java_MorePackageIds: '.' Java_Identifier
112,098 (0% | 11% | 30% | 3% | 0% | 0% | 0% | 1% | 0% | 0% | 2% | 10% | 7% | 1% | 0% | 0% | 1% | 1% | 1% | 31%) 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)
15 all 1.00 all all all all 1.38(87%) 27% all |   Java_AnnotationDefinition: [Java_Annotation] Java_MethodModifier* '@' "interface" Java_Identifier '{' [Java_Comment]* [Java_AnnotationParameter] '}'
4 all all all all all |   |   Java_AnnotationParameter: Java_Type Java_Identifier '(' ')' ';'
24,667 none all 2.90(99%) none all |   Java_StatementBlock: [Java_Label] '{' [Java_StatementOrComment]* [';'] '}'
77,741 (6% | 94%) |   |   Java_StatementOrComment: (Java_Comment | Java_Statement)
3,337 all all all Java_Subscript: '[' Java_Expression ']'
80,340 all all 3% 1.02(2%) Java_Type: [Java_Comment] Java_TypeName [Java_GenericType] [Java_ArrayType]*
1,486 all all |   Java_ArrayType: '[' ']'
506 all 1.00 |   Java_ExtendsType: ("extends"|"super") Java_Identifier_Reference*
2,414 all 100% all 2.86(25%) all |   Java_GenericType: '<' [Java_Type] ["[]"] [Java_MoreTypes]* '>'
1,735 all all |   |   Java_MoreTypes: ',' Java_Type
81,713 (0% | 76% | 23%) |   Java_TypeName: (Java_GenericTypeQuestion | Java_IdList | ("void"|"boolean"|"byte"|"short"|"int"|"long"|"char"|"float"|"double"|"String"|"class"))
260 all 58% |   |   Java_GenericTypeQuestion: '?' [Java_ExtendsType]
62,262 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]*
1,373 all all |   |   |   Java_MoreIds: '.' Java_TypeName
139,439 all 1.08(37%) 1.04(2%) Java_Variable: Java_VariableIdentifier [Java_DotVariable]* [Java_Subscript]*
55,920 all all |   Java_DotVariable: '.' Java_VariableIdentifier
195,359 (0% | 1% | 99%) |   Java_VariableIdentifier: (Java_CastedVariable | ("this"|"class"|"super") | Java_Identifier_Reference)
351 all all all all all all |   |   Java_CastedVariable: '(' '(' Java_Type ')' Java_Identifier_Reference ')'
1 all all all all Java_AssertStatement: "assert" Java_Expression [Java_AssertMessage] ';'
1 all all |   Java_AssertMessage: ':' Java_Expression
1,116 all none all Java_BreakStatement: "break" [Java_Identifier_Reference] ';'
542 all none all Java_ContinueStatement: "continue" [Java_Identifier_Reference] ';'
16 none all all all all all all all all Java_DoStatement: [Java_Label] "do" [Java_Comment] Java_Statement "while" '(' Java_Expression ')' ';'
34,689 all all all Java_ExpressionStatement: Java_Expression ';' [Java_Comment]
1,856 (33% | 67%) Java_ForStatement: (Java_ForCollectionStatement | Java_ForLoopStatement)
604 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,252 none all all none all all all all 1.00(all) all all all |   Java_ForLoopStatement: [Java_Label] "for" '(' [Java_Annotation] [Java_ForInit] ';' [Java_Expression] ';' [Java_Expression]* ')' [Java_Comment] Java_Statement
1,252 all 1.00 |   |   Java_ForInit: ["final"] Java_ForWhat*
1,252 (88% | 12%) |   |   |   Java_ForWhat: (Java_ForWithType | Java_Expression)
1,099 all all |   |   |   |   Java_ForWithType: Java_Type Java_Expression
10,988 none all all all none all 1.00(1%) all 23% Java_IfStatement: [Java_Label] "if" '(' Java_Expression [Java_Comment]* ')' [Java_Comment]* Java_Statement [Java_IfElseClause]
2,478 1.36(1%) all all all |   Java_IfElseClause: [Java_Comment]* "else" [Java_Comment] Java_Statement
8,306 all 92% all Java_ReturnStatement: "return" [Java_Expression] ';'
1,674 all all 95% all all Java_SuperStatement: "super" '(' [Java_ArgumentList] ')' ';'
296 all all all all all 4.76 all Java_SwitchStatement: "switch" '(' Java_Expression ')' '{' Java_SwitchClause* '}'
1,408 (85% | 15% | none) |   Java_SwitchClause: (Java_CaseClause | Java_DefaultClause | Java_Comment)
1,197 all all all 1.89(92%) |   |   Java_CaseClause: "case" Java_Expression ':' [Java_StatementOrComment]*
211 all all 1.11(94%) |   |   Java_DefaultClause: "default" ':' [Java_StatementOrComment]*
5 all all all all all Java_SynchronizedStatement: "synchronized" '(' Java_Expression ')' Java_Statement
1,428 all all all Java_ThrowStatement: "throw" Java_Expression ';'
921 none all none all 4.64 all none 1.01(100%) 1% Java_TryStatement: [Java_Label] "try" [Java_TryResources] '{' Java_StatementOrComment* '}' [Java_Comment]* [Java_CatchBlock]* [Java_FinallyBlock]
925 all all all all none all all all |   Java_CatchBlock: "catch" '(' ["final"] Java_Type [Java_MoreExceptions]* Java_Identifier ')' Java_Statement
    |   |   Java_MoreExceptions: '|' Java_Type
5 all all |   Java_FinallyBlock: "finally" Java_Statement
    |   Java_TryResources: '(' Java_TryResource* ')'
    |   |   Java_TryResource: ["final"] Java_Type Java_Variable_Definition Java_DataInitialValue
838 none all all all all all all Java_WhileStatement: [Java_Label] "while" '(' Java_Expression ')' [Java_Comment] Java_Statement

Terminals = 14 (instances=615,136)
Tokens = 145 (instances=1,881,937)

(*) 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.