Eagle Legacy Modernization, LLC

C Grammar

Main program: C_Program

C syntax:

 Count  Terminals:
  CMacro_Character_Literal: Literal quotes:' escape:\ doubled:no multiline:no
272 CMacro_Comment: /* comment */ or // comment to end of line
  CMacro_CommentRestOfLine: comment to end of line
89 CMacro_Define_Definition: An identifier
7,741 CMacro_EndOfLine: End of line
  CMacro_HexNumber: A hex number
  CMacro_Identifier: An identifier
32 CMacro_Identifier_Reference: An identifier
6,603 CMacro_IncludeSys: include system file
445 CMacro_Literal: Literal quotes:" escape:\ doubled:no multiline:no
45 CMacro_MultiLineText: multiline text
8 CMacro_Number: Number exponent_chars:Ee suffix_chars:Lf trailing_period:yes ignore_char:none
14 CMacro_Parameter_Definition: An identifier
579 CMacro_RestOfLine: Rest of the line
5,166 C_Character_Literal: Literal quotes:' escape:\ doubled:no multiline:no
469,398 C_Comment: /* comment */ or // comment to end of line
373,208 C_Field_Definition: An identifier
197,016 C_Function_Definition: An identifier
7,536 C_HexNumber: A hex number
1,364,843 C_Identifier_Reference: An identifier
220 C_Label_Definition: An identifier
1,124 C_Label_Reference: An identifier
51,000 C_Literal: Literal quotes:" escape:\ doubled:no multiline:no
  C_Literal_C: Literal quotes:" escape:\ doubled:no multiline:no
177,194 C_Number: Number exponent_chars:Ee suffix_chars:LlFfUu trailing_period:yes ignore_char:'
214,177 C_Type_Definition: An identifier
572,884 C_Variable_Definition: An identifier
 Count  Statistics(*) Tokens:
154,205 1.25(0%) all 2.73(79%) 1.00(0%) 0% C_ArgumentList: [C_IgnoreItem]* C_ExpressionArg [C_MoreArgument]* [C_IgnoreItem]* [',']
485,819 (none | 100% | none | 0% | none) |   C_ExpressionArg: (C_ExpressionArgType | C_Expression | "const" | C_TypePrimitive | C_Lambda)
    |   |   C_ExpressionArgType: C_Identifier_Reference C_TypeStar*
1,794 (all | none) |   C_IgnoreItem: (C_Comment | CMacro_StatementOrComment)
331,614 all 1.01(1%) all |   C_MoreArgument: ',' [C_IgnoreItem]* C_ExpressionArg
38,562 (100% | 0%) C_Data: (C_RegularData | C_FunctionPointer)
38,449 1.10(28%) all none none all 1.01(8%) 27% 1.59(6%) none none all 2.21(24%) |   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,953 all 1.09(22%) all 1.03(2%) 4% |   |   C_MoreIdentifiers: ',' [C_TypeStar]* C_Variable_Definition [C_Subscript]* [C_DataInitialValue]
10,437 none all none all none C_DataInitialValue: [CMacro_StatementOrComment] '=' [CMacro_StatementOrComment] C_Expression [CMacro_StatementOrComment]
11,693 (all | none) C_DataModifiers: (("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"restrict"|"__restrict"|"static"|"virtual"|"volatile"|"__inline") | C_Declaration)
2 (none | all) C_Declaration: (C_DeclarationBrackets | C_DeclarationParens)
    |   C_DeclarationBrackets: '[' '[' ("fallthrough"|"__fallthrough__"|"maybe_unused"|"nodiscard") ']' ']' ';'
2 all all all all all all all |   C_DeclarationParens: "__attribute__" '(' '(' ("fallthrough"|"__fallthrough__"|"maybe_unused"|"nodiscard") ')' ')' ';'
2,443 all 5% all 44% none 93% 44% C_Enum: "enum" [C_Comment] ["class"] [C_Identifier_Reference] [C_EnumType] [C_TypeEnumValues] [';']
    |   C_EnumType: ':' C_Type
2,281 all 1.23(24%) all none 71% none 8.37(99%) all |   C_TypeEnumValues: '{' [C_Comment]* C_Variable_Definition [C_FunctionAttributes]* [C_EnumInitializer] [C_Comment]* [C_MoreEnums]* '}'
5,578 all none all |   |   C_EnumInitializer: '=' [CMacro_StatementOrComment] C_Expression
18,936 all 1.20(39%) all none 21% 1.00(2%) |   |   C_MoreEnums: ',' [C_Comment]* C_Variable_Definition [C_FunctionAttributes]* [C_EnumInitializer] [C_Comment]*
1,320,712 (1% | 13% | 0% | 4% | 1% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 0% | 11% | none | 0% | 5% | 0% | 0% | 0% | 1% | 1% | 46% | 2% | 0% | 0% | 0% | 3% | 0% | none | none | 0% | 0% | 0% | 0% | 1% | 0% | 1% | 2% | 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
195,120 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"|"restrict"|"__restrict"|"static"|"virtual"|"volatile"|"__inline")] [C_Comment] [C_FunctionAttributes]* [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"restrict"|"__restrict"|"static"|"virtual"|"volatile"|"__inline")] C_FunctionTypeName C_Function_ParameterDefs [C_FunctionAsm] [C_Comment]* ["const"] C_FunctionBody
    |   C_FunctionAsm: "__asm" '(' C_Literal C_Literal ')'
195,120 (none | none | 95% | 5%) |   C_FunctionBody: (C_FunctionEqualsDefault | C_FunctionEqualsZero | C_FunctionNoBody | C_FunctionImplementation)
    |   |   C_FunctionEqualsDefault: '=' "default"
    |   |   C_FunctionEqualsZero: '=' C_Number
184,483 none none all |   |   C_FunctionNoBody: [C_FunctionAssembler] [C_FunctionAttributes]* ';'
    |   |   |   C_FunctionAssembler: ("__asm"|"__asm__") '(' C_Literal* ')'
    |   C_FunctionDeclspec: ("_declspec"|"__declspec") '(' "dllexport" ')'
3,966 all |   C_FunctionDotDotDotParameter: "..."
8 all all all |   C_FunctionFunctionParameter: C_Type C_Function_Definition C_Function_ParameterDefs
10,637 all 21.61(99%) all 0% |   C_FunctionImplementation: '{' [C_StatementOrComment]* '}' [';']
    |   C_FunctionParamAmpersand: '&' C_Type
725,046 (0% | none | 0% | 1% | 99%) |   C_FunctionParameter: (C_FunctionPointer | C_FunctionParamAmpersand | C_FunctionFunctionParameter | C_FunctionDotDotDotParameter | C_FunctionRegularParameter)
718,295 all all all 71% 1.03(0%) none all 0% |   C_FunctionRegularParameter: ["const"] C_Type [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"restrict"|"__restrict"|"static"|"virtual"|"volatile"|"__inline")] [C_Variable_Definition] [C_Subscript]* [C_FunctionDefaultValue] ["const"] [C_Comment]
    |   |   C_FunctionDefaultValue: '=' C_Expression
195,120 (none | all) |   C_FunctionTypeName: ("main" | C_Function_TypeAndName)
200,893 all none 100% none 2.23(63%) all |   C_Function_ParameterDefs: '(' [C_Comment] [C_FunctionParameter] [C_Comment] [C_MoreParameterDefs]* ')'
195,120 all 1.00(0%) all |   C_Function_TypeAndName: C_Type [C_Comment]* C_Function_Definition
411,409 all 1% 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]* ')'
220 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]
38,755 all 1.05 all C_ParenthesizedExpressions: '(' C_Expression* ')'
1,164 356.65(all) C_Program: [C_StatementOrComment]*
755,304 (21% | 4% | 5% | 26% | 42% | 0% | none | 1%) |   C_StatementOrComment: (C_Comment | C_TypeDef | C_Data | C_Function | C_Statement | C_Enum | C_AsmVolatile | CMacro_StatementOrComment)
379,054 (none | 0% | 1% | none | 11% | 0% | none | 1% | 0% | 0% | 1% | 0% | 0% | 12% | 1% | 5% | 0% | 0% | 0% | 0% | 5% | 0% | 62%) 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_SnprintfStatement | C_SwitchStatement | C_WhileStatement | C_Declaration | C_TypeStruct | C_TypeUnion | C_ExpressionStatement)
98,296 all 98% all C_Subscript: '[' [C_Expression] ']'
1,376,882 1.00(0%) none all none 0% all 1.00(10%) C_Type: [C_TypeModifier]* [C_NamespaceType]* C_TypeBase [C_Generic] [C_TypeFunction] [("const"|"volatile")] [C_TypeStar]*
    |   C_NamespaceType: C_Identifier_Reference "::"
1,377,017 (0% | 0% | 0% | 0% | 12% | none | 57% | 30% | 0%) |   C_TypeBase: (C_Enum | "unsigned" | C_TypeShortUnsignedInt | C_TypeUnion | C_TypeStruct | C_TypeLongLong | C_TypePrimitive | C_TypeUserDefined | C_TypeSimpleUnion)
3,647 all 1.00 all all |   C_TypeFunction: '(' '*'* ')' C_Function_ParameterDefs
1,839 (all) |   C_TypeModifier: (("__extension__"|"const"|"volatile"|"register"|"static"))
33,814 all all all all none all C_TypeDef: ["__extension__"] "typedef" ["interface"] C_TypeDef_What [C_TypeAttributes]* ';'
33,814 (94% | 5% | 1% | none | none) |   C_TypeDef_What: (C_TypeDef_Data | C_TypeDef_Function | C_TypeDef_NoParensFunction | C_TypeDef_Union | CMacro_StatementOrComment)
31,926 all none all none 1.02(3%) |   |   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,658 all all 1.00(91%) 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
831,349 1.00(1%) all 1.17(11%) 1.01(10%) C_Variable: [C_VariableStar]* C_VariableIdentifier [C_ExtendedIdentifier]* [C_Subscript]*
750 all all all all all all |   C_CastedVariable: '(' '(' C_Type ')' C_Identifier_Reference ')'
109,986 (86% | none | 14%) |   C_ExtendedIdentifier: (C_ArrowIdentifier | C_ColonColonIdentifier | C_DotIdentifier)
94,300 all all |   |   C_ArrowIdentifier: "->" C_Identifier_Reference
    |   |   C_ColonColonIdentifier: "::" ['~'] C_Identifier_Reference
15,686 all all |   |   C_DotIdentifier: '.' C_Identifier_Reference
831,349 (0% | 100%) |   C_VariableIdentifier: (C_CastedVariable | C_Identifier_Reference)
6,766 all |   C_VariableStar: '*'
    CPlus_NewExpression: "new" C_Type [CPlus_NewWhat]
    |   CPlus_NewWhat: (CPlus_Parentheses | C_Subscript)
    |   |   CPlus_Parentheses: '(' [C_Expression]* ')'
13,188 all all all C_AdditiveExpression: C_Expression ("+"|"-") C_Expression
21,425 all all C_AddressOfVariable: '&' C_Expression
2,481 all all all C_ArrowSubfield: C_Expression "->" C_Expression
66,928 all all none all C_AssignmentExpression: C_Expression ("="|"*="|"/="|"%="|"+="|"-="|"<<="|">>="|">>>="|"&="|"^="|"|=") [CMacro_StatementOrComment] C_Expression
2,883 all all all C_BitwiseAndExpression: C_Expression '&' C_Expression
552 all all C_BitwiseNotExpression: '~' C_Expression
1,954 all all all C_BitwiseOrExpression: C_Expression '|' C_Expression
9,917 all C_BuiltIn: ("false"|"true"|"NULL"|"default")
19,613 all all all all C_CastExpression: '(' C_Type ')' C_Expression
    C_CommentExpression: C_Comment C_Expression
5,693 all all all C_DotSubfield: C_Expression '.' C_Expression
23,101 all all all C_EqualityExpression: C_Expression ("=="|"!=") C_Expression
3,124 all all 1% all C_ExpressionList: '{' [C_ArgumentList] [C_Comment] '}'
151,721 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 ')'
48,693 1.05 C_Literals: C_Literal*
5,822 all all all C_LogicalAndExpression: C_Expression "&&" C_Expression
8,143 all all C_LogicalNotExpression: '!' C_Expression
4,674 all all all C_LogicalOrExpression: C_Expression "||" C_Expression
1,688 all all all C_LogicalXorExpression: C_Expression '^' C_Expression
4,244 all all all C_MultiplicativeExpression: C_Expression ("*"|"/"|"%") C_Expression
404 all all C_NegativeExpression: ("+"|"-") C_Expression
38,755 all C_Parenthesized_Expression: C_ParenthesizedExpressions
183 all all C_PostIncrementParens: C_Parenthesized_Expression ("++"|"--")
65,807 all all C_PostIncrementVariable: C_Variable ("++"|"--")
1,028 all all C_PreIncrementExpression: ("++"|"--") C_Expression
12,515 all all all C_RelationalExpression: C_Expression ("<"|">"|"<="|">=") C_Expression
2,538 all all all C_ShiftExpression: C_Expression ("<<"|">>"|">>>") C_Expression
675 all all C_StarExpression: '*' C_Expression
379 all all all all C_SubscriptExpression: C_Expression '[' C_Expression ']'
1,667 all all all all all C_TrueFalseExpression: C_Expression '?' C_Expression ':' C_Expression
115 all all all all all all C_VaArgExpr: ("va_arg"|"__builtin_va_arg") '(' C_Expression ',' C_Type ')'
608,541 all C_VariableExpression: C_Variable
327 all all all all C_ExitFunction: "exit" '(' C_Expression ')'
    C_FunctionName: C_Variable C_Generic
387 all all all all C_SizeOfExpr: "sizeof" '(' C_Expression ')'
2,679 all all all all C_SizeOfType: "sizeof" '(' C_Type ')'
150 all all all all all all C_StrCatFunction: "strcat" '(' C_VariableExpression ',' C_Expression ')'
1,080 all all all all all all all all C_StrCmpFunction: ("strcmp"|"stricmp"|"strcasecmp") '(' C_Expression ',' C_Expression ')' ("=="|"!="|"<"|">=") "0"
698 all all all all all all C_StrCpyFunction: "strcpy" '(' C_VariableExpression ',' C_Expression ')'
3 all all all all C_StrDupFunction: "strdup" '(' C_Expression ')'
803 all all all all C_StrLenFunction: "strlen" '(' C_Expression ')'
105 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" "::"
5,413 all all C_BreakStatement: "break" ';'
1,109 all all C_ContinueStatement: "continue" ';'
119 all 3% 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]* '}'
236,153 all all C_ExpressionStatement: C_Expression ';'
5,111 all all all C_ForStatement: "for" C_ForLoopBody C_Statement
    |   C_ForCollectionStatement: '(' ["const"] C_Type C_Variable ':' C_Expression ')'
5,111 (all | none) |   C_ForLoopBody: (C_ForLoopStatement | C_ForCollectionStatement)
5,111 all 1.11(98%) 0% all 99% 0% all 99% 1.04(6%) none all 0% |   C_ForLoopStatement: '(' [C_ForLoopVariable]* [C_Comment] ';' [C_Expression] [C_Comment] ';' [C_Expression] [C_MoreLoopIncrements]* [C_Comment] ')' [C_Comment]
5,303 (0% | 100% | 0% | none | none) |   |   C_ForLoopVariable: (C_ForWithType | C_ForWithoutType | C_PostIncrementVariable | C_ForPreIncr | C_ForPostIncr)
305 all all |   |   C_MoreLoopIncrements: ',' C_Expression
    |   C_ForPostIncr: C_Variable ("++"|"--")
    |   C_ForPreIncr: ("++"|"--") C_Variable
12 all all all |   C_ForWithType: C_Type C_Variable_Definition [C_ForTypeInit]
12 all all |   |   C_ForTypeInit: '=' C_Expression
5,278 all all all |   C_ForWithoutType: C_Variable ("="|"+="|"-=") C_Expression
539 all all all all 2.91 all all C_FprintfStatement: "fprintf" '(' ("stdout"|"stderr") ',' C_Expression* ')' ';'
1,124 all all all C_GotoStatement: "goto" [C_Label_Reference] ';'
45,296 all all all 0% all 1.01(1%) all 19% C_IfStatement: "if" '(' C_Expression [C_Comment] ')' [C_Comment]* C_Statement [C_IfElseClause]
8,565 1.01(1%) all 1.00(2%) all |   C_IfElseClause: [C_Comment]* "else" [C_Comment]* C_Statement
2,282 all all 2.33 all all C_PrintfStatement: "printf" '(' C_Expression* ')' ';'
17,525 all 84% all C_ReturnStatement: "return" [C_Expression] ';'
2 all all all all all all 15.00 all all C_SnprintfStatement: "snprintf" '(' C_Variable ',' C_Expression ',' C_Expression* ')' ';'
41,947 all 2.35(100%) all C_StatementBlock: '{' [C_StatementOrComment]* '}'
1,054 all all all all 0% all 6.06(100%) all C_SwitchStatement: "switch" '(' C_Expression ')' [C_Comment] '{' [C_SwitchClause]* '}'
5,763 all all all 2.68(81%) |   C_CaseClause: "case" C_Expression ':' [C_StatementOrComment]*
595 all all 1.75(100%) |   C_DefaultClause: "default" ':' [C_StatementOrComment]*
6,374 (0% | 90% | 9%) |   C_SwitchClause: (C_Comment | C_CaseClause | C_DefaultClause)
1,313 all all all all 1% all C_WhileStatement: "while" '(' C_Expression ')' [C_Comment] C_Statement
113,186 all all all all all all 0% all all 0% 100% 1.86(63%) all 98% C_FunctionPointer: [("const"|"constexpr"|"extern"|"final"|"inline"|"mutable"|"register"|"restrict"|"__restrict"|"static"|"virtual"|"volatile"|"__inline")] 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"
784,791 all all all all 1.09(36%) C_TypePrimitive: ["const"] [("signed"|"unsigned"|"__signed__")] ("auto"|"bool"|"char"|"double"|"float"|"int"|"long"|"short"|"void"|"BOOL") ["int"] [C_TypeStar]*
740,592 all |   C_TypeStar: ("*"|"&&"|"&")
2,054 all all all all all 1.00(22%) C_TypeShortUnsignedInt: [("signed"|"unsigned")] ("long"|"short") ["long"] [("signed"|"unsigned")] ("int"|"double") [C_TypeStar]*
1 all all C_TypeSimpleUnion: "union" C_Type_Definition
181,815 1.25(0%) all none 100% 1% 14% none 10% C_TypeStruct: [C_Comment]* "struct" [C_Comment] [C_Type_Definition] [C_Comment] [C_StructBody] [C_FunctionAttributes] [';']
434,631 (59% | 16% | 25% | none | none) |   C_FieldOrComment: (C_Field | C_Comment | C_FunctionPointer | C_TypeUnion | CMacro_StatementOrComment)
254,841 all all none 2% 1.02(2%) none 1.44(1%) all 1.15(67%) |   |   C_Field: C_Type C_Field_Definition [C_TypeAttributes]* [C_TypeNumberOfBits] [C_Subscript]* [C_FieldInitialValue] [C_MoreFields]* ';' [C_Comment]*
    |   |   |   C_FieldInitialValue: '=' C_Expression
5,181 all none 1.25(12%) all none 1.00(1%) none |   |   |   C_MoreFields: ',' [C_Comment]* ['*']* C_Field_Definition [C_TypeNumberOfBits] [C_Subscript]* [C_FieldInitialValue]
3,891 all all |   |   |   C_TypeNumberOfBits: ':' C_Number
26,285 all 6% 16.26(all) all |   C_StructBody: '{' [C_Comment] [C_FieldOrComment]* '}'
1,673 all all 18% all 4.33(all) all 0% C_TypeUnion: ["__extension__"] "union" [C_Type_Definition] '{' [C_FieldOrComment]* '}' [';']
419,069 all all 1.02(68%) C_TypeUserDefined: ["struct"] C_Identifier_Reference [C_TypeStar]*
    CMacroFunctionParens: '(' [CMacro_Identifier_Reference] ')'
9 (none | 56% | none | none | none | 44% | none | none | none | none | none | none | none | none | 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)
20 all all |   CMacro_CommentLine: CMacro_Comment CMacro_EndOfLine
89 (1% | 22% | 26% | 51% | none) |   CMacro_Element: (CMacro_Pragma_Statement | CMacro_CommentLine | CMacro_StatementOrComment | CMacro_MultiLineText | CMacro_EndOfLine)
7,670 0% all none all CMacro_StatementOrComment: [CMacro_EndOfLine] CMacro_StmtBody [CMacro_Comment]* CMacro_EndOfLine
7,670 (none | 1% | 6% | 0% | 0% | 92% | 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
    CMacro_EqualityExpression: CMacro_Expression ("=="|"!=") CMacro_Expression
    CMacro_ExclusiveOrExpression: CMacro_Expression '^' CMacro_Expression
    CMacro_FunctionCall: "defined" CMacro_FunctionType
    |   CMacro_FunctionType: (CMacro_Identifier_Reference | CMacroFunctionParens)
4 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" '(' [("_byteswap_uint64"|"_byteswap_ulong"|"_byteswap_ushort"|"rotl"|"_rotl"|"rotr"|"_rotr"|"_BitScanReverse"|"_InterlockedCompareExchange"|"_InterlockedCompareExchangePointer"|"_ReadWriteBarrier"|"_umul128")] ')'
    CMacro_Pragma_Mark: "mark" ['-'] [CMacro_CommentRestOfLine]
    CMacro_Pragma_Message: "message" ["disable"] '(' CMacro_PragmaMsg* ')'
    |   CMacro_PragmaMsg: (CMacro_Literal | ("UNDERFLOW"|"FLOATOVERFL"|"nosimpint"))
    CMacro_Pragma_Optimize: "optimize" '(' CMacro_Literal ',' ("off") ')'
    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_WarnWhat
    |   CMacro_WarnWhat: (CMacro_Number | ("aus"|"ccc"|"csu"|"rch"|"spa"))
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)
89 all all all none 10% 96% 16% CMacro_Define_Statement: '#' "define" CMacro_Define_Definition [CMacro_Comment] [CMacro_Parameters] [CMacro_RestOfLine] [CMacro_Comment]
9 all 2.11(all) all |   CMacro_Parameters: '(' [CMacro_Param]* ')'
14 (all | none) |   |   CMacro_Param: (CMacro_Parameter_Definition | "...")
494 all all all CMacro_Error_Statement: '#' ("error"|"warn"|"warning") [CMacro_RestOfLine]
28 all all all none all 1.71(all) none 36% none all all 7% 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]*
9 all all all none all 3.11(all) none 33% none all all 11% 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]*
3 all all 33% all 1.00(all) |   CMacro_IfElse: '#' "else" [CMacro_Comment] [CMacro_EndOfLine] [CMacro_Element]*
7,048 all all all 1.00(3%) CMacro_Include_Statement: '#' ("include"|"include_next"|"import") CMacro_IncludeWhat [CMacro_Comment]*
7,048 (6% | 94% | none) |   CMacro_IncludeWhat: (CMacro_Literal | CMacro_IncludeSys | CMacro_RestOfLine)
    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 | 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_Optimize | 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=3,449,594)
Tokens = 257 (instances=16,027,314)

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