OpenVDB  7.2.1
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
48 extern int axdebug;
49 #endif
50 
51 /* Token type. */
52 #ifndef AXTOKENTYPE
53 # define 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,
123  BITOREQUALS = 325,
126  OR = 328,
127  AND = 329,
128  BITOR = 330,
129  BITXOR = 331,
130  BITAND = 332,
132  NOTEQUALS = 334,
133  MORETHAN = 335,
134  LESSTHAN = 336,
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 
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;
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 {
202 };
203 # define AXLTYPE_IS_DECLARED 1
204 # define AXLTYPE_IS_TRIVIAL 1
205 #endif
206 
207 
208 extern AXSTYPE axlval;
209 extern AXLTYPE axlloc;
210 int axparse (openvdb::ax::ast::Tree** tree);
211 
212 #endif /* !YY_AX_OPENVDB_AX_GRAMMAR_AXPARSER_H_INCLUDED */
SHIFTRIGHT
@ SHIFTRIGHT
Definition: axparser.h:138
NOT
@ NOT
Definition: axparser.h:145
AT
@ AT
Definition: axparser.h:59
COMMA
@ COMMA
Definition: axparser.h:112
SHIFTRIGHTEQUALS
@ SHIFTRIGHTEQUALS
Definition: axparser.h:125
AXSTYPE::statementlist
openvdb::ax::ast::StatementList * statementlist
Definition: axparser.h:172
AXSTYPE
Definition: axparser.h:159
RETURN
@ RETURN
Definition: axparser.h:66
BITXOR
@ BITXOR
Definition: axparser.h:129
BREAK
@ BREAK
Definition: axparser.h:67
LESSTHANOREQUAL
@ LESSTHANOREQUAL
Definition: axparser.h:136
WHILE
@ WHILE
Definition: axparser.h:65
AXSTYPE::arraypack
openvdb::ax::ast::ArrayPack * arraypack
Definition: axparser.h:176
VEC3I
@ VEC3I
Definition: axparser.h:82
AXSTYPE::string
const char * string
Definition: axparser.h:165
FALSE
@ FALSE
Definition: axparser.h:57
BITNOT
@ BITNOT
Definition: axparser.h:146
SHIFTLEFTEQUALS
@ SHIFTLEFTEQUALS
Definition: axparser.h:124
IDENTIFIER
@ IDENTIFIER
Definition: axparser.h:111
PLUS
@ PLUS
Definition: axparser.h:139
LESSTHAN
@ LESSTHAN
Definition: axparser.h:134
S_AT
@ S_AT
Definition: axparser.h:91
F_DOLLAR
@ F_DOLLAR
Definition: axparser.h:99
AXSTYPE::variable
openvdb::ax::ast::Variable * variable
Definition: axparser.h:178
INT64
@ INT64
Definition: axparser.h:77
FOR
@ FOR
Definition: axparser.h:63
AXSTYPE::block
openvdb::ax::ast::Block * block
Definition: axparser.h:173
VEC4D
@ VEC4D
Definition: axparser.h:87
L_STRING
@ L_STRING
Definition: axparser.h:110
AXSTYPE::external
openvdb::ax::ast::ExternalVariable * external
Definition: axparser.h:179
EQUALS
@ EQUALS
Definition: axparser.h:115
DOUBLE
@ DOUBLE
Definition: axparser.h:74
I_AT
@ I_AT
Definition: axparser.h:89
AXSTYPE::attribute
openvdb::ax::ast::Attribute * attribute
Definition: axparser.h:180
LOWER_THAN_ELSE
@ LOWER_THAN_ELSE
Definition: axparser.h:151
BITOREQUALS
@ BITOREQUALS
Definition: axparser.h:123
LPARENS
@ LPARENS
Definition: axparser.h:149
F_AT
@ F_AT
Definition: axparser.h:88
BITOR
@ BITOR
Definition: axparser.h:128
AXSTYPE::local
openvdb::ax::ast::Local * local
Definition: axparser.h:182
DIVIDEEQUALS
@ DIVIDEEQUALS
Definition: axparser.h:119
FLOAT
@ FLOAT
Definition: axparser.h:75
ELSE
@ ELSE
Definition: axparser.h:62
DOT_X
@ DOT_X
Definition: axparser.h:103
AXSTYPE::explist
ExpList * explist
Definition: axparser.h:183
QUESTION
@ QUESTION
Definition: axparser.h:113
RSQUARE
@ RSQUARE
Definition: axparser.h:72
AXSTYPE::ExpList
std::vector< openvdb::ax::ast::Expression * > ExpList
Temporary storage for comma separated expressions.
Definition: axparser.h:163
AXSTYPE::comma
openvdb::ax::ast::CommaOperator * comma
Definition: axparser.h:177
AXSTYPE::statement
openvdb::ax::ast::Statement * statement
Definition: axparser.h:171
I_DOLLAR
@ I_DOLLAR
Definition: axparser.h:100
CONTINUE
@ CONTINUE
Definition: axparser.h:68
COLON
@ COLON
Definition: axparser.h:114
LSQUARE
@ LSQUARE
Definition: axparser.h:71
axparse
int axparse(openvdb::ax::ast::Tree **tree)
MODULO
@ MODULO
Definition: axparser.h:143
M4F_AT
@ M4F_AT
Definition: axparser.h:98
LCURLY
@ LCURLY
Definition: axparser.h:69
I16_AT
@ I16_AT
Definition: axparser.h:92
MAT4F
@ MAT4F
Definition: axparser.h:95
MULTIPLY
@ MULTIPLY
Definition: axparser.h:141
VEC4F
@ VEC4F
Definition: axparser.h:86
V_DOLLAR
@ V_DOLLAR
Definition: axparser.h:101
axtokentype
axtokentype
Definition: axparser.h:55
OR
@ OR
Definition: axparser.h:126
L_INT64
@ L_INT64
Definition: axparser.h:107
RCURLY
@ RCURLY
Definition: axparser.h:70
DOT_Y
@ DOT_Y
Definition: axparser.h:104
AXLTYPE::last_column
int last_column
Definition: axparser.h:201
NOTEQUALS
@ NOTEQUALS
Definition: axparser.h:132
MULTIPLYEQUALS
@ MULTIPLYEQUALS
Definition: axparser.h:118
V_AT
@ V_AT
Definition: axparser.h:90
SHIFTLEFT
@ SHIFTLEFT
Definition: axparser.h:137
L_INT32
@ L_INT32
Definition: axparser.h:106
MAT3F
@ MAT3F
Definition: axparser.h:93
VEC3F
@ VEC3F
Definition: axparser.h:83
SEMICOLON
@ SEMICOLON
Definition: axparser.h:58
AXSTYPE::declare_local
openvdb::ax::ast::DeclareLocal * declare_local
Definition: axparser.h:181
STRING
@ STRING
Definition: axparser.h:73
BITAND
@ BITAND
Definition: axparser.h:130
VEC2F
@ VEC2F
Definition: axparser.h:80
L_FLOAT
@ L_FLOAT
Definition: axparser.h:108
TRUE
@ TRUE
Definition: axparser.h:56
MORETHANOREQUAL
@ MORETHANOREQUAL
Definition: axparser.h:135
AXSTYPE::flt
double flt
Definition: axparser.h:167
IF
@ IF
Definition: axparser.h:61
MINUSEQUALS
@ MINUSEQUALS
Definition: axparser.h:117
MINUSMINUS
@ MINUSMINUS
Definition: axparser.h:148
BITANDEQUALS
@ BITANDEQUALS
Definition: axparser.h:121
UMINUS
@ UMINUS
Definition: axparser.h:144
VEC2I
@ VEC2I
Definition: axparser.h:79
DOLLAR
@ DOLLAR
Definition: axparser.h:60
AXSTYPE::tree
openvdb::ax::ast::Tree * tree
Definition: axparser.h:169
AXSTYPE::index
uint64_t index
Definition: axparser.h:166
MORETHAN
@ MORETHAN
Definition: axparser.h:133
M3F_AT
@ M3F_AT
Definition: axparser.h:97
AXLTYPE::first_column
int first_column
Definition: axparser.h:199
VEC4I
@ VEC4I
Definition: axparser.h:85
L_DOUBLE
@ L_DOUBLE
Definition: axparser.h:109
PLUSPLUS
@ PLUSPLUS
Definition: axparser.h:147
MODULOEQUALS
@ MODULOEQUALS
Definition: axparser.h:120
VEC2D
@ VEC2D
Definition: axparser.h:81
AXSTYPE::value
openvdb::ax::ast::ValueBase * value
Definition: axparser.h:170
axlval
AXSTYPE axlval
MINUS
@ MINUS
Definition: axparser.h:140
AXSTYPE::expression
openvdb::ax::ast::Expression * expression
Definition: axparser.h:174
RPARENS
@ RPARENS
Definition: axparser.h:150
DOT_Z
@ DOT_Z
Definition: axparser.h:105
VEC3D
@ VEC3D
Definition: axparser.h:84
PLUSEQUALS
@ PLUSEQUALS
Definition: axparser.h:116
BITXOREQUALS
@ BITXOREQUALS
Definition: axparser.h:122
AND
@ AND
Definition: axparser.h:127
MAT4D
@ MAT4D
Definition: axparser.h:96
EQUALSEQUALS
@ EQUALSEQUALS
Definition: axparser.h:131
AXLTYPE::last_line
int last_line
Definition: axparser.h:200
AXLTYPE
Definition: axparser.h:197
AXLTYPE::first_line
int first_line
Definition: axparser.h:198
DO
@ DO
Definition: axparser.h:64
DIVIDE
@ DIVIDE
Definition: axparser.h:142
BOOL
@ BOOL
Definition: axparser.h:78
MAT3D
@ MAT3D
Definition: axparser.h:94
S_DOLLAR
@ S_DOLLAR
Definition: axparser.h:102
axlloc
AXLTYPE axlloc
INT32
@ INT32
Definition: axparser.h:76