Eagle Legacy Modernization, LLC

Gupta Grammar

Main program: Gupta_Program

 Count  Terminals:
4 Gupta_CommentToEndOfLine: Comment
6 Gupta_Data_Definition: An identifier
3 Gupta_Function_Definition: An identifier
33 Gupta_Identifier_Reference: An identifier
11 Gupta_Literal: A string enclosed in quotes
11 Gupta_Number: A number
 Count  Statistics(*) Tokens:
1 all all all all all Gupta_Application: "Application" "description" Gupta_CommentToEndOfLine Gupta_Libraries Gupta_Global_Declarations
1 all all 1.00 Gupta_Application_Actions: "Application" "Actions" Gupta_OnEvent*
1 all all 1.00 |   Gupta_OnEvent: "On" ("SAM_AppStartup") Gupta_Statement*
1 all all Gupta_Class_Definitions: "Class" "Definitions"
1 all all all Gupta_Constants: "Constants" Gupta_System_Constants Gupta_User_Constants
1 all |   Gupta_System_Constants: "System"
1 all 1.00 |   Gupta_User_Constants: "User" Gupta_Variable_Declaration*
1 all all Gupta_External_Functions: "External" "Functions"
1 all Gupta_Formats: "Formats"
3 all all all all all all all all all Gupta_Function: "Function" ':' Gupta_Function_Definition Gupta_Function_Description Gupta_Function_Returns Gupta_Function_Parameters Gupta_Function_Static_Variables Gupta_Function_Local_Variables Gupta_Function_Actions
3 all 2.33 |   Gupta_Function_Actions: "Actions" Gupta_Statement*
3 all all |   Gupta_Function_Description: "Description" Gupta_CommentToEndOfLine
3 all all 1.50(67%) |   Gupta_Function_Local_Variables: "Local" "Variables" [Gupta_Variable_Declaration]*
3 all 1.00(67%) |   Gupta_Function_Parameters: "Parameters" [Gupta_Variable_Declaration]*
3 all 67% |   Gupta_Function_Returns: "Returns" [Gupta_Function_Return_Type]
2 all all |   |   Gupta_Function_Return_Type: Gupta_Type ':'
3 all all none |   Gupta_Function_Static_Variables: "Static" "Variables" [Gupta_Variable_Declaration]*
1 all all all all all all all all all all all all Gupta_Global_Declarations: "Global" "Declarations" Gupta_Window_Defaults Gupta_Formats Gupta_External_Functions Gupta_Constants Gupta_Resources Gupta_Variables Gupta_Internal_Functions Gupta_Named_Menus Gupta_Class_Definitions Gupta_Application_Actions
1 all all 3.00(all) Gupta_Internal_Functions: "Internal" "Functions" [Gupta_Function]*
1 all Gupta_Libraries: "Libraries"
1 all all Gupta_Named_Menus: "Named" "Menus"
1 all Gupta_Resources: "Resources"
1 all Gupta_Variables: "Variables"
1 all all Gupta_Window_Defaults: "Window" "Defaults"
3 all none Gupta_Condition: Gupta_ConditionClause [Gupta_AndOr]*
    |   Gupta_AndOr: ("AND"|"OR") Gupta_ConditionClause
3 all all |   Gupta_ConditionClause: Gupta_Expression Gupta_OperatorExpression
3 all all |   |   Gupta_OperatorExpression: Gupta_Relational_Operator Gupta_Expression
3 (none | none | none | all | none) |   |   |   Gupta_Relational_Operator: (Gupta_Greater_Than | Gupta_Less_Than | Gupta_Not_Equals | (">="|"<="|"<"|">"|"=") | ("GT"|"LT"|"NE"))
    |   |   |   |   Gupta_Greater_Than: "GREATER" "THAN"
    |   |   |   |   Gupta_Less_Than: "LESS" "THAN"
    |   |   |   |   Gupta_Not_Equals: "NOT" '='
66 (17% | 15% | none | 14% | 27% | none | none | 6% | 21%) Gupta_Expression: (Gupta_Number | Gupta_Literal | Gupta_Parens | Gupta_FunctionCall | Gupta_IdentifierExpression | Gupta_UnarySign | Gupta_Multiplicative_Expression | Gupta_Additive_Expression | Gupta_StrCat_Expression)
4 all all all |   Gupta_Additive_Expression: Gupta_Expression ("+"|"-") Gupta_Expression
9 all |   Gupta_FunctionCall: Gupta_Function_Call
18 all |   Gupta_IdentifierExpression: Gupta_Identifier_Reference
    |   Gupta_Multiplicative_Expression: Gupta_Expression ("*"|"/") Gupta_Expression
    |   Gupta_Parens: '(' Gupta_Expression ')'
14 all all all |   Gupta_StrCat_Expression: Gupta_Expression "||" Gupta_Expression
    |   Gupta_UnarySign: ("-"|"+") Gupta_Expression
11 all all 91% 1.20(45%) all Gupta_Function_Call: Gupta_Identifier_Reference '(' [Gupta_Expression] [Gupta_More_Arguments]* ')'
6 all all |   Gupta_More_Arguments: [','] Gupta_Expression
1 all Gupta_Program: Gupta_Application
16 (13% | 19% | 13% | 25% | 25% | 6%) Gupta_Statement: (Gupta_Call_Statement | Gupta_Comment_Statement | Gupta_If_Statement | Gupta_Return_Statement | Gupta_Set_Statement | Gupta_While_Statement)
8 all Gupta_Type: ("String"|"Number")
6 all all all 17% Gupta_Variable_Declaration: Gupta_Type ':' Gupta_Data_Definition [Gupta_InitialValue]
1 all all |   Gupta_InitialValue: '=' Gupta_Literal
2 all all Gupta_Call_Statement: "Call" Gupta_Function_Call
3 all Gupta_Comment_Statement: '!'
2 all all 1.00 all Gupta_If_Statement: "If" Gupta_Condition Gupta_Statement* [Gupta_Else_Statement]
2 all 1.00 |   Gupta_Else_Statement: "Else" Gupta_Statement*
4 all all Gupta_Return_Statement: "Return" Gupta_Expression
4 all all all all Gupta_Set_Statement: "Set" Gupta_Identifier_Reference '=' Gupta_Expression
1 all all 4.00 Gupta_While_Statement: "While" Gupta_Condition Gupta_Statement*

Terminals = 6 (instances=68)
Tokens = 54 (instances=229)

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