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