OpenVDB: openvdb_ax/grammar/generated/axparser.h Source File

OpenVDB 9.0.0

axparser.h
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.0.5. */
2
3/* Bison interface for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018 Free Software Foundation, Inc.
6
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20/* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
29
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
32
33#ifndef YY_AX_OPENVDB_AX_GRAMMAR_AXPARSER_H_INCLUDED
34# define YY_AX_OPENVDB_AX_GRAMMAR_AXPARSER_H_INCLUDED
35/* Debug traces. */
36#ifndef AXDEBUG
37# if defined YYDEBUG
38#if YYDEBUG
39# define AXDEBUG 1
40# else
41# define AXDEBUG 0
42# endif
43# else /* ! defined YYDEBUG */
44# define AXDEBUG 0
45# endif /* ! defined YYDEBUG */
46#endif /* ! defined AXDEBUG */
47#if AXDEBUG
48extern int axdebug;
49#endif
50
51/* Token type. */
52#ifndef AXTOKENTYPE
53# define AXTOKENTYPE
54 enum axtokentype
55 {
56 TRUE = 258,
57 FALSE = 259,
58 SEMICOLON = 260,
59 AT = 261,
60 DOLLAR = 262,
61 IF = 263,
62 ELSE = 264,
63 FOR = 265,
64 DO = 266,
65 WHILE = 267,
66 RETURN = 268,
67 BREAK = 269,
68 CONTINUE = 270,
69 LCURLY = 271,
70 RCURLY = 272,
71 LSQUARE = 273,
72 RSQUARE = 274,
73 STRING = 275,
74 DOUBLE = 276,
75 FLOAT = 277,
76 INT32 = 278,
77 INT64 = 279,
78 BOOL = 280,
79 VEC2I = 281,
80 VEC2F = 282,
81 VEC2D = 283,
82 VEC3I = 284,
83 VEC3F = 285,
84 VEC3D = 286,
85 VEC4I = 287,
86 VEC4F = 288,
87 VEC4D = 289,
88 F_AT = 290,
89 I_AT = 291,
90 V_AT = 292,
91 S_AT = 293,
92 I16_AT = 294,
93 MAT3F = 295,
94 MAT3D = 296,
95 MAT4F = 297,
96 MAT4D = 298,
97 M3F_AT = 299,
98 M4F_AT = 300,
99 F_DOLLAR = 301,
100 I_DOLLAR = 302,
101 V_DOLLAR = 303,
102 S_DOLLAR = 304,
103 DOT_X = 305,
104 DOT_Y = 306,
105 DOT_Z = 307,
106 L_INT32 = 308,
107 L_INT64 = 309,
108 L_FLOAT = 310,
109 L_DOUBLE = 311,
110 L_STRING = 312,
111 IDENTIFIER = 313,
112 COMMA = 314,
113 QUESTION = 315,
114 COLON = 316,
115 EQUALS = 317,
116 PLUSEQUALS = 318,
117 MINUSEQUALS = 319,
118 MULTIPLYEQUALS = 320,
119 DIVIDEEQUALS = 321,
120 MODULOEQUALS = 322,
121 BITANDEQUALS = 323,
122 BITXOREQUALS = 324,
123 BITOREQUALS = 325,
124 SHIFTLEFTEQUALS = 326,
125 SHIFTRIGHTEQUALS = 327,
126 OR = 328,
127 AND = 329,
128 BITOR = 330,
129 BITXOR = 331,
130 BITAND = 332,
131 EQUALSEQUALS = 333,
132 NOTEQUALS = 334,
133 MORETHAN = 335,
134 LESSTHAN = 336,
135 MORETHANOREQUAL = 337,
136 LESSTHANOREQUAL = 338,
137 SHIFTLEFT = 339,
138 SHIFTRIGHT = 340,
139 PLUS = 341,
140 MINUS = 342,
141 MULTIPLY = 343,
142 DIVIDE = 344,
143 MODULO = 345,
144 UMINUS = 346,
145 NOT = 347,
146 BITNOT = 348,
147 PLUSPLUS = 349,
148 MINUSMINUS = 350,
149 LPARENS = 351,
150 RPARENS = 352,
151 LOWER_THAN_ELSE = 353
152 };
153#endif
154
155/* Value type. */
156#if ! defined AXSTYPE && ! defined AXSTYPE_IS_DECLARED
157
158 union AXSTYPE
159{
160
161
162 /// @brief Temporary storage for comma separated expressions
163 using ExpList = std::vector<openvdb::ax::ast::Expression*>;
164
165 const char* string;
166 uint64_t index;
167 double flt;
168
169 openvdb::ax::ast::Tree* tree;
170 openvdb::ax::ast::ValueBase* value;
171 openvdb::ax::ast::Statement* statement;
172 openvdb::ax::ast::StatementList* statementlist;
173 openvdb::ax::ast::Block* block;
174 openvdb::ax::ast::Expression* expression;
175 openvdb::ax::ast::FunctionCall* function;
176 openvdb::ax::ast::ArrayPack* arraypack;
177 openvdb::ax::ast::CommaOperator* comma;
178 openvdb::ax::ast::Variable* variable;
179 openvdb::ax::ast::ExternalVariable* external;
180 openvdb::ax::ast::Attribute* attribute;
181 openvdb::ax::ast::DeclareLocal* declare_local;
182 openvdb::ax::ast::Local* local;
183 ExpList* explist;
184
185
186};
187
188 typedef union AXSTYPE AXSTYPE;
189# define AXSTYPE_IS_TRIVIAL 1
190# define AXSTYPE_IS_DECLARED 1
191#endif
192
193/* Location type. */
194#if ! defined AXLTYPE && ! defined AXLTYPE_IS_DECLARED
195 typedef struct AXLTYPE AXLTYPE;
196 struct AXLTYPE
197{
198 int first_line;
199 int first_column;
200 int last_line;
201 int last_column;
202};
203# define AXLTYPE_IS_DECLARED 1
204# define AXLTYPE_IS_TRIVIAL 1
205#endif
206
207
208extern AXSTYPE axlval;
209extern AXLTYPE axlloc;
210 int axparse (openvdb::ax::ast::Tree** tree);
211
212#endif /* !YY_AX_OPENVDB_AX_GRAMMAR_AXPARSER_H_INCLUDED */
axlloc
AXLTYPE axlloc
axparse
int axparse(openvdb::ax::ast::Tree **tree)
axtokentype
axtokentype
Definition: axparser.h:55
PLUSPLUS
@ PLUSPLUS
Definition: axparser.h:147
NOT
@ NOT
Definition: axparser.h:145
VEC3D
@ VEC3D
Definition: axparser.h:84
BITOR
@ BITOR
Definition: axparser.h:128
V_DOLLAR
@ V_DOLLAR
Definition: axparser.h:101
DIVIDE
@ DIVIDE
Definition: axparser.h:142
MINUSMINUS
@ MINUSMINUS
Definition: axparser.h:148
LESSTHANOREQUAL
@ LESSTHANOREQUAL
Definition: axparser.h:136
S_AT
@ S_AT
Definition: axparser.h:91
UMINUS
@ UMINUS
Definition: axparser.h:144
SHIFTRIGHT
@ SHIFTRIGHT
Definition: axparser.h:138
MAT3F
@ MAT3F
Definition: axparser.h:93
MAT3D
@ MAT3D
Definition: axparser.h:94
IF
@ IF
Definition: axparser.h:61
COLON
@ COLON
Definition: axparser.h:114
MAT4D
@ MAT4D
Definition: axparser.h:96
M3F_AT
@ M3F_AT
Definition: axparser.h:97
I_AT
@ I_AT
Definition: axparser.h:89
WHILE
@ WHILE
Definition: axparser.h:65
DOUBLE
@ DOUBLE
Definition: axparser.h:74
BITNOT
@ BITNOT
Definition: axparser.h:146
MORETHANOREQUAL
@ MORETHANOREQUAL
Definition: axparser.h:135
RSQUARE
@ RSQUARE
Definition: axparser.h:72
INT64
@ INT64
Definition: axparser.h:77
MINUSEQUALS
@ MINUSEQUALS
Definition: axparser.h:117
SHIFTLEFTEQUALS
@ SHIFTLEFTEQUALS
Definition: axparser.h:124
CONTINUE
@ CONTINUE
Definition: axparser.h:68
LSQUARE
@ LSQUARE
Definition: axparser.h:71
BITOREQUALS
@ BITOREQUALS
Definition: axparser.h:123
RETURN
@ RETURN
Definition: axparser.h:66
BITXOREQUALS
@ BITXOREQUALS
Definition: axparser.h:122
SEMICOLON
@ SEMICOLON
Definition: axparser.h:58
M4F_AT
@ M4F_AT
Definition: axparser.h:98
VEC3F
@ VEC3F
Definition: axparser.h:83
MODULOEQUALS
@ MODULOEQUALS
Definition: axparser.h:120
I_DOLLAR
@ I_DOLLAR
Definition: axparser.h:100
PLUSEQUALS
@ PLUSEQUALS
Definition: axparser.h:116
LPARENS
@ LPARENS
Definition: axparser.h:149
RPARENS
@ RPARENS
Definition: axparser.h:150
EQUALSEQUALS
@ EQUALSEQUALS
Definition: axparser.h:131
VEC2I
@ VEC2I
Definition: axparser.h:79
BITXOR
@ BITXOR
Definition: axparser.h:129
DOT_Y
@ DOT_Y
Definition: axparser.h:104
BITAND
@ BITAND
Definition: axparser.h:130
V_AT
@ V_AT
Definition: axparser.h:90
L_INT64
@ L_INT64
Definition: axparser.h:107
L_STRING
@ L_STRING
Definition: axparser.h:110
MAT4F
@ MAT4F
Definition: axparser.h:95
AT
@ AT
Definition: axparser.h:59
I16_AT
@ I16_AT
Definition: axparser.h:92
RCURLY
@ RCURLY
Definition: axparser.h:70
IDENTIFIER
@ IDENTIFIER
Definition: axparser.h:111
AND
@ AND
Definition: axparser.h:127
PLUS
@ PLUS
Definition: axparser.h:139
DOLLAR
@ DOLLAR
Definition: axparser.h:60
LESSTHAN
@ LESSTHAN
Definition: axparser.h:134
DOT_X
@ DOT_X
Definition: axparser.h:103
ELSE
@ ELSE
Definition: axparser.h:62
L_DOUBLE
@ L_DOUBLE
Definition: axparser.h:109
VEC4F
@ VEC4F
Definition: axparser.h:86
DIVIDEEQUALS
@ DIVIDEEQUALS
Definition: axparser.h:119
EQUALS
@ EQUALS
Definition: axparser.h:115
BREAK
@ BREAK
Definition: axparser.h:67
OR
@ OR
Definition: axparser.h:126
VEC4I
@ VEC4I
Definition: axparser.h:85
FLOAT
@ FLOAT
Definition: axparser.h:75
FALSE
@ FALSE
Definition: axparser.h:57
LCURLY
@ LCURLY
Definition: axparser.h:69
MODULO
@ MODULO
Definition: axparser.h:143
FOR
@ FOR
Definition: axparser.h:63
TRUE
@ TRUE
Definition: axparser.h:56
MORETHAN
@ MORETHAN
Definition: axparser.h:133
VEC2D
@ VEC2D
Definition: axparser.h:81
DOT_Z
@ DOT_Z
Definition: axparser.h:105
VEC3I
@ VEC3I
Definition: axparser.h:82
F_AT
@ F_AT
Definition: axparser.h:88
MULTIPLYEQUALS
@ MULTIPLYEQUALS
Definition: axparser.h:118
DO
@ DO
Definition: axparser.h:64
VEC4D
@ VEC4D
Definition: axparser.h:87
INT32
@ INT32
Definition: axparser.h:76
BITANDEQUALS
@ BITANDEQUALS
Definition: axparser.h:121
L_INT32
@ L_INT32
Definition: axparser.h:106
LOWER_THAN_ELSE
@ LOWER_THAN_ELSE
Definition: axparser.h:151
QUESTION
@ QUESTION
Definition: axparser.h:113
S_DOLLAR
@ S_DOLLAR
Definition: axparser.h:102
NOTEQUALS
@ NOTEQUALS
Definition: axparser.h:132
L_FLOAT
@ L_FLOAT
Definition: axparser.h:108
SHIFTRIGHTEQUALS
@ SHIFTRIGHTEQUALS
Definition: axparser.h:125
MULTIPLY
@ MULTIPLY
Definition: axparser.h:141
BOOL
@ BOOL
Definition: axparser.h:78
SHIFTLEFT
@ SHIFTLEFT
Definition: axparser.h:137
VEC2F
@ VEC2F
Definition: axparser.h:80
STRING
@ STRING
Definition: axparser.h:73
F_DOLLAR
@ F_DOLLAR
Definition: axparser.h:99
MINUS
@ MINUS
Definition: axparser.h:140
COMMA
@ COMMA
Definition: axparser.h:112
axlval
AXSTYPE axlval
AXLTYPE
Definition: axparser.h:197
AXLTYPE::first_column
int first_column
Definition: axparser.h:199
AXLTYPE::last_line
int last_line
Definition: axparser.h:200
AXLTYPE::last_column
int last_column
Definition: axparser.h:201
AXLTYPE::first_line
int first_line
Definition: axparser.h:198
AXSTYPE
Definition: axparser.h:159
AXSTYPE::expression
openvdb::ax::ast::Expression * expression
Definition: axparser.h:174
AXSTYPE::local
openvdb::ax::ast::Local * local
Definition: axparser.h:182
AXSTYPE::index
uint64_t index
Definition: axparser.h:166
AXSTYPE::declare_local
openvdb::ax::ast::DeclareLocal * declare_local
Definition: axparser.h:181
AXSTYPE::block
openvdb::ax::ast::Block * block
Definition: axparser.h:173
AXSTYPE::statement
openvdb::ax::ast::Statement * statement
Definition: axparser.h:171
AXSTYPE::arraypack
openvdb::ax::ast::ArrayPack * arraypack
Definition: axparser.h:176
AXSTYPE::flt
double flt
Definition: axparser.h:167
AXSTYPE::ExpList
std::vector< openvdb::ax::ast::Expression * > ExpList
Temporary storage for comma separated expressions.
Definition: axparser.h:163
AXSTYPE::variable
openvdb::ax::ast::Variable * variable
Definition: axparser.h:178
AXSTYPE::explist
ExpList * explist
Definition: axparser.h:183
AXSTYPE::external
openvdb::ax::ast::ExternalVariable * external
Definition: axparser.h:179
AXSTYPE::tree
openvdb::ax::ast::Tree * tree
Definition: axparser.h:169
AXSTYPE::comma
openvdb::ax::ast::CommaOperator * comma
Definition: axparser.h:177
AXSTYPE::attribute
openvdb::ax::ast::Attribute * attribute
Definition: axparser.h:180
AXSTYPE::string
const char * string
Definition: axparser.h:165
AXSTYPE::statementlist
openvdb::ax::ast::StatementList * statementlist
Definition: axparser.h:172
AXSTYPE::value
openvdb::ax::ast::ValueBase * value
Definition: axparser.h:170