Main program: CPlus_Program
Cpp syntax:
Count | Terminals: | |
CPlus_Class_Definition: An identifier | ||
137 | CPlus_Class_Reference: An identifier | |
Count | Statistics(*) | Tokens: |
CPlus_Class: ["friend"] ("class"|"struct") [CPlus_ClassModifier]* [CPlus_NamespaceList] CPlus_Class_Definition [C_Generic] ["final"] [CPlus_ClassExtendList] CPlus_ClassBody | ||
| CPlus_ClassBody: (CPlus_ClassBlockBody | ';') | ||
| | CPlus_ClassBlockBody: '{' [CPlus_ClassElement]* '}' | ||
| CPlus_ClassElement: (CPlus_ClassPublicPrivate | CPlus_Constructor | CPlus_Operator | CPlus_Data | CPlus_Method | CPlus_Extern | CPlus_Class | CPlus_Using | CPlus_Template | C_StatementOrComment) | ||
| | CPlus_ClassPublicPrivate: ("public"|"private"|"protected") ':' | ||
| CPlus_ClassExtendList: ':' CPlus_ClassExtends* | ||
| | CPlus_ClassExtends: ["public"] ["::"] [CPlus_ExtendsNamespace]* C_Identifier_Reference [C_Generic] | ||
| | | CPlus_ExtendsNamespace: C_Identifier_Reference "::" | ||
| CPlus_ClassModifier: ("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN") [C_ParenthesizedExpressions] | ||
137 | (all | none) | CPlus_Constructor: (CPlus_ConstructorParameterLess | CPlus_ConstructorWithParameters) |
137 | all none all all all | | CPlus_ConstructorParameterLess: [("const"|"constexpr")] [CPlus_NamespaceList] CPlus_Class_Reference C_Expression ';' |
| CPlus_ConstructorWithParameters: [("virtual"|"constexpr"|"explicit")] ['~'] [CPlus_NamespaceList] CPlus_Class_Reference C_Function_ParameterDefs ["override"] [CPlus_ConstructorCallSupers] CPlus_ConstructorValue | ||
| | CPlus_ConstructorCallSupers: ':' CPlus_ConstructorCallSuper* | ||
| | | CPlus_ConstructorCallSuper: CPlus_Class_Reference [CPlus_NamespaceList] '(' [C_ArgumentList] ')' | ||
CPlus_ConstructorValue: (CPlus_ConstructorNoBraces | C_StatementBlock) | ||
| CPlus_ConstructorNoBraces: [CPlus_ConstructorInitialValue] ';' | ||
| | CPlus_ConstructorInitialValue: '=' ("delete"|"default") | ||
CPlus_Data: [C_DataModifiers]* C_Type CPlus_Datum* | ||
| CPlus_Datum: [CPlus_NamespaceList] C_Variable_Definition [C_DataInitialValue] ';' | ||
CPlus_Extern: C_Extern_C CPlus_Extern_What | ||
| CPlus_Extern_What: (CPlus_Method | C_StatementBlock | C_TypeDef) | ||
141 | all all all all none all | CPlus_Method: CPlus_MethodTypeAndName C_Function_ParameterDefs ["const"] ["override"] [C_Comment]* CPlus_MethodBody |
141 | (all | none) | | CPlus_MethodBody: (CPlus_MethodUsing | C_FunctionBody) |
141 | all none 6.44(99%) all | | | CPlus_MethodUsing: '{' [CPlus_Using]* [C_StatementOrComment]* '}' |
141 | (4% | 96%) | | CPlus_MethodTypeAndName: (CPlus_MethodNoType | CPlus_MethodWithType) |
6 | all all all | | | CPlus_MethodNoType: CPlus_NamespaceList ['~'] C_Identifier_Reference |
135 | all all 33% all | | | CPlus_MethodWithType: ["const"] CPlus_Type [CPlus_NamespaceList] C_Identifier_Reference |
CPlus_Namespace: "namespace" [CPlus_NamespaceList] [C_Namespace_Definition] '{' [CPlus_NamespaceElement]* '}' | ||
51 | all none all | | CPlus_NamespaceColon: C_Identifier_Reference [C_Generic] "::" |
| CPlus_NamespaceElement: (CPlus_Data | CPlus_ClassElement | CPlus_Namespace | CPlus_Class | CPlus_Template | CPlus_Using | C_StatementOrComment) | ||
51 | (none | all) | | CPlus_NamespaceList: (CPlus_NamespaceListColons | CPlus_NamespaceListNoColons) |
| | CPlus_NamespaceListColons: "::" [CPlus_NamespaceColon]* | ||
51 | 1.00 | | | CPlus_NamespaceListNoColons: CPlus_NamespaceColon* |
CPlus_Operator: ["constexpr"] [CPlus_NamespaceList] CPlus_Type ['&'] [CPlus_NamespaceList] "operator" ("+"|"-"|"*"|"=="|"!="|"="|"<<"|"()"|"+="|"-="|"<"|">"|"&") C_Function_ParameterDefs ["const"] [CPlus_ConstructorValue] | ||
11 | 26.45(all) none | CPlus_Program: [CPlus_Element]* [C_StatementOrComment]* |
291 | (25% | none | none | none | 48% | none | none | none | none | 26% | 1%) | | CPlus_Element: (C_Comment | CPlus_Namespace | CPlus_Class | CPlus_Using | CPlus_Method | CPlus_Extern | ObjectiveC_Class | ObjectiveC_Interface | ObjectiveC_Protocol | CMacro_StatementOrComment | C_StatementOrComment) |
CPlus_Template: "template" '<' CPlus_TemplateElement* '>' [CPlus_TemplateWhat] | ||
| CPlus_TemplateClass: (CPlus_Class_Definition | "..." | C_Type) | ||
| CPlus_TemplateElement: ("class"|"typename") [CPlus_TemplateEquals] CPlus_TemplateClass* | ||
| CPlus_TemplateEquals: [C_Variable_Definition] '=' | ||
| CPlus_TemplateWhat: (C_Function | CPlus_Operator | CPlus_Class) | ||
135 | 1.00(57%) none all none none all none | CPlus_Type: [C_TypeModifier]* [C_NamespaceType]* C_TypeBase [C_Generic] [C_TypeFunction] ["const"] [C_TypeStar]* |
CPlus_Using: "using" ["namespace"] CPlus_UsingWhat ';' | ||
| CPlus_UsingColons: ["::"] [CPlus_UsingColon]* C_Type | ||
| | CPlus_UsingColon: C_Identifier_Reference [C_Generic] "::" | ||
| CPlus_UsingType1: "type" '=' CPlus_UsingColons | ||
| CPlus_UsingType2: C_Type '=' CPlus_UsingColons | ||
| CPlus_UsingWhat: (CPlus_UsingType1 | CPlus_UsingType2 | C_Expression | CPlus_UsingColons) |
Terminals = 2 (instances=137)
Tokens = 48 (instances=1,569)
(*) 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.