Main program: CMacro_Program
CMacro 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 | |
| Count | Statistics(*) | Tokens: |
| 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) |
| CMacro_Program: CMacro_Element* | ||
| 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 | ||
Terminals = 14 (instances=15,828)
Tokens = 63 (instances=30,226)
(*) 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.