Main program: VB_Program
VB syntax:
Count | Terminals: | |
14 | VB_Comment: ' comment to end of line | |
238 | VB_EndOfLine: End of line | |
464 | VB_Identifier_Reference: An identifier | |
VB_Label_Definition: An identifier | ||
129 | VB_Literal: quotes:" escape:none doubled:yes multiline:no | |
85 | VB_Number: exponent_chars:Ee suffix_chars:none trailing_period:yes ignore_char:none | |
11 | VB_Sub_Definition: An identifier | |
21 | VB_Variable_Definition: An identifier | |
Count | Statistics(*) | Tokens: |
12 | all all all | VB_AdditiveExpression: VB_Expression ("+"|"-") VB_Expression |
VB_ArrayExpression: "Array" '(' [VB_Expression]* ')' | ||
VB_BitwiseAndExpression: VB_Expression '&' VB_Expression | ||
5 | all | VB_BuiltIn: ("false"|"true"|"nothing") |
VB_CommentExpression: VB_Comment VB_Expression | ||
101 | all all all | VB_ConcatExpression: VB_Expression '&' VB_Expression |
VB_EqualityExpression: VB_Expression ("is"|"like"|"isnot") VB_Expression | ||
VB_ExponentExpression: VB_Expression '^' VB_Expression | ||
20 | all all | VB_FunctionCall: VB_Identifier_Reference VB_FnCallArguments |
20 | all 1.20(all) all | | VB_FnCallArguments: '(' [VB_Expression]* ')' |
VB_InstanceOfExpression: VB_Expression "instanceof" VB_Type | ||
VB_LogicalAndExpression: VB_Expression ("and"|"andalso") VB_Expression | ||
VB_LogicalNotExpression: "NOT" VB_Expression | ||
1 | all all all | VB_LogicalOrExpression: VB_Expression ("or"|"orelse") VB_Expression |
VB_LogicalXorExpression: VB_Expression "xor" VB_Expression | ||
VB_MultiplicativeExpression: VB_Expression VB_MultiplyOperation VB_Expression | ||
| VB_MultiplyOperation: ("mod" | ("*"|"/"|"\")) | ||
VB_NegativeExpression: ("-"|"+") VB_Expression | ||
12 | all all all | VB_ParenthesizedExpression: '(' VB_Expression ')' |
14 | all all all | VB_RelationalExpression: VB_Expression ("="|"<="|">="|"<>"|"<"|">") VB_Expression |
VB_ShiftExpression: VB_Expression ("<<"|">>") VB_Expression | ||
VB_Subfield: VB_Expression '.' VB_Expression | ||
219 | all | VB_VariableExpression: VB_Variable |
VB_CStrFunction: "CStr" '(' VB_Expression ')' | ||
1 | all all all all | VB_LenFunction: "LEN" '(' VB_Expression ')' |
1 | all all all all all all all all | VB_MidFunction: "MID" '(' VB_Expression ',' VB_Expression ',' VB_Expression ')' |
1 | all all all all | VB_UcaseFunction: ("Lcase"|"Ucase") '(' VB_Expression ')' |
61 | all all all | VB_AssignmentStatement: VB_Variable '=' VB_Expression |
VB_AttributeStatement: "attribute" VB_Identifier_Reference '=' VB_Expression | ||
VB_BeginStatement: "begin" VB_EndOfLine VB_Element* "end" | ||
15 | all all 73% | VB_CallStatement: "call" VB_Identifier_Reference [VB_CallArguments] |
11 | all 3.00(all) all | | VB_CallArguments: '(' [VB_Expression]* ')' |
VB_CloseStatement: "close" '#' VB_Number | ||
4 | all all all none 2.00(all) none none | VB_DataDeclaration: ("private"|"public"|"dim"|"const") ["const"] VB_Variable_Definition [VB_Subscript] [VB_MoreVariables]* [VB_DataType] [VB_DataInitialization] |
| VB_DataInitialization: '=' VB_Expression | ||
| VB_DataType: "as" VB_Type | ||
8 | all all none | | VB_MoreVariables: ',' VB_Variable_Definition [VB_Subscript] |
1 | all all all 4.00 all none | VB_DoStatement: "Do" [VB_DoCondition] VB_EndOfLine VB_Element* "Loop" [VB_DoCondition] |
1 | all all | | VB_DoCondition: ("While"|"Until") VB_Expression |
4 | all all | VB_ExitStatement: "exit" ("do"|"for"|"function"|"sub") |
57 | all none | VB_ExpressionStatement: VB_Expression [VB_Comment] |
VB_ForEachStatement: "for" "each" VB_Identifier_Reference "in" VB_Expression VB_EndOfLine VB_Element* "next" [VB_Identifier_Reference] | ||
6 | all all all all all all none all 9.17 all none | VB_ForStatement: "for" VB_Identifier_Reference '=' VB_Expression "to" VB_Expression [VB_ForStep] VB_EndOfLine VB_Element* "next" [VB_Identifier_Reference] |
| VB_ForStep: "step" VB_Expression | ||
5 | all all all all all none all 1.00(all) all all | VB_Function: [("private"|"public")] "function" VB_Sub_Definition VB_Parameters ["as"] [VB_Type] VB_EndOfLine [VB_Element]* "end" "function" |
VB_GotoStatement: "goto" VB_Identifier_Reference | ||
13 | all all all all | VB_IfStatement: "if" VB_Expression "then" VB_IfType |
7 | none all all 1.14 | | VB_IfElseClause: [VB_Comment]* "else" VB_EndOfLine VB_Element* |
| VB_IfElseIfClause: [VB_Comment]* "elseif" VB_Expression "then" VB_EndOfLine VB_Element* | ||
9 | all 8.78 none 78% all all | | VB_IfMultiLiner: VB_EndOfLine VB_Element* [VB_IfElseIfClause]* [VB_IfElseClause] "end" "if" |
4 | all | | VB_IfOneLiner: VB_Statement |
13 | (31% | 69%) | | VB_IfType: (VB_IfOneLiner | VB_IfMultiLiner) |
VB_MessageBoxStatment: "MsgBox" VB_Expression | ||
VB_OnStatement: "on" "error" VB_OnWhat | ||
| VB_OnWhat: (VB_OnGotoLabel | VB_OnGotoZero | VB_OnResume) | ||
| | VB_OnGotoLabel: "goto" VB_Identifier_Reference | ||
| | VB_OnGotoZero: "goto" VB_Number | ||
| | VB_OnResume: "resume" "next" | ||
VB_OpenStatement: "open" VB_Expression "for" ("input"|"output") "as" '#' VB_Number | ||
VB_OptionStatement: "option" "explicit" | ||
VB_PrintStatement: "print" '#' VB_Number ',' VB_Expression | ||
10 | all all all all | VB_SetStatement: "set" VB_Variable '=' VB_Expression |
6 | all all all all all 4.17(all) all all | VB_Subroutine: [("private"|"public")] "sub" VB_Sub_Definition VB_Parameters VB_EndOfLine [VB_Element]* "end" "sub" |
VB_VersionStatement: "version" VB_Number "class" | ||
VB_WhileStatement: "While" VB_Expression VB_EndOfLine VB_Element* ("Wend"|"End") ["While"] | ||
13 | all all all all | VB_WscriptEcho: "wscript" '.' ("echo"|"quit") VB_Expression |
204 | all 0% all | VB_Element: VB_Statement [VB_Comment] VB_EndOfLine |
208 | (none | 6% | 29% | none | none | 7% | none | 2% | 2% | 0% | 3% | none | 2% | none | 6% | none | none | none | none | none | 5% | 3% | none | none | 6% | 27%) | | VB_Statement: (VB_Label | VB_Comment | VB_AssignmentStatement | VB_AttributeStatement | VB_BeginStatement | VB_CallStatement | VB_CloseStatement | VB_DataDeclaration | VB_ExitStatement | VB_DoStatement | VB_ForStatement | VB_ForEachStatement | VB_Function | VB_GotoStatement | VB_IfStatement | VB_MessageBoxStatment | VB_OnStatement | VB_OpenStatement | VB_OptionStatement | VB_PrintStatement | VB_SetStatement | VB_Subroutine | VB_VersionStatement | VB_WhileStatement | VB_WscriptEcho | VB_ExpressionStatement) |
| | VB_Label: VB_Label_Definition ':' | ||
601 | (14% | 21% | none | 1% | 0% | 0% | 0% | none | 3% | none | none | 36% | 2% | none | none | none | none | 2% | 17% | none | 2% | none | none | none | none | none | 0%) | VB_Expression: (VB_Number | VB_Literal | VB_ArrayExpression | VB_BuiltIn | VB_MidFunction | VB_LenFunction | VB_UcaseFunction | VB_CStrFunction | VB_FunctionCall | VB_NegativeExpression | VB_LogicalNotExpression | VB_VariableExpression | VB_ParenthesizedExpression | VB_CommentExpression | VB_Subfield | VB_ExponentExpression | VB_MultiplicativeExpression | VB_AdditiveExpression | VB_ConcatExpression | VB_ShiftExpression | VB_RelationalExpression | VB_InstanceOfExpression | VB_EqualityExpression | VB_BitwiseAndExpression | VB_LogicalXorExpression | VB_LogicalAndExpression | VB_LogicalOrExpression) |
11 | all 1.57(64%) all | VB_Parameters: '(' [VB_Parameter]* ')' |
9 | all all none | | VB_Parameter: [("byval"|"byref")] VB_Variable_Definition [VB_ParameterAs] |
| | VB_ParameterAs: "as" VB_Type | ||
4 | 7.00(all) | VB_Program: [VB_Element]* |
91 | all 1.75(93%) all | VB_Subscript: '(' [VB_Expression]* ')' |
VB_Type: (("boolean"|"byte"|"sbyte"|"char"|"date"|"short"|"integer"|"long"|"ushort"|"uinteger"|"ulong"|"single"|"double"|"decimal"|"range"|"string"|"worksheet")) | ||
290 | all none 1.39(33%) | VB_Variable: VB_Identifier_Reference [VB_Subscript] [VB_VariableField]* |
133 | all all 68% | | VB_VariableField: '.' VB_Identifier_Reference [VB_Subscript] |
Terminals = 8 (instances=962)
Tokens = 78 (instances=2,206)
(*) 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.