1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319
|
/* A Bison parser, made by GNU Bison 3.7.5. */
/* 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 <http://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_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
# define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
/* Debug traces. */
#ifndef OCTAVE_DEBUG
# if defined YYDEBUG
#if YYDEBUG
# define OCTAVE_DEBUG 1
# else
# define OCTAVE_DEBUG 0
# endif
# else /* ! defined YYDEBUG */
# define OCTAVE_DEBUG 0
# endif /* ! defined YYDEBUG */
#endif /* ! defined OCTAVE_DEBUG */
#if OCTAVE_DEBUG
extern int octave_debug;
#endif
/* Token kinds. */
#ifndef OCTAVE_TOKENTYPE
# define OCTAVE_TOKENTYPE
enum octave_tokentype
{
OCTAVE_EMPTY = -2,
OCTAVE_EOF = 0, /* "end of file" */
OCTAVE_error = 256, /* error */
OCTAVE_UNDEF = 257, /* "invalid token" */
ADD_EQ = 258, /* ADD_EQ */
SUB_EQ = 259, /* SUB_EQ */
MUL_EQ = 260, /* MUL_EQ */
DIV_EQ = 261, /* DIV_EQ */
LEFTDIV_EQ = 262, /* LEFTDIV_EQ */
POW_EQ = 263, /* POW_EQ */
EMUL_EQ = 264, /* EMUL_EQ */
EDIV_EQ = 265, /* EDIV_EQ */
ELEFTDIV_EQ = 266, /* ELEFTDIV_EQ */
EPOW_EQ = 267, /* EPOW_EQ */
AND_EQ = 268, /* AND_EQ */
OR_EQ = 269, /* OR_EQ */
EXPR_AND_AND = 270, /* EXPR_AND_AND */
EXPR_OR_OR = 271, /* EXPR_OR_OR */
EXPR_AND = 272, /* EXPR_AND */
EXPR_OR = 273, /* EXPR_OR */
EXPR_NOT = 274, /* EXPR_NOT */
EXPR_LT = 275, /* EXPR_LT */
EXPR_LE = 276, /* EXPR_LE */
EXPR_EQ = 277, /* EXPR_EQ */
EXPR_NE = 278, /* EXPR_NE */
EXPR_GE = 279, /* EXPR_GE */
EXPR_GT = 280, /* EXPR_GT */
LEFTDIV = 281, /* LEFTDIV */
EMUL = 282, /* EMUL */
EDIV = 283, /* EDIV */
ELEFTDIV = 284, /* ELEFTDIV */
EPLUS = 285, /* EPLUS */
EMINUS = 286, /* EMINUS */
HERMITIAN = 287, /* HERMITIAN */
TRANSPOSE = 288, /* TRANSPOSE */
PLUS_PLUS = 289, /* PLUS_PLUS */
MINUS_MINUS = 290, /* MINUS_MINUS */
POW = 291, /* POW */
EPOW = 292, /* EPOW */
NUM = 293, /* NUM */
IMAG_NUM = 294, /* IMAG_NUM */
STRUCT_ELT = 295, /* STRUCT_ELT */
NAME = 296, /* NAME */
END = 297, /* END */
DQ_STRING = 298, /* DQ_STRING */
SQ_STRING = 299, /* SQ_STRING */
FOR = 300, /* FOR */
PARFOR = 301, /* PARFOR */
WHILE = 302, /* WHILE */
DO = 303, /* DO */
UNTIL = 304, /* UNTIL */
IF = 305, /* IF */
ELSEIF = 306, /* ELSEIF */
ELSE = 307, /* ELSE */
SWITCH = 308, /* SWITCH */
CASE = 309, /* CASE */
OTHERWISE = 310, /* OTHERWISE */
BREAK = 311, /* BREAK */
CONTINUE = 312, /* CONTINUE */
FUNC_RET = 313, /* FUNC_RET */
UNWIND = 314, /* UNWIND */
CLEANUP = 315, /* CLEANUP */
TRY = 316, /* TRY */
CATCH = 317, /* CATCH */
GLOBAL = 318, /* GLOBAL */
PERSISTENT = 319, /* PERSISTENT */
FCN_HANDLE = 320, /* FCN_HANDLE */
CLASSDEF = 321, /* CLASSDEF */
PROPERTIES = 322, /* PROPERTIES */
METHODS = 323, /* METHODS */
EVENTS = 324, /* EVENTS */
ENUMERATION = 325, /* ENUMERATION */
METAQUERY = 326, /* METAQUERY */
SUPERCLASSREF = 327, /* SUPERCLASSREF */
FQ_IDENT = 328, /* FQ_IDENT */
GET = 329, /* GET */
SET = 330, /* SET */
FCN = 331, /* FCN */
LEXICAL_ERROR = 332, /* LEXICAL_ERROR */
END_OF_INPUT = 333, /* END_OF_INPUT */
INPUT_FILE = 334, /* INPUT_FILE */
UNARY = 335 /* UNARY */
};
typedef enum octave_tokentype octave_token_kind_t;
#endif
/* Token kinds. */
#define OCTAVE_EMPTY -2
#define OCTAVE_EOF 0
#define OCTAVE_error 256
#define OCTAVE_UNDEF 257
#define ADD_EQ 258
#define SUB_EQ 259
#define MUL_EQ 260
#define DIV_EQ 261
#define LEFTDIV_EQ 262
#define POW_EQ 263
#define EMUL_EQ 264
#define EDIV_EQ 265
#define ELEFTDIV_EQ 266
#define EPOW_EQ 267
#define AND_EQ 268
#define OR_EQ 269
#define EXPR_AND_AND 270
#define EXPR_OR_OR 271
#define EXPR_AND 272
#define EXPR_OR 273
#define EXPR_NOT 274
#define EXPR_LT 275
#define EXPR_LE 276
#define EXPR_EQ 277
#define EXPR_NE 278
#define EXPR_GE 279
#define EXPR_GT 280
#define LEFTDIV 281
#define EMUL 282
#define EDIV 283
#define ELEFTDIV 284
#define EPLUS 285
#define EMINUS 286
#define HERMITIAN 287
#define TRANSPOSE 288
#define PLUS_PLUS 289
#define MINUS_MINUS 290
#define POW 291
#define EPOW 292
#define NUM 293
#define IMAG_NUM 294
#define STRUCT_ELT 295
#define NAME 296
#define END 297
#define DQ_STRING 298
#define SQ_STRING 299
#define FOR 300
#define PARFOR 301
#define WHILE 302
#define DO 303
#define UNTIL 304
#define IF 305
#define ELSEIF 306
#define ELSE 307
#define SWITCH 308
#define CASE 309
#define OTHERWISE 310
#define BREAK 311
#define CONTINUE 312
#define FUNC_RET 313
#define UNWIND 314
#define CLEANUP 315
#define TRY 316
#define CATCH 317
#define GLOBAL 318
#define PERSISTENT 319
#define FCN_HANDLE 320
#define CLASSDEF 321
#define PROPERTIES 322
#define METHODS 323
#define EVENTS 324
#define ENUMERATION 325
#define METAQUERY 326
#define SUPERCLASSREF 327
#define FQ_IDENT 328
#define GET 329
#define SET 330
#define FCN 331
#define LEXICAL_ERROR 332
#define END_OF_INPUT 333
#define INPUT_FILE 334
#define UNARY 335
/* Value type. */
#if ! defined OCTAVE_STYPE && ! defined OCTAVE_STYPE_IS_DECLARED
union OCTAVE_STYPE
{
#line 139 "../libinterp/parse-tree/oct-parse.yy"
int dummy_type;
// The type of the basic tokens returned by the lexer.
octave::token *tok_val;
// Comment strings that we need to deal with mid-rule.
octave::comment_list *comment_type;
// Types for the nonterminals we generate.
char punct_type;
octave::tree *tree_type;
octave::tree_matrix *tree_matrix_type;
octave::tree_cell *tree_cell_type;
octave::tree_expression *tree_expression_type;
octave::tree_constant *tree_constant_type;
octave::tree_fcn_handle *tree_fcn_handle_type;
octave::tree_superclass_ref *tree_superclass_ref_type;
octave::tree_metaclass_query *tree_metaclass_query_type;
octave::tree_function_def *tree_function_def_type;
octave::tree_anon_fcn_handle *tree_anon_fcn_handle_type;
octave::tree_identifier *tree_identifier_type;
octave::tree_index_expression *tree_index_expression_type;
octave::tree_colon_expression *tree_colon_expression_type;
octave::tree_argument_list *tree_argument_list_type;
octave::tree_parameter_list *tree_parameter_list_type;
octave::tree_command *tree_command_type;
octave::tree_if_command *tree_if_command_type;
octave::tree_if_clause *tree_if_clause_type;
octave::tree_if_command_list *tree_if_command_list_type;
octave::tree_switch_command *tree_switch_command_type;
octave::tree_switch_case *tree_switch_case_type;
octave::tree_switch_case_list *tree_switch_case_list_type;
octave::tree_decl_elt *tree_decl_elt_type;
octave::tree_decl_init_list *tree_decl_init_list_type;
octave::tree_decl_command *tree_decl_command_type;
octave::tree_statement *tree_statement_type;
octave::tree_statement_list *tree_statement_list_type;
octave_user_function *octave_user_function_type;
octave::tree_classdef *tree_classdef_type;
octave::tree_classdef_attribute* tree_classdef_attribute_type;
octave::tree_classdef_attribute_list* tree_classdef_attribute_list_type;
octave::tree_classdef_superclass* tree_classdef_superclass_type;
octave::tree_classdef_superclass_list* tree_classdef_superclass_list_type;
octave::tree_classdef_body* tree_classdef_body_type;
octave::tree_classdef_property* tree_classdef_property_type;
octave::tree_classdef_property_list* tree_classdef_property_list_type;
octave::tree_classdef_properties_block* tree_classdef_properties_block_type;
octave::tree_classdef_methods_list* tree_classdef_methods_list_type;
octave::tree_classdef_methods_block* tree_classdef_methods_block_type;
octave::tree_classdef_event* tree_classdef_event_type;
octave::tree_classdef_events_list* tree_classdef_events_list_type;
octave::tree_classdef_events_block* tree_classdef_events_block_type;
octave::tree_classdef_enum* tree_classdef_enum_type;
octave::tree_classdef_enum_list* tree_classdef_enum_list_type;
octave::tree_classdef_enum_block* tree_classdef_enum_block_type;
#line 294 "libinterp/parse-tree/oct-parse.h"
};
typedef union OCTAVE_STYPE OCTAVE_STYPE;
# define OCTAVE_STYPE_IS_TRIVIAL 1
# define OCTAVE_STYPE_IS_DECLARED 1
#endif
#ifndef YYPUSH_MORE_DEFINED
# define YYPUSH_MORE_DEFINED
enum { YYPUSH_MORE = 4 };
#endif
typedef struct octave_pstate octave_pstate;
int octave_parse (octave::base_parser& parser);
int octave_push_parse (octave_pstate *ps,
int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser& parser);
int octave_pull_parse (octave_pstate *ps, octave::base_parser& parser);
octave_pstate *octave_pstate_new (void);
void octave_pstate_delete (octave_pstate *ps);
#endif /* !YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED */
|