GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-parse.h
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.7.5. */
2 
3 /* Bison interface for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2021 Free Software Foundation,
6  Inc.
7 
8  This program is free software: you can redistribute it and/or modify
9  it under the terms of the GNU General Public License as published by
10  the Free Software Foundation, either version 3 of the License, or
11  (at your option) any later version.
12 
13  This program is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  GNU General Public License for more details.
17 
18  You should have received a copy of the GNU General Public License
19  along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
35  especially those whose name start with YY_ or yy_. They are
36  private implementation details that can be changed or removed. */
37 
38 #ifndef YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
39 # define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
40 /* Debug traces. */
41 #ifndef OCTAVE_DEBUG
42 # if defined YYDEBUG
43 #if YYDEBUG
44 # define OCTAVE_DEBUG 1
45 # else
46 # define OCTAVE_DEBUG 0
47 # endif
48 # else /* ! defined YYDEBUG */
49 # define OCTAVE_DEBUG 0
50 # endif /* ! defined YYDEBUG */
51 #endif /* ! defined OCTAVE_DEBUG */
52 #if OCTAVE_DEBUG
53 extern int octave_debug;
54 #endif
55 
56 /* Token kinds. */
57 #ifndef OCTAVE_TOKENTYPE
58 # define OCTAVE_TOKENTYPE
60  {
62  OCTAVE_EOF = 0, /* "end of file" */
63  OCTAVE_error = 256, /* error */
64  OCTAVE_UNDEF = 257, /* "invalid token" */
65  ADD_EQ = 258, /* ADD_EQ */
66  SUB_EQ = 259, /* SUB_EQ */
67  MUL_EQ = 260, /* MUL_EQ */
68  DIV_EQ = 261, /* DIV_EQ */
69  LEFTDIV_EQ = 262, /* LEFTDIV_EQ */
70  POW_EQ = 263, /* POW_EQ */
71  EMUL_EQ = 264, /* EMUL_EQ */
72  EDIV_EQ = 265, /* EDIV_EQ */
73  ELEFTDIV_EQ = 266, /* ELEFTDIV_EQ */
74  EPOW_EQ = 267, /* EPOW_EQ */
75  AND_EQ = 268, /* AND_EQ */
76  OR_EQ = 269, /* OR_EQ */
77  EXPR_AND_AND = 270, /* EXPR_AND_AND */
78  EXPR_OR_OR = 271, /* EXPR_OR_OR */
79  EXPR_AND = 272, /* EXPR_AND */
80  EXPR_OR = 273, /* EXPR_OR */
81  EXPR_NOT = 274, /* EXPR_NOT */
82  EXPR_LT = 275, /* EXPR_LT */
83  EXPR_LE = 276, /* EXPR_LE */
84  EXPR_EQ = 277, /* EXPR_EQ */
85  EXPR_NE = 278, /* EXPR_NE */
86  EXPR_GE = 279, /* EXPR_GE */
87  EXPR_GT = 280, /* EXPR_GT */
88  LEFTDIV = 281, /* LEFTDIV */
89  EMUL = 282, /* EMUL */
90  EDIV = 283, /* EDIV */
91  ELEFTDIV = 284, /* ELEFTDIV */
92  EPLUS = 285, /* EPLUS */
93  EMINUS = 286, /* EMINUS */
94  HERMITIAN = 287, /* HERMITIAN */
95  TRANSPOSE = 288, /* TRANSPOSE */
96  PLUS_PLUS = 289, /* PLUS_PLUS */
97  MINUS_MINUS = 290, /* MINUS_MINUS */
98  POW = 291, /* POW */
99  EPOW = 292, /* EPOW */
100  NUM = 293, /* NUM */
101  IMAG_NUM = 294, /* IMAG_NUM */
102  STRUCT_ELT = 295, /* STRUCT_ELT */
103  NAME = 296, /* NAME */
104  END = 297, /* END */
105  DQ_STRING = 298, /* DQ_STRING */
106  SQ_STRING = 299, /* SQ_STRING */
107  FOR = 300, /* FOR */
108  PARFOR = 301, /* PARFOR */
109  WHILE = 302, /* WHILE */
110  DO = 303, /* DO */
111  UNTIL = 304, /* UNTIL */
112  IF = 305, /* IF */
113  ELSEIF = 306, /* ELSEIF */
114  ELSE = 307, /* ELSE */
115  SWITCH = 308, /* SWITCH */
116  CASE = 309, /* CASE */
117  OTHERWISE = 310, /* OTHERWISE */
118  BREAK = 311, /* BREAK */
119  CONTINUE = 312, /* CONTINUE */
120  FUNC_RET = 313, /* FUNC_RET */
121  UNWIND = 314, /* UNWIND */
122  CLEANUP = 315, /* CLEANUP */
123  TRY = 316, /* TRY */
124  CATCH = 317, /* CATCH */
125  GLOBAL = 318, /* GLOBAL */
126  PERSISTENT = 319, /* PERSISTENT */
127  FCN_HANDLE = 320, /* FCN_HANDLE */
128  CLASSDEF = 321, /* CLASSDEF */
129  PROPERTIES = 322, /* PROPERTIES */
130  METHODS = 323, /* METHODS */
131  EVENTS = 324, /* EVENTS */
132  ENUMERATION = 325, /* ENUMERATION */
133  METAQUERY = 326, /* METAQUERY */
134  SUPERCLASSREF = 327, /* SUPERCLASSREF */
135  FQ_IDENT = 328, /* FQ_IDENT */
136  GET = 329, /* GET */
137  SET = 330, /* SET */
138  FCN = 331, /* FCN */
139  LEXICAL_ERROR = 332, /* LEXICAL_ERROR */
140  END_OF_INPUT = 333, /* END_OF_INPUT */
141  INPUT_FILE = 334, /* INPUT_FILE */
142  UNARY = 335 /* UNARY */
143  };
145 #endif
146 /* Token kinds. */
147 #define OCTAVE_EMPTY -2
148 #define OCTAVE_EOF 0
149 #define OCTAVE_error 256
150 #define OCTAVE_UNDEF 257
151 #define ADD_EQ 258
152 #define SUB_EQ 259
153 #define MUL_EQ 260
154 #define DIV_EQ 261
155 #define LEFTDIV_EQ 262
156 #define POW_EQ 263
157 #define EMUL_EQ 264
158 #define EDIV_EQ 265
159 #define ELEFTDIV_EQ 266
160 #define EPOW_EQ 267
161 #define AND_EQ 268
162 #define OR_EQ 269
163 #define EXPR_AND_AND 270
164 #define EXPR_OR_OR 271
165 #define EXPR_AND 272
166 #define EXPR_OR 273
167 #define EXPR_NOT 274
168 #define EXPR_LT 275
169 #define EXPR_LE 276
170 #define EXPR_EQ 277
171 #define EXPR_NE 278
172 #define EXPR_GE 279
173 #define EXPR_GT 280
174 #define LEFTDIV 281
175 #define EMUL 282
176 #define EDIV 283
177 #define ELEFTDIV 284
178 #define EPLUS 285
179 #define EMINUS 286
180 #define HERMITIAN 287
181 #define TRANSPOSE 288
182 #define PLUS_PLUS 289
183 #define MINUS_MINUS 290
184 #define POW 291
185 #define EPOW 292
186 #define NUM 293
187 #define IMAG_NUM 294
188 #define STRUCT_ELT 295
189 #define NAME 296
190 #define END 297
191 #define DQ_STRING 298
192 #define SQ_STRING 299
193 #define FOR 300
194 #define PARFOR 301
195 #define WHILE 302
196 #define DO 303
197 #define UNTIL 304
198 #define IF 305
199 #define ELSEIF 306
200 #define ELSE 307
201 #define SWITCH 308
202 #define CASE 309
203 #define OTHERWISE 310
204 #define BREAK 311
205 #define CONTINUE 312
206 #define FUNC_RET 313
207 #define UNWIND 314
208 #define CLEANUP 315
209 #define TRY 316
210 #define CATCH 317
211 #define GLOBAL 318
212 #define PERSISTENT 319
213 #define FCN_HANDLE 320
214 #define CLASSDEF 321
215 #define PROPERTIES 322
216 #define METHODS 323
217 #define EVENTS 324
218 #define ENUMERATION 325
219 #define METAQUERY 326
220 #define SUPERCLASSREF 327
221 #define FQ_IDENT 328
222 #define GET 329
223 #define SET 330
224 #define FCN 331
225 #define LEXICAL_ERROR 332
226 #define END_OF_INPUT 333
227 #define INPUT_FILE 334
228 #define UNARY 335
229 
230 /* Value type. */
231 #if ! defined OCTAVE_STYPE && ! defined OCTAVE_STYPE_IS_DECLARED
233 {
234 #line 139 "../libinterp/parse-tree/oct-parse.yy"
235 
237 
238  // The type of the basic tokens returned by the lexer.
240 
241  // Comment strings that we need to deal with mid-rule.
243 
244  // Types for the nonterminals we generate.
274 
292 
293 #line 294 "libinterp/parse-tree/oct-parse.h"
294 
295 };
296 typedef union OCTAVE_STYPE OCTAVE_STYPE;
297 # define OCTAVE_STYPE_IS_TRIVIAL 1
298 # define OCTAVE_STYPE_IS_DECLARED 1
299 #endif
300 
301 
302 
303 #ifndef YYPUSH_MORE_DEFINED
304 # define YYPUSH_MORE_DEFINED
305 enum { YYPUSH_MORE = 4 };
306 #endif
307 
308 typedef struct octave_pstate octave_pstate;
309 
310 
311 int octave_parse (octave::base_parser& parser);
313  int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser& parser);
317 
318 
319 #endif /* !YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED */
#define OCTAVE_EOF
Definition: oct-parse.h:148
#define PARFOR
Definition: oct-parse.h:194
#define ELSE
Definition: oct-parse.h:200
octave_pstate * octave_pstate_new(void)
Definition: oct-parse.cc:3253
#define MINUS_MINUS
Definition: oct-parse.h:183
#define EXPR_GE
Definition: oct-parse.h:172
#define END
Definition: oct-parse.h:190
#define INPUT_FILE
Definition: oct-parse.h:227
#define EDIV
Definition: oct-parse.h:176
#define END_OF_INPUT
Definition: oct-parse.h:226
int octave_push_parse(octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
Definition: oct-parse.cc:3288
enum octave_tokentype octave_token_kind_t
Definition: oct-parse.h:144
#define GLOBAL
Definition: oct-parse.h:211
#define EMUL_EQ
Definition: oct-parse.h:157
#define PLUS_PLUS
Definition: oct-parse.h:182
#define METHODS
Definition: oct-parse.h:216
#define EPOW_EQ
Definition: oct-parse.h:160
#define NAME
Definition: oct-parse.h:189
#define SUB_EQ
Definition: oct-parse.h:152
#define WHILE
Definition: oct-parse.h:195
int octave_pull_parse(octave_pstate *ps, octave::base_parser &parser)
Definition: oct-parse.cc:3211
#define OCTAVE_UNDEF
Definition: oct-parse.h:150
#define HERMITIAN
Definition: oct-parse.h:180
#define SET
Definition: oct-parse.h:223
#define CLASSDEF
Definition: oct-parse.h:214
void octave_pstate_delete(octave_pstate *ps)
Definition: oct-parse.cc:3267
#define UNTIL
Definition: oct-parse.h:197
#define FOR
Definition: oct-parse.h:193
#define EMINUS
Definition: oct-parse.h:179
#define OCTAVE_error
Definition: oct-parse.h:149
#define LEFTDIV_EQ
Definition: oct-parse.h:155
#define EXPR_NE
Definition: oct-parse.h:171
#define EMUL
Definition: oct-parse.h:175
#define POW
Definition: oct-parse.h:184
#define EXPR_OR_OR
Definition: oct-parse.h:164
@ YYPUSH_MORE
Definition: oct-parse.h:305
#define PERSISTENT
Definition: oct-parse.h:212
int octave_parse(octave::base_parser &parser)
Definition: oct-parse.cc:3197
#define FUNC_RET
Definition: oct-parse.h:206
#define PROPERTIES
Definition: oct-parse.h:215
#define TRANSPOSE
Definition: oct-parse.h:181
#define METAQUERY
Definition: oct-parse.h:219
#define DO
Definition: oct-parse.h:196
#define LEXICAL_ERROR
Definition: oct-parse.h:225
#define CLEANUP
Definition: oct-parse.h:208
#define POW_EQ
Definition: oct-parse.h:156
#define EXPR_LE
Definition: oct-parse.h:169
#define ELEFTDIV
Definition: oct-parse.h:177
#define GET
Definition: oct-parse.h:222
#define STRUCT_ELT
Definition: oct-parse.h:188
#define EPLUS
Definition: oct-parse.h:178
#define ELSEIF
Definition: oct-parse.h:199
#define FCN
Definition: oct-parse.h:224
#define DQ_STRING
Definition: oct-parse.h:191
#define EPOW
Definition: oct-parse.h:185
#define UNARY
Definition: oct-parse.h:228
#define NUM
Definition: oct-parse.h:186
#define AND_EQ
Definition: oct-parse.h:161
#define ENUMERATION
Definition: oct-parse.h:218
#define OR_EQ
Definition: oct-parse.h:162
#define OTHERWISE
Definition: oct-parse.h:203
#define CONTINUE
Definition: oct-parse.h:205
#define EXPR_OR
Definition: oct-parse.h:166
#define OCTAVE_EMPTY
Definition: oct-parse.h:147
#define BREAK
Definition: oct-parse.h:204
#define IF
Definition: oct-parse.h:198
#define SWITCH
Definition: oct-parse.h:201
#define ELEFTDIV_EQ
Definition: oct-parse.h:159
#define EXPR_NOT
Definition: oct-parse.h:167
#define FQ_IDENT
Definition: oct-parse.h:221
#define EDIV_EQ
Definition: oct-parse.h:158
#define TRY
Definition: oct-parse.h:209
#define SQ_STRING
Definition: oct-parse.h:192
#define EVENTS
Definition: oct-parse.h:217
#define ADD_EQ
Definition: oct-parse.h:151
#define EXPR_AND
Definition: oct-parse.h:165
#define CATCH
Definition: oct-parse.h:210
#define DIV_EQ
Definition: oct-parse.h:154
#define EXPR_LT
Definition: oct-parse.h:168
#define MUL_EQ
Definition: oct-parse.h:153
#define LEFTDIV
Definition: oct-parse.h:174
#define EXPR_GT
Definition: oct-parse.h:173
#define EXPR_EQ
Definition: oct-parse.h:170
#define CASE
Definition: oct-parse.h:202
octave_tokentype
Definition: oct-parse.h:60
#define UNWIND
Definition: oct-parse.h:207
#define FCN_HANDLE
Definition: oct-parse.h:213
#define SUPERCLASSREF
Definition: oct-parse.h:220
#define IMAG_NUM
Definition: oct-parse.h:187
#define EXPR_AND_AND
Definition: oct-parse.h:163
int octave_debug
octave::tree_switch_command * tree_switch_command_type
Definition: oct-parse.h:265
int dummy_type
Definition: oct-parse.h:236
octave::tree_argument_list * tree_argument_list_type
Definition: oct-parse.h:259
octave::tree_switch_case * tree_switch_case_type
Definition: oct-parse.h:266
octave::tree_classdef_enum * tree_classdef_enum_type
Definition: oct-parse.h:289
octave::tree_classdef_methods_block * tree_classdef_methods_block_type
Definition: oct-parse.h:285
octave::tree_command * tree_command_type
Definition: oct-parse.h:261
octave::tree_if_clause * tree_if_clause_type
Definition: oct-parse.h:263
octave::tree_expression * tree_expression_type
Definition: oct-parse.h:249
octave::tree_classdef_body * tree_classdef_body_type
Definition: oct-parse.h:280
octave::tree_classdef_properties_block * tree_classdef_properties_block_type
Definition: oct-parse.h:283
octave::tree_classdef_events_list * tree_classdef_events_list_type
Definition: oct-parse.h:287
octave::tree_classdef_events_block * tree_classdef_events_block_type
Definition: oct-parse.h:288
octave::tree_classdef_enum_list * tree_classdef_enum_list_type
Definition: oct-parse.h:290
octave::tree_if_command * tree_if_command_type
Definition: oct-parse.h:262
octave::tree_decl_elt * tree_decl_elt_type
Definition: oct-parse.h:268
octave::tree_parameter_list * tree_parameter_list_type
Definition: oct-parse.h:260
octave::tree_index_expression * tree_index_expression_type
Definition: oct-parse.h:257
octave::tree_anon_fcn_handle * tree_anon_fcn_handle_type
Definition: oct-parse.h:255
octave::tree_classdef_superclass * tree_classdef_superclass_type
Definition: oct-parse.h:278
octave::comment_list * comment_type
Definition: oct-parse.h:242
octave::tree * tree_type
Definition: oct-parse.h:246
octave::tree_constant * tree_constant_type
Definition: oct-parse.h:250
octave::tree_decl_command * tree_decl_command_type
Definition: oct-parse.h:270
octave::tree_metaclass_query * tree_metaclass_query_type
Definition: oct-parse.h:253
octave::tree_superclass_ref * tree_superclass_ref_type
Definition: oct-parse.h:252
octave::tree_matrix * tree_matrix_type
Definition: oct-parse.h:247
octave::tree_colon_expression * tree_colon_expression_type
Definition: oct-parse.h:258
octave::token * tok_val
Definition: oct-parse.h:239
octave::tree_classdef_attribute * tree_classdef_attribute_type
Definition: oct-parse.h:276
octave::tree_classdef_property_list * tree_classdef_property_list_type
Definition: oct-parse.h:282
octave::tree_statement * tree_statement_type
Definition: oct-parse.h:271
octave::tree_statement_list * tree_statement_list_type
Definition: oct-parse.h:272
octave::tree_if_command_list * tree_if_command_list_type
Definition: oct-parse.h:264
octave::tree_decl_init_list * tree_decl_init_list_type
Definition: oct-parse.h:269
octave::tree_classdef * tree_classdef_type
Definition: oct-parse.h:275
octave::tree_identifier * tree_identifier_type
Definition: oct-parse.h:256
octave::tree_fcn_handle * tree_fcn_handle_type
Definition: oct-parse.h:251
octave::tree_classdef_attribute_list * tree_classdef_attribute_list_type
Definition: oct-parse.h:277
octave::tree_switch_case_list * tree_switch_case_list_type
Definition: oct-parse.h:267
octave::tree_function_def * tree_function_def_type
Definition: oct-parse.h:254
octave::tree_classdef_property * tree_classdef_property_type
Definition: oct-parse.h:281
char punct_type
Definition: oct-parse.h:245
octave::tree_classdef_methods_list * tree_classdef_methods_list_type
Definition: oct-parse.h:284
octave::tree_classdef_superclass_list * tree_classdef_superclass_list_type
Definition: oct-parse.h:279
octave_user_function * octave_user_function_type
Definition: oct-parse.h:273
octave::tree_classdef_enum_block * tree_classdef_enum_block_type
Definition: oct-parse.h:291
octave::tree_classdef_event * tree_classdef_event_type
Definition: oct-parse.h:286
octave::tree_cell * tree_cell_type
Definition: oct-parse.h:248