12 #ifndef OPENVDB_AX_AST_TOKENS_HAS_BEEN_INCLUDED 13 #define OPENVDB_AX_AST_TOKENS_HAS_BEEN_INCLUDED 15 #include "../Exceptions.h" 17 #include <openvdb/version.h> 69 if (type ==
"vec2i")
return VEC2I;
70 if (type ==
"vec2f")
return VEC2F;
71 if (type ==
"vec2d")
return VEC2D;
72 if (type ==
"vec3i")
return VEC3I;
73 if (type ==
"vec3f")
return VEC3F;
74 if (type ==
"vec3d")
return VEC3D;
75 if (type ==
"vec4i")
return VEC4I;
76 if (type ==
"vec4f")
return VEC4F;
77 if (type ==
"vec4d")
return VEC4D;
79 else if (type[0] ==
'm') {
80 if (type ==
"mat3f")
return MAT3F;
81 if (type ==
"mat3d")
return MAT3D;
82 if (type ==
"mat4f")
return MAT4F;
83 if (type ==
"mat4d")
return MAT4D;
85 else if (type[0] ==
'q') {
86 if (type ==
"quatf")
return QUATF;
87 if (type ==
"quatd")
return QUATD;
89 else if (type[0] ==
'i') {
90 if (type ==
"int16")
return INT16;
91 if (type ==
"int")
return INT32;
92 if (type ==
"int32")
return INT32;
93 if (type ==
"int64")
return INT64;
95 else if (type ==
"bool")
return BOOL;
96 else if (type ==
"char")
return CHAR;
97 else if (type ==
"float")
return FLOAT;
98 else if (type ==
"double")
return DOUBLE;
99 else if (type ==
"string")
return STRING;
104 if (type[0] ==
'v') {
105 if (type ==
"vec2s")
return VEC2F;
106 if (type ==
"vec3s")
return VEC3F;
107 if (type ==
"vec4s")
return VEC4F;
109 else if (type[0] ==
'm') {
110 if (type ==
"mat3s")
return MAT3F;
111 if (type ==
"mat4s")
return MAT4F;
113 else if (type ==
"quats")
return QUATF;
121 case BOOL :
return "bool";
122 case CHAR :
return "char";
123 case INT16 :
return "int16";
124 case INT32 :
return "int32";
125 case INT64 :
return "int64";
126 case FLOAT :
return "float";
127 case DOUBLE :
return "double";
128 case VEC2I :
return "vec2i";
129 case VEC2F :
return "vec2f";
130 case VEC2D :
return "vec2d";
131 case VEC3I :
return "vec3i";
132 case VEC3F :
return "vec3f";
133 case VEC3D :
return "vec3d";
134 case VEC4I :
return "vec4i";
135 case VEC4F :
return "vec4f";
136 case VEC4D :
return "vec4d";
137 case MAT3F :
return "mat3f";
138 case MAT3D :
return "mat3d";
139 case MAT4F :
return "mat4f";
140 case MAT4D :
return "mat4d";
141 case QUATF :
return "quatf";
142 case QUATD :
return "quatd";
143 case STRING :
return "string";
212 const size_t idx =
static_cast<size_t>(token);
214 if (idx <= static_cast<size_t>(
NOT))
return LOGICAL;
223 if (name ==
"+")
return PLUS;
224 if (name ==
"-")
return MINUS;
226 if (name ==
"/")
return DIVIDE;
227 if (name ==
"%")
return MODULO;
228 if (name ==
"&&")
return AND;
229 if (name ==
"||")
return OR;
230 if (name ==
"!")
return NOT;
239 if (name ==
"&")
return BITAND;
240 if (name ==
"|")
return BITOR;
241 if (name ==
"^")
return BITXOR;
242 if (name ==
"~")
return BITNOT;
243 if (name ==
"=")
return EQUALS;
260 case PLUS :
return "+";
261 case MINUS :
return "-";
265 case AND :
return "&&";
266 case OR :
return "||";
267 case NOT :
return "!";
277 case BITOR :
return "|";
306 case FOR :
return "for";
307 case DO :
return "do";
308 case WHILE :
return "while";
324 case RETURN :
return "return";
325 case BREAK :
return "break";
340 #endif // OPENVDB_AX_AST_TOKENS_HAS_BEEN_INCLUDED Definition: axparser.h:88
Definition: axparser.h:140
Definition: axparser.h:95
OperatorType
Definition: Tokens.h:200
Definition: axparser.h:76
std::string operatorNameFromToken(const OperatorToken token)
Definition: Tokens.h:257
OperatorType operatorType(const OperatorToken token)
Definition: Tokens.h:210
Definition: axparser.h:128
Definition: Exceptions.h:36
KeywordToken
Definition: Tokens.h:314
Definition: axparser.h:86
Definition: axparser.h:133
Definition: axparser.h:127
Definition: axparser.h:141
Definition: axparser.h:103
OperatorToken operatorTokenFromName(const std::string &name)
Definition: Tokens.h:221
#define OPENVDB_THROW(exception, message)
Definition: Exceptions.h:74
Definition: axparser.h:147
Definition: axparser.h:82
Definition: axparser.h:144
Definition: axparser.h:154
Definition: axparser.h:134
Definition: axparser.h:125
Definition: axparser.h:104
Definition: axparser.h:136
Definition: axparser.h:124
Definition: axparser.h:145
Definition: axparser.h:155
Definition: axparser.h:143
Definition: axparser.h:90
Definition: axparser.h:87
Definition: axparser.h:72
std::string loopNameFromToken(const LoopToken loop)
Definition: Tokens.h:303
std::string keywordNameFromToken(const KeywordToken keyw)
Definition: Tokens.h:321
Definition: axparser.h:151
Definition: axparser.h:137
Definition: axparser.h:146
LoopToken
Definition: Tokens.h:296
Definition: axparser.h:102
Definition: axparser.h:85
Definition: axparser.h:92
CoreType
Definition: Tokens.h:31
Definition: axparser.h:96
Definition: Exceptions.h:13
Definition: axparser.h:74
Definition: axparser.h:135
Definition: axparser.h:150
Definition: axparser.h:73
Definition: axparser.h:142
Definition: axparser.h:149
Definition: axparser.h:148
Definition: axparser.h:139
Definition: axparser.h:89
std::string typeStringFromToken(const CoreType type)
Definition: Tokens.h:118
Definition: axparser.h:77
Definition: axparser.h:93
Definition: axparser.h:126
Definition: axparser.h:131
Definition: axparser.h:75
Definition: axparser.h:152
Definition: axparser.h:138
Definition: axparser.h:94
Definition: axparser.h:132
Definition: axparser.h:84
CoreType tokenFromTypeString(const std::string &type)
Definition: Tokens.h:66
Definition: axparser.h:129
#define OPENVDB_VERSION_NAME
The version namespace name for this library version.
Definition: version.h.in:121
OperatorToken
Definition: Tokens.h:150
Definition: axparser.h:105
Definition: axparser.h:83
#define OPENVDB_USE_VERSION_NAMESPACE
Definition: version.h.in:218
Definition: axparser.h:130
Definition: axparser.h:91