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