OpenVDB  12.0.0
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
53 extern 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
167 union AXSTYPE
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 };
195 typedef 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
202 typedef struct AXLTYPE AXLTYPE;
203 struct AXLTYPE
204 {
209 };
210 # define AXLTYPE_IS_DECLARED 1
211 # define AXLTYPE_IS_TRIVIAL 1
212 #endif
213 
214 
215 extern AXSTYPE axlval;
216 extern AXLTYPE axlloc;
217 
218 int axparse (openvdb::ax::ast::Tree** tree);
219 
220 
221 #endif /* !YY_AX_AXPARSER_H_INCLUDED */
std::vector< openvdb::ax::ast::Expression * > ExpList
Temporary storage for comma separated expressions.
Definition: axparser.h:171
openvdb::ax::ast::Block * block
Definition: axparser.h:181
axtokentype
Definition: axparser.h:59
Definition: axparser.h:88
Definition: axparser.h:140
Definition: axparser.h:95
Definition: axparser.h:76
int first_column
Definition: axparser.h:206
Definition: axparser.h:110
Definition: axparser.h:128
Definition: axparser.h:120
openvdb::ax::ast::Tree * tree
Definition: axparser.h:177
Definition: axparser.h:86
Definition: axparser.h:133
Definition: axparser.h:127
Definition: axparser.h:141
Definition: axparser.h:81
Definition: axparser.h:103
Definition: axparser.h:115
Definition: axparser.h:147
Definition: axparser.h:119
Definition: axparser.h:82
Definition: axparser.h:144
openvdb::ax::ast::ValueBase * value
Definition: axparser.h:178
Definition: axparser.h:154
Definition: axparser.h:134
Definition: axparser.h:125
Definition: axparser.h:104
Definition: axparser.h:136
Definition: axparser.h:153
openvdb::ax::ast::DeclareLocal * declare_local
Definition: axparser.h:189
Definition: axparser.h:124
openvdb::ax::ast::ExternalVariable * external
Definition: axparser.h:187
Definition: axparser.h:97
openvdb::ax::ast::CommaOperator * comma
Definition: axparser.h:185
openvdb::ax::ast::Statement * statement
Definition: axparser.h:179
Definition: axparser.h:145
Definition: axparser.h:106
Definition: axparser.h:118
Definition: axparser.h:160
Definition: axparser.h:158
Definition: axparser.h:156
Definition: axparser.h:66
Definition: axparser.h:155
Definition: axparser.h:143
Definition: axparser.h:100
double flt
Definition: axparser.h:175
Definition: axparser.h:90
Definition: axparser.h:108
Definition: axparser.h:87
Definition: axparser.h:72
Definition: axparser.h:159
Definition: axparser.h:122
openvdb::ax::ast::Attribute * attribute
Definition: axparser.h:188
Definition: axparser.h:117
int first_line
Definition: axparser.h:205
Definition: axparser.h:116
Definition: axparser.h:113
Definition: axparser.h:151
Definition: axparser.h:137
AXLTYPE axlloc
Definition: axparser.h:146
int last_line
Definition: axparser.h:207
Definition: axparser.h:102
Definition: axparser.h:80
Definition: axparser.h:85
Definition: axparser.h:92
Definition: axparser.h:96
Definition: axparser.h:99
openvdb::ax::ast::Local * local
Definition: axparser.h:190
openvdb::ax::ast::Variable * variable
Definition: axparser.h:186
Definition: axparser.h:69
Definition: axparser.h:107
Definition: axparser.h:74
Definition: axparser.h:157
Definition: axparser.h:135
int last_column
Definition: axparser.h:208
Definition: axparser.h:150
Definition: axparser.h:73
Definition: axparser.h:142
Definition: axparser.h:62
Definition: axparser.h:149
Definition: axparser.h:112
Definition: axparser.h:148
openvdb::ax::ast::ArrayPack * arraypack
Definition: axparser.h:184
Definition: axparser.h:64
Definition: axparser.h:67
openvdb::ax::ast::StatementList * statementlist
Definition: axparser.h:180
uint64_t index
Definition: axparser.h:174
Definition: axparser.h:63
Definition: axparser.h:139
Definition: axparser.h:89
Definition: axparser.h:65
Definition: axparser.h:77
Definition: axparser.h:68
Definition: axparser.h:93
Definition: axparser.h:121
Definition: axparser.h:126
Definition: axparser.h:131
Definition: axparser.h:61
Definition: axparser.h:75
Definition: axparser.h:152
openvdb::ax::ast::Expression * expression
Definition: axparser.h:182
Definition: axparser.h:114
Definition: axparser.h:203
Definition: axparser.h:70
Definition: axparser.h:138
Definition: axparser.h:98
Definition: axparser.h:94
Definition: axparser.h:132
Definition: axparser.h:167
Definition: axparser.h:84
Definition: axparser.h:71
int axparse(openvdb::ax::ast::Tree **tree)
Definition: axparser.h:79
Definition: axparser.h:129
Definition: axparser.h:111
Definition: axparser.h:109
Definition: axparser.h:123
AXSTYPE axlval
const char * string
Definition: axparser.h:173
Definition: axparser.h:105
Definition: axparser.h:78
ExpList * explist
Definition: axparser.h:191
Definition: axparser.h:101
Definition: axparser.h:83
enum axtokentype axtoken_kind_t
Definition: axparser.h:162
Definition: axparser.h:130
Definition: axparser.h:91