Eagle Legacy Modernization, LLC

C Grammar

Main program: C_Program

C syntax:

 Count  Terminals:
  CMacro_Character_Literal: Literal quotes:' escape:\ doubled:no multiline:no
260 CMacro_Comment: /* comment */ or // comment to end of line
  CMacro_CommentRestOfLine: comment to end of line
102 CMacro_Define_Definition: An identifier
6,220 CMacro_EndOfLine: End of line
  CMacro_HexNumber: A hex number
  CMacro_Identifier: An identifier
39 CMacro_Identifier_Reference: An identifier
5,454 CMacro_IncludeSys: include system file
59 CMacro_Literal: Literal quotes:" escape:\ doubled:no multiline:no
56 CMacro_MultiLineText: multiline text
11 CMacro_Number: Number exponent_chars:Ee suffix_chars:Lf trailing_period:yes ignore_char:none
31 CMacro_Parameter_Definition: An identifier
574 CMacro_RestOfLine: Rest of the line
3,533 C_Character_Literal: Literal quotes:' escape:\ doubled:no multiline:no
360,392 C_Comment: /* comment */ or // comment to end of line
294,347 C_Field_Definition: An identifier
127,661 C_Function_Definition: An identifier
1,959 C_HexNumber: A hex number
1,026,639 C_Identifier_Reference: An identifier
131 C_Label_Definition: An identifier
801 C_Label_Reference: An identifier
42,469 C_Literal: Literal quotes:" escape:\ doubled:no multiline:no
  C_Literal_C: Literal quotes:" escape:\ doubled:no multiline:no
98,929 C_Number: Number exponent_chars:Ee suffix_chars:LlFfUu trailing_period:yes ignore_char:'
193,943 C_Type_Definition: An identifier
531,576 C_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
132,458 1.33(0%) all 2.43(82%) 1.00(0%) 0% C_ArgumentList: [C_IgnoreItem]* C_ExpressionArg [C_MoreArgument]* [C_IgnoreItem]* [',']
396,407 (none | 100% | none | 0% | none) |   C_ExpressionArg: (C_ExpressionArgType | C_Expression | "const" | C_TypePrimitive | C_Lambda)
    |   |   C_ExpressionArgType: C_Identifier_Reference C_TypeStar*
305 (all | none) |   C_IgnoreItem: (C_Comment | CMacro_StatementOrComment)
263,949 all 1.00(0%) all |   C_MoreArgument: ',' [C_IgnoreItem]* C_ExpressionArg
26,674 (100% | 0%) C_Data: (C_RegularData | C_FunctionPointer)
26,656 1.01(31%) all none none all 1.01(8%) 17% 1.63(8%) none none all 2.51(26%) |   C_RegularData: [C_DataModifiers]* C_Type [C_DataModifiers]* [C_Comment]* C_Variable_Definition [C_Subscript]* [C_DataInitialValue] [C_MoreIdentifiers]* [C_FunctionAttributes] [C_FunctionAsm] ';' [C_Comment]*
3,487 all 1.10(23%) all 1.03(2%) 4% |   |   C_MoreIdentifiers: ',' [C_TypeStar]* C_Variable_Definition [C_Subscript]* [C_DataInitialValue]
4,651 none all none all none C_DataInitialValue: [CMacro_StatementOrComment] '=' [CMacro_StatementOrComment] C_Expression [CMacro_StatementOrComment]
8,386 (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") ']' ']' ';'
2,436 all 5% all 43% none 94% 44% C_Enum: "enum" [C_Comment] ["class"] [C_Identifier_Reference] [C_EnumType] [C_TypeEnumValues] [';']
    |   C_EnumType: ':' C_Type
2,278 all 1.23(24%) all none 72% none 8.36(99%) all |   C_TypeEnumValues: '{' [C_Comment]* C_Variable_Definition [C_FunctionAttributes]* [C_EnumInitializer] [C_Comment]* [C_MoreEnums]* '}'
5,581 all none all |   |   C_EnumInitializer: '=' [CMacro_StatementOrComment] C_Expression
18,888 all 1.20(39%) all none 21% 1.00(2%) |   |   C_MoreEnums: ',' [C_Comment]* C_Variable_Definition [C_FunctionAttributes]* [C_EnumInitializer] [C_Comment]*
1,019,255 (0% | 10% | 0% | 4% | 2% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 13% | none | 0% | 6% | 0% | 0% | 0% | 1% | 1% | 49% | 2% | 0% | 0% | 0% | 2% | 0% | none | none | 0% | 0% | 0% | 0% | 1% | 0% | 1% | 1% | 0% | 0% | 0% | 0% | 0% | 0% | 5%) 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_FunctionPointerCall | C_FunctionCall | C_FunctionName | C_PreIncrementExpression | C_PostIncrementVariable | C_PostIncrementParens | 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
125,967 none none all none all 0% none all all all none 2.82(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] [C_FunctionAttributes]* [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN")] C_FunctionTypeName C_Function_ParameterDefs [C_FunctionAsm] [C_Comment]* ["const"] C_FunctionBody
    |   C_FunctionAsm: "__asm" '(' C_Literal C_Literal ')'
125,967 (none | none | 94% | 6%) |   C_FunctionBody: (C_FunctionEqualsDefault | C_FunctionEqualsZero | C_FunctionNoBody | C_FunctionImplementation)
    |   |   C_FunctionEqualsDefault: '=' "default"
    |   |   C_FunctionEqualsZero: '=' C_Number
118,639 none none all |   |   C_FunctionNoBody: [C_FunctionAssembler] [C_FunctionAttributes]* ';'
    |   |   |   C_FunctionAssembler: ("__asm"|"__asm__") '(' C_Literal* ')'
    |   C_FunctionDeclspec: ("_declspec"|"__declspec") '(' "dllexport" ')'
2,927 all |   C_FunctionDotDotDotParameter: "..."
8 all all all |   C_FunctionFunctionParameter: C_Type C_Function_Definition C_Function_ParameterDefs
7,328 all 28.12(98%) all none |   C_FunctionImplementation: '{' [C_StatementOrComment]* '}' [';']
    |   C_FunctionParamAmpersand: '&' C_Type
507,206 (0% | none | 0% | 1% | 99%) |   C_FunctionParameter: (C_FunctionPointer | C_FunctionParamAmpersand | C_FunctionFunctionParameter | C_FunctionDotDotDotParameter | C_FunctionRegularParameter)
502,578 all all all 96% 1.03(0%) none all 0% |   C_FunctionRegularParameter: ["const"] C_Type [("__restrict"|"restrict")] [C_Variable_Definition] [C_Subscript]* [C_FunctionDefaultValue] ["const"] [C_Comment]
    |   |   C_FunctionDefaultValue: '=' C_Expression
125,967 (none | all) |   C_FunctionTypeName: ("main" | C_Function_TypeAndName)
128,056 all none 100% none 2.31(60%) all |   C_Function_ParameterDefs: '(' [C_Comment] [C_FunctionParameter] [C_Comment] [C_MoreParameterDefs]* ')'
125,967 all 1.00(0%) all |   C_Function_TypeAndName: C_Type [C_Comment]* C_Function_Definition
284,729 all 0% all |   C_MoreParameterDefs: ',' [C_Comment] C_FunctionParameter
    C_FunctionAttributes: "__attribute__" '(' '(' C_FunctionAttribute* ')' ')'
    |   C_FunctionAttribute: (C_FunctionAttributeAligned | C_FunctionAttributeAllocAlign | C_FunctionAttributeAllocSize | C_FunctionAttributeAvailability | C_FunctionAttributeDeprecated1 | C_FunctionAttributeFormat | C_FunctionAttributeFormatArg | C_FunctionAttributeNonNull | C_FunctionAttributeSentinel | C_FunctionAttributeSwift | ("__always_inline__"|"__cold__"|"__const__"|"__leaf__"|"__malloc__"|"__noreturn__"|"__nothrow__"|"__pure__"|"__warn_unused_result__"))
    |   |   C_FunctionAttributeAligned: "aligned" '(' C_Number ')'
    |   |   C_FunctionAttributeAllocAlign: "alloc_align" '(' C_Number* ')'
    |   |   C_FunctionAttributeAllocSize: ("alloc_size"|"__alloc_size__") '(' C_Number* ')'
    |   |   C_FunctionAttributeAvailability: ("availability"|"__availability__") '(' ("driverkit"|"ios"|"macos"|"macosx"|"swift"|"tvos"|"visionos"|"watchos") ',' C_FunctionAttrAvail ')'
    |   |   |   C_FunctionAttrAvail: (C_FunctionAvailIntroduced | C_FunctionDeprecated2 | C_FunctionUnvailable)
    |   |   |   |   C_FunctionAvailIntroduced: "introduced" '=' C_Number ['.'] [C_Number]
    |   |   |   |   C_FunctionDeprecated2: "deprecated" '=' C_Number C_FunctionMessage
    |   |   |   |   C_FunctionUnvailable: "unavailable" [C_FunctionMessage]
    |   |   C_FunctionAttributeDeprecated1: "__deprecated__" '(' C_Literal ')'
    |   |   C_FunctionAttributeFormat: "__format__" '(' ("__printf__"|"__scanf__"|"__strfmon__") ',' C_Number ',' C_Number ')'
    |   |   C_FunctionAttributeFormatArg: "format_arg" '(' C_Number ')'
    |   |   C_FunctionAttributeNonNull: "__nonnull__" '(' C_Number* ')'
    |   |   C_FunctionAttributeSentinel: "__sentinel__" '(' C_Number ')'
    |   |   C_FunctionAttributeSwift: "__swift_attr__" '(' C_Literal ')'
    |   C_FunctionMessage: ',' "message" '=' C_Literal
    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]* ')'
131 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]
23,186 all 1.04 all C_ParenthesizedExpressions: '(' C_Expression* ')'
883 334.25(all) C_Program: [C_StatementOrComment]*
572,657 (21% | 5% | 5% | 22% | 46% | 0% | none | 1%) |   C_StatementOrComment: (C_Comment | C_TypeDef | C_Data | C_Function | C_Statement | C_Enum | C_AsmVolatile | CMacro_StatementOrComment)
308,746 (none | 0% | 0% | none | 9% | 0% | none | 1% | 0% | 0% | 1% | 0% | 0% | 11% | 1% | 4% | 0% | 0% | none | 4% | none | 67%) 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)
85,596 all 98% all C_Subscript: '[' [C_Expression] ']'
989,073 1.00(0%) none all none 0% all 1.00(14%) C_Type: [C_TypeModifier]* [C_NamespaceType]* C_TypeBase [C_Generic] [C_TypeFunction] ["const"] [C_TypeStar]*
    |   C_NamespaceType: C_Identifier_Reference "::"
989,208 (0% | 0% | 0% | 0% | 16% | none | 60% | 24% | none) |   C_TypeBase: (C_Enum | "unsigned" | C_TypeShortUnsignedInt | C_TypeUnion | C_TypeStruct | C_TypeLongLong | C_TypePrimitive | C_TypeUserDefined | C_TypeSimpleUnion)
254 all all all all |   C_TypeFunction: '(' '*' ')' C_Function_ParameterDefs
143 (all) |   C_TypeModifier: (("__extension__"|"const"|"volatile"|"register"|"static"))
26,259 all all all all none all C_TypeDef: ["__extension__"] "typedef" ["interface"] C_TypeDef_What [C_TypeAttributes]* ';'
26,259 (94% | 6% | 1% | none | none) |   C_TypeDef_What: (C_TypeDef_Data | C_TypeDef_Function | C_TypeDef_NoParensFunction | C_TypeDef_Union | CMacro_StatementOrComment)
24,573 all none all none 1.02(4%) |   |   C_TypeDef_Data: C_Type ['*']* C_Type_Definition [C_Subscript] [C_TypeDefMore]*
948 all 1.02(98%) all none |   |   |   C_TypeDefMore: ',' ['*']* C_Type_Definition [C_Subscript]
1,456 all all 1.00(90%) all all all |   |   C_TypeDef_Function: C_Type '(' ['*']* C_Function_Definition ')' C_Function_ParameterDefs
230 all all all |   |   C_TypeDef_NoParensFunction: C_Type C_Function_Definition C_Function_ParameterDefs
    |   |   C_TypeDef_Union: "union" C_Type_Definition C_Type_Definition
701,164 1.01(1%) all 1.17(10%) 1.01(11%) C_Variable: [C_VariableStar]* C_VariableIdentifier [C_ExtendedIdentifier]* [C_Subscript]*
669 all all all all all all |   C_CastedVariable: '(' '(' C_Type ')' C_Identifier_Reference ')'
81,320 (87% | none | 13%) |   C_ExtendedIdentifier: (C_ArrowIdentifier | C_ColonColonIdentifier | C_DotIdentifier)
70,906 all all |   |   C_ArrowIdentifier: "->" C_Identifier_Reference
    |   |   C_ColonColonIdentifier: "::" ['~'] C_Identifier_Reference
10,414 all all |   |   C_DotIdentifier: '.' C_Identifier_Reference
701,164 (0% | 100%) |   C_VariableIdentifier: (C_CastedVariable | C_Identifier_Reference)
5,299 all |   C_VariableStar: '*'
    CPlus_NewExpression: "new" C_Type [CPlus_NewWhat]
    |   CPlus_NewWhat: (CPlus_Parentheses | C_Subscript)
    |   |   CPlus_Parentheses: '(' [C_Expression]* ')'
7,013 all all all C_AdditiveExpression: C_Expression ("+"|"-") C_Expression
17,334 all all C_AddressOfVariable: '&' C_Expression
1,417 all all all C_ArrowSubfield: C_Expression "->" C_Expression
48,865 all all none all C_AssignmentExpression: C_Expression ("="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|">>>="|"&="|"^="|"|=") [CMacro_StatementOrComment] C_Expression
277 all all all C_BitwiseAndExpression: C_Expression '&' C_Expression
54 all all C_BitwiseNotExpression: '~' C_Expression
295 all all all C_BitwiseOrExpression: C_Expression '|' C_Expression
9,853 all C_BuiltIn: ("false"|"true"|"NULL"|"default")
15,586 all all all all C_CastExpression: '(' C_Type ')' C_Expression
    C_CommentExpression: C_Comment C_Expression
4,340 all all all C_DotSubfield: C_Expression '.' C_Expression
12,922 all all all C_EqualityExpression: C_Expression ("=="|"!=") C_Expression
1,779 all all 0% all C_ExpressionList: '{' [C_ArgumentList] [C_Comment] '}'
130,877 none all none all 99% all C_FunctionCall: [CPlus_NamespaceList] C_Variable [C_Generic] '(' [C_ArgumentList] ')'
1,068 all 6% all 1.98 1% all all all all C_FunctionPointerCall: '(' ['*'] C_MethodParameter C_MethodNextParam* [C_Subscript] ')' '(' C_ArgumentList ')'
2,116 all all |   C_MethodNextParam: ("->"|".") C_MethodParameter
3,184 (0% | 100%) |   C_MethodParameter: (C_MethodParam_Parens | C_Identifier_Reference)
5 all 80% all all |   |   C_MethodParam_Parens: '(' ['*'] C_Identifier_Reference ')'
42,368 1.01 C_Literals: C_Literal*
3,212 all all all C_LogicalAndExpression: C_Expression "&&" C_Expression
7,389 all all C_LogicalNotExpression: '!' C_Expression
3,130 all all all C_LogicalOrExpression: C_Expression "||" C_Expression
19 all all all C_LogicalXorExpression: C_Expression '^' C_Expression
2,745 all all all C_MultiplicativeExpression: C_Expression ("*"|"/"|"%") C_Expression
342 all all C_NegativeExpression: ("+"|"-") C_Expression
23,186 all C_Parenthesized_Expression: C_ParenthesizedExpressions
170 all all C_PostIncrementParens: C_Parenthesized_Expression ("++"|"--")
63,161 all all C_PostIncrementVariable: C_Variable ("++"|"--")
810 all all C_PreIncrementExpression: ("++"|"--") C_Expression
7,959 all all all C_RelationalExpression: C_Expression ("<"|">"|"<="|">=") C_Expression
205 all all all C_ShiftExpression: C_Expression ("<<"|">>"|">>>") C_Expression
488 all all C_StarExpression: '*' C_Expression
331 all all all all C_SubscriptExpression: C_Expression '[' C_Expression ']'
1,035 all all all all all C_TrueFalseExpression: C_Expression '?' C_Expression ':' C_Expression
93 all all all all all all C_VaArgExpr: ("va_arg"|"__builtin_va_arg") '(' C_Expression ',' C_Type ')'
503,297 all C_VariableExpression: C_Variable
143 all all all all C_ExitFunction: "exit" '(' C_Expression ')'
    C_FunctionName: C_Variable C_Generic
25 all all all all C_SizeOfExpr: "sizeof" '(' C_Expression ')'
1,827 all all all all C_SizeOfType: "sizeof" '(' C_Type ')'
150 all all all all all all C_StrCatFunction: "strcat" '(' C_VariableExpression ',' C_Expression ')'
737 all all all all all all all all C_StrCmpFunction: ("strcmp"|"stricmp"|"strcasecmp") '(' C_Expression ',' C_Expression ')' ("=="|"!="|"<"|">=") "0"
699 all all all all all all C_StrCpyFunction: "strcpy" '(' C_VariableExpression ',' C_Expression ')'
3 all all all all C_StrDupFunction: "strdup" '(' C_Expression ')'
605 all all all all C_StrLenFunction: "strlen" '(' C_Expression ')'
75 all all all all all all all all all all C_StrNCmpFunction: "strncmp" '(' C_Expression ',' C_Expression ',' C_Expression ')' ("=="|"!="|"<"|">=") "0"
    C_AsmVolatile: "__asm__" "__volatile__" '(' C_Literal C_AsmPiece* ')' ';'
    |   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,012 all all C_BreakStatement: "break" ';'
728 all all C_ContinueStatement: "continue" ';'
45 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]* '}'
205,543 all all C_ExpressionStatement: C_Expression ';'
3,716 all all all C_ForStatement: "for" C_ForLoopBody C_Statement
    |   C_ForCollectionStatement: '(' ["const"] C_Type C_Variable ':' C_Expression ')'
3,716 (all | none) |   C_ForLoopBody: (C_ForLoopStatement | C_ForCollectionStatement)
3,716 all 1.10(99%) none all 99% none all 99% 1.05(5%) none all 0% |   C_ForLoopStatement: '(' [C_ForLoopVariable]* [C_Comment] ';' [C_Expression] [C_Comment] ';' [C_Expression] [C_MoreLoopIncrements]* [C_Comment] ')' [C_Comment]
3,848 (0% | 100% | 0%) |   |   C_ForLoopVariable: (C_ForWithType | C_ForWithoutType | C_PostIncrementVariable)
193 all all |   |   C_MoreLoopIncrements: ',' C_Expression
12 all all all |   C_ForWithType: C_Type C_Variable_Definition [C_ForTypeInit]
12 all all |   |   C_ForTypeInit: '=' C_Expression
3,829 all all all |   C_ForWithoutType: C_Variable '=' C_Expression
269 all all all all 2.58 all all C_FprintfStatement: "fprintf" '(' ("stdout"|"stderr") ',' C_Expression* ')' ';'
801 all all all C_GotoStatement: "goto" [C_Label_Reference] ';'
34,477 all all all 0% all 1.01(1%) all 17% C_IfStatement: "if" '(' C_Expression [C_Comment] ')' [C_Comment]* C_Statement [C_IfElseClause]
5,857 1.02(1%) all 1.00(3%) all |   C_IfElseClause: [C_Comment]* "else" [C_Comment]* C_Statement
1,572 all all 1.96 all all C_PrintfStatement: "printf" '(' C_Expression* ')' ';'
12,912 all 82% all C_ReturnStatement: "return" [C_Expression] ';'
29,259 all 2.13(100%) all C_StatementBlock: '{' [C_StatementOrComment]* '}'
850 all all all all 1% all 5.78(100%) all C_SwitchStatement: "switch" '(' C_Expression ')' [C_Comment] '{' [C_SwitchClause]* '}'
4,414 all all all 2.98(80%) |   C_CaseClause: "case" C_Expression ':' [C_StatementOrComment]*
476 all all 1.78(100%) |   C_DefaultClause: "default" ':' [C_StatementOrComment]*
4,898 (0% | 90% | 10%) |   C_SwitchClause: (C_Comment | C_CaseClause | C_DefaultClause)
665 all all all all 1% all C_WhileStatement: "while" '(' C_Expression ')' [C_Comment] C_Statement
94,856 all all all all all all none all all 0% 100% 1.79(63%) all 98% C_FunctionPointer: [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"static"|"virtual"|"volatile"|"__inline"|"CM_PUBLIC"|"CM_PRIVATE"|"externalref"|"EXTERN")] C_Type '(' '*' [("_Nullable"|"_Nonnull")] [C_Field_Definition] [C_Function_ParameterDefs] ')' '(' [C_Comment] [C_FunctionParameter] [C_MoreParameterDefs]* ')' [';']
    C_TypeAttributes: "__attribute__" '(' '(' C_TypedefAttribute [C_TypedefMoreAttributes]* ')' ')'
    |   C_TypedefAttribute: (C_TypedefAttributeAligned | C_TypedefAttributeMode)
    |   |   C_TypedefAttributeAligned: "__aligned__" '(' "__alignof__" '(' C_Type ')' ')'
    |   |   C_TypedefAttributeMode: "__mode__" '(' "__word__" ')'
    |   C_TypedefMoreAttributes: ',' C_TypedefAttribute
    C_TypeLongLong: [("signed"|"unsigned"|"__signed__")] "long" "long"
590,312 all all all all 1.10(39%) C_TypePrimitive: ["const"] [("signed"|"unsigned"|"__signed__")] ("auto"|"bool"|"char"|"double"|"float"|"int"|"long"|"short"|"void"|"BOOL") ["int"] [C_TypeStar]*
534,747 all |   C_TypeStar: ("*"|"&&"|"&")
1,812 all all all all all 1.00(25%) C_TypeShortUnsignedInt: [("signed"|"unsigned")] ("long"|"short") ["long"] [("signed"|"unsigned")] ("int"|"double") [C_TypeStar]*
    C_TypeSimpleUnion: "union" C_Type_Definition
168,249 2.00(0%) all none 100% 1% 12% none 7% C_TypeStruct: [C_Comment]* "struct" [C_Comment] [C_Type_Definition] [C_Comment] [C_StructBody] [C_FunctionAttributes] [';']
354,717 (55% | 19% | 26% | none | none) |   C_FieldOrComment: (C_Field | C_Comment | C_FunctionPointer | C_TypeUnion | CMacro_StatementOrComment)
194,562 all all none 0% 1.03(2%) none 1.47(2%) all 1.22(59%) |   |   C_Field: C_Type C_Field_Definition [C_TypeAttributes]* [C_TypeNumberOfBits] [C_Subscript]* [C_FieldInitialValue] [C_MoreFields]* ';' [C_Comment]*
    |   |   |   C_FieldInitialValue: '=' C_Expression
4,929 all none 1.29(11%) all none 1.00(1%) none |   |   |   C_MoreFields: ',' [C_Comment]* ['*']* C_Field_Definition [C_TypeNumberOfBits] [C_Subscript]* [C_FieldInitialValue]
24 all all |   |   |   C_TypeNumberOfBits: ':' C_Number
19,997 all 3% 17.66(all) all |   C_StructBody: '{' [C_Comment] [C_FieldOrComment]* '}'
329 all all 68% all 4.69(all) all none C_TypeUnion: ["__extension__"] "union" [C_Type_Definition] '{' [C_FieldOrComment]* '}' [';']
239,724 all all 1.02(59%) 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)
6,138 none all none all CMacro_StatementOrComment: [CMacro_EndOfLine] CMacro_StmtBody [CMacro_Comment]* CMacro_EndOfLine
6,138 (none | 2% | 8% | 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 | "...")
476 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]*
5,513 all all all 1.00(4%) CMacro_Include_Statement: '#' ("include"|"include_next"|"import") CMacro_IncludeWhat [CMacro_Comment]*
5,513 (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=2,695,186)
Tokens = 250 (instances=12,062,872)

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