30#include "NvFlowString.h"
40enum NvFlowPreprocessorTokenType
42 eNvFlowPreprocessorTokenType_unknown = 0,
43 eNvFlowPreprocessorTokenType_whitespace,
44 eNvFlowPreprocessorTokenType_newline,
45 eNvFlowPreprocessorTokenType_comment,
46 eNvFlowPreprocessorTokenType_name,
47 eNvFlowPreprocessorTokenType_number,
48 eNvFlowPreprocessorTokenType_string,
49 eNvFlowPreprocessorTokenType_char,
51 eNvFlowPreprocessorTokenType_pound,
52 eNvFlowPreprocessorTokenType_comma,
53 eNvFlowPreprocessorTokenType_period,
54 eNvFlowPreprocessorTokenType_semicolon,
55 eNvFlowPreprocessorTokenType_colon,
56 eNvFlowPreprocessorTokenType_equals,
57 eNvFlowPreprocessorTokenType_asterisk,
59 eNvFlowPreprocessorTokenType_leftParenthesis,
60 eNvFlowPreprocessorTokenType_rightParenthesis,
61 eNvFlowPreprocessorTokenType_leftBracket,
62 eNvFlowPreprocessorTokenType_rightBracket,
63 eNvFlowPreprocessorTokenType_leftCurlyBrace,
64 eNvFlowPreprocessorTokenType_rightCurlyBrace,
66 eNvFlowPreprocessorTokenType_lessThan,
67 eNvFlowPreprocessorTokenType_greaterThan,
69 eNvFlowPreprocessorTokenType_anyWhitespace,
71 eNvFlowPreprocessorTokenType_count,
72 eNvFlowPreprocessorTokenType_maxEnum = 0x7FFFFFFF
77 NvFlowPreprocessorTokenType type;
83 return token.type == eNvFlowPreprocessorTokenType_whitespace ||
84 token.type == eNvFlowPreprocessorTokenType_newline ||
85 token.type == eNvFlowPreprocessorTokenType_comment;
88NV_FLOW_INLINE
void NvFlowPreprocessorSkipWhitespaceTokens(NvFlowUint64* pTokenIdx, NvFlowUint64 numTokens,
const NvFlowPreprocessorToken* tokens)
90 while ((*pTokenIdx) < numTokens && NvFlowPreprocessorTokenIsWhitespace(tokens[(*pTokenIdx)]))
96enum NvFlowPreprocessorType
98 eNvFlowPreprocessorType_constant = 0,
99 eNvFlowPreprocessorType_statement = 1,
100 eNvFlowPreprocessorType_function = 2,
101 eNvFlowPreprocessorType_index = 3,
102 eNvFlowPreprocessorType_attribute = 4,
103 eNvFlowPreprocessorType_line = 5,
104 eNvFlowPreprocessorType_body = 6,
105 eNvFlowPreprocessorType_templateInstance = 7,
106 eNvFlowPreprocessorType_statementComma = 8,
108 eNvFlowPreprocessorType_maxEnum = 0x7FFFFFFF
120 NvFlowPreprocessorType type;
123 NvFlowBool32 allowRecursion;
126enum NvFlowPreprocessorMode
128 eNvFlowPreprocessorMode_default = 0,
129 eNvFlowPreprocessorMode_singlePass = 1,
130 eNvFlowPreprocessorMode_disable_passthrough = 2,
132 eNvFlowPreprocessorMode_maxEnum = 0x7FFFFFFF
157const char* NvFlowPreprocessorExtractDelimitedN(
NvFlowPreprocessor* ptr, NvFlowUint64* pTokenIdx, NvFlowUint64 numTokens,
const NvFlowPreprocessorToken* tokens, NvFlowUint64 numDelimiters,
const NvFlowPreprocessorTokenType* delimiters);
159const char* NvFlowPreprocessorExtractDelimitedPreserve(
NvFlowPreprocessor* ptr, NvFlowUint64* pTokenIdx, NvFlowUint64 numTokens,
const NvFlowPreprocessorToken* tokens, NvFlowPreprocessorTokenType delimiter);
171enum NvFlowPreprocessorGlobalType
173 eNvFlowPreprocessorGlobalType_unknown = 0,
174 eNvFlowPreprocessorGlobalType_statement = 1,
175 eNvFlowPreprocessorGlobalType_function = 2,
176 eNvFlowPreprocessorGlobalType_attribute = 3,
177 eNvFlowPreprocessorGlobalType_line = 4,
179 eNvFlowPreprocessorGlobalType_maxEnum = 0x7FFFFFFF
Definition NvFlowPreprocessor.h:112
Definition NvFlowPreprocessor.h:118
Definition NvFlowPreprocessor.h:35
Definition NvFlowPreprocessor.h:76
Definition NvFlowPreprocessor.cpp:44
Definition NvFlowString.cpp:35