OpenVDB  8.1.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,
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 */
std::vector< openvdb::ax::ast::Expression * > ExpList
Temporary storage for comma separated expressions.
Definition: axparser.h:163
openvdb::ax::ast::Block * block
Definition: axparser.h:173
axtokentype
Definition: axparser.h:54
Definition: axparser.h:79
Definition: axparser.h:131
Definition: axparser.h:86
Definition: axparser.h:67
int first_column
Definition: axparser.h:199
Definition: axparser.h:101
Definition: axparser.h:119
Definition: axparser.h:111
openvdb::ax::ast::Tree * tree
Definition: axparser.h:169
Definition: axparser.h:77
Definition: axparser.h:124
Definition: axparser.h:118
Definition: axparser.h:132
Definition: axparser.h:72
Definition: axparser.h:94
Definition: axparser.h:106
Definition: axparser.h:138
Definition: axparser.h:110
Definition: axparser.h:73
Definition: axparser.h:135
openvdb::ax::ast::ValueBase * value
Definition: axparser.h:170
Definition: axparser.h:145
Definition: axparser.h:125
Definition: axparser.h:116
Definition: axparser.h:95
Definition: axparser.h:127
Definition: axparser.h:144
openvdb::ax::ast::DeclareLocal * declare_local
Definition: axparser.h:181
Definition: axparser.h:115
openvdb::ax::ast::ExternalVariable * external
Definition: axparser.h:179
Definition: axparser.h:88
openvdb::ax::ast::CommaOperator * comma
Definition: axparser.h:177
openvdb::ax::ast::Statement * statement
Definition: axparser.h:171
Definition: axparser.h:136
Definition: axparser.h:97
Definition: axparser.h:109
Definition: axparser.h:151
Definition: axparser.h:149
Definition: axparser.h:147
Definition: axparser.h:57
Definition: axparser.h:146
Definition: axparser.h:134
Definition: axparser.h:91
double flt
Definition: axparser.h:167
Definition: axparser.h:81
Definition: axparser.h:99
Definition: axparser.h:78
Definition: axparser.h:63
Definition: axparser.h:150
Definition: axparser.h:113
openvdb::ax::ast::Attribute * attribute
Definition: axparser.h:180
Definition: axparser.h:108
int first_line
Definition: axparser.h:198
Definition: axparser.h:107
Definition: axparser.h:104
Definition: axparser.h:142
Definition: axparser.h:128
AXLTYPE axlloc
Definition: axparser.h:137
int last_line
Definition: axparser.h:200
Definition: axparser.h:93
Definition: axparser.h:71
Definition: axparser.h:76
Definition: axparser.h:83
Definition: axparser.h:87
Definition: axparser.h:90
openvdb::ax::ast::Local * local
Definition: axparser.h:182
openvdb::ax::ast::Variable * variable
Definition: axparser.h:178
Definition: axparser.h:60
Definition: axparser.h:98
Definition: axparser.h:65
Definition: axparser.h:148
Definition: axparser.h:126
int last_column
Definition: axparser.h:201
Definition: axparser.h:141
Definition: axparser.h:64
Definition: axparser.h:133
Definition: axparser.h:140
Definition: axparser.h:103
Definition: axparser.h:139
openvdb::ax::ast::ArrayPack * arraypack
Definition: axparser.h:176
Definition: axparser.h:58
openvdb::ax::ast::StatementList * statementlist
Definition: axparser.h:172
uint64_t index
Definition: axparser.h:166
Definition: axparser.h:130
Definition: axparser.h:80
Definition: axparser.h:56
Definition: axparser.h:68
Definition: axparser.h:59
Definition: axparser.h:84
Definition: axparser.h:112
Definition: axparser.h:117
Definition: axparser.h:122
Definition: axparser.h:66
Definition: axparser.h:143
openvdb::ax::ast::Expression * expression
Definition: axparser.h:174
Definition: axparser.h:105
Definition: axparser.h:196
Definition: axparser.h:61
Definition: axparser.h:129
Definition: axparser.h:89
Definition: axparser.h:85
Definition: axparser.h:123
Definition: axparser.h:158
Definition: axparser.h:75
Definition: axparser.h:62
int axparse(openvdb::ax::ast::Tree **tree)
Definition: axparser.h:70
Definition: axparser.h:120
Definition: axparser.h:102
Definition: axparser.h:100
Definition: axparser.h:114
AXSTYPE axlval
const char * string
Definition: axparser.h:165
Definition: axparser.h:96
Definition: axparser.h:69
ExpList * explist
Definition: axparser.h:183
Definition: axparser.h:92
Definition: axparser.h:74
Definition: axparser.h:121
Definition: axparser.h:82