Eagle Legacy Modernization, LLC

C Grammar

Main program: C_Program

C syntax:

 Count  Terminals:
  CMacro_Character_Literal: quotes:' escape:\ doubled:no multiline:no
217 CMacro_Comment: /* comment */ or // comment to end of line
  CMacro_CommentRestOfLine: comment to end of line
102 CMacro_Define_Definition: An identifier
5,298 CMacro_EndOfLine: End of line
  CMacro_HexNumber: A hex number
  CMacro_Identifier: An identifier
39 CMacro_Identifier_Reference: An identifier
4,617 CMacro_IncludeSys: include system file
59 CMacro_Literal: quotes:" escape:\ doubled:no multiline:no
56 CMacro_MultiLineText: multiline text
11 CMacro_Number: exponent_chars:Ee suffix_chars:Lf trailing_period:yes ignore_char:none
31 CMacro_Parameter_Definition: An identifier
489 CMacro_RestOfLine: Rest of the line
4,307 C_Character_Literal: quotes:' escape:\ doubled:no multiline:no
301,443 C_Comment: /* comment */ or // comment to end of line
720,929 C_Field_Definition: An identifier
546,201 C_Function_Definition: An identifier
10,738 C_HexNumber: A hex number
2,735,083 C_Identifier_Reference: An identifier
226 C_Label_Definition: An identifier
903 C_Label_Reference: An identifier
74,457 C_Literal: quotes:" escape:\ doubled:no multiline:no
  C_Literal_C: quotes:" escape:\ doubled:no multiline:no
322,392 C_Number: exponent_chars:Ee suffix_chars:LlFfUu trailing_period:yes ignore_char:'
448,899 C_Type_Definition: An identifier
1,228,359 C_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
162,370 1.42(0%) all 2.58(79%) 1.00(0%) 0% C_ArgumentList: [C_IgnoreItem]* C_ExpressionArg [C_MoreArgument]* [C_IgnoreItem]* [',']
494,072 (none | 100% | none | 0% | none) |   C_ExpressionArg: (C_ExpressionArgType | C_Expression | "const" | C_TypePrimitive | C_Lambda)
    |   |   C_ExpressionArgType: C_Identifier_Reference C_TypeStar*
175 (all | none) |   C_IgnoreItem: (C_Comment | CMacro_StatementOrComment)
331,702 all 1.01(0%) all |   C_MoreArgument: ',' [C_IgnoreItem]* C_ExpressionArg
45,408 (99% | 1%) C_Data: (C_RegularData | C_FunctionPointer)
44,962 1.04(47%) all 1.00(0%) none all 1.00(10%) 12% 1.66(5%) all 2.59(13%) |   C_RegularData: [C_DataModifiers]* C_Type [C_DataModifiers]* [C_Comment]* C_Variable_Definition [C_Subscript]* [C_DataInitialValue] [C_MoreIdentifiers]* ';' [C_Comment]*
3,771 all 1.05(20%) all 1.02(2%) 3% |   |   C_MoreIdentifiers: ',' [C_TypeStar]* C_Variable_Definition [C_Subscript]* [C_DataInitialValue]
5,590 none all none all none C_DataInitialValue: [CMacro_StatementOrComment] '=' [CMacro_StatementOrComment] C_Expression [CMacro_StatementOrComment]
21,850 (all | none) C_DataModifiers: (("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN") | C_Declaration)
    C_Declaration: '[' '[' ("fallthrough"|"__fallthrough__"|"maybe_unused"|"nodiscard") ']' ']' ';'
38,866 all 0% all 4% none 99% 67% C_Enum: "enum" [C_Comment] ["class"] [C_Identifier_Reference] [C_EnumType] [C_TypeEnumValues] [';']
    |   C_EnumType: ':' C_Type
38,654 all 1.22(1%) all 25% none 3.90(97%) all |   C_TypeEnumValues: '{' [C_Comment]* C_Variable_Definition [C_EnumInitializer] [C_Comment]* [C_MoreEnums]* '}'
25,855 all none all |   |   C_EnumInitializer: '=' [CMacro_StatementOrComment] C_Expression
146,513 all 1.19(4%) all 11% 1.00(0%) |   |   C_MoreEnums: ',' [C_Comment]* C_Variable_Definition [C_EnumInitializer] [C_Comment]*
2,848,384 (0% | 10% | 0% | 2% | 8% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 6% | none | 0% | 0% | 4% | 0% | 0% | 0% | 0% | 36% | 3% | 0% | 0% | 0% | 17% | 0% | none | none | 0% | 4% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 6%) C_Expression: (C_HexNumber | C_Number | C_Character_Literal | C_Literals | C_CastExpression | C_ExpressionList | C_StrCmpFunction | C_StrNCmpFunction | C_StrCatFunction | C_StrCpyFunction | C_StrDupFunction | C_StrLenFunction | C_ExitFunction | C_FunctionCall | C_FunctionName | C_FunctionPointerCall | C_PreIncrementExpression | C_PostIncrementVariable | C_NegativeExpression | C_BitwiseNotExpression | C_LogicalNotExpression | C_BuiltIn | C_VariableExpression | C_AddressOfVariable | C_SizeOfType | C_SizeOfExpr | C_VaArgExpr | C_Parenthesized_Expression | C_StarExpression | C_CommentExpression | CPlus_NewExpression | C_SubscriptExpression | C_DotSubfield | C_ArrowSubfield | C_MultiplicativeExpression | C_AdditiveExpression | C_ShiftExpression | C_RelationalExpression | C_EqualityExpression | C_BitwiseAndExpression | C_LogicalXorExpression | C_BitwiseOrExpression | C_LogicalAndExpression | C_LogicalOrExpression | C_TrueFalseExpression | C_AssignmentExpression)
    C_Extern_C: "extern" C_Literal_C
526,673 none 0% all 0% all 0% all all all 2.48(0%) all all C_Function: [C_Extern_C] [C_FunctionDeclspec] ["__extension__"] [C_FunctionAttributes] [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN")] [C_Comment] [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN")] C_FunctionTypeName C_Function_ParameterDefs [C_Comment]* ["const"] C_FunctionBody
526,673 (none | none | 98% | 2%) |   C_FunctionBody: (C_FunctionEqualsDefault | C_FunctionEqualsZero | C_FunctionNoBody | C_FunctionImplementation)
    |   |   C_FunctionEqualsDefault: '=' "default"
    |   |   C_FunctionEqualsZero: '=' C_Number
513,563 0% 1.53(15%) all |   |   C_FunctionNoBody: [C_FunctionAssembler] [C_FunctionAttributes]* ';'
2,199 all all all all all |   |   |   C_FunctionAssembler: "__asm__" '(' C_Literal C_Literal ')'
73 all all all all |   C_FunctionDeclspec: ("_declspec"|"__declspec") '(' "dllexport" ')'
16,552 all |   C_FunctionDotDotDotParameter: "..."
13 all all all |   C_FunctionFunctionParameter: C_Type C_Function_Definition C_Function_ParameterDefs
13,110 all 27.68(99%) all none |   C_FunctionImplementation: '{' [C_StatementOrComment]* '}' [';']
    |   C_FunctionParamAmpersand: '&' C_Type
1,755,919 (0% | none | 0% | 1% | 99%) |   C_FunctionParameter: (C_FunctionPointer | C_FunctionParamAmpersand | C_FunctionFunctionParameter | C_FunctionDotDotDotParameter | C_FunctionRegularParameter)
1,736,472 all all all 57% 1.01(0%) none 0% |   C_FunctionRegularParameter: ["const"] C_Type [("__restrict"|"restrict")] [C_Variable_Definition] [C_Subscript]* [C_FunctionDefaultValue] [C_Comment]
    |   |   C_FunctionDefaultValue: '=' C_Expression
526,673 (none | all) |   C_FunctionTypeName: ("main" | C_Function_TypeAndName)
548,168 all none 100% none 2.60(65%) all |   C_Function_ParameterDefs: '(' [C_Comment] [C_FunctionParameter] [C_Comment] [C_MoreParameterDefs]* ')'
526,673 all 1.00(0%) all |   C_Function_TypeAndName: C_Type [C_Comment]* C_Function_Definition
1,076,128 all 0% all |   C_MoreParameterDefs: ',' [C_Comment] C_FunctionParameter
115,604 all all all all 1.00(57%) all all C_FunctionAttributes: "__attribute__" '(' '(' C_FunctionAttribute [C_FunctionMoreAttributes]* ')' ')'
181,564 (0% | 2% | 12% | 3% | 82%) |   C_FunctionAttribute: (C_FunctionAttributeAllocSize | C_FunctionAttributeFormat | C_FunctionAttributeNonNull | C_FunctionAttributeSentinel | ("deprecated"|"__const__"|"__deprecated__"|"__leaf__"|"__malloc__"|"__noreturn__"|"__nothrow__"|"__pure__"|"__warn_unused_result__"))
864 all all 1.67 all |   |   C_FunctionAttributeAllocSize: "__alloc_size__" '(' C_Number* ')'
3,391 all all all all all all all all |   |   C_FunctionAttributeFormat: "__format__" '(' ("__printf__"|"__scanf__"|"__strfmon__") ',' C_Number ',' C_Number ')'
22,511 all all 2.23 all |   |   C_FunctionAttributeNonNull: "__nonnull__" '(' C_Number* ')'
5,304 all all all all |   |   C_FunctionAttributeSentinel: "__sentinel__" '(' C_Number ')'
65,960 all all |   C_FunctionMoreAttributes: ',' C_FunctionAttribute
    C_Generic: '<' [C_GenericType]* '>'
    |   C_GenericType: (C_Plus_GenericType | C_Plus_GenericVoid | C_Number | C_Literal)
    |   |   C_Plus_GenericType: C_Type ["..."]
    |   |   C_Plus_GenericVoid: "void" '(' [C_Type]* ')'
226 all all C_Label: C_Label_Definition ':'
    C_Lambda: [C_LambdaBrackets] C_Function_ParameterDefs "->" C_Type C_Statement
    |   C_LambdaBrackets: '[' [C_LambdaParam]* ']'
    |   |   C_LambdaParam: ['&'] [C_Variable]
474,878 all 1.25 all C_ParenthesizedExpressions: '(' C_Expression* ')'
1,138 774.04(all) C_Program: [C_StatementOrComment]*
1,317,778 (8% | 14% | 3% | 40% | 33% | 2% | 0% | 0%) |   C_StatementOrComment: (C_Comment | C_TypeDef | C_Data | C_Function | C_Statement | C_Enum | C_AsmVolatile | CMacro_StatementOrComment)
483,727 (none | 0% | 0% | none | 7% | 0% | none | 1% | 0% | 0% | 1% | 0% | 0% | 9% | 0% | 4% | 0% | 0% | none | 5% | 0% | 73%) C_Statement: (C_Data | C_Label | ';' | CMacro_StatementOrComment | C_StatementBlock | C_Embed_Assembler | C_AutoLock | C_BreakStatement | C_ContinueStatement | C_DoStatement | C_ForStatement | C_FprintfStatement | C_GotoStatement | C_IfStatement | C_PrintfStatement | C_ReturnStatement | C_SwitchStatement | C_WhileStatement | C_Declaration | C_TypeStruct | C_TypeUnion | C_ExpressionStatement)
295,578 all 98% all C_Subscript: '[' [C_Expression] ']'
3,414,094 1.00(0%) none all none 0% all 1.01(6%) C_Type: [C_TypeModifier]* [C_NamespaceType]* C_TypeBase [C_Generic] [C_TypeFunction] ["const"] [C_TypeStar]*
    |   C_NamespaceType: C_Identifier_Reference "::"
3,414,229 (0% | 0% | 1% | 0% | 8% | 0% | 51% | 38% | 0%) |   C_TypeBase: (C_Enum | "unsigned" | C_TypeShortUnsignedInt | C_TypeUnion | C_TypeStruct | C_TypeLongLong | C_TypePrimitive | C_TypeUserDefined | C_TypeSimpleUnion)
1,384 all all all all |   C_TypeFunction: '(' '*' ')' C_Function_ParameterDefs
5,000 (all) |   C_TypeModifier: (("__extension__"|"const"|"volatile"|"register"|"static"))
183,868 all all all all 1.00(0%) all C_TypeDef: ["__extension__"] "typedef" ["interface"] C_TypeDef_What [C_TypeAttributes]* ';'
183,868 (89% | 10% | 0% | none | none) |   C_TypeDef_What: (C_TypeDef_Data | C_TypeDef_Function | C_TypeDef_NoParensFunction | C_TypeDef_Union | CMacro_StatementOrComment)
164,353 all none all 0% 1.00(6%) |   |   C_TypeDef_Data: C_Type ['*']* C_Type_Definition [C_Subscript] [C_TypeDefMore]*
10,017 all 1.00(100%) all none |   |   |   C_TypeDefMore: ',' ['*']* C_Type_Definition [C_Subscript]
19,169 all all 1.00(99%) all all all |   |   C_TypeDef_Function: C_Type '(' ['*']* C_Function_Definition ')' C_Function_ParameterDefs
346 all all all |   |   C_TypeDef_NoParensFunction: C_Type C_Function_Definition C_Function_ParameterDefs
    |   |   C_TypeDef_Union: "union" C_Type_Definition C_Type_Definition
1,319,330 1.00(0%) all 1.15(7%) 1.01(20%) C_Variable: [C_VariableStar]* C_VariableIdentifier [C_ExtendedIdentifier]* [C_Subscript]*
697 all all all all all all |   C_CastedVariable: '(' '(' C_Type ')' C_Identifier_Reference ')'
105,199 (88% | none | 12%) |   C_ExtendedIdentifier: (C_ArrowIdentifier | C_ColonColonIdentifier | C_DotIdentifier)
92,592 all all |   |   C_ArrowIdentifier: "->" C_Identifier_Reference
    |   |   C_ColonColonIdentifier: "::" ['~'] C_Identifier_Reference
12,607 all all |   |   C_DotIdentifier: '.' C_Identifier_Reference
1,319,330 (0% | 100%) |   C_VariableIdentifier: (C_CastedVariable | C_Identifier_Reference)
5,873 all |   C_VariableStar: '*'
    CPlus_NewExpression: "new" C_Type [CPlus_NewWhat]
    |   CPlus_NewWhat: (CPlus_Parentheses | C_Subscript)
    |   |   CPlus_Parentheses: '(' [C_Expression]* ')'
12,523 all all all C_AdditiveExpression: C_Expression ("+"|"-") C_Expression
98,830 all all C_AddressOfVariable: '&' C_Expression
1,491 all all all C_ArrowSubfield: C_Expression "->" C_Expression
182,872 all all none all C_AssignmentExpression: C_Expression ("="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|">>>="|"&="|"^="|"|=") [CMacro_StatementOrComment] C_Expression
238 all all all C_BitwiseAndExpression: C_Expression '&' C_Expression
43 all all C_BitwiseNotExpression: '~' C_Expression
5,672 all all all C_BitwiseOrExpression: C_Expression '|' C_Expression
5,365 all C_BuiltIn: ("false"|"true"|"NULL"|"default")
220,011 all all all all C_CastExpression: '(' C_Type ')' C_Expression
    C_CommentExpression: C_Comment C_Expression
120,733 all all all C_DotSubfield: C_Expression '.' C_Expression
12,843 all all all C_EqualityExpression: C_Expression ("=="|"!=") C_Expression
1,736 all all none all C_ExpressionList: '{' [C_ArgumentList] [C_Comment] '}'
161,296 none all none all 99% all C_FunctionCall: [CPlus_NamespaceList] C_Variable [C_Generic] '(' [C_ArgumentList] ')'
1,099 all 12% all all all all all C_FunctionPointerCall: '(' ['*'] C_Variable ')' '(' [C_ArgumentList] ')'
60,574 1.03 C_Literals: C_Literal*
4,248 all all all C_LogicalAndExpression: C_Expression "&&" C_Expression
7,771 all all C_LogicalNotExpression: '!' C_Expression
3,111 all all all C_LogicalOrExpression: C_Expression "||" C_Expression
29 all all all C_LogicalXorExpression: C_Expression '^' C_Expression
6,148 all all all C_MultiplicativeExpression: C_Expression ("*"|"/"|"%") C_Expression
704 all all C_NegativeExpression: ("+"|"-") C_Expression
474,878 all C_Parenthesized_Expression: C_ParenthesizedExpressions
121,823 all all C_PostIncrementVariable: C_Variable ("++"|"--")
386 all all C_PreIncrementExpression: ("++"|"--") C_Expression
9,624 all all all C_RelationalExpression: C_Expression ("<"|">"|"<="|">=") C_Expression
4,476 all all all C_ShiftExpression: C_Expression ("<<"|">>"|">>>") C_Expression
564 all all C_StarExpression: '*' C_Expression
234 all all all all C_SubscriptExpression: C_Expression '[' C_Expression ']'
1,708 all all all all all C_TrueFalseExpression: C_Expression '?' C_Expression ':' C_Expression
72 all all all all all all C_VaArgExpr: "va_arg" '(' C_Expression ',' C_Type ')'
1,035,112 all C_VariableExpression: C_Variable
170 all all all all C_ExitFunction: "exit" '(' C_Expression ')'
    C_FunctionName: C_Variable C_Generic
54 all all all all C_SizeOfExpr: "sizeof" '(' C_Expression ')'
3,274 all all all all C_SizeOfType: "sizeof" '(' C_Type ')'
378 all all all all all all C_StrCatFunction: "strcat" '(' C_VariableExpression ',' C_Expression ')'
346 all all all all all all all all C_StrCmpFunction: ("strcmp"|"stricmp"|"strcasecmp") '(' C_Expression ',' C_Expression ')' ("=="|"!="|"<"|">=") "0"
850 all all all all all all C_StrCpyFunction: "strcpy" '(' C_VariableExpression ',' C_Expression ')'
3 all all all all C_StrDupFunction: "strdup" '(' C_Expression ')'
514 all all all all C_StrLenFunction: "strlen" '(' C_Expression ')'
39 all all all all all all all all all all C_StrNCmpFunction: "strncmp" '(' C_Expression ',' C_Expression ',' C_Expression ')' ("=="|"!="|"<"|">=") "0"
2,052 all all all all 3.00 all all C_AsmVolatile: "__asm__" "__volatile__" '(' C_Literal C_AsmPiece* ')' ';'
6,156 all 11% all all all all |   C_AsmPiece: (","|":") [':'] C_Literal '(' ("__addr"|"__count"|"__port"|"_v"|"__value") ')'
    C_AutoLock: [C_Comment]* [C_AutoLockMutex] "AutoLock" C_Identifier_Reference '(' C_Expression ')' ';'
    |   C_AutoLockMutex: "Mutex" "::"
4,132 all all C_BreakStatement: "break" ';'
709 all all C_ContinueStatement: "continue" ';'
42 all 7% all all all all all all C_DoStatement: "do" [C_Comment] C_Statement "while" '(' C_Expression ')' ';'
2 all all 56.50(all) all C_Embed_Assembler: ("__asm"|"_asm") '{' [IntelASM_Line]* '}'
352,534 all all C_ExpressionStatement: C_Expression ';'
3,520 all all all C_ForStatement: "for" C_ForLoopBody C_Statement
    |   C_ForCollectionStatement: '(' ["const"] C_Type C_Variable ':' C_Expression ')'
3,520 (all | none) |   C_ForLoopBody: (C_ForLoopStatement | C_ForCollectionStatement)
3,520 all 1.04(98%) none all 99% none all 99% 1.00(0%) none all 0% |   C_ForLoopStatement: '(' [C_ForLoopVariable]* [C_Comment] ';' [C_Expression] [C_Comment] ';' [C_Expression] [C_MoreLoopIncrements]* [C_Comment] ')' [C_Comment]
3,544 (0% | 100%) |   |   C_ForLoopVariable: (C_ForWithType | C_ForWithoutType)
7 all all |   |   C_MoreLoopIncrements: ',' C_ForLoopVariable
12 all all all |   C_ForWithType: C_Type C_Variable_Definition [C_ForTypeInit]
12 all all |   |   C_ForTypeInit: '=' C_Expression
3,532 all all all |   C_ForWithoutType: C_Variable_Definition '=' C_Expression
287 all all all all 2.51 all all C_FprintfStatement: "fprintf" '(' ("stdout"|"stderr") ',' C_Expression* ')' ';'
903 all all all C_GotoStatement: "goto" [C_Label_Reference] ';'
45,098 all all all 0% all 1.02(0%) all 13% C_IfStatement: "if" '(' C_Expression [C_Comment] ')' [C_Comment]* C_Statement [C_IfElseClause]
5,979 1.03(1%) all 1.00(2%) all |   C_IfElseClause: [C_Comment]* "else" [C_Comment]* C_Statement
1,483 all all 2.18 all all C_PrintfStatement: "printf" '(' C_Expression* ')' ';'
17,172 all 85% all C_ReturnStatement: "return" [C_Expression] ';'
31,654 all 2.06(100%) all C_StatementBlock: '{' [C_StatementOrComment]* '}'
968 all all all all 0% all 6.04(100%) all C_SwitchStatement: "switch" '(' C_Expression ')' [C_Comment] '{' [C_SwitchClause]* '}'
5,225 all all all 2.63(80%) |   C_CaseClause: "case" C_Expression ':' [C_StatementOrComment]*
602 all all 1.77(100%) |   C_DefaultClause: "default" ':' [C_StatementOrComment]*
5,830 (0% | 90% | 10%) |   C_SwitchClause: (C_Comment | C_CaseClause | C_DefaultClause)
720 all all all all 1% all C_WhileStatement: "while" '(' C_Expression ')' [C_Comment] C_Statement
132,062 all all all all all 0% all all 0% 100% 1.82(63%) all 98% C_FunctionPointer: [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN")] C_Type '(' '*' C_Field_Definition [C_Function_ParameterDefs] ')' '(' [C_Comment] [C_FunctionParameter] [C_MoreParameterDefs]* ')' [';']
721 all all all all none all all C_TypeAttributes: "__attribute__" '(' '(' C_TypedefAttribute [C_TypedefMoreAttributes]* ')' ')'
721 (61% | 39%) |   C_TypedefAttribute: (C_TypedefAttributeAligned | C_TypedefAttributeMode)
442 all all all all all all all |   |   C_TypedefAttributeAligned: "__aligned__" '(' "__alignof__" '(' C_Type ')' ')'
279 all all all all |   |   C_TypedefAttributeMode: "__mode__" '(' "__word__" ')'
    |   C_TypedefMoreAttributes: ',' C_TypedefAttribute
482 all all all C_TypeLongLong: [("signed"|"unsigned"|"__signed__")] "long" "long"
1,749,186 all all all all 1.09(35%) C_TypePrimitive: ["const"] [("signed"|"unsigned"|"__signed__")] ("auto"|"bool"|"char"|"double"|"float"|"int"|"long"|"short"|"void"|"BOOL") ["int"] [C_TypeStar]*
1,385,537 all |   C_TypeStar: ("*"|"&&"|"&")
50,773 all all all all all 1.04(4%) C_TypeShortUnsignedInt: [("signed"|"unsigned")] ("long"|"short") ["long"] [("signed"|"unsigned")] ("int"|"double") [C_TypeStar]*
731 all all C_TypeSimpleUnion: "union" C_Type_Definition
307,692 2.00(0%) all none 89% 0% 24% 7% C_TypeStruct: [C_Comment]* "struct" [C_Comment] [C_Type_Definition] [C_Comment] [C_StructBody] [';']
752,438 (75% | 8% | 17% | 0% | none) |   C_FieldOrComment: (C_Field | C_Comment | C_FunctionPointer | C_TypeUnion | CMacro_StatementOrComment)
565,536 all all 1.00(0%) 0% 1.01(3%) none 1.19(3%) all 1.23(17%) |   |   C_Field: C_Type C_Field_Definition [C_TypeAttributes]* [C_TypeNumberOfBits] [C_Subscript]* [C_FieldInitialValue] [C_MoreFields]* ';' [C_Comment]*
    |   |   |   C_FieldInitialValue: '=' C_Expression
23,331 all none 1.23(4%) all 1.00(0%) none |   |   |   C_MoreFields: ',' [C_Comment]* ['*']* C_Field_Definition [C_Subscript]* [C_FieldInitialValue]
29 all all |   |   |   C_TypeNumberOfBits: ':' C_Number
75,187 all 1% 9.73(all) all |   C_StructBody: '{' [C_Comment] [C_FieldOrComment]* '}'
5,181 all all 16% all 4.05(all) all 16% C_TypeUnion: ["__extension__"] "union" [C_Type_Definition] '{' [C_FieldOrComment]* '}' [';']
1,308,871 all all 1.02(38%) C_TypeUserDefined: ["struct"] C_Identifier_Reference [C_TypeStar]*
    CMacroFunctionParens: '(' [CMacro_Identifier_Reference] ')'
16 (none | 50% | none | none | none | 38% | none | none | none | none | none | none | none | 13% | none | none | none | none | none | none) CMacro_Expression: (CMacro_HexNumber | CMacro_Number | CMacro_Literal | CMacro_Character_Literal | CMacro_FunctionCall | CMacro_IdentifierExpression | CMacro_SignedExpression | CMacro_NotExpression | CMacro_ParenthesizedExpression | CMacro_SymbolExpression | CMacro_MultiplicativeExpression | CMacro_AdditiveExpression | CMacro_RelationalExpression | CMacro_EqualityExpression | CMacro_BitwiseAndExpression | CMacro_ExclusiveOrExpression | CMacro_BitwiseOrExpression | CMacro_ConditionalAndExpression | CMacro_ConditionalOrExpression | CMacro_ConcatenateExpression)
25 all all |   CMacro_CommentLine: CMacro_Comment CMacro_EndOfLine
115 (1% | 22% | 29% | 49% | none) |   CMacro_Element: (CMacro_Pragma_Statement | CMacro_CommentLine | CMacro_StatementOrComment | CMacro_MultiLineText | CMacro_EndOfLine)
5,216 none all none all CMacro_StatementOrComment: [CMacro_EndOfLine] CMacro_StmtBody [CMacro_Comment]* CMacro_EndOfLine
5,216 (none | 2% | 7% | 0% | 1% | 90% | none | 0% | none | none) |   CMacro_StmtBody: (CMacro_IfDefCPlusPlus | CMacro_Define_Statement | CMacro_Error_Statement | CMacro_If_Statement | CMacro_IfDef_Statement | CMacro_Include_Statement | CMacro_LineNumber_Statement | CMacro_Pragma_Statement | CMacro_Region_Statement | CMacro_Undef_Statement)
    CMacro_AdditiveExpression: CMacro_Expression ("+"|"-") CMacro_Expression
    CMacro_BitwiseAndExpression: CMacro_Expression '&' CMacro_Expression
    CMacro_BitwiseOrExpression: CMacro_Expression '|' CMacro_Expression
    CMacro_ConcatenateExpression: CMacro_Expression "##" CMacro_Expression
    CMacro_ConditionalAndExpression: CMacro_Expression "&&" CMacro_Expression
    CMacro_ConditionalOrExpression: CMacro_Expression "||" CMacro_Expression
2 all all all CMacro_EqualityExpression: CMacro_Expression ("=="|"!=") CMacro_Expression
    CMacro_ExclusiveOrExpression: CMacro_Expression '^' CMacro_Expression
    CMacro_FunctionCall: "defined" CMacro_FunctionType
    |   CMacro_FunctionType: (CMacro_Identifier_Reference | CMacroFunctionParens)
6 all none CMacro_IdentifierExpression: CMacro_Identifier_Reference [CMacroFunctionParens]
    CMacro_MultiplicativeExpression: CMacro_Expression ("*"|"/"|"%") CMacro_Expression
    CMacro_NotExpression: '!' CMacro_Expression
    CMacro_ParenthesizedExpression: '(' CMacro_Expression ')'
    CMacro_RelationalExpression: CMacro_Expression ("<"|">"|"<="|">=") CMacro_Expression
    CMacro_SignedExpression: ("+"|"-") CMacro_Expression
    CMacro_SymbolExpression: '#' CMacro_Expression
    CMacro_Pragma_CLang: ("clang"|"GCC") ("diagnostic"|"optimize") CMacro_Pragma_CLang_What
    |   CMacro_Pragma_CLang_What: (CMacro_Pragma_CLangIgnored | CMacro_Pragma_CLangOptimize | CMacro_Literal | ("push"|"pop"))
    |   |   CMacro_Pragma_CLangIgnored: "ignored" CMacro_Literal
    |   |   CMacro_Pragma_CLangOptimize: '(' CMacro_Literal ')'
    CMacro_Pragma_CodeSeg: "code_seg" '(' CMacro_Literal ')'
    CMacro_Pragma_Comment: "comment" '(' "lib" ',' CMacro_Literal ')'
    CMacro_Pragma_Export: ("export"|"import") ("on"|"off")
    CMacro_Pragma_Intrinsic: "intrinsic" '(' [("rotl"|"rotr"|"_rotl"|"_rotr"|"_BitScanReverse"|"_InterlockedCompareExchange"|"_InterlockedCompareExchangePointer"|"_umul128")] ')'
    CMacro_Pragma_Mark: "mark" ['-'] [CMacro_CommentRestOfLine]
    CMacro_Pragma_Message: "message" ["disable"] '(' CMacro_PragmaMsg* ')'
    |   CMacro_PragmaMsg: (CMacro_Literal | ("UNDERFLOW"|"FLOATOVERFL"|"nosimpint"))
    CMacro_Pragma_Pack: "pack" '(' [("push"|"pop")] [','] [CMacro_Number] ')'
    CMacro_Pragma_Region: "region" [CMacro_CommentRestOfLine]
    CMacro_Pragma_RuntimeChecks: "runtime_checks" '(' CMacro_Literal [','] ["off"] [','] [CMacro_Number] ')'
    CMacro_Pragma_STDC: "STDC" "FP_CONTRACT" "OFF"
    CMacro_Pragma_Unroll: "unroll" CMacro_Number
    CMacro_Pragma_Warn: "warn" ['-'] CMacro_Number
3 all all all all 1.00(all) all CMacro_Pragma_Warning: "warning" ['('] ("disable"|"restore"|"push"|"pop"|"default") [':'] [CMacro_PragmaCode]* [')']
3 (none | all | none) |   CMacro_PragmaCode: (',' | CMacro_Number | CMacro_Identifier)
102 all all all none 18% 96% 16% CMacro_Define_Statement: '#' "define" CMacro_Define_Definition [CMacro_Comment] [CMacro_Parameters] [CMacro_RestOfLine] [CMacro_Comment]
18 all 2.44(all) all |   CMacro_Parameters: '(' [CMacro_Param]* ')'
31 (all | none) |   |   CMacro_Param: (CMacro_Parameter_Definition | "...")
391 all all all CMacro_Error_Statement: '#' ("error"|"warn"|"warning") [CMacro_RestOfLine]
33 all all all none all 2.03(all) none 30% none all all 15% CMacro_IfDef_Statement: '#' ("ifdef"|"ifndef") CMacro_Identifier_Reference [CMacro_Comment] CMacro_EndOfLine [CMacro_Element]* [CMacro_IfDefElif]* [CMacro_IfDefElse] [CMacro_EndOfLine] '#' "endif" [CMacro_Comment]
    |   CMacro_IfDefCPlusPlus: '#' "ifdef" "__cplusplus" CMacro_EndOfLine "extern" CMacro_Literal '{' CMacro_EndOfLine '#' "endif" CMacro_EndOfLine [CMacro_Element]* '#' "ifdef" "__cplusplus" CMacro_EndOfLine '}' [CMacro_Comment] CMacro_EndOfLine '#' "endif"
    |   CMacro_IfDefElif: '#' "elif" CMacro_Expression [CMacro_Comment] [CMacro_EndOfLine] [CMacro_Element]*
10 none all all none all 1.00(all) |   CMacro_IfDefElse: [CMacro_EndOfLine] '#' "else" [CMacro_Comment] CMacro_EndOfLine [CMacro_Element]*
12 all all all 25% all 3.00(all) none 17% none all all 8% CMacro_If_Statement: '#' "if" CMacro_Expression [CMacro_Comment] CMacro_EndOfLine [CMacro_Element]* [CMacro_IfElif]* [CMacro_IfElse] [CMacro_EndOfLine] '#' "endif" [CMacro_Comment]
    |   CMacro_IfElif: '#' "elif" CMacro_Expression [CMacro_Comment] [CMacro_EndOfLine] [CMacro_Element]*
2 all all 50% all 1.00(all) |   CMacro_IfElse: '#' "else" [CMacro_Comment] [CMacro_EndOfLine] [CMacro_Element]*
4,676 all all all 1.00(4%) CMacro_Include_Statement: '#' ("include"|"include_next"|"import") CMacro_IncludeWhat [CMacro_Comment]*
4,676 (1% | 99%) |   CMacro_IncludeWhat: (CMacro_Literal | CMacro_IncludeSys)
    CMacro_LineNumber_Statement: '#' ["line"] CMacro_Number CMacro_Literal [CMacro_Number]*
3 all all all CMacro_Pragma_Statement: '#' "pragma" CMacro_Pragma_Type
3 (none | none | none | none | none | none | none | none | none | none | none | none | none | none | all) |   CMacro_Pragma_Type: ("once" | CMacro_Pragma_CLang | CMacro_Pragma_CodeSeg | CMacro_Pragma_Comment | CMacro_Pragma_Export | CMacro_Pragma_Intrinsic | CMacro_Pragma_Mark | CMacro_Pragma_Message | CMacro_Pragma_Pack | CMacro_Pragma_Region | CMacro_Pragma_RuntimeChecks | CMacro_Pragma_STDC | CMacro_Pragma_Unroll | CMacro_Pragma_Warn | CMacro_Pragma_Warning)
    CMacro_Region_Statement: '#' "region" [CMacro_CommentRestOfLine] CMacro_EndOfLine [CMacro_Element]* [CMacro_EndOfLine] '#' "endregion" [CMacro_CommentRestOfLine]
    CMacro_Undef_Statement: '#' "undef" CMacro_Identifier_Reference
51 all none all |   CPlus_NamespaceColon: C_Identifier_Reference [C_Generic] "::"
51 (none | all) |   CPlus_NamespaceList: (CPlus_NamespaceListColons | CPlus_NamespaceListNoColons)
    |   |   CPlus_NamespaceListColons: "::" [CPlus_NamespaceColon]*
51 1.00 |   |   CPlus_NamespaceListNoColons: CPlus_NamespaceColon*

Terminals = 27 (instances=6,404,856)
Tokens = 235 (instances=34,638,508)

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