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