GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-parse.cc
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.8.2. */
2 
3 /* Bison implementation 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 <https://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 /* C LALR(1) parser skeleton written by Richard Stallman, by
35  simplifying the original so-called "semantic" parser. */
36 
37 /* DO NOT RELY ON FEATURES THAT ARE NOT DOCUMENTED in the manual,
38  especially those whose name start with YY_ or yy_. They are
39  private implementation details that can be changed or removed. */
40 
41 /* All symbols defined below should begin with yy or YY, to avoid
42  infringing on user name space. This should be done even for local
43  variables, as they might otherwise be expanded by user macros.
44  There are some unavoidable exceptions within include files to
45  define necessary library symbols; they are noted "INFRINGES ON
46  USER NAME SPACE" below. */
47 
48 /* Identify Bison output, and Bison version. */
49 #define YYBISON 30802
50 
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.8.2"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 1
59 
60 /* Push parsers. */
61 #define YYPUSH 1
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 /* Substitute the type names. */
67 #define YYSTYPE OCTAVE_STYPE
68 /* Substitute the variable and function names. */
69 #define yyparse octave_parse
70 #define yypush_parse octave_push_parse
71 #define yypull_parse octave_pull_parse
72 #define yypstate_new octave_pstate_new
73 #define yypstate_clear octave_pstate_clear
74 #define yypstate_delete octave_pstate_delete
75 #define yypstate octave_pstate
76 #define yylex octave_lex
77 #define yyerror octave_error
78 #define yydebug octave_debug
79 #define yynerrs octave_nerrs
80 
81 /* First part of user prologue. */
82 #line 30 "../libinterp/parse-tree/oct-parse.yy"
83 
84 
85 #define YYDEBUG 1
86 
87 #if defined (HAVE_CONFIG_H)
88 # include "config.h"
89 #endif
90 
91 #include <cassert>
92 #include <cstdio>
93 #include <cstdlib>
94 
95 #include <iostream>
96 #include <map>
97 #include <sstream>
98 
99 #include "Matrix.h"
100 #include "cmd-edit.h"
101 #include "cmd-hist.h"
102 #include "file-ops.h"
103 #include "file-stat.h"
104 #include "oct-env.h"
105 #include "oct-time.h"
106 #include "quit.h"
107 
108 #include "Cell.h"
109 #include "anon-fcn-validator.h"
110 #include "builtin-defun-decls.h"
111 #include "defun.h"
112 #include "dynamic-ld.h"
113 #include "error.h"
114 #include "input.h"
115 #include "interpreter-private.h"
116 #include "interpreter.h"
117 #include "lex.h"
118 #include "load-path.h"
119 #include "lo-sysdep.h"
120 #include "oct-hist.h"
121 #include "oct-map.h"
122 #include "ov-classdef.h"
123 #include "ov-fcn-handle.h"
124 #include "ov-usr-fcn.h"
125 #include "ov-null-mat.h"
126 #include "pager.h"
127 #include "parse.h"
128 #include "pt-all.h"
129 #include "pt-eval.h"
130 #include "symtab.h"
131 #include "token.h"
132 #include "unwind-prot.h"
133 #include "utils.h"
134 #include "variables.h"
135 
136 // oct-parse.h must be included after pt-all.h
137 #include "oct-parse.h"
138 
139 extern int octave_lex (YYSTYPE *, void *);
140 
141 // Forward declarations for some functions defined at the bottom of
142 // the file.
143 
144 static void yyerror (octave::base_parser& parser, const char *s);
145 
146 #define lexer (parser.get_lexer ())
147 #define scanner lexer.m_scanner
148 
149 // Previous versions of Octave used Bison's YYUSE macro to avoid
150 // warnings about unused values in rules. But that Bison macro was
151 // apparently never intended to be public. So define our own. All we
152 // need to do is mention the symantic value somewhere in the rule. It
153 // doesn't actually need to be used to avoid the Bison warning, so just
154 // define this macro to discard its parameter.
155 #define OCTAVE_YYUSE(X, ...)
156 
157 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
158  // Disable this warning for code that is generated by Bison,
159  // including grammar rules. Push the current state so we can
160  // restore the warning state prior to functions we define at
161  // the bottom of the file.
162 # pragma GCC diagnostic push
163 # pragma GCC diagnostic ignored "-Wold-style-cast"
164 #endif
165 
166 
167 #line 168 "libinterp/parse-tree/oct-parse.cc"
168 
169 # ifndef YY_CAST
170 # ifdef __cplusplus
171 # define YY_CAST(Type, Val) static_cast<Type> (Val)
172 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
173 # else
174 # define YY_CAST(Type, Val) ((Type) (Val))
175 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
176 # endif
177 # endif
178 # ifndef YY_NULLPTR
179 # if defined __cplusplus
180 # if 201103L <= __cplusplus
181 # define YY_NULLPTR nullptr
182 # else
183 # define YY_NULLPTR 0
184 # endif
185 # else
186 # define YY_NULLPTR ((void*)0)
187 # endif
188 # endif
189 
190 #include "oct-parse.h"
191 /* Symbol kind. */
193 {
195  YYSYMBOL_YYEOF = 0, /* "end of file" */
196  YYSYMBOL_YYerror = 1, /* error */
197  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
198  YYSYMBOL_3_ = 3, /* '=' */
199  YYSYMBOL_4_ = 4, /* ':' */
200  YYSYMBOL_5_ = 5, /* '-' */
201  YYSYMBOL_6_ = 6, /* '+' */
202  YYSYMBOL_7_ = 7, /* '*' */
203  YYSYMBOL_8_ = 8, /* '/' */
204  YYSYMBOL_9_ = 9, /* '~' */
205  YYSYMBOL_10_ = 10, /* '!' */
206  YYSYMBOL_11_ = 11, /* '(' */
207  YYSYMBOL_12_ = 12, /* ')' */
208  YYSYMBOL_13_ = 13, /* '[' */
209  YYSYMBOL_14_ = 14, /* ']' */
210  YYSYMBOL_15_ = 15, /* '{' */
211  YYSYMBOL_16_ = 16, /* '}' */
212  YYSYMBOL_17_ = 17, /* '.' */
213  YYSYMBOL_18_ = 18, /* '@' */
214  YYSYMBOL_19_ = 19, /* ',' */
215  YYSYMBOL_20_ = 20, /* ';' */
216  YYSYMBOL_21_n_ = 21, /* '\n' */
217  YYSYMBOL_ADD_EQ = 22, /* ADD_EQ */
218  YYSYMBOL_SUB_EQ = 23, /* SUB_EQ */
219  YYSYMBOL_MUL_EQ = 24, /* MUL_EQ */
220  YYSYMBOL_DIV_EQ = 25, /* DIV_EQ */
221  YYSYMBOL_LEFTDIV_EQ = 26, /* LEFTDIV_EQ */
222  YYSYMBOL_POW_EQ = 27, /* POW_EQ */
223  YYSYMBOL_EMUL_EQ = 28, /* EMUL_EQ */
224  YYSYMBOL_EDIV_EQ = 29, /* EDIV_EQ */
225  YYSYMBOL_ELEFTDIV_EQ = 30, /* ELEFTDIV_EQ */
226  YYSYMBOL_EPOW_EQ = 31, /* EPOW_EQ */
227  YYSYMBOL_AND_EQ = 32, /* AND_EQ */
228  YYSYMBOL_OR_EQ = 33, /* OR_EQ */
229  YYSYMBOL_EXPR_AND_AND = 34, /* EXPR_AND_AND */
230  YYSYMBOL_EXPR_OR_OR = 35, /* EXPR_OR_OR */
231  YYSYMBOL_EXPR_AND = 36, /* EXPR_AND */
232  YYSYMBOL_EXPR_OR = 37, /* EXPR_OR */
233  YYSYMBOL_EXPR_LT = 38, /* EXPR_LT */
234  YYSYMBOL_EXPR_LE = 39, /* EXPR_LE */
235  YYSYMBOL_EXPR_EQ = 40, /* EXPR_EQ */
236  YYSYMBOL_EXPR_NE = 41, /* EXPR_NE */
237  YYSYMBOL_EXPR_GE = 42, /* EXPR_GE */
238  YYSYMBOL_EXPR_GT = 43, /* EXPR_GT */
239  YYSYMBOL_LEFTDIV = 44, /* LEFTDIV */
240  YYSYMBOL_EMUL = 45, /* EMUL */
241  YYSYMBOL_EDIV = 46, /* EDIV */
242  YYSYMBOL_ELEFTDIV = 47, /* ELEFTDIV */
243  YYSYMBOL_HERMITIAN = 48, /* HERMITIAN */
244  YYSYMBOL_TRANSPOSE = 49, /* TRANSPOSE */
245  YYSYMBOL_PLUS_PLUS = 50, /* PLUS_PLUS */
246  YYSYMBOL_MINUS_MINUS = 51, /* MINUS_MINUS */
247  YYSYMBOL_POW = 52, /* POW */
248  YYSYMBOL_EPOW = 53, /* EPOW */
249  YYSYMBOL_NUMBER = 54, /* NUMBER */
250  YYSYMBOL_STRUCT_ELT = 55, /* STRUCT_ELT */
251  YYSYMBOL_NAME = 56, /* NAME */
252  YYSYMBOL_END = 57, /* END */
253  YYSYMBOL_DQ_STRING = 58, /* DQ_STRING */
254  YYSYMBOL_SQ_STRING = 59, /* SQ_STRING */
255  YYSYMBOL_FOR = 60, /* FOR */
256  YYSYMBOL_PARFOR = 61, /* PARFOR */
257  YYSYMBOL_WHILE = 62, /* WHILE */
258  YYSYMBOL_DO = 63, /* DO */
259  YYSYMBOL_UNTIL = 64, /* UNTIL */
260  YYSYMBOL_SPMD = 65, /* SPMD */
261  YYSYMBOL_IF = 66, /* IF */
262  YYSYMBOL_ELSEIF = 67, /* ELSEIF */
263  YYSYMBOL_ELSE = 68, /* ELSE */
264  YYSYMBOL_SWITCH = 69, /* SWITCH */
265  YYSYMBOL_CASE = 70, /* CASE */
266  YYSYMBOL_OTHERWISE = 71, /* OTHERWISE */
267  YYSYMBOL_BREAK = 72, /* BREAK */
268  YYSYMBOL_CONTINUE = 73, /* CONTINUE */
269  YYSYMBOL_FUNC_RET = 74, /* FUNC_RET */
270  YYSYMBOL_UNWIND = 75, /* UNWIND */
271  YYSYMBOL_CLEANUP = 76, /* CLEANUP */
272  YYSYMBOL_TRY = 77, /* TRY */
273  YYSYMBOL_CATCH = 78, /* CATCH */
274  YYSYMBOL_GLOBAL = 79, /* GLOBAL */
275  YYSYMBOL_PERSISTENT = 80, /* PERSISTENT */
276  YYSYMBOL_FCN_HANDLE = 81, /* FCN_HANDLE */
277  YYSYMBOL_CLASSDEF = 82, /* CLASSDEF */
278  YYSYMBOL_PROPERTIES = 83, /* PROPERTIES */
279  YYSYMBOL_METHODS = 84, /* METHODS */
280  YYSYMBOL_EVENTS = 85, /* EVENTS */
281  YYSYMBOL_ENUMERATION = 86, /* ENUMERATION */
282  YYSYMBOL_METAQUERY = 87, /* METAQUERY */
283  YYSYMBOL_SUPERCLASSREF = 88, /* SUPERCLASSREF */
284  YYSYMBOL_FQ_IDENT = 89, /* FQ_IDENT */
285  YYSYMBOL_GET = 90, /* GET */
286  YYSYMBOL_SET = 91, /* SET */
287  YYSYMBOL_FCN = 92, /* FCN */
288  YYSYMBOL_ARGUMENTS = 93, /* ARGUMENTS */
289  YYSYMBOL_LEXICAL_ERROR = 94, /* LEXICAL_ERROR */
290  YYSYMBOL_END_OF_INPUT = 95, /* END_OF_INPUT */
291  YYSYMBOL_INPUT_FILE = 96, /* INPUT_FILE */
292  YYSYMBOL_UNARY = 97, /* UNARY */
293  YYSYMBOL_YYACCEPT = 98, /* $accept */
294  YYSYMBOL_input = 99, /* input */
295  YYSYMBOL_simple_list = 100, /* simple_list */
296  YYSYMBOL_simple_list1 = 101, /* simple_list1 */
297  YYSYMBOL_opt_list = 102, /* opt_list */
298  YYSYMBOL_list = 103, /* list */
299  YYSYMBOL_list1 = 104, /* list1 */
300  YYSYMBOL_opt_fcn_list = 105, /* opt_fcn_list */
301  YYSYMBOL_fcn_list = 106, /* fcn_list */
302  YYSYMBOL_fcn_list1 = 107, /* fcn_list1 */
303  YYSYMBOL_statement = 108, /* statement */
304  YYSYMBOL_word_list_cmd = 109, /* word_list_cmd */
305  YYSYMBOL_word_list = 110, /* word_list */
306  YYSYMBOL_identifier = 111, /* identifier */
307  YYSYMBOL_superclass_identifier = 112, /* superclass_identifier */
308  YYSYMBOL_meta_identifier = 113, /* meta_identifier */
309  YYSYMBOL_string = 114, /* string */
310  YYSYMBOL_constant = 115, /* constant */
311  YYSYMBOL_matrix = 116, /* matrix */
312  YYSYMBOL_matrix_rows = 117, /* matrix_rows */
313  YYSYMBOL_cell = 118, /* cell */
314  YYSYMBOL_cell_rows = 119, /* cell_rows */
315  YYSYMBOL_cell_or_matrix_row = 120, /* cell_or_matrix_row */
316  YYSYMBOL_fcn_handle = 121, /* fcn_handle */
317  YYSYMBOL_anon_fcn_handle = 122, /* anon_fcn_handle */
318  YYSYMBOL_primary_expr = 123, /* primary_expr */
319  YYSYMBOL_magic_colon = 124, /* magic_colon */
320  YYSYMBOL_magic_tilde = 125, /* magic_tilde */
321  YYSYMBOL_arg_list = 126, /* arg_list */
322  YYSYMBOL_indirect_ref_op = 127, /* indirect_ref_op */
323  YYSYMBOL_oper_expr = 128, /* oper_expr */
324  YYSYMBOL_power_expr = 129, /* power_expr */
325  YYSYMBOL_colon_expr = 130, /* colon_expr */
326  YYSYMBOL_simple_expr = 131, /* simple_expr */
327  YYSYMBOL_assign_lhs = 132, /* assign_lhs */
328  YYSYMBOL_assign_expr = 133, /* assign_expr */
329  YYSYMBOL_expression = 134, /* expression */
330  YYSYMBOL_command = 135, /* command */
331  YYSYMBOL_declaration = 136, /* declaration */
332  YYSYMBOL_decl_init_list = 137, /* decl_init_list */
333  YYSYMBOL_decl_elt = 138, /* decl_elt */
334  YYSYMBOL_select_command = 139, /* select_command */
335  YYSYMBOL_if_command = 140, /* if_command */
336  YYSYMBOL_if_cmd_list = 141, /* if_cmd_list */
337  YYSYMBOL_if_cmd_list1 = 142, /* if_cmd_list1 */
338  YYSYMBOL_elseif_clause = 143, /* elseif_clause */
339  YYSYMBOL_else_clause = 144, /* else_clause */
340  YYSYMBOL_switch_command = 145, /* switch_command */
341  YYSYMBOL_case_list = 146, /* case_list */
342  YYSYMBOL_case_list1 = 147, /* case_list1 */
343  YYSYMBOL_switch_case = 148, /* switch_case */
344  YYSYMBOL_default_case = 149, /* default_case */
345  YYSYMBOL_loop_command = 150, /* loop_command */
346  YYSYMBOL_jump_command = 151, /* jump_command */
347  YYSYMBOL_spmd_command = 152, /* spmd_command */
348  YYSYMBOL_except_command = 153, /* except_command */
349  YYSYMBOL_push_fcn_symtab = 154, /* push_fcn_symtab */
350  YYSYMBOL_param_list_beg = 155, /* param_list_beg */
351  YYSYMBOL_param_list_end = 156, /* param_list_end */
352  YYSYMBOL_opt_param_list = 157, /* opt_param_list */
353  YYSYMBOL_param_list = 158, /* param_list */
354  YYSYMBOL_param_list1 = 159, /* param_list1 */
355  YYSYMBOL_param_list2 = 160, /* param_list2 */
356  YYSYMBOL_param_list_elt = 161, /* param_list_elt */
357  YYSYMBOL_return_list = 162, /* return_list */
358  YYSYMBOL_return_list1 = 163, /* return_list1 */
359  YYSYMBOL_parsing_local_fcns = 164, /* parsing_local_fcns */
360  YYSYMBOL_push_script_symtab = 165, /* push_script_symtab */
361  YYSYMBOL_begin_file = 166, /* begin_file */
362  YYSYMBOL_file = 167, /* file */
363  YYSYMBOL_function_beg = 168, /* function_beg */
364  YYSYMBOL_fcn_name = 169, /* fcn_name */
365  YYSYMBOL_function_end = 170, /* function_end */
366  YYSYMBOL_function = 171, /* function */
367  YYSYMBOL_function_body = 172, /* function_body */
368  YYSYMBOL_at_first_executable_stmt = 173, /* at_first_executable_stmt */
369  YYSYMBOL_function_body1 = 174, /* function_body1 */
370  YYSYMBOL_arguments_block = 175, /* arguments_block */
371  YYSYMBOL_arguments_beg = 176, /* arguments_beg */
372  YYSYMBOL_args_attr_list = 177, /* args_attr_list */
373  YYSYMBOL_args_validation_list = 178, /* args_validation_list */
374  YYSYMBOL_arg_name = 179, /* arg_name */
375  YYSYMBOL_arg_validation = 180, /* arg_validation */
376  YYSYMBOL_size_spec = 181, /* size_spec */
377  YYSYMBOL_class_name = 182, /* class_name */
378  YYSYMBOL_validation_fcns = 183, /* validation_fcns */
379  YYSYMBOL_default_value = 184, /* default_value */
380  YYSYMBOL_classdef_beg = 185, /* classdef_beg */
381  YYSYMBOL_classdef = 186, /* classdef */
382  YYSYMBOL_attr_list = 187, /* attr_list */
383  YYSYMBOL_attr_list1 = 188, /* attr_list1 */
384  YYSYMBOL_attr = 189, /* attr */
385  YYSYMBOL_superclass_list = 190, /* superclass_list */
386  YYSYMBOL_superclass_list1 = 191, /* superclass_list1 */
387  YYSYMBOL_superclass = 192, /* superclass */
388  YYSYMBOL_class_body = 193, /* class_body */
389  YYSYMBOL_class_body1 = 194, /* class_body1 */
390  YYSYMBOL_properties_block = 195, /* properties_block */
391  YYSYMBOL_properties_beg = 196, /* properties_beg */
392  YYSYMBOL_property_list = 197, /* property_list */
393  YYSYMBOL_property_list1 = 198, /* property_list1 */
394  YYSYMBOL_class_property = 199, /* class_property */
395  YYSYMBOL_methods_block = 200, /* methods_block */
396  YYSYMBOL_methods_beg = 201, /* methods_beg */
397  YYSYMBOL_method_decl1 = 202, /* method_decl1 */
398  YYSYMBOL_method_decl = 203, /* method_decl */
399  YYSYMBOL_204_1 = 204, /* $@1 */
400  YYSYMBOL_method = 205, /* method */
401  YYSYMBOL_methods_list = 206, /* methods_list */
402  YYSYMBOL_methods_list1 = 207, /* methods_list1 */
403  YYSYMBOL_events_block = 208, /* events_block */
404  YYSYMBOL_events_beg = 209, /* events_beg */
405  YYSYMBOL_events_list = 210, /* events_list */
406  YYSYMBOL_events_list1 = 211, /* events_list1 */
407  YYSYMBOL_class_event = 212, /* class_event */
408  YYSYMBOL_enum_block = 213, /* enum_block */
409  YYSYMBOL_enumeration_beg = 214, /* enumeration_beg */
410  YYSYMBOL_enum_list = 215, /* enum_list */
411  YYSYMBOL_enum_list1 = 216, /* enum_list1 */
412  YYSYMBOL_class_enum = 217, /* class_enum */
413  YYSYMBOL_stmt_begin = 218, /* stmt_begin */
414  YYSYMBOL_anon_fcn_begin = 219, /* anon_fcn_begin */
415  YYSYMBOL_stash_comment = 220, /* stash_comment */
416  YYSYMBOL_parse_error = 221, /* parse_error */
417  YYSYMBOL_sep_no_nl = 222, /* sep_no_nl */
418  YYSYMBOL_opt_sep_no_nl = 223, /* opt_sep_no_nl */
419  YYSYMBOL_opt_nl = 224, /* opt_nl */
420  YYSYMBOL_nl = 225, /* nl */
421  YYSYMBOL_sep = 226, /* sep */
422  YYSYMBOL_opt_sep = 227 /* opt_sep */
423 };
424 typedef enum yysymbol_kind_t yysymbol_kind_t;
425 
426 
427 
428 
429 #ifdef short
430 # undef short
431 #endif
432 
433 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
434  <limits.h> and (if available) <stdint.h> are included
435  so that the code can choose integer types of a good width. */
436 
437 #ifndef __PTRDIFF_MAX__
438 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
439 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
440 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
441 # define YY_STDINT_H
442 # endif
443 #endif
444 
445 /* Narrow types that promote to a signed type and that can represent a
446  signed or unsigned integer of at least N bits. In tables they can
447  save space and decrease cache pressure. Promoting to a signed type
448  helps avoid bugs in integer arithmetic. */
449 
450 #ifdef __INT_LEAST8_MAX__
451 typedef __INT_LEAST8_TYPE__ yytype_int8;
452 #elif defined YY_STDINT_H
453 typedef int_least8_t yytype_int8;
454 #else
455 typedef signed char yytype_int8;
456 #endif
457 
458 #ifdef __INT_LEAST16_MAX__
459 typedef __INT_LEAST16_TYPE__ yytype_int16;
460 #elif defined YY_STDINT_H
461 typedef int_least16_t yytype_int16;
462 #else
463 typedef short yytype_int16;
464 #endif
465 
466 /* Work around bug in HP-UX 11.23, which defines these macros
467  incorrectly for preprocessor constants. This workaround can likely
468  be removed in 2023, as HPE has promised support for HP-UX 11.23
469  (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
470  <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
471 #ifdef __hpux
472 # undef UINT_LEAST8_MAX
473 # undef UINT_LEAST16_MAX
474 # define UINT_LEAST8_MAX 255
475 # define UINT_LEAST16_MAX 65535
476 #endif
477 
478 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
479 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
480 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
481  && UINT_LEAST8_MAX <= INT_MAX)
482 typedef uint_least8_t yytype_uint8;
483 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
484 typedef unsigned char yytype_uint8;
485 #else
486 typedef short yytype_uint8;
487 #endif
488 
489 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
490 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
491 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
492  && UINT_LEAST16_MAX <= INT_MAX)
493 typedef uint_least16_t yytype_uint16;
494 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
495 typedef unsigned short yytype_uint16;
496 #else
497 typedef int yytype_uint16;
498 #endif
499 
500 #ifndef YYPTRDIFF_T
501 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
502 # define YYPTRDIFF_T __PTRDIFF_TYPE__
503 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
504 # elif defined PTRDIFF_MAX
505 # ifndef ptrdiff_t
506 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
507 # endif
508 # define YYPTRDIFF_T ptrdiff_t
509 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
510 # else
511 # define YYPTRDIFF_T long
512 # define YYPTRDIFF_MAXIMUM LONG_MAX
513 # endif
514 #endif
515 
516 #ifndef YYSIZE_T
517 # ifdef __SIZE_TYPE__
518 # define YYSIZE_T __SIZE_TYPE__
519 # elif defined size_t
520 # define YYSIZE_T size_t
521 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
522 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
523 # define YYSIZE_T size_t
524 # else
525 # define YYSIZE_T unsigned
526 # endif
527 #endif
528 
529 #define YYSIZE_MAXIMUM \
530  YY_CAST (YYPTRDIFF_T, \
531  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
532  ? YYPTRDIFF_MAXIMUM \
533  : YY_CAST (YYSIZE_T, -1)))
534 
535 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
536 
537 
538 /* Stored state numbers (used for stacks). */
540 
541 /* State numbers in computations. */
542 typedef int yy_state_fast_t;
543 
544 #ifndef YY_
545 # if defined YYENABLE_NLS && YYENABLE_NLS
546 # if ENABLE_NLS
547 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
548 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
549 # endif
550 # endif
551 # ifndef YY_
552 # define YY_(Msgid) Msgid
553 # endif
554 #endif
555 
556 
557 #ifndef YY_ATTRIBUTE_PURE
558 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
559 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
560 # else
561 # define YY_ATTRIBUTE_PURE
562 # endif
563 #endif
564 
565 #ifndef YY_ATTRIBUTE_UNUSED
566 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
567 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
568 # else
569 # define YY_ATTRIBUTE_UNUSED
570 # endif
571 #endif
572 
573 /* Suppress unused-variable warnings by "using" E. */
574 #if ! defined lint || defined __GNUC__
575 # define YY_USE(E) ((void) (E))
576 #else
577 # define YY_USE(E) /* empty */
578 #endif
579 
580 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
581 #if defined __GNUC__ && ! defined __ICC && 406 <= __GNUC__ * 100 + __GNUC_MINOR__
582 # if __GNUC__ * 100 + __GNUC_MINOR__ < 407
583 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
584  _Pragma ("GCC diagnostic push") \
585  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")
586 # else
587 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
588  _Pragma ("GCC diagnostic push") \
589  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
590  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
591 # endif
592 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
593  _Pragma ("GCC diagnostic pop")
594 #else
595 # define YY_INITIAL_VALUE(Value) Value
596 #endif
597 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
598 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
599 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
600 #endif
601 #ifndef YY_INITIAL_VALUE
602 # define YY_INITIAL_VALUE(Value) /* Nothing. */
603 #endif
604 
605 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
606 # define YY_IGNORE_USELESS_CAST_BEGIN \
607  _Pragma ("GCC diagnostic push") \
608  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
609 # define YY_IGNORE_USELESS_CAST_END \
610  _Pragma ("GCC diagnostic pop")
611 #endif
612 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
613 # define YY_IGNORE_USELESS_CAST_BEGIN
614 # define YY_IGNORE_USELESS_CAST_END
615 #endif
616 
617 
618 #define YY_ASSERT(E) ((void) (0 && (E)))
619 
620 #if !defined yyoverflow
621 
622 /* The parser invokes alloca or malloc; define the necessary symbols. */
623 
624 # ifdef YYSTACK_ALLOC
625  /* Pacify GCC's 'empty if-body' warning. */
626 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
627 # ifndef YYSTACK_ALLOC_MAXIMUM
628  /* The OS might guarantee only one guard page at the bottom of the stack,
629  and a page size can be as small as 4096 bytes. So we cannot safely
630  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
631  to allow for a few compiler-allocated temporary stack slots. */
632 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
633 # endif
634 # else
635 # define YYSTACK_ALLOC YYMALLOC
636 # define YYSTACK_FREE YYFREE
637 # ifndef YYSTACK_ALLOC_MAXIMUM
638 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
639 # endif
640 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
641  && ! ((defined YYMALLOC || defined malloc) \
642  && (defined YYFREE || defined free)))
643 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
644 # ifndef EXIT_SUCCESS
645 # define EXIT_SUCCESS 0
646 # endif
647 # endif
648 # ifndef YYMALLOC
649 # define YYMALLOC malloc
650 # if ! defined malloc && ! defined EXIT_SUCCESS
651 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
652 # endif
653 # endif
654 # ifndef YYFREE
655 # define YYFREE free
656 # if ! defined free && ! defined EXIT_SUCCESS
657 void free (void *); /* INFRINGES ON USER NAME SPACE */
658 # endif
659 # endif
660 # endif
661 #endif /* !defined yyoverflow */
662 
663 #if (! defined yyoverflow \
664  && (! defined __cplusplus \
665  || (defined OCTAVE_STYPE_IS_TRIVIAL && OCTAVE_STYPE_IS_TRIVIAL)))
666 
667 /* A type that is properly aligned for any stack member. */
668 union yyalloc
669 {
672 };
673 
674 /* The size of the maximum gap between one aligned stack and the next. */
675 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
676 
677 /* The size of an array large to enough to hold all stacks, each with
678  N elements. */
679 # define YYSTACK_BYTES(N) \
680  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
681  + YYSTACK_GAP_MAXIMUM)
682 
683 # define YYCOPY_NEEDED 1
684 
685 /* Relocate STACK from its old location to the new one. The
686  local variables YYSIZE and YYSTACKSIZE give the old and new number of
687  elements in the stack, and YYPTR gives the new location of the
688  stack. Advance YYPTR to a properly aligned location for the next
689  stack. */
690 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
691  do \
692  { \
693  YYPTRDIFF_T yynewbytes; \
694  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
695  Stack = &yyptr->Stack_alloc; \
696  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
697  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
698  } \
699  while (0)
700 
701 #endif
702 
703 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
704 /* Copy COUNT objects from SRC to DST. The source and destination do
705  not overlap. */
706 # ifndef YYCOPY
707 # if defined __GNUC__ && 1 < __GNUC__
708 # define YYCOPY(Dst, Src, Count) \
709  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
710 # else
711 # define YYCOPY(Dst, Src, Count) \
712  do \
713  { \
714  YYPTRDIFF_T yyi; \
715  for (yyi = 0; yyi < (Count); yyi++) \
716  (Dst)[yyi] = (Src)[yyi]; \
717  } \
718  while (0)
719 # endif
720 # endif
721 #endif /* !YYCOPY_NEEDED */
722 
723 /* YYFINAL -- State number of the termination state. */
724 #define YYFINAL 110
725 /* YYLAST -- Last index in YYTABLE. */
726 #define YYLAST 1622
727 
728 /* YYNTOKENS -- Number of terminals. */
729 #define YYNTOKENS 98
730 /* YYNNTS -- Number of nonterminals. */
731 #define YYNNTS 130
732 /* YYNRULES -- Number of rules. */
733 #define YYNRULES 315
734 /* YYNSTATES -- Number of states. */
735 #define YYNSTATES 574
736 
737 /* YYMAXUTOK -- Last valid token kind. */
738 #define YYMAXUTOK 333
739 
740 
741 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
742  as returned by yylex, with out-of-bounds checking. */
743 #define YYTRANSLATE(YYX) \
744  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
745  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
746  : YYSYMBOL_YYUNDEF)
747 
748 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
749  as returned by yylex. */
750 static const yytype_int8 yytranslate[] =
751 {
752  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
753  21, 2, 2, 2, 2, 2, 2, 2, 2, 2,
754  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
755  2, 2, 2, 10, 2, 2, 2, 2, 2, 2,
756  11, 12, 7, 6, 19, 5, 17, 8, 2, 2,
757  2, 2, 2, 2, 2, 2, 2, 2, 4, 20,
758  2, 3, 2, 2, 18, 2, 2, 2, 2, 2,
759  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
760  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
761  2, 13, 2, 14, 2, 2, 2, 2, 2, 2,
762  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
763  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
764  2, 2, 2, 15, 2, 16, 9, 2, 2, 2,
765  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
766  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
767  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
768  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
769  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
770  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
771  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
772  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
773  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
774  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
775  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
776  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
777  2, 2, 2, 2, 2, 2, 1, 2, 22, 23,
778  24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
779  34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
780  44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
781  54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
782  64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
783  74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
784  84, 85, 86, 87, 88, 89, 90, 91, 92, 93,
785  94, 95, 96, 97
786 };
787 
788 #if OCTAVE_DEBUG
789 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
790 static const yytype_int16 yyrline[] =
791 {
792  0, 415, 415, 426, 437, 444, 450, 454, 456, 461,
793  462, 466, 470, 472, 477, 478, 482, 490, 495, 502,
794  504, 506, 518, 530, 532, 540, 545, 549, 553, 555,
795  559, 561, 565, 569, 571, 579, 583, 585, 602, 603,
796  609, 611, 617, 623, 631, 639, 651, 663, 665, 667,
797  669, 674, 676, 678, 680, 688, 692, 700, 702, 704,
798  706, 712, 718, 726, 735, 737, 739, 741, 752, 763,
799  774, 785, 787, 789, 791, 797, 799, 801, 803, 805,
800  807, 809, 811, 813, 815, 817, 819, 821, 823, 825,
801  827, 831, 833, 835, 837, 848, 859, 870, 881, 883,
802  889, 891, 893, 895, 897, 899, 903, 915, 929, 931,
803  933, 935, 937, 939, 941, 943, 945, 947, 949, 951,
804  955, 969, 971, 973, 975, 977, 979, 981, 983, 985,
805  987, 989, 991, 993, 997, 1012, 1019, 1027, 1029, 1031,
806  1033, 1035, 1037, 1039, 1041, 1049, 1054, 1061, 1063, 1067,
807  1069, 1077, 1079, 1087, 1097, 1099, 1103, 1111, 1115, 1125,
808  1137, 1150, 1151, 1153, 1155, 1159, 1161, 1165, 1173, 1185,
809  1197, 1203, 1214, 1225, 1236, 1253, 1258, 1263, 1271, 1290,
810  1301, 1312, 1330, 1342, 1360, 1372, 1373, 1377, 1384, 1393,
811  1394, 1411, 1413, 1421, 1423, 1431, 1439, 1458, 1477, 1481,
812  1495, 1499, 1508, 1512, 1546, 1564, 1573, 1583, 1594, 1607,
813  1620, 1655, 1662, 1671, 1677, 1687, 1693, 1699, 1707, 1725,
814  1733, 1734, 1748, 1753, 1766, 1770, 1781, 1782, 1795, 1796,
815  1802, 1803, 1816, 1817, 1829, 1847, 1867, 1868, 1876, 1878,
816  1886, 1888, 1894, 1900, 1909, 1915, 1927, 1933, 1941, 1946,
817  1950, 1959, 1961, 1963, 1965, 1967, 1973, 1979, 1985, 1994,
818  2011, 2019, 2023, 2033, 2035, 2066, 2070, 2087, 2094, 2099,
819  2106, 2109, 2108, 2124, 2126, 2131, 2135, 2144, 2146, 2154,
820  2171, 2179, 2183, 2192, 2194, 2202, 2206, 2223, 2231, 2235,
821  2244, 2246, 2254, 2267, 2274, 2282, 2285, 2291, 2295, 2301,
822  2307, 2313, 2322, 2323, 2328, 2329, 2333, 2339, 2347, 2353,
823  2359, 2365, 2371, 2377, 2386, 2387
824 };
825 #endif
826 
827 /** Accessing symbol of state STATE. */
828 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
829 
830 #if OCTAVE_DEBUG || 0
831 /* The user-facing name of the symbol whose (internal) number is
832  YYSYMBOL. No bounds checking. */
833 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
834 
835 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
836  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
837 static const char *const yytname[] =
838 {
839  "\"end of file\"", "error", "\"invalid token\"", "'='", "':'", "'-'",
840  "'+'", "'*'", "'/'", "'~'", "'!'", "'('", "')'", "'['", "']'", "'{'",
841  "'}'", "'.'", "'@'", "','", "';'", "'\\n'", "ADD_EQ", "SUB_EQ", "MUL_EQ",
842  "DIV_EQ", "LEFTDIV_EQ", "POW_EQ", "EMUL_EQ", "EDIV_EQ", "ELEFTDIV_EQ",
843  "EPOW_EQ", "AND_EQ", "OR_EQ", "EXPR_AND_AND", "EXPR_OR_OR", "EXPR_AND",
844  "EXPR_OR", "EXPR_LT", "EXPR_LE", "EXPR_EQ", "EXPR_NE", "EXPR_GE",
845  "EXPR_GT", "LEFTDIV", "EMUL", "EDIV", "ELEFTDIV", "HERMITIAN",
846  "TRANSPOSE", "PLUS_PLUS", "MINUS_MINUS", "POW", "EPOW", "NUMBER",
847  "STRUCT_ELT", "NAME", "END", "DQ_STRING", "SQ_STRING", "FOR", "PARFOR",
848  "WHILE", "DO", "UNTIL", "SPMD", "IF", "ELSEIF", "ELSE", "SWITCH", "CASE",
849  "OTHERWISE", "BREAK", "CONTINUE", "FUNC_RET", "UNWIND", "CLEANUP", "TRY",
850  "CATCH", "GLOBAL", "PERSISTENT", "FCN_HANDLE", "CLASSDEF", "PROPERTIES",
851  "METHODS", "EVENTS", "ENUMERATION", "METAQUERY", "SUPERCLASSREF",
852  "FQ_IDENT", "GET", "SET", "FCN", "ARGUMENTS", "LEXICAL_ERROR",
853  "END_OF_INPUT", "INPUT_FILE", "UNARY", "$accept", "input", "simple_list",
854  "simple_list1", "opt_list", "list", "list1", "opt_fcn_list", "fcn_list",
855  "fcn_list1", "statement", "word_list_cmd", "word_list", "identifier",
856  "superclass_identifier", "meta_identifier", "string", "constant",
857  "matrix", "matrix_rows", "cell", "cell_rows", "cell_or_matrix_row",
858  "fcn_handle", "anon_fcn_handle", "primary_expr", "magic_colon",
859  "magic_tilde", "arg_list", "indirect_ref_op", "oper_expr", "power_expr",
860  "colon_expr", "simple_expr", "assign_lhs", "assign_expr", "expression",
861  "command", "declaration", "decl_init_list", "decl_elt", "select_command",
862  "if_command", "if_cmd_list", "if_cmd_list1", "elseif_clause",
863  "else_clause", "switch_command", "case_list", "case_list1",
864  "switch_case", "default_case", "loop_command", "jump_command",
865  "spmd_command", "except_command", "push_fcn_symtab", "param_list_beg",
866  "param_list_end", "opt_param_list", "param_list", "param_list1",
867  "param_list2", "param_list_elt", "return_list", "return_list1",
868  "parsing_local_fcns", "push_script_symtab", "begin_file", "file",
869  "function_beg", "fcn_name", "function_end", "function", "function_body",
870  "at_first_executable_stmt", "function_body1", "arguments_block",
871  "arguments_beg", "args_attr_list", "args_validation_list", "arg_name",
872  "arg_validation", "size_spec", "class_name", "validation_fcns",
873  "default_value", "classdef_beg", "classdef", "attr_list", "attr_list1",
874  "attr", "superclass_list", "superclass_list1", "superclass",
875  "class_body", "class_body1", "properties_block", "properties_beg",
876  "property_list", "property_list1", "class_property", "methods_block",
877  "methods_beg", "method_decl1", "method_decl", "$@1", "method",
878  "methods_list", "methods_list1", "events_block", "events_beg",
879  "events_list", "events_list1", "class_event", "enum_block",
880  "enumeration_beg", "enum_list", "enum_list1", "class_enum", "stmt_begin",
881  "anon_fcn_begin", "stash_comment", "parse_error", "sep_no_nl",
882  "opt_sep_no_nl", "opt_nl", "nl", "sep", "opt_sep", YY_NULLPTR
883 };
884 
885 static const char *
886 yysymbol_name (yysymbol_kind_t yysymbol)
887 {
888  return yytname[yysymbol];
889 }
890 #endif
891 
892 #define YYPACT_NINF (-453)
893 
894 #define yypact_value_is_default(Yyn) \
895  ((Yyn) == YYPACT_NINF)
896 
897 #define YYTABLE_NINF (-316)
898 
899 #define yytable_value_is_error(Yyn) \
900  0
901 
902 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
903  STATE-NUM. */
904 static const yytype_int16 yypact[] =
905 {
906  748, -453, 610, 610, 610, 610, 549, 1160, 1160, 40,
907  -453, -453, 610, 610, -453, -453, -453, -453, -453, -453,
908  -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
909  38, 38, -453, -453, -453, -453, 58, -11, 86, -453,
910  -453, 124, -453, -453, -453, -453, -453, -453, -453, -453,
911  -453, 726, -453, 844, 919, -453, -453, -453, -453, -453,
912  -453, -453, -453, -453, -453, -453, 42, 69, 111, -453,
913  -453, -453, -453, 166, -453, -453, 198, 198, 198, 198,
914  184, -453, 610, 1336, 41, -453, -453, -453, 195, -453,
915  156, -453, -453, 25, -453, 198, 198, 1400, 1416, 549,
916  183, 183, 549, 549, 183, 183, 228, 38, -453, 38,
917  -453, -453, -453, 920, -453, 124, -453, 610, 610, 610,
918  610, 610, 1176, 1240, -453, 610, 610, 610, 610, -453,
919  -453, -453, -453, 1480, 1480, 33, 610, 610, 610, 610,
920  610, 610, 610, 610, 610, 610, 549, 549, 549, 549,
921  549, 549, 549, 549, 549, 549, 549, 549, 549, -453,
922  -453, -453, 1000, 213, 20, -453, -453, -453, 216, -453,
923  1160, 1336, -453, 1160, -453, -453, -453, -453, 225, 219,
924  -453, 484, 549, 351, 237, 549, 238, -453, -453, -453,
925  -453, 187, 1080, 1080, -453, 199, 143, 183, 1080, 1080,
926  549, -453, -453, -453, 1501, 1569, 1569, 198, 198, -453,
927  45, -453, 98, 198, 198, 198, 198, 1480, 1480, 1480,
928  1480, 1480, 1480, -453, 39, 39, 549, -453, 550, 397,
929  251, 408, -453, -453, -453, -453, -453, -453, -453, -453,
930  -453, -453, -453, -453, -453, -453, -453, -453, -453, -453,
931  -453, -453, 149, -453, 183, -453, -453, -453, -453, 18,
932  241, 245, 267, 271, 40, 1336, -453, -453, -453, -453,
933  -453, -453, -453, 31, -453, -453, 931, 549, 999, 549,
934  183, -453, -453, -453, 211, 222, 183, -453, -453, -453,
935  -453, -453, 146, 204, 74, -453, 610, -453, 1336, -453,
936  39, 39, 39, 39, 39, 39, 1256, 1320, -453, -453,
937  36, 270, -453, 840, -453, 272, 183, -453, -453, 139,
938  38, 38, 60, 183, -453, -453, 549, -453, 549, -453,
939  1080, 549, -453, 1080, 183, 183, -453, -453, 227, 146,
940  -453, -453, -453, -453, -453, 1558, -453, 130, -453, 154,
941  549, -453, -453, -453, 26, 38, 193, -453, 38, -453,
942  -453, -453, 40, 203, 274, 183, 290, 183, 253, -453,
943  -453, 549, 1080, 183, 183, -453, -453, -453, 183, 183,
944  -453, -453, 299, 38, 38, 311, 142, -453, 183, 221,
945  -453, 183, -453, -453, 183, -453, 6, 1080, 183, -453,
946  -453, 183, 1080, 549, 1080, -453, -453, -453, 549, 1080,
947  1080, 1080, -453, -453, -453, 549, 183, 26, 279, -453,
948  193, 203, -453, -453, -453, -453, 203, 183, 1080, 266,
949  306, 268, 183, -453, -453, 269, 275, -453, -453, -453,
950  235, 105, 148, -453, 6, 1080, -453, 316, 277, -453,
951  183, -453, 1080, 183, -453, -453, -453, -453, -453, -453,
952  -453, -453, 281, 183, -453, -453, -453, -453, -453, -453,
953  -453, -453, 235, -453, -453, -453, 38, 38, -453, 1080,
954  -453, 1080, -453, 105, 183, 183, 183, 183, -453, 317,
955  -453, 183, 320, 282, -453, -453, -453, -453, -453, 272,
956  272, 272, 272, -453, 104, 283, 1336, -453, 38, -453,
957  286, -19, 286, 286, 320, -453, 144, -453, 313, 287,
958  183, -453, 38, -453, -453, -453, 288, 183, 30, 293,
959  183, -453, 38, 295, 183, -453, 38, -453, -453, 1336,
960  344, -453, 51, -453, 320, -453, -15, 101, 350, -453,
961  -453, 286, -453, -453, 286, 345, 161, 549, -453, -453,
962  -453, -453, -453, -453, -453, -453, 549, -453, -453, 38,
963  347, 40, -453, -453
964 };
965 
966 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
967  Performed when YYTABLE does not specify something else to do. Zero
968  means the default is an error. */
969 static const yytype_int16 yydefact[] =
970 {
971  0, 297, 0, 0, 0, 0, 0, 38, 38, 0,
972  298, 299, 0, 0, 30, 25, 28, 29, 295, 295,
973  295, 295, 295, 295, 295, 175, 176, 177, 295, 295,
974  0, 0, 44, 27, 26, 296, 0, 0, 302, 7,
975  21, 47, 53, 52, 31, 48, 50, 51, 49, 136,
976  64, 108, 109, 134, 0, 135, 19, 20, 137, 138,
977  151, 152, 139, 140, 141, 142, 0, 0, 304, 144,
978  295, 143, 4, 303, 5, 47, 80, 79, 77, 78,
979  0, 55, 56, 39, 0, 33, 58, 59, 40, 57,
980  0, 36, 183, 0, 294, 75, 76, 0, 0, 0,
981  314, 314, 0, 0, 314, 314, 149, 145, 147, 146,
982  1, 2, 3, 303, 6, 22, 23, 0, 0, 0,
983  0, 0, 0, 0, 63, 0, 0, 0, 0, 71,
984  72, 65, 66, 0, 0, 0, 0, 0, 0, 0,
985  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
986  0, 0, 0, 0, 0, 0, 0, 0, 0, 205,
987  202, 306, 9, 305, 0, 300, 301, 54, 42, 32,
988  38, 41, 35, 38, 188, 56, 194, 193, 0, 190,
989  191, 0, 0, 120, 0, 0, 0, 293, 308, 309,
990  310, 315, 9, 9, 293, 0, 154, 314, 9, 9,
991  0, 148, 8, 24, 106, 84, 83, 85, 86, 67,
992  0, 69, 0, 89, 87, 88, 90, 0, 0, 0,
993  0, 0, 0, 91, 81, 82, 0, 73, 118, 119,
994  116, 117, 110, 111, 112, 115, 113, 114, 121, 122,
995  123, 124, 125, 126, 127, 128, 129, 130, 131, 132,
996  133, 234, 0, 10, 314, 12, 295, 200, 307, 0,
997  0, 0, 206, 0, 185, 43, 34, 60, 61, 62,
998  37, 184, 187, 0, 46, 45, 0, 0, 0, 0,
999  314, 311, 312, 313, 0, 0, 314, 153, 295, 295,
1000  157, 155, 161, 0, 0, 150, 0, 68, 0, 70,
1001  105, 104, 102, 103, 100, 101, 0, 0, 92, 93,
1002  0, 0, 203, 315, 11, 236, 314, 195, 198, 0,
1003  0, 0, 0, 314, 186, 192, 0, 293, 0, 293,
1004  9, 0, 178, 9, 314, 314, 295, 295, 0, 163,
1005  165, 162, 295, 181, 295, 107, 94, 0, 96, 0,
1006  0, 98, 74, 13, 0, 0, 14, 197, 0, 207,
1007  208, 206, 185, 215, 0, 314, 121, 314, 0, 170,
1008  156, 0, 9, 314, 314, 160, 166, 164, 314, 314,
1009  95, 97, 0, 0, 0, 240, 0, 238, 314, 0,
1010  15, 314, 17, 199, 314, 219, 0, 9, 314, 216,
1011  295, 314, 9, 0, 9, 169, 293, 159, 0, 9,
1012  9, 9, 99, 242, 243, 0, 314, 0, 244, 204,
1013  16, 215, 209, 210, 211, 213, 215, 314, 9, 0,
1014  0, 0, 314, 293, 168, 0, 0, 241, 237, 239,
1015  0, 249, 314, 18, 0, 9, 217, 220, 0, 171,
1016  314, 173, 9, 314, 179, 180, 248, 246, 260, 267,
1017  280, 287, 0, 314, 251, 295, 252, 295, 253, 295,
1018  254, 295, 0, 245, 212, 214, 0, 0, 172, 9,
1019  158, 9, 235, 250, 314, 314, 314, 314, 247, 0,
1020  224, 314, 226, 0, 167, 255, 256, 257, 258, 236,
1021  236, 236, 236, 221, 315, 0, 0, 222, 228, 174,
1022  261, 295, 281, 288, 226, 218, 0, 229, 230, 0,
1023  314, 263, 0, 274, 273, 277, 0, 314, 0, 0,
1024  314, 283, 0, 0, 314, 290, 0, 223, 227, 0,
1025  232, 259, 295, 262, 226, 266, 295, 268, 0, 270,
1026  279, 282, 285, 286, 289, 0, 0, 0, 225, 264,
1027  265, 278, 269, 271, 284, 291, 0, 231, 233, 0,
1028  0, 268, 272, 292
1029 };
1030 
1031 /* YYPGOTO[NTERM-NUM]. */
1032 static const yytype_int16 yypgoto[] =
1033 {
1034  -453, -453, -453, -453, -133, -453, -453, -453, -453, -453,
1035  2, -453, -453, 0, -453, -453, -12, -453, -453, -453,
1036  -453, -453, 8, -453, -453, -81, -163, -86, -74, -157,
1037  1, -122, -453, 163, -52, -453, 72, -453, -453, 326,
1038  -68, -453, -453, -453, -453, -453, -453, -453, -453, -453,
1039  21, 22, -453, -453, -453, -453, -453, -453, -453, 5,
1040  -8, -453, -453, 90, -164, -453, -453, -453, -453, -453,
1041  -453, 46, -75, -345, -50, -53, -453, -51, -453, -453,
1042  -453, -130, -452, -453, -453, -453, -453, -453, -453, -234,
1043  -453, -41, -453, -453, -95, -453, -453, -103, -453, -453,
1044  -453, -161, -101, -453, -174, -453, -453, -150, -453, -453,
1045  -82, -453, -453, -453, -146, -77, -453, -453, -453, -147,
1046  -170, -453, -1, -453, 370, 374, -453, -453, -239, 261
1047 };
1048 
1049 /* YYDEFGOTO[NTERM-NUM]. */
1050 static const yytype_int16 yydefgoto[] =
1051 {
1052  0, 36, 37, 38, 252, 253, 254, 389, 390, 391,
1053  255, 40, 115, 75, 42, 43, 44, 45, 46, 84,
1054  47, 90, 85, 48, 49, 50, 86, 87, 88, 135,
1055  51, 224, 52, 53, 54, 55, 56, 57, 58, 107,
1056  108, 59, 60, 195, 196, 290, 291, 61, 338, 339,
1057  340, 341, 62, 63, 64, 65, 66, 93, 272, 323,
1058  324, 178, 179, 180, 263, 319, 316, 67, 68, 69,
1059  70, 264, 424, 71, 396, 397, 398, 399, 400, 477,
1060  491, 492, 507, 508, 518, 540, 558, 256, 257, 355,
1061  386, 387, 441, 442, 457, 462, 463, 464, 465, 519,
1062  520, 521, 466, 467, 549, 524, 569, 525, 526, 527,
1063  468, 469, 529, 530, 531, 470, 471, 533, 534, 535,
1064  280, 181, 522, 72, 73, 74, 162, 163, 191, 192
1065 };
1066 
1067 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1068  positive, shift that token. If negative, reduce the rule whose
1069  number is the opposite. If YYTABLE_NINF, syntax error. */
1070 static const yytype_int16 yytable[] =
1071 {
1072  41, 94, 39, 76, 77, 78, 79, 176, 267, 168,
1073  111, 392, 225, 95, 96, 313, 91, 97, 98, 99,
1074  100, 101, 102, 103, 286, 177, 174, 104, 105, 116,
1075  106, 106, 317, 259, 175, 383, 384, -189, -275, 201,
1076  175, 201, -276, 259, 226, 184, 186, 350, 210, 212,
1077  306, 92, 223, 223, 307, 169, 124, 297, 110, 284,
1078  285, 170, 537, 422, 298, 293, 294, 310, 310, 164,
1079  281, 282, 283, -182, 15, 443, 15, -182, 80, 89,
1080  89, 15, 15, 78, 112, 268, 15, 15, 227, 308,
1081  309, 351, 560, 106, 15, 300, 301, 302, 303, 304,
1082  305, 423, 267, 203, -196, 10, 11, 106, -315, 106,
1083  260, 261, 92, 41, 299, 202, 15, 298, 204, 205,
1084  206, 207, 208, 281, 282, 283, 213, 214, 215, 216,
1085  276, 343, 161, 278, 159, 267, 223, 223, 223, 223,
1086  223, 223, 380, 310, 310, 310, 310, 310, 310, 298,
1087  260, 261, 344, 357, 416, 89, 538, 365, 358, 367,
1088  15, 417, 41, 298, 262, 160, 523, 188, 189, 190,
1089  381, 187, 172, 298, 194, 197, 173, 567, 266, 268,
1090  298, 270, 16, 17, 472, 165, 166, 176, 458, 459,
1091  460, 461, 41, 41, 89, 89, 167, 368, 41, 41,
1092  370, 523, 188, 189, 190, 177, 281, 282, 283, 122,
1093  288, 289, 268, 123, 171, 124, 336, 337, 238, 239,
1094  240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
1095  250, 200, 347, 349, 258, 265, 432, 271, 273, 407,
1096  277, 279, 89, 269, 312, 89, 129, 130, 131, 132,
1097  133, 134, 504, 275, 80, 315, 287, 80, 320, 318,
1098  183, 183, 321, 453, 425, 510, 511, 512, 513, 429,
1099  -196, 431, 295, 106, 322, 331, 434, 435, 436, 332,
1100  342, 542, 352, 354, 375, -182, 401, 334, 335, 140,
1101  141, 142, 143, 144, 145, 448, 395, 345, 311, 228,
1102  229, 230, 231, 232, 233, 234, 235, 236, 237, 403,
1103  405, 412, 475, 41, 415, 353, 419, 440, 450, 480,
1104  359, 360, 361, 449, 456, 451, 454, 476, 539, 503,
1105  41, 506, 455, 41, 478, 373, 374, 269, 482, 509,
1106  515, 378, -295, 379, 541, 545, 493, 557, 494, 327,
1107  550, 329, 553, 563, 385, 388, 566, 109, 393, 573,
1108  376, 377, 193, 325, 548, 198, 199, 394, 362, 474,
1109  269, 444, 41, 445, 514, 446, 439, 488, 89, 89,
1110  495, 559, 496, 413, 414, 136, 137, 138, 139, 140,
1111  141, 142, 143, 144, 145, 572, 561, 41, 364, 427,
1112  366, 497, 41, 369, 41, 564, 498, 565, 113, 41,
1113  41, 41, 114, 0, 0, 0, 0, 385, 0, 0,
1114  0, 0, 382, 0, 0, 0, 0, 0, 41, 0,
1115  0, 136, 516, 138, 139, 140, 141, 142, 143, 144,
1116  145, 0, 0, 406, 138, 41, 140, 141, 142, 143,
1117  144, 145, 41, 0, 0, 0, 0, 0, 292, 0,
1118  0, 0, 0, 0, 484, 556, 485, 0, 486, 0,
1119  487, 0, 0, 0, 0, 430, 489, 490, 0, 41,
1120  433, 41, 0, 0, 0, 274, 0, 437, 0, 2,
1121  3, 0, 0, 4, 5, 6, 0, 7, 0, 8,
1122  0, 0, 9, 0, 490, 0, 0, 0, 517, 0,
1123  528, 532, 536, 0, 0, 314, 0, 0, 0, 0,
1124  0, 0, 544, 0, 0, 0, 0, 0, 547, 0,
1125  0, 0, 552, 0, 12, 13, 555, 0, 14, 562,
1126  15, 330, 16, 17, 0, 528, 0, 333, 0, 0,
1127  532, 0, 0, 536, 2, 3, 0, 0, 4, 5,
1128  6, 0, 7, 562, 8, 32, 0, 9, 0, 571,
1129  0, 33, 34, 0, 0, 0, 0, 356, 89, 0,
1130  0, 0, 0, 0, 363, 0, 138, 139, 140, 141,
1131  142, 143, 144, 145, 0, 371, 372, 0, 0, 12,
1132  13, 0, 0, 14, 0, 15, 0, 16, 17, 0,
1133  0, 89, 0, 0, 0, 2, 3, 0, 0, 4,
1134  5, 6, 0, 7, 0, 8, 402, 0, 404, 568,
1135  32, 0, 0, 0, 408, 409, 33, 34, 570, 410,
1136  411, 0, 0, 0, 0, 0, 0, 0, 0, 418,
1137  0, 0, 420, 0, 0, 421, 0, 0, 0, 426,
1138  12, 13, 428, 0, 14, 0, 15, 0, 16, 17,
1139  0, 0, 0, 0, 0, 0, 0, 438, 0, 0,
1140  0, 0, 0, 0, 0, 0, 0, 0, 447, 0,
1141  0, 32, 0, 452, 0, 0, 0, 33, 34, 0,
1142  0, 0, 0, 473, 0, 0, 0, 0, 0, 0,
1143  0, 479, 0, 0, 481, 0, 0, 0, 0, 0,
1144  0, 0, 0, 0, 483, 0, 0, 0, 0, 0,
1145  117, 118, 119, 120, 121, 0, 0, 122, 0, 0,
1146  0, 123, 0, 124, 0, 499, 500, 501, 502, 1,
1147  0, 0, 505, 2, 3, 0, 0, 4, 5, 6,
1148  0, 7, 0, 8, 0, 0, 9, 10, 11, -302,
1149  125, 126, 127, 128, 129, 130, 131, 132, 133, 134,
1150  0, 543, 0, 0, 0, 0, 0, 0, 546, 0,
1151  0, 551, 0, 0, 0, 554, 0, 0, 12, 13,
1152  0, 0, 14, 0, 15, 0, 16, 17, 18, 19,
1153  20, 21, 0, 22, 23, 0, 0, 24, 0, 0,
1154  25, 26, 27, 28, 0, 29, 0, 30, 31, 32,
1155  0, 0, 0, 0, 0, 33, 34, 0, 0, 0,
1156  -182, 0, 35, -302, -201, 2, 3, -120, 0, 4,
1157  5, 6, 0, 7, 0, 8, 0, 0, 9, 281,
1158  282, 283, 0, 0, 0, 0, -120, -120, -120, -120,
1159  -120, -120, -120, -120, -120, -120, -120, -120, 136, 137,
1160  138, 139, 140, 141, 142, 143, 144, 145, 0, 0,
1161  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1162  18, 19, 20, 21, 0, 22, 23, 0, 0, 24,
1163  0, 0, 25, 26, 27, 28, 0, 29, 0, 30,
1164  31, 32, 146, 0, 0, 2, 3, 33, 34, 4,
1165  5, 6, -182, 7, 326, 8, -201, 0, 9, 165,
1166  166, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1167  156, 157, 158, 147, 148, 149, 150, 151, 152, 153,
1168  154, 155, 156, 157, 158, 0, 0, 0, 0, 0,
1169  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1170  18, 19, 20, 21, 0, 22, 23, 0, 0, 24,
1171  0, 0, 25, 26, 27, 28, 0, 29, 0, 30,
1172  31, 32, 328, 0, 0, 2, 3, 33, 34, 4,
1173  5, 6, -182, 7, 0, 8, -201, 0, 9, 0,
1174  0, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1175  156, 157, 158, 0, 0, 0, 0, 0, 0, 0,
1176  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1177  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1178  18, 19, 20, 21, 0, 22, 23, 0, 0, 24,
1179  0, 0, 25, 26, 27, 28, 0, 29, 0, 30,
1180  31, 32, 251, 0, 0, 2, 3, 33, 34, 4,
1181  5, 6, -182, 7, 0, 8, -201, 0, 9, 0,
1182  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1183  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1184  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1185  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1186  18, 19, 20, 21, 0, 22, 23, 0, 0, 24,
1187  0, 0, 25, 26, 27, 28, 0, 29, 0, 30,
1188  31, 32, 0, 0, 81, 2, 3, 33, 34, 82,
1189  5, 6, -182, 7, 0, 8, -201, 0, 9, 83,
1190  81, 2, 3, 0, 0, 82, 5, 6, 209, 7,
1191  0, 8, 0, 0, 9, 0, 0, 0, 0, 0,
1192  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1193  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1194  0, 0, 0, 0, 0, 0, 12, 13, 0, 0,
1195  14, 0, 15, 0, 16, 17, 0, 0, 0, 0,
1196  0, 32, 0, 0, 81, 2, 3, 33, 34, 82,
1197  5, 6, 0, 7, 0, 8, 211, 32, 9, 0,
1198  81, 2, 3, 33, 34, 82, 5, 6, 346, 7,
1199  0, 8, 0, 0, 9, 0, 0, 0, 0, 0,
1200  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1201  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1202  0, 0, 0, 0, 0, 0, 12, 13, 0, 0,
1203  14, 0, 15, 0, 16, 17, 0, 0, 0, 0,
1204  0, 32, 0, 0, 81, 2, 3, 33, 34, 82,
1205  5, 6, 0, 7, 0, 8, 348, 32, 9, 0,
1206  81, 2, 3, 33, 34, 82, 5, 6, 0, 7,
1207  0, 8, 0, 0, 9, 0, 0, 0, 0, 0,
1208  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1209  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1210  0, 0, 0, 0, 0, 0, 12, 13, 0, 0,
1211  14, 0, 15, 0, 16, 17, 0, 0, 0, 0,
1212  0, 32, 0, 0, 0, 2, 3, 33, 34, 4,
1213  5, 182, 0, 7, 0, 8, 0, 32, 0, 0,
1214  0, 2, 3, 33, 34, 4, 5, 185, 0, 7,
1215  0, 8, 0, 0, 0, 0, 0, 0, 0, 0,
1216  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1217  12, 13, 0, 0, 14, 0, 15, 0, 16, 17,
1218  0, 0, 0, 0, 0, 0, 12, 13, 0, 0,
1219  14, 0, 15, 0, 16, 17, 0, 0, 0, 0,
1220  0, 32, 0, 0, 0, 217, 218, 33, 34, 219,
1221  220, 6, 0, 7, 0, 8, 0, 32, 0, 0,
1222  0, 0, 0, 33, 34, 296, 118, 119, 120, 121,
1223  0, 0, 122, 0, 0, 0, 123, 0, 124, 0,
1224  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1225  221, 222, 0, 0, 14, 0, 15, 0, 16, 17,
1226  0, 0, 0, 0, 0, 125, 126, 127, 128, 129,
1227  130, 131, 132, 133, 134, 0, 0, 0, 0, 0,
1228  0, 32, 0, 118, 119, 120, 121, 33, 34, 122,
1229  0, 0, 0, 123, 0, 124, 120, 121, 0, 0,
1230  122, 0, 0, 0, 123, 0, 124, 0, 0, 0,
1231  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1232  0, 0, 125, 126, 127, 128, 129, 130, 131, 132,
1233  133, 134, 0, 125, 126, 127, 128, 129, 130, 131,
1234  132, 133, 134
1235 };
1236 
1237 static const yytype_int16 yycheck[] =
1238 {
1239  0, 9, 0, 2, 3, 4, 5, 93, 171, 83,
1240  21, 356, 134, 12, 13, 254, 8, 18, 19, 20,
1241  21, 22, 23, 24, 194, 93, 1, 28, 29, 41,
1242  30, 31, 14, 13, 9, 9, 10, 12, 57, 107,
1243  9, 109, 57, 13, 11, 97, 98, 11, 122, 123,
1244  11, 11, 133, 134, 15, 14, 17, 12, 0, 192,
1245  193, 20, 514, 57, 19, 198, 199, 224, 225, 70,
1246  19, 20, 21, 92, 56, 420, 56, 92, 6, 7,
1247  8, 56, 56, 82, 95, 171, 56, 56, 55, 50,
1248  51, 55, 544, 93, 56, 217, 218, 219, 220, 221,
1249  222, 95, 265, 115, 3, 19, 20, 107, 57, 109,
1250  90, 91, 11, 113, 16, 113, 56, 19, 117, 118,
1251  119, 120, 121, 19, 20, 21, 125, 126, 127, 128,
1252  182, 57, 21, 185, 92, 298, 217, 218, 219, 220,
1253  221, 222, 12, 300, 301, 302, 303, 304, 305, 19,
1254  90, 91, 78, 14, 12, 83, 12, 327, 19, 329,
1255  56, 19, 162, 19, 164, 96, 511, 19, 20, 21,
1256  16, 99, 16, 19, 102, 103, 20, 16, 170, 265,
1257  19, 173, 58, 59, 36, 19, 20, 273, 83, 84,
1258  85, 86, 192, 193, 122, 123, 12, 330, 198, 199,
1259  333, 546, 19, 20, 21, 273, 19, 20, 21, 11,
1260  67, 68, 298, 15, 19, 17, 70, 71, 146, 147,
1261  148, 149, 150, 151, 152, 153, 154, 155, 156, 157,
1262  158, 3, 306, 307, 21, 19, 406, 12, 19, 372,
1263  3, 3, 170, 171, 95, 173, 48, 49, 50, 51,
1264  52, 53, 491, 181, 182, 256, 57, 185, 17, 259,
1265  97, 98, 17, 433, 397, 499, 500, 501, 502, 402,
1266  3, 404, 200, 273, 3, 64, 409, 410, 411, 57,
1267  76, 520, 12, 11, 57, 92, 12, 288, 289, 38,
1268  39, 40, 41, 42, 43, 428, 93, 296, 226, 136,
1269  137, 138, 139, 140, 141, 142, 143, 144, 145, 19,
1270  57, 12, 445, 313, 3, 313, 95, 38, 12, 452,
1271  320, 321, 322, 57, 89, 57, 57, 11, 15, 12,
1272  330, 11, 57, 333, 57, 336, 337, 265, 57, 57,
1273  57, 342, 56, 344, 57, 57, 479, 3, 481, 277,
1274  57, 279, 57, 3, 354, 355, 11, 31, 358, 12,
1275  339, 339, 101, 273, 528, 104, 105, 362, 322, 444,
1276  298, 421, 372, 426, 504, 426, 417, 472, 306, 307,
1277  483, 542, 483, 383, 384, 34, 35, 36, 37, 38,
1278  39, 40, 41, 42, 43, 569, 546, 397, 326, 400,
1279  328, 483, 402, 331, 404, 551, 483, 554, 38, 409,
1280  410, 411, 38, -1, -1, -1, -1, 417, -1, -1,
1281  -1, -1, 350, -1, -1, -1, -1, -1, 428, -1,
1282  -1, 34, 506, 36, 37, 38, 39, 40, 41, 42,
1283  43, -1, -1, 371, 36, 445, 38, 39, 40, 41,
1284  42, 43, 452, -1, -1, -1, -1, -1, 197, -1,
1285  -1, -1, -1, -1, 465, 539, 467, -1, 469, -1,
1286  471, -1, -1, -1, -1, 403, 476, 477, -1, 479,
1287  408, 481, -1, -1, -1, 1, -1, 415, -1, 5,
1288  6, -1, -1, 9, 10, 11, -1, 13, -1, 15,
1289  -1, -1, 18, -1, 504, -1, -1, -1, 508, -1,
1290  511, 512, 513, -1, -1, 254, -1, -1, -1, -1,
1291  -1, -1, 522, -1, -1, -1, -1, -1, 528, -1,
1292  -1, -1, 532, -1, 50, 51, 536, -1, 54, 547,
1293  56, 280, 58, 59, -1, 546, -1, 286, -1, -1,
1294  551, -1, -1, 554, 5, 6, -1, -1, 9, 10,
1295  11, -1, 13, 571, 15, 81, -1, 18, -1, 569,
1296  -1, 87, 88, -1, -1, -1, -1, 316, 506, -1,
1297  -1, -1, -1, -1, 323, -1, 36, 37, 38, 39,
1298  40, 41, 42, 43, -1, 334, 335, -1, -1, 50,
1299  51, -1, -1, 54, -1, 56, -1, 58, 59, -1,
1300  -1, 539, -1, -1, -1, 5, 6, -1, -1, 9,
1301  10, 11, -1, 13, -1, 15, 365, -1, 367, 557,
1302  81, -1, -1, -1, 373, 374, 87, 88, 566, 378,
1303  379, -1, -1, -1, -1, -1, -1, -1, -1, 388,
1304  -1, -1, 391, -1, -1, 394, -1, -1, -1, 398,
1305  50, 51, 401, -1, 54, -1, 56, -1, 58, 59,
1306  -1, -1, -1, -1, -1, -1, -1, 416, -1, -1,
1307  -1, -1, -1, -1, -1, -1, -1, -1, 427, -1,
1308  -1, 81, -1, 432, -1, -1, -1, 87, 88, -1,
1309  -1, -1, -1, 442, -1, -1, -1, -1, -1, -1,
1310  -1, 450, -1, -1, 453, -1, -1, -1, -1, -1,
1311  -1, -1, -1, -1, 463, -1, -1, -1, -1, -1,
1312  4, 5, 6, 7, 8, -1, -1, 11, -1, -1,
1313  -1, 15, -1, 17, -1, 484, 485, 486, 487, 1,
1314  -1, -1, 491, 5, 6, -1, -1, 9, 10, 11,
1315  -1, 13, -1, 15, -1, -1, 18, 19, 20, 21,
1316  44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
1317  -1, 520, -1, -1, -1, -1, -1, -1, 527, -1,
1318  -1, 530, -1, -1, -1, 534, -1, -1, 50, 51,
1319  -1, -1, 54, -1, 56, -1, 58, 59, 60, 61,
1320  62, 63, -1, 65, 66, -1, -1, 69, -1, -1,
1321  72, 73, 74, 75, -1, 77, -1, 79, 80, 81,
1322  -1, -1, -1, -1, -1, 87, 88, -1, -1, -1,
1323  92, -1, 94, 95, 96, 5, 6, 3, -1, 9,
1324  10, 11, -1, 13, -1, 15, -1, -1, 18, 19,
1325  20, 21, -1, -1, -1, -1, 22, 23, 24, 25,
1326  26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
1327  36, 37, 38, 39, 40, 41, 42, 43, -1, -1,
1328  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1329  60, 61, 62, 63, -1, 65, 66, -1, -1, 69,
1330  -1, -1, 72, 73, 74, 75, -1, 77, -1, 79,
1331  80, 81, 3, -1, -1, 5, 6, 87, 88, 9,
1332  10, 11, 92, 13, 3, 15, 96, -1, 18, 19,
1333  20, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1334  31, 32, 33, 22, 23, 24, 25, 26, 27, 28,
1335  29, 30, 31, 32, 33, -1, -1, -1, -1, -1,
1336  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1337  60, 61, 62, 63, -1, 65, 66, -1, -1, 69,
1338  -1, -1, 72, 73, 74, 75, -1, 77, -1, 79,
1339  80, 81, 3, -1, -1, 5, 6, 87, 88, 9,
1340  10, 11, 92, 13, -1, 15, 96, -1, 18, -1,
1341  -1, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1342  31, 32, 33, -1, -1, -1, -1, -1, -1, -1,
1343  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1344  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1345  60, 61, 62, 63, -1, 65, 66, -1, -1, 69,
1346  -1, -1, 72, 73, 74, 75, -1, 77, -1, 79,
1347  80, 81, 82, -1, -1, 5, 6, 87, 88, 9,
1348  10, 11, 92, 13, -1, 15, 96, -1, 18, -1,
1349  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1350  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1351  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1352  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1353  60, 61, 62, 63, -1, 65, 66, -1, -1, 69,
1354  -1, -1, 72, 73, 74, 75, -1, 77, -1, 79,
1355  80, 81, -1, -1, 4, 5, 6, 87, 88, 9,
1356  10, 11, 92, 13, -1, 15, 96, -1, 18, 19,
1357  4, 5, 6, -1, -1, 9, 10, 11, 12, 13,
1358  -1, 15, -1, -1, 18, -1, -1, -1, -1, -1,
1359  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1360  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1361  -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1362  54, -1, 56, -1, 58, 59, -1, -1, -1, -1,
1363  -1, 81, -1, -1, 4, 5, 6, 87, 88, 9,
1364  10, 11, -1, 13, -1, 15, 16, 81, 18, -1,
1365  4, 5, 6, 87, 88, 9, 10, 11, 12, 13,
1366  -1, 15, -1, -1, 18, -1, -1, -1, -1, -1,
1367  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1368  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1369  -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1370  54, -1, 56, -1, 58, 59, -1, -1, -1, -1,
1371  -1, 81, -1, -1, 4, 5, 6, 87, 88, 9,
1372  10, 11, -1, 13, -1, 15, 16, 81, 18, -1,
1373  4, 5, 6, 87, 88, 9, 10, 11, -1, 13,
1374  -1, 15, -1, -1, 18, -1, -1, -1, -1, -1,
1375  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1376  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1377  -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1378  54, -1, 56, -1, 58, 59, -1, -1, -1, -1,
1379  -1, 81, -1, -1, -1, 5, 6, 87, 88, 9,
1380  10, 11, -1, 13, -1, 15, -1, 81, -1, -1,
1381  -1, 5, 6, 87, 88, 9, 10, 11, -1, 13,
1382  -1, 15, -1, -1, -1, -1, -1, -1, -1, -1,
1383  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1384  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1385  -1, -1, -1, -1, -1, -1, 50, 51, -1, -1,
1386  54, -1, 56, -1, 58, 59, -1, -1, -1, -1,
1387  -1, 81, -1, -1, -1, 5, 6, 87, 88, 9,
1388  10, 11, -1, 13, -1, 15, -1, 81, -1, -1,
1389  -1, -1, -1, 87, 88, 4, 5, 6, 7, 8,
1390  -1, -1, 11, -1, -1, -1, 15, -1, 17, -1,
1391  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1392  50, 51, -1, -1, 54, -1, 56, -1, 58, 59,
1393  -1, -1, -1, -1, -1, 44, 45, 46, 47, 48,
1394  49, 50, 51, 52, 53, -1, -1, -1, -1, -1,
1395  -1, 81, -1, 5, 6, 7, 8, 87, 88, 11,
1396  -1, -1, -1, 15, -1, 17, 7, 8, -1, -1,
1397  11, -1, -1, -1, 15, -1, 17, -1, -1, -1,
1398  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1399  -1, -1, 44, 45, 46, 47, 48, 49, 50, 51,
1400  52, 53, -1, 44, 45, 46, 47, 48, 49, 50,
1401  51, 52, 53
1402 };
1403 
1404 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1405  state STATE-NUM. */
1406 static const yytype_uint8 yystos[] =
1407 {
1408  0, 1, 5, 6, 9, 10, 11, 13, 15, 18,
1409  19, 20, 50, 51, 54, 56, 58, 59, 60, 61,
1410  62, 63, 65, 66, 69, 72, 73, 74, 75, 77,
1411  79, 80, 81, 87, 88, 94, 99, 100, 101, 108,
1412  109, 111, 112, 113, 114, 115, 116, 118, 121, 122,
1413  123, 128, 130, 131, 132, 133, 134, 135, 136, 139,
1414  140, 145, 150, 151, 152, 153, 154, 165, 166, 167,
1415  168, 171, 221, 222, 223, 111, 128, 128, 128, 128,
1416  134, 4, 9, 19, 117, 120, 124, 125, 126, 134,
1417  119, 120, 11, 155, 158, 128, 128, 220, 220, 220,
1418  220, 220, 220, 220, 220, 220, 111, 137, 138, 137,
1419  0, 21, 95, 222, 223, 110, 114, 4, 5, 6,
1420  7, 8, 11, 15, 17, 44, 45, 46, 47, 48,
1421  49, 50, 51, 52, 53, 127, 34, 35, 36, 37,
1422  38, 39, 40, 41, 42, 43, 3, 22, 23, 24,
1423  25, 26, 27, 28, 29, 30, 31, 32, 33, 92,
1424  96, 21, 224, 225, 220, 19, 20, 12, 126, 14,
1425  20, 19, 16, 20, 1, 9, 125, 138, 159, 160,
1426  161, 219, 11, 131, 132, 11, 132, 134, 19, 20,
1427  21, 226, 227, 227, 134, 141, 142, 134, 227, 227,
1428  3, 138, 108, 114, 128, 128, 128, 128, 128, 12,
1429  126, 16, 126, 128, 128, 128, 128, 5, 6, 9,
1430  10, 50, 51, 123, 129, 129, 11, 55, 131, 131,
1431  131, 131, 131, 131, 131, 131, 131, 131, 134, 134,
1432  134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
1433  134, 82, 102, 103, 104, 108, 185, 186, 21, 13,
1434  90, 91, 111, 162, 169, 19, 120, 124, 125, 134,
1435  120, 12, 156, 19, 1, 134, 132, 3, 132, 3,
1436  218, 19, 20, 21, 102, 102, 218, 57, 67, 68,
1437  143, 144, 227, 102, 102, 134, 4, 12, 19, 16,
1438  129, 129, 129, 129, 129, 129, 11, 15, 50, 51,
1439  127, 134, 95, 226, 227, 220, 164, 14, 111, 163,
1440  17, 17, 3, 157, 158, 161, 3, 134, 3, 134,
1441  227, 64, 57, 227, 220, 220, 70, 71, 146, 147,
1442  148, 149, 76, 57, 78, 128, 12, 126, 16, 126,
1443  11, 55, 12, 108, 11, 187, 227, 14, 19, 111,
1444  111, 111, 169, 227, 134, 218, 134, 218, 102, 134,
1445  102, 227, 227, 220, 220, 57, 148, 149, 220, 220,
1446  12, 16, 134, 9, 10, 111, 188, 189, 111, 105,
1447  106, 107, 171, 111, 157, 93, 172, 173, 174, 175,
1448  176, 12, 227, 19, 227, 57, 134, 102, 227, 227,
1449  227, 227, 12, 111, 111, 3, 12, 19, 227, 95,
1450  227, 227, 57, 95, 170, 102, 227, 220, 227, 102,
1451  134, 102, 218, 134, 102, 102, 102, 134, 227, 189,
1452  38, 190, 191, 171, 172, 173, 175, 227, 102, 57,
1453  12, 57, 227, 218, 57, 57, 89, 192, 83, 84,
1454  85, 86, 193, 194, 195, 196, 200, 201, 208, 209,
1455  213, 214, 36, 227, 170, 102, 11, 177, 57, 227,
1456  102, 227, 57, 227, 220, 220, 220, 220, 192, 111,
1457  111, 178, 179, 102, 102, 195, 200, 208, 213, 227,
1458  227, 227, 227, 12, 226, 227, 11, 180, 181, 57,
1459  187, 187, 187, 187, 179, 57, 126, 111, 182, 197,
1460  198, 199, 220, 171, 203, 205, 206, 207, 220, 210,
1461  211, 212, 220, 215, 216, 217, 220, 180, 12, 15,
1462  183, 57, 226, 227, 111, 57, 227, 111, 162, 202,
1463  57, 227, 111, 57, 227, 111, 126, 3, 184, 199,
1464  180, 205, 158, 3, 212, 217, 11, 16, 134, 204,
1465  134, 111, 202, 12
1466 };
1467 
1468 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
1469 static const yytype_uint8 yyr1[] =
1470 {
1471  0, 98, 99, 99, 99, 100, 100, 101, 101, 102,
1472  102, 103, 104, 104, 105, 105, 106, 107, 107, 108,
1473  108, 108, 109, 110, 110, 111, 112, 113, 114, 114,
1474  115, 115, 116, 117, 117, 118, 119, 119, 120, 120,
1475  120, 120, 120, 120, 121, 122, 122, 123, 123, 123,
1476  123, 123, 123, 123, 123, 124, 125, 126, 126, 126,
1477  126, 126, 126, 127, 128, 128, 128, 128, 128, 128,
1478  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1479  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1480  128, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1481  129, 129, 129, 129, 129, 129, 130, 130, 131, 131,
1482  131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1483  132, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1484  133, 133, 133, 133, 134, 134, 134, 135, 135, 135,
1485  135, 135, 135, 135, 135, 136, 136, 137, 137, 138,
1486  138, 139, 139, 140, 141, 141, 142, 142, 143, 144,
1487  145, 146, 146, 146, 146, 147, 147, 148, 149, 150,
1488  150, 150, 150, 150, 150, 151, 151, 151, 152, 153,
1489  153, 153, 154, 155, 156, 157, 157, 158, 158, 159,
1490  159, 160, 160, 161, 161, 162, 162, 162, 163, 163,
1491  164, 165, 166, 167, 167, 168, 169, 169, 169, 170,
1492  170, 171, 171, 172, 172, 173, 174, 174, 175, 176,
1493  177, 177, 178, 178, 179, 180, 181, 181, 182, 182,
1494  183, 183, 184, 184, 185, 186, 187, 187, 188, 188,
1495  189, 189, 189, 189, 190, 190, 191, 191, 192, 193,
1496  193, 194, 194, 194, 194, 194, 194, 194, 194, 195,
1497  196, 197, 197, 198, 198, 199, 200, 201, 202, 202,
1498  203, 204, 203, 205, 205, 206, 206, 207, 207, 208,
1499  209, 210, 210, 211, 211, 212, 213, 214, 215, 215,
1500  216, 216, 217, 218, 219, 220, 221, 221, 222, 222,
1501  222, 222, 223, 223, 224, 224, 225, 225, 226, 226,
1502  226, 226, 226, 226, 227, 227
1503 };
1504 
1505 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
1506 static const yytype_int8 yyr2[] =
1507 {
1508  0, 2, 2, 2, 1, 1, 2, 1, 3, 0,
1509  1, 2, 1, 3, 0, 1, 2, 1, 3, 1,
1510  1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1511  1, 1, 3, 1, 3, 3, 1, 3, 0, 1,
1512  1, 2, 2, 3, 1, 4, 4, 1, 1, 1,
1513  1, 1, 1, 1, 3, 1, 1, 1, 1, 1,
1514  3, 3, 3, 1, 1, 2, 2, 3, 4, 3,
1515  4, 2, 2, 3, 5, 2, 2, 2, 2, 2,
1516  2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1517  3, 1, 2, 2, 3, 4, 3, 4, 3, 5,
1518  2, 2, 2, 2, 2, 2, 3, 5, 1, 1,
1519  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1520  1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1521  3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
1522  1, 1, 1, 1, 1, 2, 2, 1, 2, 1,
1523  3, 1, 1, 4, 1, 2, 4, 2, 7, 4,
1524  6, 0, 1, 1, 2, 1, 2, 7, 4, 7,
1525  6, 9, 10, 9, 12, 1, 1, 1, 5, 9,
1526  9, 5, 0, 1, 1, 0, 1, 3, 2, 0,
1527  1, 1, 3, 1, 1, 2, 1, 3, 1, 3,
1528  0, 0, 2, 4, 7, 2, 1, 3, 3, 1,
1529  1, 7, 9, 2, 4, 0, 1, 3, 7, 1,
1530  0, 3, 2, 4, 1, 4, 0, 3, 0, 1,
1531  0, 3, 0, 2, 1, 8, 0, 4, 1, 3,
1532  1, 3, 2, 2, 0, 2, 2, 3, 1, 0,
1533  2, 1, 1, 1, 1, 3, 3, 3, 3, 6,
1534  1, 0, 2, 1, 3, 3, 6, 1, 1, 2,
1535  2, 0, 5, 1, 1, 0, 2, 1, 3, 6,
1536  1, 0, 2, 1, 3, 2, 6, 1, 0, 2,
1537  1, 3, 5, 0, 0, 0, 1, 1, 1, 1,
1538  2, 2, 0, 1, 0, 1, 1, 2, 1, 1,
1539  1, 2, 2, 2, 0, 1
1540 };
1541 
1542 
1543 enum { YYENOMEM = -2 };
1544 
1545 #define yyerrok (yyerrstatus = 0)
1546 #define yyclearin (yychar = OCTAVE_EMPTY)
1547 
1548 #define YYACCEPT goto yyacceptlab
1549 #define YYABORT goto yyabortlab
1550 #define YYERROR goto yyerrorlab
1551 #define YYNOMEM goto yyexhaustedlab
1552 
1553 
1554 #define YYRECOVERING() (!!yyerrstatus)
1555 
1556 #define YYBACKUP(Token, Value) \
1557  do \
1558  if (yychar == OCTAVE_EMPTY) \
1559  { \
1560  yychar = (Token); \
1561  yylval = (Value); \
1562  YYPOPSTACK (yylen); \
1563  yystate = *yyssp; \
1564  goto yybackup; \
1565  } \
1566  else \
1567  { \
1568  yyerror (parser, YY_("syntax error: cannot back up")); \
1569  YYERROR; \
1570  } \
1571  while (0)
1572 
1573 /* Backward compatibility with an undocumented macro.
1574  Use OCTAVE_error or OCTAVE_UNDEF. */
1575 #define YYERRCODE OCTAVE_UNDEF
1576 
1577 
1578 /* Enable debugging if requested. */
1579 #if OCTAVE_DEBUG
1580 
1581 # ifndef YYFPRINTF
1582 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1583 # define YYFPRINTF fprintf
1584 # endif
1585 
1586 # define YYDPRINTF(Args) \
1587 do { \
1588  if (yydebug) \
1589  YYFPRINTF Args; \
1590 } while (0)
1591 
1592 
1593 
1594 
1595 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1596 do { \
1597  if (yydebug) \
1598  { \
1599  YYFPRINTF (stderr, "%s ", Title); \
1600  yy_symbol_print (stderr, \
1601  Kind, Value, parser); \
1602  YYFPRINTF (stderr, "\n"); \
1603  } \
1604 } while (0)
1605 
1606 
1607 /*-----------------------------------.
1608 | Print this symbol's value on YYO. |
1609 `-----------------------------------*/
1610 
1611 static void
1612 yy_symbol_value_print (FILE *yyo,
1613  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1614 {
1615  FILE *yyoutput = yyo;
1616  YY_USE (yyoutput);
1617  YY_USE (parser);
1618  if (!yyvaluep)
1619  return;
1621  YY_USE (yykind);
1623 }
1624 
1625 
1626 /*---------------------------.
1627 | Print this symbol on YYO. |
1628 `---------------------------*/
1629 
1630 static void
1631 yy_symbol_print (FILE *yyo,
1632  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1633 {
1634  YYFPRINTF (yyo, "%s %s (",
1635  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1636 
1637  yy_symbol_value_print (yyo, yykind, yyvaluep, parser);
1638  YYFPRINTF (yyo, ")");
1639 }
1640 
1641 /*------------------------------------------------------------------.
1642 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1643 | TOP (included). |
1644 `------------------------------------------------------------------*/
1645 
1646 static void
1647 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1648 {
1649  YYFPRINTF (stderr, "Stack now");
1650  for (; yybottom <= yytop; yybottom++)
1651  {
1652  int yybot = *yybottom;
1653  YYFPRINTF (stderr, " %d", yybot);
1654  }
1655  YYFPRINTF (stderr, "\n");
1656 }
1657 
1658 # define YY_STACK_PRINT(Bottom, Top) \
1659 do { \
1660  if (yydebug) \
1661  yy_stack_print ((Bottom), (Top)); \
1662 } while (0)
1663 
1664 
1665 /*------------------------------------------------.
1666 | Report that the YYRULE is going to be reduced. |
1667 `------------------------------------------------*/
1668 
1669 static void
1670 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1671  int yyrule, octave::base_parser& parser)
1672 {
1673  int yylno = yyrline[yyrule];
1674  int yynrhs = yyr2[yyrule];
1675  int yyi;
1676  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1677  yyrule - 1, yylno);
1678  /* The symbols being reduced. */
1679  for (yyi = 0; yyi < yynrhs; yyi++)
1680  {
1681  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1682  yy_symbol_print (stderr,
1683  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1684  &yyvsp[(yyi + 1) - (yynrhs)], parser);
1685  YYFPRINTF (stderr, "\n");
1686  }
1687 }
1688 
1689 # define YY_REDUCE_PRINT(Rule) \
1690 do { \
1691  if (yydebug) \
1692  yy_reduce_print (yyssp, yyvsp, Rule, parser); \
1693 } while (0)
1694 
1695 /* Nonzero means print parse trace. It is left uninitialized so that
1696  multiple parsers can coexist. */
1697 int yydebug;
1698 #else /* !OCTAVE_DEBUG */
1699 # define YYDPRINTF(Args) ((void) 0)
1700 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1701 # define YY_STACK_PRINT(Bottom, Top)
1702 # define YY_REDUCE_PRINT(Rule)
1703 #endif /* !OCTAVE_DEBUG */
1704 
1705 
1706 /* YYINITDEPTH -- initial size of the parser's stacks. */
1707 #ifndef YYINITDEPTH
1708 # define YYINITDEPTH 200
1709 #endif
1710 
1711 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1712  if the built-in stack extension method is used).
1713 
1714  Do not make this value too large; the results are undefined if
1715  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1716  evaluated with infinite-precision integer arithmetic. */
1717 
1718 #ifndef YYMAXDEPTH
1719 # define YYMAXDEPTH 10000
1720 #endif
1721 /* Parser data structure. */
1722 struct yypstate
1723  {
1724  /* Number of syntax errors so far. */
1725  int yynerrs;
1726 
1728  /* Number of tokens to shift before error messages enabled. */
1730 
1731  /* Refer to the stacks through separate pointers, to allow yyoverflow
1732  to reallocate them elsewhere. */
1733 
1734  /* Their size. */
1736 
1737  /* The state stack: array, bottom, top. */
1741 
1742  /* The semantic value stack: array, bottom, top. */
1746  /* Whether this instance has not started parsing yet.
1747  * If 2, it corresponds to a finished parsing. */
1748  int yynew;
1749  };
1750 
1751 
1752 
1753 
1754 
1755 
1756 /*-----------------------------------------------.
1757 | Release the memory associated to this symbol. |
1758 `-----------------------------------------------*/
1759 
1760 static void
1761 yydestruct (const char *yymsg,
1762  yysymbol_kind_t yykind, YYSTYPE *yyvaluep, octave::base_parser& parser)
1763 {
1764  YY_USE (yyvaluep);
1765  YY_USE (parser);
1766  if (!yymsg)
1767  yymsg = "Deleting";
1768  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1769 
1771  switch (yykind)
1772  {
1773  case YYSYMBOL_3_: /* '=' */
1774 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1775  { }
1776 #line 1777 "libinterp/parse-tree/oct-parse.cc"
1777  break;
1778 
1779  case YYSYMBOL_4_: /* ':' */
1780 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1781  { }
1782 #line 1783 "libinterp/parse-tree/oct-parse.cc"
1783  break;
1784 
1785  case YYSYMBOL_5_: /* '-' */
1786 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1787  { }
1788 #line 1789 "libinterp/parse-tree/oct-parse.cc"
1789  break;
1790 
1791  case YYSYMBOL_6_: /* '+' */
1792 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1793  { }
1794 #line 1795 "libinterp/parse-tree/oct-parse.cc"
1795  break;
1796 
1797  case YYSYMBOL_7_: /* '*' */
1798 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1799  { }
1800 #line 1801 "libinterp/parse-tree/oct-parse.cc"
1801  break;
1802 
1803  case YYSYMBOL_8_: /* '/' */
1804 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1805  { }
1806 #line 1807 "libinterp/parse-tree/oct-parse.cc"
1807  break;
1808 
1809  case YYSYMBOL_9_: /* '~' */
1810 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1811  { }
1812 #line 1813 "libinterp/parse-tree/oct-parse.cc"
1813  break;
1814 
1815  case YYSYMBOL_10_: /* '!' */
1816 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1817  { }
1818 #line 1819 "libinterp/parse-tree/oct-parse.cc"
1819  break;
1820 
1821  case YYSYMBOL_11_: /* '(' */
1822 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1823  { }
1824 #line 1825 "libinterp/parse-tree/oct-parse.cc"
1825  break;
1826 
1827  case YYSYMBOL_12_: /* ')' */
1828 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1829  { }
1830 #line 1831 "libinterp/parse-tree/oct-parse.cc"
1831  break;
1832 
1833  case YYSYMBOL_13_: /* '[' */
1834 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1835  { }
1836 #line 1837 "libinterp/parse-tree/oct-parse.cc"
1837  break;
1838 
1839  case YYSYMBOL_14_: /* ']' */
1840 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1841  { }
1842 #line 1843 "libinterp/parse-tree/oct-parse.cc"
1843  break;
1844 
1845  case YYSYMBOL_15_: /* '{' */
1846 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1847  { }
1848 #line 1849 "libinterp/parse-tree/oct-parse.cc"
1849  break;
1850 
1851  case YYSYMBOL_16_: /* '}' */
1852 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1853  { }
1854 #line 1855 "libinterp/parse-tree/oct-parse.cc"
1855  break;
1856 
1857  case YYSYMBOL_17_: /* '.' */
1858 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1859  { }
1860 #line 1861 "libinterp/parse-tree/oct-parse.cc"
1861  break;
1862 
1863  case YYSYMBOL_18_: /* '@' */
1864 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1865  { }
1866 #line 1867 "libinterp/parse-tree/oct-parse.cc"
1867  break;
1868 
1869  case YYSYMBOL_19_: /* ',' */
1870 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1871  { }
1872 #line 1873 "libinterp/parse-tree/oct-parse.cc"
1873  break;
1874 
1875  case YYSYMBOL_20_: /* ';' */
1876 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1877  { }
1878 #line 1879 "libinterp/parse-tree/oct-parse.cc"
1879  break;
1880 
1881  case YYSYMBOL_21_n_: /* '\n' */
1882 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1883  { }
1884 #line 1885 "libinterp/parse-tree/oct-parse.cc"
1885  break;
1886 
1887  case YYSYMBOL_ADD_EQ: /* ADD_EQ */
1888 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1889  { }
1890 #line 1891 "libinterp/parse-tree/oct-parse.cc"
1891  break;
1892 
1893  case YYSYMBOL_SUB_EQ: /* SUB_EQ */
1894 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1895  { }
1896 #line 1897 "libinterp/parse-tree/oct-parse.cc"
1897  break;
1898 
1899  case YYSYMBOL_MUL_EQ: /* MUL_EQ */
1900 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1901  { }
1902 #line 1903 "libinterp/parse-tree/oct-parse.cc"
1903  break;
1904 
1905  case YYSYMBOL_DIV_EQ: /* DIV_EQ */
1906 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1907  { }
1908 #line 1909 "libinterp/parse-tree/oct-parse.cc"
1909  break;
1910 
1911  case YYSYMBOL_LEFTDIV_EQ: /* LEFTDIV_EQ */
1912 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1913  { }
1914 #line 1915 "libinterp/parse-tree/oct-parse.cc"
1915  break;
1916 
1917  case YYSYMBOL_POW_EQ: /* POW_EQ */
1918 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1919  { }
1920 #line 1921 "libinterp/parse-tree/oct-parse.cc"
1921  break;
1922 
1923  case YYSYMBOL_EMUL_EQ: /* EMUL_EQ */
1924 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1925  { }
1926 #line 1927 "libinterp/parse-tree/oct-parse.cc"
1927  break;
1928 
1929  case YYSYMBOL_EDIV_EQ: /* EDIV_EQ */
1930 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1931  { }
1932 #line 1933 "libinterp/parse-tree/oct-parse.cc"
1933  break;
1934 
1935  case YYSYMBOL_ELEFTDIV_EQ: /* ELEFTDIV_EQ */
1936 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1937  { }
1938 #line 1939 "libinterp/parse-tree/oct-parse.cc"
1939  break;
1940 
1941  case YYSYMBOL_EPOW_EQ: /* EPOW_EQ */
1942 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1943  { }
1944 #line 1945 "libinterp/parse-tree/oct-parse.cc"
1945  break;
1946 
1947  case YYSYMBOL_AND_EQ: /* AND_EQ */
1948 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1949  { }
1950 #line 1951 "libinterp/parse-tree/oct-parse.cc"
1951  break;
1952 
1953  case YYSYMBOL_OR_EQ: /* OR_EQ */
1954 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1955  { }
1956 #line 1957 "libinterp/parse-tree/oct-parse.cc"
1957  break;
1958 
1959  case YYSYMBOL_EXPR_AND_AND: /* EXPR_AND_AND */
1960 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1961  { }
1962 #line 1963 "libinterp/parse-tree/oct-parse.cc"
1963  break;
1964 
1965  case YYSYMBOL_EXPR_OR_OR: /* EXPR_OR_OR */
1966 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1967  { }
1968 #line 1969 "libinterp/parse-tree/oct-parse.cc"
1969  break;
1970 
1971  case YYSYMBOL_EXPR_AND: /* EXPR_AND */
1972 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1973  { }
1974 #line 1975 "libinterp/parse-tree/oct-parse.cc"
1975  break;
1976 
1977  case YYSYMBOL_EXPR_OR: /* EXPR_OR */
1978 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1979  { }
1980 #line 1981 "libinterp/parse-tree/oct-parse.cc"
1981  break;
1982 
1983  case YYSYMBOL_EXPR_LT: /* EXPR_LT */
1984 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1985  { }
1986 #line 1987 "libinterp/parse-tree/oct-parse.cc"
1987  break;
1988 
1989  case YYSYMBOL_EXPR_LE: /* EXPR_LE */
1990 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1991  { }
1992 #line 1993 "libinterp/parse-tree/oct-parse.cc"
1993  break;
1994 
1995  case YYSYMBOL_EXPR_EQ: /* EXPR_EQ */
1996 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1997  { }
1998 #line 1999 "libinterp/parse-tree/oct-parse.cc"
1999  break;
2000 
2001  case YYSYMBOL_EXPR_NE: /* EXPR_NE */
2002 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2003  { }
2004 #line 2005 "libinterp/parse-tree/oct-parse.cc"
2005  break;
2006 
2007  case YYSYMBOL_EXPR_GE: /* EXPR_GE */
2008 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2009  { }
2010 #line 2011 "libinterp/parse-tree/oct-parse.cc"
2011  break;
2012 
2013  case YYSYMBOL_EXPR_GT: /* EXPR_GT */
2014 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2015  { }
2016 #line 2017 "libinterp/parse-tree/oct-parse.cc"
2017  break;
2018 
2019  case YYSYMBOL_LEFTDIV: /* LEFTDIV */
2020 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2021  { }
2022 #line 2023 "libinterp/parse-tree/oct-parse.cc"
2023  break;
2024 
2025  case YYSYMBOL_EMUL: /* EMUL */
2026 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2027  { }
2028 #line 2029 "libinterp/parse-tree/oct-parse.cc"
2029  break;
2030 
2031  case YYSYMBOL_EDIV: /* EDIV */
2032 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2033  { }
2034 #line 2035 "libinterp/parse-tree/oct-parse.cc"
2035  break;
2036 
2037  case YYSYMBOL_ELEFTDIV: /* ELEFTDIV */
2038 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2039  { }
2040 #line 2041 "libinterp/parse-tree/oct-parse.cc"
2041  break;
2042 
2043  case YYSYMBOL_HERMITIAN: /* HERMITIAN */
2044 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2045  { }
2046 #line 2047 "libinterp/parse-tree/oct-parse.cc"
2047  break;
2048 
2049  case YYSYMBOL_TRANSPOSE: /* TRANSPOSE */
2050 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2051  { }
2052 #line 2053 "libinterp/parse-tree/oct-parse.cc"
2053  break;
2054 
2055  case YYSYMBOL_PLUS_PLUS: /* PLUS_PLUS */
2056 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2057  { }
2058 #line 2059 "libinterp/parse-tree/oct-parse.cc"
2059  break;
2060 
2061  case YYSYMBOL_MINUS_MINUS: /* MINUS_MINUS */
2062 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2063  { }
2064 #line 2065 "libinterp/parse-tree/oct-parse.cc"
2065  break;
2066 
2067  case YYSYMBOL_POW: /* POW */
2068 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2069  { }
2070 #line 2071 "libinterp/parse-tree/oct-parse.cc"
2071  break;
2072 
2073  case YYSYMBOL_EPOW: /* EPOW */
2074 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2075  { }
2076 #line 2077 "libinterp/parse-tree/oct-parse.cc"
2077  break;
2078 
2079  case YYSYMBOL_NUMBER: /* NUMBER */
2080 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2081  { }
2082 #line 2083 "libinterp/parse-tree/oct-parse.cc"
2083  break;
2084 
2085  case YYSYMBOL_STRUCT_ELT: /* STRUCT_ELT */
2086 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2087  { }
2088 #line 2089 "libinterp/parse-tree/oct-parse.cc"
2089  break;
2090 
2091  case YYSYMBOL_NAME: /* NAME */
2092 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2093  { }
2094 #line 2095 "libinterp/parse-tree/oct-parse.cc"
2095  break;
2096 
2097  case YYSYMBOL_END: /* END */
2098 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2099  { }
2100 #line 2101 "libinterp/parse-tree/oct-parse.cc"
2101  break;
2102 
2103  case YYSYMBOL_DQ_STRING: /* DQ_STRING */
2104 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2105  { }
2106 #line 2107 "libinterp/parse-tree/oct-parse.cc"
2107  break;
2108 
2109  case YYSYMBOL_SQ_STRING: /* SQ_STRING */
2110 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2111  { }
2112 #line 2113 "libinterp/parse-tree/oct-parse.cc"
2113  break;
2114 
2115  case YYSYMBOL_FOR: /* FOR */
2116 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2117  { }
2118 #line 2119 "libinterp/parse-tree/oct-parse.cc"
2119  break;
2120 
2121  case YYSYMBOL_PARFOR: /* PARFOR */
2122 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2123  { }
2124 #line 2125 "libinterp/parse-tree/oct-parse.cc"
2125  break;
2126 
2127  case YYSYMBOL_WHILE: /* WHILE */
2128 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2129  { }
2130 #line 2131 "libinterp/parse-tree/oct-parse.cc"
2131  break;
2132 
2133  case YYSYMBOL_DO: /* DO */
2134 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2135  { }
2136 #line 2137 "libinterp/parse-tree/oct-parse.cc"
2137  break;
2138 
2139  case YYSYMBOL_UNTIL: /* UNTIL */
2140 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2141  { }
2142 #line 2143 "libinterp/parse-tree/oct-parse.cc"
2143  break;
2144 
2145  case YYSYMBOL_SPMD: /* SPMD */
2146 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2147  { }
2148 #line 2149 "libinterp/parse-tree/oct-parse.cc"
2149  break;
2150 
2151  case YYSYMBOL_IF: /* IF */
2152 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2153  { }
2154 #line 2155 "libinterp/parse-tree/oct-parse.cc"
2155  break;
2156 
2157  case YYSYMBOL_ELSEIF: /* ELSEIF */
2158 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2159  { }
2160 #line 2161 "libinterp/parse-tree/oct-parse.cc"
2161  break;
2162 
2163  case YYSYMBOL_ELSE: /* ELSE */
2164 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2165  { }
2166 #line 2167 "libinterp/parse-tree/oct-parse.cc"
2167  break;
2168 
2169  case YYSYMBOL_SWITCH: /* SWITCH */
2170 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2171  { }
2172 #line 2173 "libinterp/parse-tree/oct-parse.cc"
2173  break;
2174 
2175  case YYSYMBOL_CASE: /* CASE */
2176 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2177  { }
2178 #line 2179 "libinterp/parse-tree/oct-parse.cc"
2179  break;
2180 
2181  case YYSYMBOL_OTHERWISE: /* OTHERWISE */
2182 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2183  { }
2184 #line 2185 "libinterp/parse-tree/oct-parse.cc"
2185  break;
2186 
2187  case YYSYMBOL_BREAK: /* BREAK */
2188 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2189  { }
2190 #line 2191 "libinterp/parse-tree/oct-parse.cc"
2191  break;
2192 
2193  case YYSYMBOL_CONTINUE: /* CONTINUE */
2194 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2195  { }
2196 #line 2197 "libinterp/parse-tree/oct-parse.cc"
2197  break;
2198 
2199  case YYSYMBOL_FUNC_RET: /* FUNC_RET */
2200 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2201  { }
2202 #line 2203 "libinterp/parse-tree/oct-parse.cc"
2203  break;
2204 
2205  case YYSYMBOL_UNWIND: /* UNWIND */
2206 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2207  { }
2208 #line 2209 "libinterp/parse-tree/oct-parse.cc"
2209  break;
2210 
2211  case YYSYMBOL_CLEANUP: /* CLEANUP */
2212 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2213  { }
2214 #line 2215 "libinterp/parse-tree/oct-parse.cc"
2215  break;
2216 
2217  case YYSYMBOL_TRY: /* TRY */
2218 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2219  { }
2220 #line 2221 "libinterp/parse-tree/oct-parse.cc"
2221  break;
2222 
2223  case YYSYMBOL_CATCH: /* CATCH */
2224 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2225  { }
2226 #line 2227 "libinterp/parse-tree/oct-parse.cc"
2227  break;
2228 
2229  case YYSYMBOL_GLOBAL: /* GLOBAL */
2230 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2231  { }
2232 #line 2233 "libinterp/parse-tree/oct-parse.cc"
2233  break;
2234 
2235  case YYSYMBOL_PERSISTENT: /* PERSISTENT */
2236 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2237  { }
2238 #line 2239 "libinterp/parse-tree/oct-parse.cc"
2239  break;
2240 
2241  case YYSYMBOL_FCN_HANDLE: /* FCN_HANDLE */
2242 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2243  { }
2244 #line 2245 "libinterp/parse-tree/oct-parse.cc"
2245  break;
2246 
2247  case YYSYMBOL_CLASSDEF: /* CLASSDEF */
2248 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2249  { }
2250 #line 2251 "libinterp/parse-tree/oct-parse.cc"
2251  break;
2252 
2253  case YYSYMBOL_PROPERTIES: /* PROPERTIES */
2254 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2255  { }
2256 #line 2257 "libinterp/parse-tree/oct-parse.cc"
2257  break;
2258 
2259  case YYSYMBOL_METHODS: /* METHODS */
2260 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2261  { }
2262 #line 2263 "libinterp/parse-tree/oct-parse.cc"
2263  break;
2264 
2265  case YYSYMBOL_EVENTS: /* EVENTS */
2266 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2267  { }
2268 #line 2269 "libinterp/parse-tree/oct-parse.cc"
2269  break;
2270 
2271  case YYSYMBOL_ENUMERATION: /* ENUMERATION */
2272 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2273  { }
2274 #line 2275 "libinterp/parse-tree/oct-parse.cc"
2275  break;
2276 
2277  case YYSYMBOL_METAQUERY: /* METAQUERY */
2278 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2279  { }
2280 #line 2281 "libinterp/parse-tree/oct-parse.cc"
2281  break;
2282 
2283  case YYSYMBOL_SUPERCLASSREF: /* SUPERCLASSREF */
2284 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2285  { }
2286 #line 2287 "libinterp/parse-tree/oct-parse.cc"
2287  break;
2288 
2289  case YYSYMBOL_FQ_IDENT: /* FQ_IDENT */
2290 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2291  { }
2292 #line 2293 "libinterp/parse-tree/oct-parse.cc"
2293  break;
2294 
2295  case YYSYMBOL_GET: /* GET */
2296 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2297  { }
2298 #line 2299 "libinterp/parse-tree/oct-parse.cc"
2299  break;
2300 
2301  case YYSYMBOL_SET: /* SET */
2302 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2303  { }
2304 #line 2305 "libinterp/parse-tree/oct-parse.cc"
2305  break;
2306 
2307  case YYSYMBOL_FCN: /* FCN */
2308 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2309  { }
2310 #line 2311 "libinterp/parse-tree/oct-parse.cc"
2311  break;
2312 
2313  case YYSYMBOL_ARGUMENTS: /* ARGUMENTS */
2314 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2315  { }
2316 #line 2317 "libinterp/parse-tree/oct-parse.cc"
2317  break;
2318 
2319  case YYSYMBOL_LEXICAL_ERROR: /* LEXICAL_ERROR */
2320 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2321  { }
2322 #line 2323 "libinterp/parse-tree/oct-parse.cc"
2323  break;
2324 
2325  case YYSYMBOL_END_OF_INPUT: /* END_OF_INPUT */
2326 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2327  { }
2328 #line 2329 "libinterp/parse-tree/oct-parse.cc"
2329  break;
2330 
2331  case YYSYMBOL_UNARY: /* UNARY */
2332 #line 343 "../libinterp/parse-tree/oct-parse.yy"
2333  { }
2334 #line 2335 "libinterp/parse-tree/oct-parse.cc"
2335  break;
2336 
2337  case YYSYMBOL_input: /* input */
2338 #line 345 "../libinterp/parse-tree/oct-parse.yy"
2339  { delete ((*yyvaluep).tree_type); }
2340 #line 2341 "libinterp/parse-tree/oct-parse.cc"
2341  break;
2342 
2343  case YYSYMBOL_simple_list: /* simple_list */
2344 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2345  { delete ((*yyvaluep).tree_statement_list_type); }
2346 #line 2347 "libinterp/parse-tree/oct-parse.cc"
2347  break;
2348 
2349  case YYSYMBOL_simple_list1: /* simple_list1 */
2350 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2351  { delete ((*yyvaluep).tree_statement_list_type); }
2352 #line 2353 "libinterp/parse-tree/oct-parse.cc"
2353  break;
2354 
2355  case YYSYMBOL_opt_list: /* opt_list */
2356 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2357  { delete ((*yyvaluep).tree_statement_list_type); }
2358 #line 2359 "libinterp/parse-tree/oct-parse.cc"
2359  break;
2360 
2361  case YYSYMBOL_list: /* list */
2362 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2363  { delete ((*yyvaluep).tree_statement_list_type); }
2364 #line 2365 "libinterp/parse-tree/oct-parse.cc"
2365  break;
2366 
2367  case YYSYMBOL_list1: /* list1 */
2368 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2369  { delete ((*yyvaluep).tree_statement_list_type); }
2370 #line 2371 "libinterp/parse-tree/oct-parse.cc"
2371  break;
2372 
2373  case YYSYMBOL_opt_fcn_list: /* opt_fcn_list */
2374 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2375  { delete ((*yyvaluep).tree_statement_list_type); }
2376 #line 2377 "libinterp/parse-tree/oct-parse.cc"
2377  break;
2378 
2379  case YYSYMBOL_fcn_list: /* fcn_list */
2380 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2381  { delete ((*yyvaluep).tree_statement_list_type); }
2382 #line 2383 "libinterp/parse-tree/oct-parse.cc"
2383  break;
2384 
2385  case YYSYMBOL_fcn_list1: /* fcn_list1 */
2386 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2387  { delete ((*yyvaluep).tree_statement_list_type); }
2388 #line 2389 "libinterp/parse-tree/oct-parse.cc"
2389  break;
2390 
2391  case YYSYMBOL_statement: /* statement */
2392 #line 369 "../libinterp/parse-tree/oct-parse.yy"
2393  { delete ((*yyvaluep).tree_statement_type); }
2394 #line 2395 "libinterp/parse-tree/oct-parse.cc"
2395  break;
2396 
2397  case YYSYMBOL_word_list_cmd: /* word_list_cmd */
2398 #line 356 "../libinterp/parse-tree/oct-parse.yy"
2399  { delete ((*yyvaluep).tree_index_expression_type); }
2400 #line 2401 "libinterp/parse-tree/oct-parse.cc"
2401  break;
2402 
2403  case YYSYMBOL_word_list: /* word_list */
2404 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2405  { delete ((*yyvaluep).tree_argument_list_type); }
2406 #line 2407 "libinterp/parse-tree/oct-parse.cc"
2407  break;
2408 
2409  case YYSYMBOL_identifier: /* identifier */
2410 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2411  { delete ((*yyvaluep).tree_identifier_type); }
2412 #line 2413 "libinterp/parse-tree/oct-parse.cc"
2413  break;
2414 
2415  case YYSYMBOL_superclass_identifier: /* superclass_identifier */
2416 #line 351 "../libinterp/parse-tree/oct-parse.yy"
2417  { delete ((*yyvaluep).tree_superclass_ref_type); }
2418 #line 2419 "libinterp/parse-tree/oct-parse.cc"
2419  break;
2420 
2421  case YYSYMBOL_meta_identifier: /* meta_identifier */
2422 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2423  { delete ((*yyvaluep).tree_metaclass_query_type); }
2424 #line 2425 "libinterp/parse-tree/oct-parse.cc"
2425  break;
2426 
2427  case YYSYMBOL_string: /* string */
2428 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2429  { delete ((*yyvaluep).tree_constant_type); }
2430 #line 2431 "libinterp/parse-tree/oct-parse.cc"
2431  break;
2432 
2433  case YYSYMBOL_constant: /* constant */
2434 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2435  { delete ((*yyvaluep).tree_constant_type); }
2436 #line 2437 "libinterp/parse-tree/oct-parse.cc"
2437  break;
2438 
2439  case YYSYMBOL_matrix: /* matrix */
2440 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2441  { delete ((*yyvaluep).tree_expression_type); }
2442 #line 2443 "libinterp/parse-tree/oct-parse.cc"
2443  break;
2444 
2445  case YYSYMBOL_matrix_rows: /* matrix_rows */
2446 #line 346 "../libinterp/parse-tree/oct-parse.yy"
2447  { delete ((*yyvaluep).tree_matrix_type); }
2448 #line 2449 "libinterp/parse-tree/oct-parse.cc"
2449  break;
2450 
2451  case YYSYMBOL_cell: /* cell */
2452 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2453  { delete ((*yyvaluep).tree_expression_type); }
2454 #line 2455 "libinterp/parse-tree/oct-parse.cc"
2455  break;
2456 
2457  case YYSYMBOL_cell_rows: /* cell_rows */
2458 #line 347 "../libinterp/parse-tree/oct-parse.yy"
2459  { delete ((*yyvaluep).tree_cell_type); }
2460 #line 2461 "libinterp/parse-tree/oct-parse.cc"
2461  break;
2462 
2463  case YYSYMBOL_cell_or_matrix_row: /* cell_or_matrix_row */
2464 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2465  { delete ((*yyvaluep).tree_argument_list_type); }
2466 #line 2467 "libinterp/parse-tree/oct-parse.cc"
2467  break;
2468 
2469  case YYSYMBOL_fcn_handle: /* fcn_handle */
2470 #line 350 "../libinterp/parse-tree/oct-parse.yy"
2471  { delete ((*yyvaluep).tree_fcn_handle_type); }
2472 #line 2473 "libinterp/parse-tree/oct-parse.cc"
2473  break;
2474 
2475  case YYSYMBOL_anon_fcn_handle: /* anon_fcn_handle */
2476 #line 354 "../libinterp/parse-tree/oct-parse.yy"
2477  { delete ((*yyvaluep).tree_anon_fcn_handle_type); }
2478 #line 2479 "libinterp/parse-tree/oct-parse.cc"
2479  break;
2480 
2481  case YYSYMBOL_primary_expr: /* primary_expr */
2482 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2483  { delete ((*yyvaluep).tree_expression_type); }
2484 #line 2485 "libinterp/parse-tree/oct-parse.cc"
2485  break;
2486 
2487  case YYSYMBOL_magic_colon: /* magic_colon */
2488 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2489  { delete ((*yyvaluep).tree_constant_type); }
2490 #line 2491 "libinterp/parse-tree/oct-parse.cc"
2491  break;
2492 
2493  case YYSYMBOL_magic_tilde: /* magic_tilde */
2494 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2495  { delete ((*yyvaluep).tree_identifier_type); }
2496 #line 2497 "libinterp/parse-tree/oct-parse.cc"
2497  break;
2498 
2499  case YYSYMBOL_arg_list: /* arg_list */
2500 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2501  { delete ((*yyvaluep).tree_argument_list_type); }
2502 #line 2503 "libinterp/parse-tree/oct-parse.cc"
2503  break;
2504 
2505  case YYSYMBOL_oper_expr: /* oper_expr */
2506 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2507  { delete ((*yyvaluep).tree_expression_type); }
2508 #line 2509 "libinterp/parse-tree/oct-parse.cc"
2509  break;
2510 
2511  case YYSYMBOL_power_expr: /* power_expr */
2512 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2513  { delete ((*yyvaluep).tree_expression_type); }
2514 #line 2515 "libinterp/parse-tree/oct-parse.cc"
2515  break;
2516 
2517  case YYSYMBOL_colon_expr: /* colon_expr */
2518 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2519  { delete ((*yyvaluep).tree_expression_type); }
2520 #line 2521 "libinterp/parse-tree/oct-parse.cc"
2521  break;
2522 
2523  case YYSYMBOL_simple_expr: /* simple_expr */
2524 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2525  { delete ((*yyvaluep).tree_expression_type); }
2526 #line 2527 "libinterp/parse-tree/oct-parse.cc"
2527  break;
2528 
2529  case YYSYMBOL_assign_lhs: /* assign_lhs */
2530 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2531  { delete ((*yyvaluep).tree_argument_list_type); }
2532 #line 2533 "libinterp/parse-tree/oct-parse.cc"
2533  break;
2534 
2535  case YYSYMBOL_assign_expr: /* assign_expr */
2536 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2537  { delete ((*yyvaluep).tree_expression_type); }
2538 #line 2539 "libinterp/parse-tree/oct-parse.cc"
2539  break;
2540 
2541  case YYSYMBOL_expression: /* expression */
2542 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2543  { delete ((*yyvaluep).tree_expression_type); }
2544 #line 2545 "libinterp/parse-tree/oct-parse.cc"
2545  break;
2546 
2547  case YYSYMBOL_command: /* command */
2548 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2549  { delete ((*yyvaluep).tree_command_type); }
2550 #line 2551 "libinterp/parse-tree/oct-parse.cc"
2551  break;
2552 
2553  case YYSYMBOL_declaration: /* declaration */
2554 #line 368 "../libinterp/parse-tree/oct-parse.yy"
2555  { delete ((*yyvaluep).tree_decl_command_type); }
2556 #line 2557 "libinterp/parse-tree/oct-parse.cc"
2557  break;
2558 
2559  case YYSYMBOL_decl_init_list: /* decl_init_list */
2560 #line 367 "../libinterp/parse-tree/oct-parse.yy"
2561  { delete ((*yyvaluep).tree_decl_init_list_type); }
2562 #line 2563 "libinterp/parse-tree/oct-parse.cc"
2563  break;
2564 
2565  case YYSYMBOL_decl_elt: /* decl_elt */
2566 #line 366 "../libinterp/parse-tree/oct-parse.yy"
2567  { delete ((*yyvaluep).tree_decl_elt_type); }
2568 #line 2569 "libinterp/parse-tree/oct-parse.cc"
2569  break;
2570 
2571  case YYSYMBOL_select_command: /* select_command */
2572 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2573  { delete ((*yyvaluep).tree_command_type); }
2574 #line 2575 "libinterp/parse-tree/oct-parse.cc"
2575  break;
2576 
2577  case YYSYMBOL_if_command: /* if_command */
2578 #line 360 "../libinterp/parse-tree/oct-parse.yy"
2579  { delete ((*yyvaluep).tree_if_command_type); }
2580 #line 2581 "libinterp/parse-tree/oct-parse.cc"
2581  break;
2582 
2583  case YYSYMBOL_if_cmd_list: /* if_cmd_list */
2584 #line 362 "../libinterp/parse-tree/oct-parse.yy"
2585  { delete ((*yyvaluep).tree_if_command_list_type); }
2586 #line 2587 "libinterp/parse-tree/oct-parse.cc"
2587  break;
2588 
2589  case YYSYMBOL_if_cmd_list1: /* if_cmd_list1 */
2590 #line 362 "../libinterp/parse-tree/oct-parse.yy"
2591  { delete ((*yyvaluep).tree_if_command_list_type); }
2592 #line 2593 "libinterp/parse-tree/oct-parse.cc"
2593  break;
2594 
2595  case YYSYMBOL_elseif_clause: /* elseif_clause */
2596 #line 361 "../libinterp/parse-tree/oct-parse.yy"
2597  { delete ((*yyvaluep).tree_if_clause_type); }
2598 #line 2599 "libinterp/parse-tree/oct-parse.cc"
2599  break;
2600 
2601  case YYSYMBOL_else_clause: /* else_clause */
2602 #line 361 "../libinterp/parse-tree/oct-parse.yy"
2603  { delete ((*yyvaluep).tree_if_clause_type); }
2604 #line 2605 "libinterp/parse-tree/oct-parse.cc"
2605  break;
2606 
2607  case YYSYMBOL_switch_command: /* switch_command */
2608 #line 363 "../libinterp/parse-tree/oct-parse.yy"
2609  { delete ((*yyvaluep).tree_switch_command_type); }
2610 #line 2611 "libinterp/parse-tree/oct-parse.cc"
2611  break;
2612 
2613  case YYSYMBOL_case_list: /* case_list */
2614 #line 365 "../libinterp/parse-tree/oct-parse.yy"
2615  { delete ((*yyvaluep).tree_switch_case_list_type); }
2616 #line 2617 "libinterp/parse-tree/oct-parse.cc"
2617  break;
2618 
2619  case YYSYMBOL_case_list1: /* case_list1 */
2620 #line 365 "../libinterp/parse-tree/oct-parse.yy"
2621  { delete ((*yyvaluep).tree_switch_case_list_type); }
2622 #line 2623 "libinterp/parse-tree/oct-parse.cc"
2623  break;
2624 
2625  case YYSYMBOL_switch_case: /* switch_case */
2626 #line 364 "../libinterp/parse-tree/oct-parse.yy"
2627  { delete ((*yyvaluep).tree_switch_case_type); }
2628 #line 2629 "libinterp/parse-tree/oct-parse.cc"
2629  break;
2630 
2631  case YYSYMBOL_default_case: /* default_case */
2632 #line 364 "../libinterp/parse-tree/oct-parse.yy"
2633  { delete ((*yyvaluep).tree_switch_case_type); }
2634 #line 2635 "libinterp/parse-tree/oct-parse.cc"
2635  break;
2636 
2637  case YYSYMBOL_loop_command: /* loop_command */
2638 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2639  { delete ((*yyvaluep).tree_command_type); }
2640 #line 2641 "libinterp/parse-tree/oct-parse.cc"
2641  break;
2642 
2643  case YYSYMBOL_jump_command: /* jump_command */
2644 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2645  { delete ((*yyvaluep).tree_command_type); }
2646 #line 2647 "libinterp/parse-tree/oct-parse.cc"
2647  break;
2648 
2649  case YYSYMBOL_spmd_command: /* spmd_command */
2650 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2651  { delete ((*yyvaluep).tree_command_type); }
2652 #line 2653 "libinterp/parse-tree/oct-parse.cc"
2653  break;
2654 
2655  case YYSYMBOL_except_command: /* except_command */
2656 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2657  { delete ((*yyvaluep).tree_command_type); }
2658 #line 2659 "libinterp/parse-tree/oct-parse.cc"
2659  break;
2660 
2661  case YYSYMBOL_opt_param_list: /* opt_param_list */
2662 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2663  { delete ((*yyvaluep).tree_parameter_list_type); }
2664 #line 2665 "libinterp/parse-tree/oct-parse.cc"
2665  break;
2666 
2667  case YYSYMBOL_param_list: /* param_list */
2668 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2669  { delete ((*yyvaluep).tree_parameter_list_type); }
2670 #line 2671 "libinterp/parse-tree/oct-parse.cc"
2671  break;
2672 
2673  case YYSYMBOL_param_list1: /* param_list1 */
2674 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2675  { delete ((*yyvaluep).tree_parameter_list_type); }
2676 #line 2677 "libinterp/parse-tree/oct-parse.cc"
2677  break;
2678 
2679  case YYSYMBOL_param_list2: /* param_list2 */
2680 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2681  { delete ((*yyvaluep).tree_parameter_list_type); }
2682 #line 2683 "libinterp/parse-tree/oct-parse.cc"
2683  break;
2684 
2685  case YYSYMBOL_param_list_elt: /* param_list_elt */
2686 #line 366 "../libinterp/parse-tree/oct-parse.yy"
2687  { delete ((*yyvaluep).tree_decl_elt_type); }
2688 #line 2689 "libinterp/parse-tree/oct-parse.cc"
2689  break;
2690 
2691  case YYSYMBOL_return_list: /* return_list */
2692 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2693  { delete ((*yyvaluep).tree_parameter_list_type); }
2694 #line 2695 "libinterp/parse-tree/oct-parse.cc"
2695  break;
2696 
2697  case YYSYMBOL_return_list1: /* return_list1 */
2698 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2699  { delete ((*yyvaluep).tree_parameter_list_type); }
2700 #line 2701 "libinterp/parse-tree/oct-parse.cc"
2701  break;
2702 
2703  case YYSYMBOL_file: /* file */
2704 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2705  { delete ((*yyvaluep).tree_command_type); }
2706 #line 2707 "libinterp/parse-tree/oct-parse.cc"
2707  break;
2708 
2709  case YYSYMBOL_function_beg: /* function_beg */
2710 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2711  { }
2712 #line 2713 "libinterp/parse-tree/oct-parse.cc"
2713  break;
2714 
2715  case YYSYMBOL_fcn_name: /* fcn_name */
2716 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2717  { delete ((*yyvaluep).tree_identifier_type); }
2718 #line 2719 "libinterp/parse-tree/oct-parse.cc"
2719  break;
2720 
2721  case YYSYMBOL_function_end: /* function_end */
2722 #line 369 "../libinterp/parse-tree/oct-parse.yy"
2723  { delete ((*yyvaluep).tree_statement_type); }
2724 #line 2725 "libinterp/parse-tree/oct-parse.cc"
2725  break;
2726 
2727  case YYSYMBOL_function: /* function */
2728 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2729  { delete ((*yyvaluep).tree_function_def_type); }
2730 #line 2731 "libinterp/parse-tree/oct-parse.cc"
2731  break;
2732 
2733  case YYSYMBOL_function_body: /* function_body */
2734 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2735  { delete ((*yyvaluep).tree_statement_list_type); }
2736 #line 2737 "libinterp/parse-tree/oct-parse.cc"
2737  break;
2738 
2739  case YYSYMBOL_function_body1: /* function_body1 */
2740 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2741  { delete ((*yyvaluep).tree_statement_list_type); }
2742 #line 2743 "libinterp/parse-tree/oct-parse.cc"
2743  break;
2744 
2745  case YYSYMBOL_arguments_block: /* arguments_block */
2746 #line 371 "../libinterp/parse-tree/oct-parse.yy"
2747  { delete ((*yyvaluep).tree_arguments_block_type); }
2748 #line 2749 "libinterp/parse-tree/oct-parse.cc"
2749  break;
2750 
2751  case YYSYMBOL_arguments_beg: /* arguments_beg */
2752 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2753  { }
2754 #line 2755 "libinterp/parse-tree/oct-parse.cc"
2755  break;
2756 
2757  case YYSYMBOL_args_attr_list: /* args_attr_list */
2758 #line 372 "../libinterp/parse-tree/oct-parse.yy"
2759  { delete ((*yyvaluep).tree_args_block_attribute_list_type); }
2760 #line 2761 "libinterp/parse-tree/oct-parse.cc"
2761  break;
2762 
2763  case YYSYMBOL_args_validation_list: /* args_validation_list */
2764 #line 373 "../libinterp/parse-tree/oct-parse.yy"
2765  { delete ((*yyvaluep).tree_args_block_validation_list_type); }
2766 #line 2767 "libinterp/parse-tree/oct-parse.cc"
2767  break;
2768 
2769  case YYSYMBOL_arg_name: /* arg_name */
2770 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2771  { delete ((*yyvaluep).tree_expression_type); }
2772 #line 2773 "libinterp/parse-tree/oct-parse.cc"
2773  break;
2774 
2775  case YYSYMBOL_arg_validation: /* arg_validation */
2776 #line 374 "../libinterp/parse-tree/oct-parse.yy"
2777  { delete ((*yyvaluep).tree_arg_validation_type); }
2778 #line 2779 "libinterp/parse-tree/oct-parse.cc"
2779  break;
2780 
2781  case YYSYMBOL_size_spec: /* size_spec */
2782 #line 375 "../libinterp/parse-tree/oct-parse.yy"
2783  { delete ((*yyvaluep).tree_arg_size_spec_type); }
2784 #line 2785 "libinterp/parse-tree/oct-parse.cc"
2785  break;
2786 
2787  case YYSYMBOL_class_name: /* class_name */
2788 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2789  { delete ((*yyvaluep).tree_identifier_type); }
2790 #line 2791 "libinterp/parse-tree/oct-parse.cc"
2791  break;
2792 
2793  case YYSYMBOL_validation_fcns: /* validation_fcns */
2794 #line 376 "../libinterp/parse-tree/oct-parse.yy"
2795  { delete ((*yyvaluep).tree_arg_validation_fcns_type); }
2796 #line 2797 "libinterp/parse-tree/oct-parse.cc"
2797  break;
2798 
2799  case YYSYMBOL_default_value: /* default_value */
2800 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2801  { delete ((*yyvaluep).tree_expression_type); }
2802 #line 2803 "libinterp/parse-tree/oct-parse.cc"
2803  break;
2804 
2805  case YYSYMBOL_classdef_beg: /* classdef_beg */
2806 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2807  { }
2808 #line 2809 "libinterp/parse-tree/oct-parse.cc"
2809  break;
2810 
2811  case YYSYMBOL_classdef: /* classdef */
2812 #line 379 "../libinterp/parse-tree/oct-parse.yy"
2813  { delete ((*yyvaluep).tree_classdef_type); }
2814 #line 2815 "libinterp/parse-tree/oct-parse.cc"
2815  break;
2816 
2817  case YYSYMBOL_attr_list: /* attr_list */
2818 #line 381 "../libinterp/parse-tree/oct-parse.yy"
2819  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2820 #line 2821 "libinterp/parse-tree/oct-parse.cc"
2821  break;
2822 
2823  case YYSYMBOL_attr_list1: /* attr_list1 */
2824 #line 381 "../libinterp/parse-tree/oct-parse.yy"
2825  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2826 #line 2827 "libinterp/parse-tree/oct-parse.cc"
2827  break;
2828 
2829  case YYSYMBOL_attr: /* attr */
2830 #line 380 "../libinterp/parse-tree/oct-parse.yy"
2831  { delete ((*yyvaluep).tree_classdef_attribute_type); }
2832 #line 2833 "libinterp/parse-tree/oct-parse.cc"
2833  break;
2834 
2835  case YYSYMBOL_superclass_list: /* superclass_list */
2836 #line 383 "../libinterp/parse-tree/oct-parse.yy"
2837  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2838 #line 2839 "libinterp/parse-tree/oct-parse.cc"
2839  break;
2840 
2841  case YYSYMBOL_superclass_list1: /* superclass_list1 */
2842 #line 383 "../libinterp/parse-tree/oct-parse.yy"
2843  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2844 #line 2845 "libinterp/parse-tree/oct-parse.cc"
2845  break;
2846 
2847  case YYSYMBOL_superclass: /* superclass */
2848 #line 382 "../libinterp/parse-tree/oct-parse.yy"
2849  { delete ((*yyvaluep).tree_classdef_superclass_type); }
2850 #line 2851 "libinterp/parse-tree/oct-parse.cc"
2851  break;
2852 
2853  case YYSYMBOL_class_body: /* class_body */
2854 #line 384 "../libinterp/parse-tree/oct-parse.yy"
2855  { delete ((*yyvaluep).tree_classdef_body_type); }
2856 #line 2857 "libinterp/parse-tree/oct-parse.cc"
2857  break;
2858 
2859  case YYSYMBOL_class_body1: /* class_body1 */
2860 #line 384 "../libinterp/parse-tree/oct-parse.yy"
2861  { delete ((*yyvaluep).tree_classdef_body_type); }
2862 #line 2863 "libinterp/parse-tree/oct-parse.cc"
2863  break;
2864 
2865  case YYSYMBOL_properties_block: /* properties_block */
2866 #line 387 "../libinterp/parse-tree/oct-parse.yy"
2867  { delete ((*yyvaluep).tree_classdef_properties_block_type); }
2868 #line 2869 "libinterp/parse-tree/oct-parse.cc"
2869  break;
2870 
2871  case YYSYMBOL_properties_beg: /* properties_beg */
2872 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2873  { }
2874 #line 2875 "libinterp/parse-tree/oct-parse.cc"
2875  break;
2876 
2877  case YYSYMBOL_property_list: /* property_list */
2878 #line 386 "../libinterp/parse-tree/oct-parse.yy"
2879  { delete ((*yyvaluep).tree_classdef_property_list_type); }
2880 #line 2881 "libinterp/parse-tree/oct-parse.cc"
2881  break;
2882 
2883  case YYSYMBOL_property_list1: /* property_list1 */
2884 #line 386 "../libinterp/parse-tree/oct-parse.yy"
2885  { delete ((*yyvaluep).tree_classdef_property_list_type); }
2886 #line 2887 "libinterp/parse-tree/oct-parse.cc"
2887  break;
2888 
2889  case YYSYMBOL_class_property: /* class_property */
2890 #line 385 "../libinterp/parse-tree/oct-parse.yy"
2891  { delete ((*yyvaluep).tree_classdef_property_type); }
2892 #line 2893 "libinterp/parse-tree/oct-parse.cc"
2893  break;
2894 
2895  case YYSYMBOL_methods_block: /* methods_block */
2896 #line 389 "../libinterp/parse-tree/oct-parse.yy"
2897  { delete ((*yyvaluep).tree_classdef_methods_block_type); }
2898 #line 2899 "libinterp/parse-tree/oct-parse.cc"
2899  break;
2900 
2901  case YYSYMBOL_methods_beg: /* methods_beg */
2902 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2903  { }
2904 #line 2905 "libinterp/parse-tree/oct-parse.cc"
2905  break;
2906 
2907  case YYSYMBOL_method_decl1: /* method_decl1 */
2908 #line 377 "../libinterp/parse-tree/oct-parse.yy"
2909  { delete ((*yyvaluep).octave_user_function_type); }
2910 #line 2911 "libinterp/parse-tree/oct-parse.cc"
2911  break;
2912 
2913  case YYSYMBOL_method_decl: /* method_decl */
2914 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2915  { delete ((*yyvaluep).tree_function_def_type); }
2916 #line 2917 "libinterp/parse-tree/oct-parse.cc"
2917  break;
2918 
2919  case YYSYMBOL_method: /* method */
2920 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2921  { delete ((*yyvaluep).tree_function_def_type); }
2922 #line 2923 "libinterp/parse-tree/oct-parse.cc"
2923  break;
2924 
2925  case YYSYMBOL_methods_list: /* methods_list */
2926 #line 388 "../libinterp/parse-tree/oct-parse.yy"
2927  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
2928 #line 2929 "libinterp/parse-tree/oct-parse.cc"
2929  break;
2930 
2931  case YYSYMBOL_methods_list1: /* methods_list1 */
2932 #line 388 "../libinterp/parse-tree/oct-parse.yy"
2933  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
2934 #line 2935 "libinterp/parse-tree/oct-parse.cc"
2935  break;
2936 
2937  case YYSYMBOL_events_block: /* events_block */
2938 #line 392 "../libinterp/parse-tree/oct-parse.yy"
2939  { delete ((*yyvaluep).tree_classdef_events_block_type); }
2940 #line 2941 "libinterp/parse-tree/oct-parse.cc"
2941  break;
2942 
2943  case YYSYMBOL_events_beg: /* events_beg */
2944 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2945  { }
2946 #line 2947 "libinterp/parse-tree/oct-parse.cc"
2947  break;
2948 
2949  case YYSYMBOL_events_list: /* events_list */
2950 #line 391 "../libinterp/parse-tree/oct-parse.yy"
2951  { delete ((*yyvaluep).tree_classdef_events_list_type); }
2952 #line 2953 "libinterp/parse-tree/oct-parse.cc"
2953  break;
2954 
2955  case YYSYMBOL_events_list1: /* events_list1 */
2956 #line 391 "../libinterp/parse-tree/oct-parse.yy"
2957  { delete ((*yyvaluep).tree_classdef_events_list_type); }
2958 #line 2959 "libinterp/parse-tree/oct-parse.cc"
2959  break;
2960 
2961  case YYSYMBOL_class_event: /* class_event */
2962 #line 390 "../libinterp/parse-tree/oct-parse.yy"
2963  { delete ((*yyvaluep).tree_classdef_event_type); }
2964 #line 2965 "libinterp/parse-tree/oct-parse.cc"
2965  break;
2966 
2967  case YYSYMBOL_enum_block: /* enum_block */
2968 #line 395 "../libinterp/parse-tree/oct-parse.yy"
2969  { delete ((*yyvaluep).tree_classdef_enum_block_type); }
2970 #line 2971 "libinterp/parse-tree/oct-parse.cc"
2971  break;
2972 
2973  case YYSYMBOL_enumeration_beg: /* enumeration_beg */
2974 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2975  { }
2976 #line 2977 "libinterp/parse-tree/oct-parse.cc"
2977  break;
2978 
2979  case YYSYMBOL_enum_list: /* enum_list */
2980 #line 394 "../libinterp/parse-tree/oct-parse.yy"
2981  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
2982 #line 2983 "libinterp/parse-tree/oct-parse.cc"
2983  break;
2984 
2985  case YYSYMBOL_enum_list1: /* enum_list1 */
2986 #line 394 "../libinterp/parse-tree/oct-parse.yy"
2987  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
2988 #line 2989 "libinterp/parse-tree/oct-parse.cc"
2989  break;
2990 
2991  case YYSYMBOL_class_enum: /* class_enum */
2992 #line 393 "../libinterp/parse-tree/oct-parse.yy"
2993  { delete ((*yyvaluep).tree_classdef_enum_type); }
2994 #line 2995 "libinterp/parse-tree/oct-parse.cc"
2995  break;
2996 
2997  case YYSYMBOL_stash_comment: /* stash_comment */
2998 #line 342 "../libinterp/parse-tree/oct-parse.yy"
2999  { }
3000 #line 3001 "libinterp/parse-tree/oct-parse.cc"
3001  break;
3002 
3003  case YYSYMBOL_sep_no_nl: /* sep_no_nl */
3004 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3005  { }
3006 #line 3007 "libinterp/parse-tree/oct-parse.cc"
3007  break;
3008 
3009  case YYSYMBOL_opt_sep_no_nl: /* opt_sep_no_nl */
3010 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3011  { }
3012 #line 3013 "libinterp/parse-tree/oct-parse.cc"
3013  break;
3014 
3015  case YYSYMBOL_opt_nl: /* opt_nl */
3016 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3017  { }
3018 #line 3019 "libinterp/parse-tree/oct-parse.cc"
3019  break;
3020 
3021  case YYSYMBOL_nl: /* nl */
3022 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3023  { }
3024 #line 3025 "libinterp/parse-tree/oct-parse.cc"
3025  break;
3026 
3027  case YYSYMBOL_sep: /* sep */
3028 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3029  { }
3030 #line 3031 "libinterp/parse-tree/oct-parse.cc"
3031  break;
3032 
3033  case YYSYMBOL_opt_sep: /* opt_sep */
3034 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3035  { }
3036 #line 3037 "libinterp/parse-tree/oct-parse.cc"
3037  break;
3038 
3039  default:
3040  break;
3041  }
3043 }
3044 
3045 
3046 
3047 
3048 
3049 int
3050 yyparse (octave::base_parser& parser)
3051 {
3052  yypstate *yyps = yypstate_new ();
3053  if (!yyps)
3054  {
3055  yyerror (parser, YY_("memory exhausted"));
3056  return 2;
3057  }
3058  int yystatus = yypull_parse (yyps, parser);
3059  yypstate_delete (yyps);
3060  return yystatus;
3061 }
3062 
3063 int
3064 yypull_parse (yypstate *yyps, octave::base_parser& parser)
3065 {
3066  YY_ASSERT (yyps);
3067  int yystatus;
3068  do {
3069  YYSTYPE yylval;
3070  int yychar = yylex (&yylval, scanner);
3071  yystatus = yypush_parse (yyps, yychar, &yylval, parser);
3072  } while (yystatus == YYPUSH_MORE);
3073  return yystatus;
3074 }
3075 
3076 #define octave_nerrs yyps->octave_nerrs
3077 #define yystate yyps->yystate
3078 #define yyerrstatus yyps->yyerrstatus
3079 #define yyssa yyps->yyssa
3080 #define yyss yyps->yyss
3081 #define yyssp yyps->yyssp
3082 #define yyvsa yyps->yyvsa
3083 #define yyvs yyps->yyvs
3084 #define yyvsp yyps->yyvsp
3085 #define yystacksize yyps->yystacksize
3086 
3087 /* Initialize the parser data structure. */
3088 static void
3090 {
3091  yynerrs = 0;
3092  yystate = 0;
3093  yyerrstatus = 0;
3094 
3095  yyssp = yyss;
3096  yyvsp = yyvs;
3097 
3098  /* Initialize the state stack, in case yypcontext_expected_tokens is
3099  called before the first call to yyparse. */
3100  *yyssp = 0;
3101  yyps->yynew = 1;
3102 }
3103 
3104 /* Initialize the parser data structure. */
3105 yypstate *
3107 {
3108  yypstate *yyps;
3109  yyps = YY_CAST (yypstate *, YYMALLOC (sizeof *yyps));
3110  if (!yyps)
3111  return YY_NULLPTR;
3113  yyss = yyssa;
3114  yyvs = yyvsa;
3115  yypstate_clear (yyps);
3116  return yyps;
3117 }
3118 
3119 void
3121 {
3122  if (yyps)
3123  {
3124 #ifndef yyoverflow
3125  /* If the stack was reallocated but the parse did not complete, then the
3126  stack still needs to be freed. */
3127  if (yyss != yyssa)
3128  YYSTACK_FREE (yyss);
3129 #endif
3130  YYFREE (yyps);
3131  }
3132 }
3133 
3134 
3135 
3136 /*---------------.
3137 | yypush_parse. |
3138 `---------------*/
3139 
3140 int
3142  int yypushed_char, YYSTYPE const *yypushed_val, octave::base_parser& parser)
3143 {
3144 /* Lookahead token kind. */
3145 int yychar;
3146 
3147 
3148 /* The semantic value of the lookahead symbol. */
3149 /* Default value used for initialization, for pacifying older GCCs
3150  or non-GCC compilers. */
3151 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
3152 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
3153 
3154  int yyn;
3155  /* The return value of yyparse. */
3156  int yyresult;
3157  /* Lookahead symbol kind. */
3159  /* The variables used to return semantic value and location from the
3160  action routines. */
3161  YYSTYPE yyval;
3162 
3163 
3164 
3165 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3166 
3167  /* The number of symbols on the RHS of the reduced rule.
3168  Keep to zero when no symbol should be popped. */
3169  int yylen = 0;
3170 
3171  switch (yyps->yynew)
3172  {
3173  case 0:
3174  yyn = yypact[yystate];
3175  goto yyread_pushed_token;
3176 
3177  case 2:
3178  yypstate_clear (yyps);
3179  break;
3180 
3181  default:
3182  break;
3183  }
3184 
3185  YYDPRINTF ((stderr, "Starting parse\n"));
3186 
3187  yychar = OCTAVE_EMPTY; /* Cause a token to be read. */
3188 
3189  goto yysetstate;
3190 
3191 
3192 /*------------------------------------------------------------.
3193 | yynewstate -- push a new state, which is found in yystate. |
3194 `------------------------------------------------------------*/
3195 yynewstate:
3196  /* In all cases, when you get here, the value and location stacks
3197  have just been pushed. So pushing a state here evens the stacks. */
3198  yyssp++;
3199 
3200 
3201 /*--------------------------------------------------------------------.
3202 | yysetstate -- set current state (the top of the stack) to yystate. |
3203 `--------------------------------------------------------------------*/
3204 yysetstate:
3205  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3206  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
3211 
3212  if (yyss + yystacksize - 1 <= yyssp)
3213 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
3214  YYNOMEM;
3215 #else
3216  {
3217  /* Get the current used size of the three stacks, in elements. */
3218  YYPTRDIFF_T yysize = yyssp - yyss + 1;
3219 
3220 # if defined yyoverflow
3221  {
3222  /* Give user a chance to reallocate the stack. Use copies of
3223  these so that the &'s don't force the real ones into
3224  memory. */
3225  yy_state_t *yyss1 = yyss;
3226  YYSTYPE *yyvs1 = yyvs;
3227 
3228  /* Each stack pointer address is followed by the size of the
3229  data in use in that stack, in bytes. This used to be a
3230  conditional around just the two extra args, but that might
3231  be undefined if yyoverflow is a macro. */
3232  yyoverflow (YY_("memory exhausted"),
3233  &yyss1, yysize * YYSIZEOF (*yyssp),
3234  &yyvs1, yysize * YYSIZEOF (*yyvsp),
3235  &yystacksize);
3236  yyss = yyss1;
3237  yyvs = yyvs1;
3238  }
3239 # else /* defined YYSTACK_RELOCATE */
3240  /* Extend the stack our own way. */
3241  if (YYMAXDEPTH <= yystacksize)
3242  YYNOMEM;
3243  yystacksize *= 2;
3244  if (YYMAXDEPTH < yystacksize)
3246 
3247  {
3248  yy_state_t *yyss1 = yyss;
3249  union yyalloc *yyptr =
3250  YY_CAST (union yyalloc *,
3252  if (! yyptr)
3253  YYNOMEM;
3254  YYSTACK_RELOCATE (yyss_alloc, yyss);
3255  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3256 # undef YYSTACK_RELOCATE
3257  if (yyss1 != yyssa)
3258  YYSTACK_FREE (yyss1);
3259  }
3260 # endif
3261 
3262  yyssp = yyss + yysize - 1;
3263  yyvsp = yyvs + yysize - 1;
3264 
3266  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
3267  YY_CAST (long, yystacksize)));
3269 
3270  if (yyss + yystacksize - 1 <= yyssp)
3271  YYABORT;
3272  }
3273 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
3274 
3275 
3276  if (yystate == YYFINAL)
3277  YYACCEPT;
3278 
3279  goto yybackup;
3280 
3281 
3282 /*-----------.
3283 | yybackup. |
3284 `-----------*/
3285 yybackup:
3286  /* Do appropriate processing given the current state. Read a
3287  lookahead token if we need one and don't already have one. */
3288 
3289  /* First try to decide what to do without reference to lookahead token. */
3290  yyn = yypact[yystate];
3291  if (yypact_value_is_default (yyn))
3292  goto yydefault;
3293 
3294  /* Not known => get a lookahead token if don't already have one. */
3295 
3296  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
3297  if (yychar == OCTAVE_EMPTY)
3298  {
3299  if (!yyps->yynew)
3300  {
3301  YYDPRINTF ((stderr, "Return for a new token:\n"));
3302  yyresult = YYPUSH_MORE;
3303  goto yypushreturn;
3304  }
3305  yyps->yynew = 0;
3306 yyread_pushed_token:
3307  YYDPRINTF ((stderr, "Reading a token\n"));
3308  yychar = yypushed_char;
3309  if (yypushed_val)
3310  yylval = *yypushed_val;
3311  }
3312 
3313  if (yychar <= OCTAVE_EOF)
3314  {
3315  yychar = OCTAVE_EOF;
3316  yytoken = YYSYMBOL_YYEOF;
3317  YYDPRINTF ((stderr, "Now at end of input.\n"));
3318  }
3319  else if (yychar == OCTAVE_error)
3320  {
3321  /* The scanner already issued an error message, process directly
3322  to error recovery. But do not keep the error token as
3323  lookahead, it is too special and may lead us to an endless
3324  loop in error recovery. */
3325  yychar = OCTAVE_UNDEF;
3326  yytoken = YYSYMBOL_YYerror;
3327  goto yyerrlab1;
3328  }
3329  else
3330  {
3331  yytoken = YYTRANSLATE (yychar);
3332  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3333  }
3334 
3335  /* If the proper action on seeing token YYTOKEN is to reduce or to
3336  detect an error, take that action. */
3337  yyn += yytoken;
3338  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3339  goto yydefault;
3340  yyn = yytable[yyn];
3341  if (yyn <= 0)
3342  {
3343  if (yytable_value_is_error (yyn))
3344  goto yyerrlab;
3345  yyn = -yyn;
3346  goto yyreduce;
3347  }
3348 
3349  /* Count tokens shifted since error; after three, turn off error
3350  status. */
3351  if (yyerrstatus)
3352  yyerrstatus--;
3353 
3354  /* Shift the lookahead token. */
3355  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3356  yystate = yyn;
3358  *++yyvsp = yylval;
3360 
3361  /* Discard the shifted token. */
3362  yychar = OCTAVE_EMPTY;
3363  goto yynewstate;
3364 
3365 
3366 /*-----------------------------------------------------------.
3367 | yydefault -- do the default action for the current state. |
3368 `-----------------------------------------------------------*/
3369 yydefault:
3370  yyn = yydefact[yystate];
3371  if (yyn == 0)
3372  goto yyerrlab;
3373  goto yyreduce;
3374 
3375 
3376 /*-----------------------------.
3377 | yyreduce -- do a reduction. |
3378 `-----------------------------*/
3379 yyreduce:
3380  /* yyn is the number of a rule to reduce with. */
3381  yylen = yyr2[yyn];
3382 
3383  /* If YYLEN is nonzero, implement the default value of the action:
3384  '$$ = $1'.
3385 
3386  Otherwise, the following line sets YYVAL to garbage.
3387  This behavior is undocumented and Bison
3388  users should not rely upon it. Assigning to YYVAL
3389  unconditionally makes the parser a bit smaller, and it avoids a
3390  GCC warning that YYVAL may be used uninitialized. */
3391  yyval = yyvsp[1-yylen];
3392 
3393 
3394  YY_REDUCE_PRINT (yyn);
3395  switch (yyn)
3396  {
3397  case 2: /* input: simple_list '\n' */
3398 #line 416 "../libinterp/parse-tree/oct-parse.yy"
3399  {
3400  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3401 
3402  (yyval.tree_type) = nullptr;
3403 
3404  if (! parser.finish_input ((yyvsp[-1].tree_statement_list_type)))
3405  YYABORT;
3406  else
3407  YYACCEPT;
3408  }
3409 #line 3410 "libinterp/parse-tree/oct-parse.cc"
3410  break;
3411 
3412  case 3: /* input: simple_list END_OF_INPUT */
3413 #line 427 "../libinterp/parse-tree/oct-parse.yy"
3414  {
3415  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3416 
3417  (yyval.tree_type) = nullptr;
3418 
3419  if (! parser.finish_input ((yyvsp[-1].tree_statement_list_type), true))
3420  YYABORT;
3421  else
3422  YYACCEPT;
3423  }
3424 #line 3425 "libinterp/parse-tree/oct-parse.cc"
3425  break;
3426 
3427  case 4: /* input: parse_error */
3428 #line 438 "../libinterp/parse-tree/oct-parse.yy"
3429  {
3430  (yyval.tree_type) = nullptr;
3431  YYABORT;
3432  }
3433 #line 3434 "libinterp/parse-tree/oct-parse.cc"
3434  break;
3435 
3436  case 5: /* simple_list: opt_sep_no_nl */
3437 #line 445 "../libinterp/parse-tree/oct-parse.yy"
3438  {
3439  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3440 
3441  (yyval.tree_statement_list_type) = nullptr;
3442  }
3443 #line 3444 "libinterp/parse-tree/oct-parse.cc"
3444  break;
3445 
3446  case 6: /* simple_list: simple_list1 opt_sep_no_nl */
3447 #line 451 "../libinterp/parse-tree/oct-parse.yy"
3448  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), false); }
3449 #line 3450 "libinterp/parse-tree/oct-parse.cc"
3450  break;
3451 
3452  case 7: /* simple_list1: statement */
3453 #line 455 "../libinterp/parse-tree/oct-parse.yy"
3454  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3455 #line 3456 "libinterp/parse-tree/oct-parse.cc"
3456  break;
3457 
3458  case 8: /* simple_list1: simple_list1 sep_no_nl statement */
3459 #line 457 "../libinterp/parse-tree/oct-parse.yy"
3460  { (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), (yyvsp[0].tree_statement_type), false); }
3461 #line 3462 "libinterp/parse-tree/oct-parse.cc"
3462  break;
3463 
3464  case 9: /* opt_list: %empty */
3465 #line 461 "../libinterp/parse-tree/oct-parse.yy"
3466  { (yyval.tree_statement_list_type) = nullptr; }
3467 #line 3468 "libinterp/parse-tree/oct-parse.cc"
3468  break;
3469 
3470  case 10: /* opt_list: list */
3471 #line 463 "../libinterp/parse-tree/oct-parse.yy"
3472  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3473 #line 3474 "libinterp/parse-tree/oct-parse.cc"
3474  break;
3475 
3476  case 11: /* list: list1 opt_sep */
3477 #line 467 "../libinterp/parse-tree/oct-parse.yy"
3478  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), true); }
3479 #line 3480 "libinterp/parse-tree/oct-parse.cc"
3480  break;
3481 
3482  case 12: /* list1: statement */
3483 #line 471 "../libinterp/parse-tree/oct-parse.yy"
3484  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3485 #line 3486 "libinterp/parse-tree/oct-parse.cc"
3486  break;
3487 
3488  case 13: /* list1: list1 sep statement */
3489 #line 473 "../libinterp/parse-tree/oct-parse.yy"
3490  { (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), (yyvsp[0].tree_statement_type), true); }
3491 #line 3492 "libinterp/parse-tree/oct-parse.cc"
3492  break;
3493 
3494  case 14: /* opt_fcn_list: %empty */
3495 #line 477 "../libinterp/parse-tree/oct-parse.yy"
3496  { (yyval.tree_statement_list_type) = nullptr; }
3497 #line 3498 "libinterp/parse-tree/oct-parse.cc"
3498  break;
3499 
3500  case 15: /* opt_fcn_list: fcn_list */
3501 #line 479 "../libinterp/parse-tree/oct-parse.yy"
3502  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3503 #line 3504 "libinterp/parse-tree/oct-parse.cc"
3504  break;
3505 
3506  case 16: /* fcn_list: fcn_list1 opt_sep */
3507 #line 483 "../libinterp/parse-tree/oct-parse.yy"
3508  {
3509  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3510 
3511  (yyval.tree_statement_list_type) = (yyvsp[-1].tree_statement_list_type);
3512  }
3513 #line 3514 "libinterp/parse-tree/oct-parse.cc"
3514  break;
3515 
3516  case 17: /* fcn_list1: function */
3517 #line 491 "../libinterp/parse-tree/oct-parse.yy"
3518  {
3519  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3520  (yyval.tree_statement_list_type) = parser.make_statement_list (stmt);
3521  }
3522 #line 3523 "libinterp/parse-tree/oct-parse.cc"
3523  break;
3524 
3525  case 18: /* fcn_list1: fcn_list1 opt_sep function */
3526 #line 496 "../libinterp/parse-tree/oct-parse.yy"
3527  {
3528  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3529  (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), stmt, false);
3530  }
3531 #line 3532 "libinterp/parse-tree/oct-parse.cc"
3532  break;
3533 
3534  case 19: /* statement: expression */
3535 #line 503 "../libinterp/parse-tree/oct-parse.yy"
3536  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_expression_type)); }
3537 #line 3538 "libinterp/parse-tree/oct-parse.cc"
3538  break;
3539 
3540  case 20: /* statement: command */
3541 #line 505 "../libinterp/parse-tree/oct-parse.yy"
3542  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_command_type)); }
3543 #line 3544 "libinterp/parse-tree/oct-parse.cc"
3544  break;
3545 
3546  case 21: /* statement: word_list_cmd */
3547 #line 507 "../libinterp/parse-tree/oct-parse.yy"
3548  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_index_expression_type)); }
3549 #line 3550 "libinterp/parse-tree/oct-parse.cc"
3550  break;
3551 
3552  case 22: /* word_list_cmd: identifier word_list */
3553 #line 519 "../libinterp/parse-tree/oct-parse.yy"
3554  {
3555  (yyval.tree_index_expression_type) = parser.make_index_expression ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_argument_list_type), '(');
3556  if (! (yyval.tree_index_expression_type))
3557  {
3558  // make_index_expression deleted $1 and $2.
3559  YYABORT;
3560  }
3561  (yyval.tree_index_expression_type)->mark_word_list_cmd ();
3562  }
3563 #line 3564 "libinterp/parse-tree/oct-parse.cc"
3564  break;
3565 
3566  case 23: /* word_list: string */
3567 #line 531 "../libinterp/parse-tree/oct-parse.yy"
3568  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_constant_type)); }
3569 #line 3570 "libinterp/parse-tree/oct-parse.cc"
3570  break;
3571 
3572  case 24: /* word_list: word_list string */
3573 #line 533 "../libinterp/parse-tree/oct-parse.yy"
3574  { (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-1].tree_argument_list_type), (yyvsp[0].tree_constant_type)); }
3575 #line 3576 "libinterp/parse-tree/oct-parse.cc"
3576  break;
3577 
3578  case 25: /* identifier: NAME */
3579 #line 541 "../libinterp/parse-tree/oct-parse.yy"
3580  { (yyval.tree_identifier_type) = parser.make_identifier ((yyvsp[0].tok_val)); }
3581 #line 3582 "libinterp/parse-tree/oct-parse.cc"
3582  break;
3583 
3584  case 26: /* superclass_identifier: SUPERCLASSREF */
3585 #line 546 "../libinterp/parse-tree/oct-parse.yy"
3586  { (yyval.tree_superclass_ref_type) = parser.make_superclass_ref ((yyvsp[0].tok_val)); }
3587 #line 3588 "libinterp/parse-tree/oct-parse.cc"
3588  break;
3589 
3590  case 27: /* meta_identifier: METAQUERY */
3591 #line 550 "../libinterp/parse-tree/oct-parse.yy"
3592  { (yyval.tree_metaclass_query_type) = parser.make_metaclass_query ((yyvsp[0].tok_val)); }
3593 #line 3594 "libinterp/parse-tree/oct-parse.cc"
3594  break;
3595 
3596  case 28: /* string: DQ_STRING */
3597 #line 554 "../libinterp/parse-tree/oct-parse.yy"
3598  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3599 #line 3600 "libinterp/parse-tree/oct-parse.cc"
3600  break;
3601 
3602  case 29: /* string: SQ_STRING */
3603 #line 556 "../libinterp/parse-tree/oct-parse.yy"
3604  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3605 #line 3606 "libinterp/parse-tree/oct-parse.cc"
3606  break;
3607 
3608  case 30: /* constant: NUMBER */
3609 #line 560 "../libinterp/parse-tree/oct-parse.yy"
3610  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3611 #line 3612 "libinterp/parse-tree/oct-parse.cc"
3612  break;
3613 
3614  case 31: /* constant: string */
3615 #line 562 "../libinterp/parse-tree/oct-parse.yy"
3616  { (yyval.tree_constant_type) = (yyvsp[0].tree_constant_type); }
3617 #line 3618 "libinterp/parse-tree/oct-parse.cc"
3618  break;
3619 
3620  case 32: /* matrix: '[' matrix_rows ']' */
3621 #line 566 "../libinterp/parse-tree/oct-parse.yy"
3622  { (yyval.tree_expression_type) = parser.finish_matrix ((yyvsp[-1].tree_matrix_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3623 #line 3624 "libinterp/parse-tree/oct-parse.cc"
3624  break;
3625 
3626  case 33: /* matrix_rows: cell_or_matrix_row */
3627 #line 570 "../libinterp/parse-tree/oct-parse.yy"
3628  { (yyval.tree_matrix_type) = parser.make_matrix ((yyvsp[0].tree_argument_list_type)); }
3629 #line 3630 "libinterp/parse-tree/oct-parse.cc"
3630  break;
3631 
3632  case 34: /* matrix_rows: matrix_rows ';' cell_or_matrix_row */
3633 #line 572 "../libinterp/parse-tree/oct-parse.yy"
3634  {
3635  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3636 
3637  (yyval.tree_matrix_type) = parser.append_matrix_row ((yyvsp[-2].tree_matrix_type), (yyvsp[0].tree_argument_list_type));
3638  }
3639 #line 3640 "libinterp/parse-tree/oct-parse.cc"
3640  break;
3641 
3642  case 35: /* cell: '{' cell_rows '}' */
3643 #line 580 "../libinterp/parse-tree/oct-parse.yy"
3644  { (yyval.tree_expression_type) = parser.finish_cell ((yyvsp[-1].tree_cell_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3645 #line 3646 "libinterp/parse-tree/oct-parse.cc"
3646  break;
3647 
3648  case 36: /* cell_rows: cell_or_matrix_row */
3649 #line 584 "../libinterp/parse-tree/oct-parse.yy"
3650  { (yyval.tree_cell_type) = parser.make_cell ((yyvsp[0].tree_argument_list_type)); }
3651 #line 3652 "libinterp/parse-tree/oct-parse.cc"
3652  break;
3653 
3654  case 37: /* cell_rows: cell_rows ';' cell_or_matrix_row */
3655 #line 586 "../libinterp/parse-tree/oct-parse.yy"
3656  {
3657  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3658 
3659  (yyval.tree_cell_type) = parser.append_cell_row ((yyvsp[-2].tree_cell_type), (yyvsp[0].tree_argument_list_type));
3660  }
3661 #line 3662 "libinterp/parse-tree/oct-parse.cc"
3662  break;
3663 
3664  case 38: /* cell_or_matrix_row: %empty */
3665 #line 602 "../libinterp/parse-tree/oct-parse.yy"
3666  { (yyval.tree_argument_list_type) = nullptr; }
3667 #line 3668 "libinterp/parse-tree/oct-parse.cc"
3668  break;
3669 
3670  case 39: /* cell_or_matrix_row: ',' */
3671 #line 604 "../libinterp/parse-tree/oct-parse.yy"
3672  {
3673  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3674 
3675  (yyval.tree_argument_list_type) = nullptr;
3676  }
3677 #line 3678 "libinterp/parse-tree/oct-parse.cc"
3678  break;
3679 
3680  case 40: /* cell_or_matrix_row: arg_list */
3681 #line 610 "../libinterp/parse-tree/oct-parse.yy"
3682  { (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type); }
3683 #line 3684 "libinterp/parse-tree/oct-parse.cc"
3684  break;
3685 
3686  case 41: /* cell_or_matrix_row: arg_list ',' */
3687 #line 612 "../libinterp/parse-tree/oct-parse.yy"
3688  {
3689  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3690 
3691  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3692  }
3693 #line 3694 "libinterp/parse-tree/oct-parse.cc"
3694  break;
3695 
3696  case 42: /* cell_or_matrix_row: ',' arg_list */
3697 #line 618 "../libinterp/parse-tree/oct-parse.yy"
3698  {
3699  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3700 
3701  (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type);
3702  }
3703 #line 3704 "libinterp/parse-tree/oct-parse.cc"
3704  break;
3705 
3706  case 43: /* cell_or_matrix_row: ',' arg_list ',' */
3707 #line 624 "../libinterp/parse-tree/oct-parse.yy"
3708  {
3709  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3710 
3711  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3712  }
3713 #line 3714 "libinterp/parse-tree/oct-parse.cc"
3714  break;
3715 
3716  case 44: /* fcn_handle: FCN_HANDLE */
3717 #line 632 "../libinterp/parse-tree/oct-parse.yy"
3718  { (yyval.tree_fcn_handle_type) = parser.make_fcn_handle ((yyvsp[0].tok_val)); }
3719 #line 3720 "libinterp/parse-tree/oct-parse.cc"
3720  break;
3721 
3722  case 45: /* anon_fcn_handle: '@' param_list anon_fcn_begin expression */
3723 #line 640 "../libinterp/parse-tree/oct-parse.yy"
3724  {
3725  (yyval.tree_anon_fcn_handle_type) = parser.make_anon_fcn_handle ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_expression_type), (yyvsp[-3].tok_val)->beg_pos ());
3726  if (! (yyval.tree_anon_fcn_handle_type))
3727  {
3728  // make_anon_fcn_handle deleted $2 and $4.
3729  YYABORT;
3730  }
3731 
3734  }
3735 #line 3736 "libinterp/parse-tree/oct-parse.cc"
3736  break;
3737 
3738  case 46: /* anon_fcn_handle: '@' param_list anon_fcn_begin error */
3739 #line 652 "../libinterp/parse-tree/oct-parse.yy"
3740  {
3741  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-2].tree_parameter_list_type));
3742 
3744 
3745  (yyval.tree_anon_fcn_handle_type) = nullptr;
3746  parser.bison_error ("anonymous function bodies must be single expressions");
3747  YYABORT;
3748  }
3749 #line 3750 "libinterp/parse-tree/oct-parse.cc"
3750  break;
3751 
3752  case 47: /* primary_expr: identifier */
3753 #line 664 "../libinterp/parse-tree/oct-parse.yy"
3754  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
3755 #line 3756 "libinterp/parse-tree/oct-parse.cc"
3756  break;
3757 
3758  case 48: /* primary_expr: constant */
3759 #line 666 "../libinterp/parse-tree/oct-parse.yy"
3760  { (yyval.tree_expression_type) = (yyvsp[0].tree_constant_type); }
3761 #line 3762 "libinterp/parse-tree/oct-parse.cc"
3762  break;
3763 
3764  case 49: /* primary_expr: fcn_handle */
3765 #line 668 "../libinterp/parse-tree/oct-parse.yy"
3766  { (yyval.tree_expression_type) = (yyvsp[0].tree_fcn_handle_type); }
3767 #line 3768 "libinterp/parse-tree/oct-parse.cc"
3768  break;
3769 
3770  case 50: /* primary_expr: matrix */
3771 #line 670 "../libinterp/parse-tree/oct-parse.yy"
3772  {
3774  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
3775  }
3776 #line 3777 "libinterp/parse-tree/oct-parse.cc"
3777  break;
3778 
3779  case 51: /* primary_expr: cell */
3780 #line 675 "../libinterp/parse-tree/oct-parse.yy"
3781  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3782 #line 3783 "libinterp/parse-tree/oct-parse.cc"
3783  break;
3784 
3785  case 52: /* primary_expr: meta_identifier */
3786 #line 677 "../libinterp/parse-tree/oct-parse.yy"
3787  { (yyval.tree_expression_type) = (yyvsp[0].tree_metaclass_query_type); }
3788 #line 3789 "libinterp/parse-tree/oct-parse.cc"
3789  break;
3790 
3791  case 53: /* primary_expr: superclass_identifier */
3792 #line 679 "../libinterp/parse-tree/oct-parse.yy"
3793  { (yyval.tree_expression_type) = (yyvsp[0].tree_superclass_ref_type); }
3794 #line 3795 "libinterp/parse-tree/oct-parse.cc"
3795  break;
3796 
3797  case 54: /* primary_expr: '(' expression ')' */
3798 #line 681 "../libinterp/parse-tree/oct-parse.yy"
3799  {
3800  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3801 
3802  (yyval.tree_expression_type) = (yyvsp[-1].tree_expression_type)->mark_in_parens ();
3803  }
3804 #line 3805 "libinterp/parse-tree/oct-parse.cc"
3805  break;
3806 
3807  case 55: /* magic_colon: ':' */
3808 #line 689 "../libinterp/parse-tree/oct-parse.yy"
3809  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3810 #line 3811 "libinterp/parse-tree/oct-parse.cc"
3811  break;
3812 
3813  case 56: /* magic_tilde: '~' */
3814 #line 693 "../libinterp/parse-tree/oct-parse.yy"
3815  {
3816  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3817 
3818  (yyval.tree_identifier_type) = parser.make_black_hole ();
3819  }
3820 #line 3821 "libinterp/parse-tree/oct-parse.cc"
3821  break;
3822 
3823  case 57: /* arg_list: expression */
3824 #line 701 "../libinterp/parse-tree/oct-parse.yy"
3825  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_expression_type)); }
3826 #line 3827 "libinterp/parse-tree/oct-parse.cc"
3827  break;
3828 
3829  case 58: /* arg_list: magic_colon */
3830 #line 703 "../libinterp/parse-tree/oct-parse.yy"
3831  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_constant_type)); }
3832 #line 3833 "libinterp/parse-tree/oct-parse.cc"
3833  break;
3834 
3835  case 59: /* arg_list: magic_tilde */
3836 #line 705 "../libinterp/parse-tree/oct-parse.yy"
3837  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_identifier_type)); }
3838 #line 3839 "libinterp/parse-tree/oct-parse.cc"
3839  break;
3840 
3841  case 60: /* arg_list: arg_list ',' magic_colon */
3842 #line 707 "../libinterp/parse-tree/oct-parse.yy"
3843  {
3844  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3845 
3846  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_constant_type));
3847  }
3848 #line 3849 "libinterp/parse-tree/oct-parse.cc"
3849  break;
3850 
3851  case 61: /* arg_list: arg_list ',' magic_tilde */
3852 #line 713 "../libinterp/parse-tree/oct-parse.yy"
3853  {
3854  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3855 
3856  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_identifier_type));
3857  }
3858 #line 3859 "libinterp/parse-tree/oct-parse.cc"
3859  break;
3860 
3861  case 62: /* arg_list: arg_list ',' expression */
3862 #line 719 "../libinterp/parse-tree/oct-parse.yy"
3863  {
3864  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3865 
3866  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_expression_type));
3867  }
3868 #line 3869 "libinterp/parse-tree/oct-parse.cc"
3869  break;
3870 
3871  case 63: /* indirect_ref_op: '.' */
3872 #line 727 "../libinterp/parse-tree/oct-parse.yy"
3873  {
3874  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3875 
3876  (yyval.dummy_type) = 0;
3878  }
3879 #line 3880 "libinterp/parse-tree/oct-parse.cc"
3880  break;
3881 
3882  case 64: /* oper_expr: primary_expr */
3883 #line 736 "../libinterp/parse-tree/oct-parse.yy"
3884  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3885 #line 3886 "libinterp/parse-tree/oct-parse.cc"
3886  break;
3887 
3888  case 65: /* oper_expr: oper_expr PLUS_PLUS */
3889 #line 738 "../libinterp/parse-tree/oct-parse.yy"
3890  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3891 #line 3892 "libinterp/parse-tree/oct-parse.cc"
3892  break;
3893 
3894  case 66: /* oper_expr: oper_expr MINUS_MINUS */
3895 #line 740 "../libinterp/parse-tree/oct-parse.yy"
3896  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3897 #line 3898 "libinterp/parse-tree/oct-parse.cc"
3898  break;
3899 
3900  case 67: /* oper_expr: oper_expr '(' ')' */
3901 #line 742 "../libinterp/parse-tree/oct-parse.yy"
3902  {
3903  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
3904 
3905  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
3906  if (! (yyval.tree_expression_type))
3907  {
3908  // make_index_expression deleted $1.
3909  YYABORT;
3910  }
3911  }
3912 #line 3913 "libinterp/parse-tree/oct-parse.cc"
3913  break;
3914 
3915  case 68: /* oper_expr: oper_expr '(' arg_list ')' */
3916 #line 753 "../libinterp/parse-tree/oct-parse.yy"
3917  {
3918  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3919 
3920  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
3921  if (! (yyval.tree_expression_type))
3922  {
3923  // make_index_expression deleted $1 and $3.
3924  YYABORT;
3925  }
3926  }
3927 #line 3928 "libinterp/parse-tree/oct-parse.cc"
3928  break;
3929 
3930  case 69: /* oper_expr: oper_expr '{' '}' */
3931 #line 764 "../libinterp/parse-tree/oct-parse.yy"
3932  {
3933  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
3934 
3935  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
3936  if (! (yyval.tree_expression_type))
3937  {
3938  // make_index_expression deleted $1.
3939  YYABORT;
3940  }
3941  }
3942 #line 3943 "libinterp/parse-tree/oct-parse.cc"
3943  break;
3944 
3945  case 70: /* oper_expr: oper_expr '{' arg_list '}' */
3946 #line 775 "../libinterp/parse-tree/oct-parse.yy"
3947  {
3948  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3949 
3950  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
3951  if (! (yyval.tree_expression_type))
3952  {
3953  // make_index_expression deleted $1 and $3.
3954  YYABORT;
3955  }
3956  }
3957 #line 3958 "libinterp/parse-tree/oct-parse.cc"
3958  break;
3959 
3960  case 71: /* oper_expr: oper_expr HERMITIAN */
3961 #line 786 "../libinterp/parse-tree/oct-parse.yy"
3962  { (yyval.tree_expression_type) = parser.make_postfix_op (HERMITIAN, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3963 #line 3964 "libinterp/parse-tree/oct-parse.cc"
3964  break;
3965 
3966  case 72: /* oper_expr: oper_expr TRANSPOSE */
3967 #line 788 "../libinterp/parse-tree/oct-parse.yy"
3968  { (yyval.tree_expression_type) = parser.make_postfix_op (TRANSPOSE, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3969 #line 3970 "libinterp/parse-tree/oct-parse.cc"
3970  break;
3971 
3972  case 73: /* oper_expr: oper_expr indirect_ref_op STRUCT_ELT */
3973 #line 790 "../libinterp/parse-tree/oct-parse.yy"
3974  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
3975 #line 3976 "libinterp/parse-tree/oct-parse.cc"
3976  break;
3977 
3978  case 74: /* oper_expr: oper_expr indirect_ref_op '(' expression ')' */
3979 #line 792 "../libinterp/parse-tree/oct-parse.yy"
3980  {
3981  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3982 
3983  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
3984  }
3985 #line 3986 "libinterp/parse-tree/oct-parse.cc"
3986  break;
3987 
3988  case 75: /* oper_expr: PLUS_PLUS oper_expr */
3989 #line 798 "../libinterp/parse-tree/oct-parse.yy"
3990  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3991 #line 3992 "libinterp/parse-tree/oct-parse.cc"
3992  break;
3993 
3994  case 76: /* oper_expr: MINUS_MINUS oper_expr */
3995 #line 800 "../libinterp/parse-tree/oct-parse.yy"
3996  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3997 #line 3998 "libinterp/parse-tree/oct-parse.cc"
3998  break;
3999 
4000  case 77: /* oper_expr: '~' oper_expr */
4001 #line 802 "../libinterp/parse-tree/oct-parse.yy"
4002  { (yyval.tree_expression_type) = parser.make_prefix_op ('~', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4003 #line 4004 "libinterp/parse-tree/oct-parse.cc"
4004  break;
4005 
4006  case 78: /* oper_expr: '!' oper_expr */
4007 #line 804 "../libinterp/parse-tree/oct-parse.yy"
4008  { (yyval.tree_expression_type) = parser.make_prefix_op ('!', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4009 #line 4010 "libinterp/parse-tree/oct-parse.cc"
4010  break;
4011 
4012  case 79: /* oper_expr: '+' oper_expr */
4013 #line 806 "../libinterp/parse-tree/oct-parse.yy"
4014  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4015 #line 4016 "libinterp/parse-tree/oct-parse.cc"
4016  break;
4017 
4018  case 80: /* oper_expr: '-' oper_expr */
4019 #line 808 "../libinterp/parse-tree/oct-parse.yy"
4020  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4021 #line 4022 "libinterp/parse-tree/oct-parse.cc"
4022  break;
4023 
4024  case 81: /* oper_expr: oper_expr POW power_expr */
4025 #line 810 "../libinterp/parse-tree/oct-parse.yy"
4026  { (yyval.tree_expression_type) = parser.make_binary_op (POW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4027 #line 4028 "libinterp/parse-tree/oct-parse.cc"
4028  break;
4029 
4030  case 82: /* oper_expr: oper_expr EPOW power_expr */
4031 #line 812 "../libinterp/parse-tree/oct-parse.yy"
4032  { (yyval.tree_expression_type) = parser.make_binary_op (EPOW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4033 #line 4034 "libinterp/parse-tree/oct-parse.cc"
4034  break;
4035 
4036  case 83: /* oper_expr: oper_expr '+' oper_expr */
4037 #line 814 "../libinterp/parse-tree/oct-parse.yy"
4038  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4039 #line 4040 "libinterp/parse-tree/oct-parse.cc"
4040  break;
4041 
4042  case 84: /* oper_expr: oper_expr '-' oper_expr */
4043 #line 816 "../libinterp/parse-tree/oct-parse.yy"
4044  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4045 #line 4046 "libinterp/parse-tree/oct-parse.cc"
4046  break;
4047 
4048  case 85: /* oper_expr: oper_expr '*' oper_expr */
4049 #line 818 "../libinterp/parse-tree/oct-parse.yy"
4050  { (yyval.tree_expression_type) = parser.make_binary_op ('*', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4051 #line 4052 "libinterp/parse-tree/oct-parse.cc"
4052  break;
4053 
4054  case 86: /* oper_expr: oper_expr '/' oper_expr */
4055 #line 820 "../libinterp/parse-tree/oct-parse.yy"
4056  { (yyval.tree_expression_type) = parser.make_binary_op ('/', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4057 #line 4058 "libinterp/parse-tree/oct-parse.cc"
4058  break;
4059 
4060  case 87: /* oper_expr: oper_expr EMUL oper_expr */
4061 #line 822 "../libinterp/parse-tree/oct-parse.yy"
4062  { (yyval.tree_expression_type) = parser.make_binary_op (EMUL, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4063 #line 4064 "libinterp/parse-tree/oct-parse.cc"
4064  break;
4065 
4066  case 88: /* oper_expr: oper_expr EDIV oper_expr */
4067 #line 824 "../libinterp/parse-tree/oct-parse.yy"
4068  { (yyval.tree_expression_type) = parser.make_binary_op (EDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4069 #line 4070 "libinterp/parse-tree/oct-parse.cc"
4070  break;
4071 
4072  case 89: /* oper_expr: oper_expr LEFTDIV oper_expr */
4073 #line 826 "../libinterp/parse-tree/oct-parse.yy"
4074  { (yyval.tree_expression_type) = parser.make_binary_op (LEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4075 #line 4076 "libinterp/parse-tree/oct-parse.cc"
4076  break;
4077 
4078  case 90: /* oper_expr: oper_expr ELEFTDIV oper_expr */
4079 #line 828 "../libinterp/parse-tree/oct-parse.yy"
4080  { (yyval.tree_expression_type) = parser.make_binary_op (ELEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4081 #line 4082 "libinterp/parse-tree/oct-parse.cc"
4082  break;
4083 
4084  case 91: /* power_expr: primary_expr */
4085 #line 832 "../libinterp/parse-tree/oct-parse.yy"
4086  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4087 #line 4088 "libinterp/parse-tree/oct-parse.cc"
4088  break;
4089 
4090  case 92: /* power_expr: power_expr PLUS_PLUS */
4091 #line 834 "../libinterp/parse-tree/oct-parse.yy"
4092  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4093 #line 4094 "libinterp/parse-tree/oct-parse.cc"
4094  break;
4095 
4096  case 93: /* power_expr: power_expr MINUS_MINUS */
4097 #line 836 "../libinterp/parse-tree/oct-parse.yy"
4098  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4099 #line 4100 "libinterp/parse-tree/oct-parse.cc"
4100  break;
4101 
4102  case 94: /* power_expr: power_expr '(' ')' */
4103 #line 838 "../libinterp/parse-tree/oct-parse.yy"
4104  {
4105  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4106 
4107  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
4108  if (! (yyval.tree_expression_type))
4109  {
4110  // make_index_expression deleted $1.
4111  YYABORT;
4112  }
4113  }
4114 #line 4115 "libinterp/parse-tree/oct-parse.cc"
4115  break;
4116 
4117  case 95: /* power_expr: power_expr '(' arg_list ')' */
4118 #line 849 "../libinterp/parse-tree/oct-parse.yy"
4119  {
4120  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4121 
4122  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
4123  if (! (yyval.tree_expression_type))
4124  {
4125  // make_index_expression deleted $1 and $3.
4126  YYABORT;
4127  }
4128  }
4129 #line 4130 "libinterp/parse-tree/oct-parse.cc"
4130  break;
4131 
4132  case 96: /* power_expr: power_expr '{' '}' */
4133 #line 860 "../libinterp/parse-tree/oct-parse.yy"
4134  {
4135  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4136 
4137  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
4138  if (! (yyval.tree_expression_type))
4139  {
4140  // make_index_expression deleted $1.
4141  YYABORT;
4142  }
4143  }
4144 #line 4145 "libinterp/parse-tree/oct-parse.cc"
4145  break;
4146 
4147  case 97: /* power_expr: power_expr '{' arg_list '}' */
4148 #line 871 "../libinterp/parse-tree/oct-parse.yy"
4149  {
4150  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4151 
4152  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
4153  if (! (yyval.tree_expression_type))
4154  {
4155  // make_index_expression deleted $1 and $3.
4156  YYABORT;
4157  }
4158  }
4159 #line 4160 "libinterp/parse-tree/oct-parse.cc"
4160  break;
4161 
4162  case 98: /* power_expr: power_expr indirect_ref_op STRUCT_ELT */
4163 #line 882 "../libinterp/parse-tree/oct-parse.yy"
4164  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
4165 #line 4166 "libinterp/parse-tree/oct-parse.cc"
4166  break;
4167 
4168  case 99: /* power_expr: power_expr indirect_ref_op '(' expression ')' */
4169 #line 884 "../libinterp/parse-tree/oct-parse.yy"
4170  {
4171  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4172 
4173  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
4174  }
4175 #line 4176 "libinterp/parse-tree/oct-parse.cc"
4176  break;
4177 
4178  case 100: /* power_expr: PLUS_PLUS power_expr */
4179 #line 890 "../libinterp/parse-tree/oct-parse.yy"
4180  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4181 #line 4182 "libinterp/parse-tree/oct-parse.cc"
4182  break;
4183 
4184  case 101: /* power_expr: MINUS_MINUS power_expr */
4185 #line 892 "../libinterp/parse-tree/oct-parse.yy"
4186  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4187 #line 4188 "libinterp/parse-tree/oct-parse.cc"
4188  break;
4189 
4190  case 102: /* power_expr: '~' power_expr */
4191 #line 894 "../libinterp/parse-tree/oct-parse.yy"
4192  { (yyval.tree_expression_type) = parser.make_prefix_op ('~', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4193 #line 4194 "libinterp/parse-tree/oct-parse.cc"
4194  break;
4195 
4196  case 103: /* power_expr: '!' power_expr */
4197 #line 896 "../libinterp/parse-tree/oct-parse.yy"
4198  { (yyval.tree_expression_type) = parser.make_prefix_op ('!', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4199 #line 4200 "libinterp/parse-tree/oct-parse.cc"
4200  break;
4201 
4202  case 104: /* power_expr: '+' power_expr */
4203 #line 898 "../libinterp/parse-tree/oct-parse.yy"
4204  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4205 #line 4206 "libinterp/parse-tree/oct-parse.cc"
4206  break;
4207 
4208  case 105: /* power_expr: '-' power_expr */
4209 #line 900 "../libinterp/parse-tree/oct-parse.yy"
4210  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4211 #line 4212 "libinterp/parse-tree/oct-parse.cc"
4212  break;
4213 
4214  case 106: /* colon_expr: oper_expr ':' oper_expr */
4215 #line 904 "../libinterp/parse-tree/oct-parse.yy"
4216  {
4217  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4218 
4219  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-2].tree_expression_type), (yyvsp[0].tree_expression_type));
4220 
4221  if (! (yyval.tree_expression_type))
4222  {
4223  // make_colon_expression deleted $1 and $3.
4224  YYABORT;
4225  }
4226  }
4227 #line 4228 "libinterp/parse-tree/oct-parse.cc"
4228  break;
4229 
4230  case 107: /* colon_expr: oper_expr ':' oper_expr ':' oper_expr */
4231 #line 916 "../libinterp/parse-tree/oct-parse.yy"
4232  {
4233  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-1].tok_val));
4234 
4235  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-4].tree_expression_type), (yyvsp[0].tree_expression_type), (yyvsp[-2].tree_expression_type));
4236 
4237  if (! (yyval.tree_expression_type))
4238  {
4239  // make_colon_expression deleted $1, $3, and $5.
4240  YYABORT;
4241  }
4242  }
4243 #line 4244 "libinterp/parse-tree/oct-parse.cc"
4244  break;
4245 
4246  case 108: /* simple_expr: oper_expr */
4247 #line 930 "../libinterp/parse-tree/oct-parse.yy"
4248  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4249 #line 4250 "libinterp/parse-tree/oct-parse.cc"
4250  break;
4251 
4252  case 109: /* simple_expr: colon_expr */
4253 #line 932 "../libinterp/parse-tree/oct-parse.yy"
4254  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4255 #line 4256 "libinterp/parse-tree/oct-parse.cc"
4256  break;
4257 
4258  case 110: /* simple_expr: simple_expr EXPR_LT simple_expr */
4259 #line 934 "../libinterp/parse-tree/oct-parse.yy"
4260  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4261 #line 4262 "libinterp/parse-tree/oct-parse.cc"
4262  break;
4263 
4264  case 111: /* simple_expr: simple_expr EXPR_LE simple_expr */
4265 #line 936 "../libinterp/parse-tree/oct-parse.yy"
4266  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4267 #line 4268 "libinterp/parse-tree/oct-parse.cc"
4268  break;
4269 
4270  case 112: /* simple_expr: simple_expr EXPR_EQ simple_expr */
4271 #line 938 "../libinterp/parse-tree/oct-parse.yy"
4272  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_EQ, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4273 #line 4274 "libinterp/parse-tree/oct-parse.cc"
4274  break;
4275 
4276  case 113: /* simple_expr: simple_expr EXPR_GE simple_expr */
4277 #line 940 "../libinterp/parse-tree/oct-parse.yy"
4278  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4279 #line 4280 "libinterp/parse-tree/oct-parse.cc"
4280  break;
4281 
4282  case 114: /* simple_expr: simple_expr EXPR_GT simple_expr */
4283 #line 942 "../libinterp/parse-tree/oct-parse.yy"
4284  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4285 #line 4286 "libinterp/parse-tree/oct-parse.cc"
4286  break;
4287 
4288  case 115: /* simple_expr: simple_expr EXPR_NE simple_expr */
4289 #line 944 "../libinterp/parse-tree/oct-parse.yy"
4290  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_NE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4291 #line 4292 "libinterp/parse-tree/oct-parse.cc"
4292  break;
4293 
4294  case 116: /* simple_expr: simple_expr EXPR_AND simple_expr */
4295 #line 946 "../libinterp/parse-tree/oct-parse.yy"
4296  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_AND, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4297 #line 4298 "libinterp/parse-tree/oct-parse.cc"
4298  break;
4299 
4300  case 117: /* simple_expr: simple_expr EXPR_OR simple_expr */
4301 #line 948 "../libinterp/parse-tree/oct-parse.yy"
4302  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_OR, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4303 #line 4304 "libinterp/parse-tree/oct-parse.cc"
4304  break;
4305 
4306  case 118: /* simple_expr: simple_expr EXPR_AND_AND simple_expr */
4307 #line 950 "../libinterp/parse-tree/oct-parse.yy"
4308  { (yyval.tree_expression_type) = parser.make_boolean_op (EXPR_AND_AND, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4309 #line 4310 "libinterp/parse-tree/oct-parse.cc"
4310  break;
4311 
4312  case 119: /* simple_expr: simple_expr EXPR_OR_OR simple_expr */
4313 #line 952 "../libinterp/parse-tree/oct-parse.yy"
4314  { (yyval.tree_expression_type) = parser.make_boolean_op (EXPR_OR_OR, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4315 #line 4316 "libinterp/parse-tree/oct-parse.cc"
4316  break;
4317 
4318  case 120: /* assign_lhs: simple_expr */
4319 #line 956 "../libinterp/parse-tree/oct-parse.yy"
4320  {
4321  (yyval.tree_argument_list_type) = parser.validate_matrix_for_assignment ((yyvsp[0].tree_expression_type));
4322 
4323  if ((yyval.tree_argument_list_type))
4325  else
4326  {
4327  // validate_matrix_for_assignment deleted $1.
4328  YYABORT;
4329  }
4330  }
4331 #line 4332 "libinterp/parse-tree/oct-parse.cc"
4332  break;
4333 
4334  case 121: /* assign_expr: assign_lhs '=' expression */
4335 #line 970 "../libinterp/parse-tree/oct-parse.yy"
4336  { (yyval.tree_expression_type) = parser.make_assign_op ('=', (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4337 #line 4338 "libinterp/parse-tree/oct-parse.cc"
4338  break;
4339 
4340  case 122: /* assign_expr: assign_lhs ADD_EQ expression */
4341 #line 972 "../libinterp/parse-tree/oct-parse.yy"
4342  { (yyval.tree_expression_type) = parser.make_assign_op (ADD_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4343 #line 4344 "libinterp/parse-tree/oct-parse.cc"
4344  break;
4345 
4346  case 123: /* assign_expr: assign_lhs SUB_EQ expression */
4347 #line 974 "../libinterp/parse-tree/oct-parse.yy"
4348  { (yyval.tree_expression_type) = parser.make_assign_op (SUB_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4349 #line 4350 "libinterp/parse-tree/oct-parse.cc"
4350  break;
4351 
4352  case 124: /* assign_expr: assign_lhs MUL_EQ expression */
4353 #line 976 "../libinterp/parse-tree/oct-parse.yy"
4354  { (yyval.tree_expression_type) = parser.make_assign_op (MUL_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4355 #line 4356 "libinterp/parse-tree/oct-parse.cc"
4356  break;
4357 
4358  case 125: /* assign_expr: assign_lhs DIV_EQ expression */
4359 #line 978 "../libinterp/parse-tree/oct-parse.yy"
4360  { (yyval.tree_expression_type) = parser.make_assign_op (DIV_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4361 #line 4362 "libinterp/parse-tree/oct-parse.cc"
4362  break;
4363 
4364  case 126: /* assign_expr: assign_lhs LEFTDIV_EQ expression */
4365 #line 980 "../libinterp/parse-tree/oct-parse.yy"
4366  { (yyval.tree_expression_type) = parser.make_assign_op (LEFTDIV_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4367 #line 4368 "libinterp/parse-tree/oct-parse.cc"
4368  break;
4369 
4370  case 127: /* assign_expr: assign_lhs POW_EQ expression */
4371 #line 982 "../libinterp/parse-tree/oct-parse.yy"
4372  { (yyval.tree_expression_type) = parser.make_assign_op (POW_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4373 #line 4374 "libinterp/parse-tree/oct-parse.cc"
4374  break;
4375 
4376  case 128: /* assign_expr: assign_lhs EMUL_EQ expression */
4377 #line 984 "../libinterp/parse-tree/oct-parse.yy"
4378  { (yyval.tree_expression_type) = parser.make_assign_op (EMUL_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4379 #line 4380 "libinterp/parse-tree/oct-parse.cc"
4380  break;
4381 
4382  case 129: /* assign_expr: assign_lhs EDIV_EQ expression */
4383 #line 986 "../libinterp/parse-tree/oct-parse.yy"
4384  { (yyval.tree_expression_type) = parser.make_assign_op (EDIV_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4385 #line 4386 "libinterp/parse-tree/oct-parse.cc"
4386  break;
4387 
4388  case 130: /* assign_expr: assign_lhs ELEFTDIV_EQ expression */
4389 #line 988 "../libinterp/parse-tree/oct-parse.yy"
4390  { (yyval.tree_expression_type) = parser.make_assign_op (ELEFTDIV_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4391 #line 4392 "libinterp/parse-tree/oct-parse.cc"
4392  break;
4393 
4394  case 131: /* assign_expr: assign_lhs EPOW_EQ expression */
4395 #line 990 "../libinterp/parse-tree/oct-parse.yy"
4396  { (yyval.tree_expression_type) = parser.make_assign_op (EPOW_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4397 #line 4398 "libinterp/parse-tree/oct-parse.cc"
4398  break;
4399 
4400  case 132: /* assign_expr: assign_lhs AND_EQ expression */
4401 #line 992 "../libinterp/parse-tree/oct-parse.yy"
4402  { (yyval.tree_expression_type) = parser.make_assign_op (AND_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4403 #line 4404 "libinterp/parse-tree/oct-parse.cc"
4404  break;
4405 
4406  case 133: /* assign_expr: assign_lhs OR_EQ expression */
4407 #line 994 "../libinterp/parse-tree/oct-parse.yy"
4408  { (yyval.tree_expression_type) = parser.make_assign_op (OR_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4409 #line 4410 "libinterp/parse-tree/oct-parse.cc"
4410  break;
4411 
4412  case 134: /* expression: simple_expr */
4413 #line 998 "../libinterp/parse-tree/oct-parse.yy"
4414  {
4415  if ((yyvsp[0].tree_expression_type) && ((yyvsp[0].tree_expression_type)->is_matrix () || (yyvsp[0].tree_expression_type)->iscell ()))
4416  {
4417  if (parser.validate_array_list ((yyvsp[0].tree_expression_type)))
4418  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4419  else
4420  {
4421  delete (yyvsp[0].tree_expression_type);
4422  YYABORT;
4423  }
4424  }
4425  else
4426  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4427  }
4428 #line 4429 "libinterp/parse-tree/oct-parse.cc"
4429  break;
4430 
4431  case 135: /* expression: assign_expr */
4432 #line 1013 "../libinterp/parse-tree/oct-parse.yy"
4433  {
4434  if (! (yyvsp[0].tree_expression_type))
4435  YYABORT;
4436 
4437  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4438  }
4439 #line 4440 "libinterp/parse-tree/oct-parse.cc"
4440  break;
4441 
4442  case 136: /* expression: anon_fcn_handle */
4443 #line 1020 "../libinterp/parse-tree/oct-parse.yy"
4444  { (yyval.tree_expression_type) = (yyvsp[0].tree_anon_fcn_handle_type); }
4445 #line 4446 "libinterp/parse-tree/oct-parse.cc"
4446  break;
4447 
4448  case 137: /* command: declaration */
4449 #line 1028 "../libinterp/parse-tree/oct-parse.yy"
4450  { (yyval.tree_command_type) = (yyvsp[0].tree_decl_command_type); }
4451 #line 4452 "libinterp/parse-tree/oct-parse.cc"
4452  break;
4453 
4454  case 138: /* command: select_command */
4455 #line 1030 "../libinterp/parse-tree/oct-parse.yy"
4456  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4457 #line 4458 "libinterp/parse-tree/oct-parse.cc"
4458  break;
4459 
4460  case 139: /* command: loop_command */
4461 #line 1032 "../libinterp/parse-tree/oct-parse.yy"
4462  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4463 #line 4464 "libinterp/parse-tree/oct-parse.cc"
4464  break;
4465 
4466  case 140: /* command: jump_command */
4467 #line 1034 "../libinterp/parse-tree/oct-parse.yy"
4468  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4469 #line 4470 "libinterp/parse-tree/oct-parse.cc"
4470  break;
4471 
4472  case 141: /* command: spmd_command */
4473 #line 1036 "../libinterp/parse-tree/oct-parse.yy"
4474  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4475 #line 4476 "libinterp/parse-tree/oct-parse.cc"
4476  break;
4477 
4478  case 142: /* command: except_command */
4479 #line 1038 "../libinterp/parse-tree/oct-parse.yy"
4480  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4481 #line 4482 "libinterp/parse-tree/oct-parse.cc"
4482  break;
4483 
4484  case 143: /* command: function */
4485 #line 1040 "../libinterp/parse-tree/oct-parse.yy"
4486  { (yyval.tree_command_type) = (yyvsp[0].tree_function_def_type); }
4487 #line 4488 "libinterp/parse-tree/oct-parse.cc"
4488  break;
4489 
4490  case 144: /* command: file */
4491 #line 1042 "../libinterp/parse-tree/oct-parse.yy"
4492  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4493 #line 4494 "libinterp/parse-tree/oct-parse.cc"
4494  break;
4495 
4496  case 145: /* declaration: GLOBAL decl_init_list */
4497 #line 1050 "../libinterp/parse-tree/oct-parse.yy"
4498  {
4499  (yyval.tree_decl_command_type) = parser.make_decl_command (GLOBAL, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4500  lexer.m_looking_at_decl_list = false;
4501  }
4502 #line 4503 "libinterp/parse-tree/oct-parse.cc"
4503  break;
4504 
4505  case 146: /* declaration: PERSISTENT decl_init_list */
4506 #line 1055 "../libinterp/parse-tree/oct-parse.yy"
4507  {
4508  (yyval.tree_decl_command_type) = parser.make_decl_command (PERSISTENT, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4509  lexer.m_looking_at_decl_list = false;
4510  }
4511 #line 4512 "libinterp/parse-tree/oct-parse.cc"
4512  break;
4513 
4514  case 147: /* decl_init_list: decl_elt */
4515 #line 1062 "../libinterp/parse-tree/oct-parse.yy"
4516  { (yyval.tree_decl_init_list_type) = parser.make_decl_init_list ((yyvsp[0].tree_decl_elt_type)); }
4517 #line 4518 "libinterp/parse-tree/oct-parse.cc"
4518  break;
4519 
4520  case 148: /* decl_init_list: decl_init_list decl_elt */
4521 #line 1064 "../libinterp/parse-tree/oct-parse.yy"
4522  { (yyval.tree_decl_init_list_type) = parser.append_decl_init_list ((yyvsp[-1].tree_decl_init_list_type), (yyvsp[0].tree_decl_elt_type)); }
4523 #line 4524 "libinterp/parse-tree/oct-parse.cc"
4524  break;
4525 
4526  case 149: /* decl_elt: identifier */
4527 #line 1068 "../libinterp/parse-tree/oct-parse.yy"
4528  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[0].tree_identifier_type)); }
4529 #line 4530 "libinterp/parse-tree/oct-parse.cc"
4530  break;
4531 
4532  case 150: /* decl_elt: identifier '=' expression */
4533 #line 1070 "../libinterp/parse-tree/oct-parse.yy"
4534  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[-2].tree_identifier_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4535 #line 4536 "libinterp/parse-tree/oct-parse.cc"
4536  break;
4537 
4538  case 151: /* select_command: if_command */
4539 #line 1078 "../libinterp/parse-tree/oct-parse.yy"
4540  { (yyval.tree_command_type) = (yyvsp[0].tree_if_command_type); }
4541 #line 4542 "libinterp/parse-tree/oct-parse.cc"
4542  break;
4543 
4544  case 152: /* select_command: switch_command */
4545 #line 1080 "../libinterp/parse-tree/oct-parse.yy"
4546  { (yyval.tree_command_type) = (yyvsp[0].tree_switch_command_type); }
4547 #line 4548 "libinterp/parse-tree/oct-parse.cc"
4548  break;
4549 
4550  case 153: /* if_command: IF stash_comment if_cmd_list END */
4551 #line 1088 "../libinterp/parse-tree/oct-parse.yy"
4552  {
4553  if (! ((yyval.tree_if_command_type) = parser.finish_if_command ((yyvsp[-3].tok_val), (yyvsp[-1].tree_if_command_list_type), (yyvsp[0].tok_val), (yyvsp[-2].comment_type))))
4554  {
4555  // finish_if_command deleted $3.
4556  YYABORT;
4557  }
4558  }
4559 #line 4560 "libinterp/parse-tree/oct-parse.cc"
4560  break;
4561 
4562  case 154: /* if_cmd_list: if_cmd_list1 */
4563 #line 1098 "../libinterp/parse-tree/oct-parse.yy"
4564  { (yyval.tree_if_command_list_type) = (yyvsp[0].tree_if_command_list_type); }
4565 #line 4566 "libinterp/parse-tree/oct-parse.cc"
4566  break;
4567 
4568  case 155: /* if_cmd_list: if_cmd_list1 else_clause */
4569 #line 1100 "../libinterp/parse-tree/oct-parse.yy"
4570  { (yyval.tree_if_command_list_type) = parser.append_if_clause ((yyvsp[-1].tree_if_command_list_type), (yyvsp[0].tree_if_clause_type)); }
4571 #line 4572 "libinterp/parse-tree/oct-parse.cc"
4572  break;
4573 
4574  case 156: /* if_cmd_list1: expression stmt_begin opt_sep opt_list */
4575 #line 1104 "../libinterp/parse-tree/oct-parse.yy"
4576  {
4577  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4578 
4579  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-3].tree_expression_type));
4580 
4581  (yyval.tree_if_command_list_type) = parser.start_if_command ((yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type));
4582  }
4583 #line 4584 "libinterp/parse-tree/oct-parse.cc"
4584  break;
4585 
4586  case 157: /* if_cmd_list1: if_cmd_list1 elseif_clause */
4587 #line 1112 "../libinterp/parse-tree/oct-parse.yy"
4588  { (yyval.tree_if_command_list_type) = parser.append_if_clause ((yyvsp[-1].tree_if_command_list_type), (yyvsp[0].tree_if_clause_type)); }
4589 #line 4590 "libinterp/parse-tree/oct-parse.cc"
4590  break;
4591 
4592  case 158: /* elseif_clause: ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4593 #line 1116 "../libinterp/parse-tree/oct-parse.yy"
4594  {
4595  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
4596 
4597  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-3].tree_expression_type));
4598 
4599  (yyval.tree_if_clause_type) = parser.make_elseif_clause ((yyvsp[-6].tok_val), (yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type), (yyvsp[-5].comment_type));
4600  }
4601 #line 4602 "libinterp/parse-tree/oct-parse.cc"
4602  break;
4603 
4604  case 159: /* else_clause: ELSE stash_comment opt_sep opt_list */
4605 #line 1126 "../libinterp/parse-tree/oct-parse.yy"
4606  {
4607  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4608 
4609  (yyval.tree_if_clause_type) = parser.make_else_clause ((yyvsp[-3].tok_val), (yyvsp[-2].comment_type), (yyvsp[0].tree_statement_list_type));
4610  }
4611 #line 4612 "libinterp/parse-tree/oct-parse.cc"
4612  break;
4613 
4614  case 160: /* switch_command: SWITCH stash_comment expression opt_sep case_list END */
4615 #line 1138 "../libinterp/parse-tree/oct-parse.yy"
4616  {
4617  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4618 
4619  if (! ((yyval.tree_switch_command_type) = parser.finish_switch_command ((yyvsp[-5].tok_val), (yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_switch_case_list_type), (yyvsp[0].tok_val), (yyvsp[-4].comment_type))))
4620  {
4621  // finish_switch_command deleted $3 adn $5.
4622  YYABORT;
4623  }
4624  }
4625 #line 4626 "libinterp/parse-tree/oct-parse.cc"
4626  break;
4627 
4628  case 161: /* case_list: %empty */
4629 #line 1150 "../libinterp/parse-tree/oct-parse.yy"
4630  { (yyval.tree_switch_case_list_type) = nullptr; }
4631 #line 4632 "libinterp/parse-tree/oct-parse.cc"
4632  break;
4633 
4634  case 162: /* case_list: default_case */
4635 #line 1152 "../libinterp/parse-tree/oct-parse.yy"
4636  { (yyval.tree_switch_case_list_type) = parser.make_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4637 #line 4638 "libinterp/parse-tree/oct-parse.cc"
4638  break;
4639 
4640  case 163: /* case_list: case_list1 */
4641 #line 1154 "../libinterp/parse-tree/oct-parse.yy"
4642  { (yyval.tree_switch_case_list_type) = (yyvsp[0].tree_switch_case_list_type); }
4643 #line 4644 "libinterp/parse-tree/oct-parse.cc"
4644  break;
4645 
4646  case 164: /* case_list: case_list1 default_case */
4647 #line 1156 "../libinterp/parse-tree/oct-parse.yy"
4648  { (yyval.tree_switch_case_list_type) = parser.append_switch_case ((yyvsp[-1].tree_switch_case_list_type), (yyvsp[0].tree_switch_case_type)); }
4649 #line 4650 "libinterp/parse-tree/oct-parse.cc"
4650  break;
4651 
4652  case 165: /* case_list1: switch_case */
4653 #line 1160 "../libinterp/parse-tree/oct-parse.yy"
4654  { (yyval.tree_switch_case_list_type) = parser.make_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4655 #line 4656 "libinterp/parse-tree/oct-parse.cc"
4656  break;
4657 
4658  case 166: /* case_list1: case_list1 switch_case */
4659 #line 1162 "../libinterp/parse-tree/oct-parse.yy"
4660  { (yyval.tree_switch_case_list_type) = parser.append_switch_case ((yyvsp[-1].tree_switch_case_list_type), (yyvsp[0].tree_switch_case_type)); }
4661 #line 4662 "libinterp/parse-tree/oct-parse.cc"
4662  break;
4663 
4664  case 167: /* switch_case: CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4665 #line 1166 "../libinterp/parse-tree/oct-parse.yy"
4666  {
4667  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
4668 
4669  (yyval.tree_switch_case_type) = parser.make_switch_case ((yyvsp[-6].tok_val), (yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type), (yyvsp[-5].comment_type));
4670  }
4671 #line 4672 "libinterp/parse-tree/oct-parse.cc"
4672  break;
4673 
4674  case 168: /* default_case: OTHERWISE stash_comment opt_sep opt_list */
4675 #line 1174 "../libinterp/parse-tree/oct-parse.yy"
4676  {
4677  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4678 
4679  (yyval.tree_switch_case_type) = parser.make_default_switch_case ((yyvsp[-3].tok_val), (yyvsp[-2].comment_type), (yyvsp[0].tree_statement_list_type));
4680  }
4681 #line 4682 "libinterp/parse-tree/oct-parse.cc"
4682  break;
4683 
4684  case 169: /* loop_command: WHILE stash_comment expression stmt_begin opt_sep opt_list END */
4685 #line 1186 "../libinterp/parse-tree/oct-parse.yy"
4686  {
4687  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4688 
4689  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-4].tree_expression_type));
4690 
4691  if (! ((yyval.tree_command_type) = parser.make_while_command ((yyvsp[-6].tok_val), (yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
4692  {
4693  // make_while_command deleted $3 and $6.
4694  YYABORT;
4695  }
4696  }
4697 #line 4698 "libinterp/parse-tree/oct-parse.cc"
4698  break;
4699 
4700  case 170: /* loop_command: DO stash_comment opt_sep opt_list UNTIL expression */
4701 #line 1198 "../libinterp/parse-tree/oct-parse.yy"
4702  {
4703  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-3].punct_type));
4704 
4705  (yyval.tree_command_type) = parser.make_do_until_command ((yyvsp[-1].tok_val), (yyvsp[-2].tree_statement_list_type), (yyvsp[0].tree_expression_type), (yyvsp[-4].comment_type));
4706  }
4707 #line 4708 "libinterp/parse-tree/oct-parse.cc"
4708  break;
4709 
4710  case 171: /* loop_command: FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4711 #line 1204 "../libinterp/parse-tree/oct-parse.yy"
4712  {
4713  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-2].punct_type));
4714 
4715  if (! ((yyval.tree_command_type) = parser.make_for_command (FOR, (yyvsp[-8].tok_val), (yyvsp[-6].tree_argument_list_type), (yyvsp[-4].tree_expression_type),
4716  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4717  {
4718  // make_for_command deleted $3, $5, and $8.
4719  YYABORT;
4720  }
4721  }
4722 #line 4723 "libinterp/parse-tree/oct-parse.cc"
4723  break;
4724 
4725  case 172: /* loop_command: FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END */
4726 #line 1215 "../libinterp/parse-tree/oct-parse.yy"
4727  {
4728  OCTAVE_YYUSE ((yyvsp[-7].tok_val), (yyvsp[-5].tok_val), (yyvsp[-3].tok_val), (yyvsp[-2].punct_type));
4729 
4730  if (! ((yyval.tree_command_type) = parser.make_for_command (FOR, (yyvsp[-9].tok_val), (yyvsp[-6].tree_argument_list_type), (yyvsp[-4].tree_expression_type),
4731  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-8].comment_type))))
4732  {
4733  // make_for_command deleted $4, $6, and $9.
4734  YYABORT;
4735  }
4736  }
4737 #line 4738 "libinterp/parse-tree/oct-parse.cc"
4738  break;
4739 
4740  case 173: /* loop_command: PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4741 #line 1226 "../libinterp/parse-tree/oct-parse.yy"
4742  {
4743  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-2].punct_type));
4744 
4745  if (! ((yyval.tree_command_type) = parser.make_for_command (PARFOR, (yyvsp[-8].tok_val), (yyvsp[-6].tree_argument_list_type), (yyvsp[-4].tree_expression_type),
4746  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4747  {
4748  // make_for_command deleted $3, $5, and $8.
4749  YYABORT;
4750  }
4751  }
4752 #line 4753 "libinterp/parse-tree/oct-parse.cc"
4753  break;
4754 
4755  case 174: /* loop_command: PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END */
4756 #line 1237 "../libinterp/parse-tree/oct-parse.yy"
4757  {
4758  OCTAVE_YYUSE ((yyvsp[-9].tok_val), (yyvsp[-7].tok_val), (yyvsp[-5].tok_val), (yyvsp[-3].tok_val), (yyvsp[-2].punct_type));
4759 
4760  if (! ((yyval.tree_command_type) = parser.make_for_command (PARFOR, (yyvsp[-11].tok_val), (yyvsp[-8].tree_argument_list_type), (yyvsp[-6].tree_expression_type),
4761  (yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-10].comment_type))))
4762  {
4763  // make_for_command deleted $4, $6, $8, and $11.
4764  YYABORT;
4765  }
4766  }
4767 #line 4768 "libinterp/parse-tree/oct-parse.cc"
4768  break;
4769 
4770  case 175: /* jump_command: BREAK */
4771 #line 1254 "../libinterp/parse-tree/oct-parse.yy"
4772  {
4773  if (! ((yyval.tree_command_type) = parser.make_break_command ((yyvsp[0].tok_val))))
4774  YYABORT;
4775  }
4776 #line 4777 "libinterp/parse-tree/oct-parse.cc"
4777  break;
4778 
4779  case 176: /* jump_command: CONTINUE */
4780 #line 1259 "../libinterp/parse-tree/oct-parse.yy"
4781  {
4782  if (! ((yyval.tree_command_type) = parser.make_continue_command ((yyvsp[0].tok_val))))
4783  YYABORT;
4784  }
4785 #line 4786 "libinterp/parse-tree/oct-parse.cc"
4786  break;
4787 
4788  case 177: /* jump_command: FUNC_RET */
4789 #line 1264 "../libinterp/parse-tree/oct-parse.yy"
4790  { (yyval.tree_command_type) = parser.make_return_command ((yyvsp[0].tok_val)); }
4791 #line 4792 "libinterp/parse-tree/oct-parse.cc"
4792  break;
4793 
4794  case 178: /* spmd_command: SPMD stash_comment opt_sep opt_list END */
4795 #line 1272 "../libinterp/parse-tree/oct-parse.yy"
4796  {
4797  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4798 
4799  octave::comment_list *lc = (yyvsp[-3].comment_type);
4800  octave::comment_list *tc = lexer.get_comment ();
4801 
4802  if (! ((yyval.tree_command_type) = parser.make_spmd_command ((yyvsp[-4].tok_val), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), lc, tc)))
4803  {
4804  // make_spmd_command deleted $4, LC, and TC.
4805  YYABORT;
4806  }
4807  }
4808 #line 4809 "libinterp/parse-tree/oct-parse.cc"
4809  break;
4810 
4811  case 179: /* except_command: UNWIND stash_comment opt_sep opt_list CLEANUP stash_comment opt_sep opt_list END */
4812 #line 1292 "../libinterp/parse-tree/oct-parse.yy"
4813  {
4814  OCTAVE_YYUSE ((yyvsp[-6].punct_type), (yyvsp[-4].tok_val), (yyvsp[-2].punct_type));
4815 
4816  if (! ((yyval.tree_command_type) = parser.make_unwind_command ((yyvsp[-8].tok_val), (yyvsp[-5].tree_statement_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type), (yyvsp[-3].comment_type))))
4817  {
4818  // make_unwind_command deleted $4 and $8.
4819  YYABORT;
4820  }
4821  }
4822 #line 4823 "libinterp/parse-tree/oct-parse.cc"
4823  break;
4824 
4825  case 180: /* except_command: TRY stash_comment opt_sep opt_list CATCH stash_comment opt_sep opt_list END */
4826 #line 1303 "../libinterp/parse-tree/oct-parse.yy"
4827  {
4828  OCTAVE_YYUSE ((yyvsp[-6].punct_type), (yyvsp[-4].tok_val), (yyvsp[-2].punct_type));
4829 
4830  if (! ((yyval.tree_command_type) = parser.make_try_command ((yyvsp[-8].tok_val), (yyvsp[-5].tree_statement_list_type), (yyvsp[-2].punct_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type), (yyvsp[-3].comment_type))))
4831  {
4832  // make_try_command deleted $4 and $8.
4833  YYABORT;
4834  }
4835  }
4836 #line 4837 "libinterp/parse-tree/oct-parse.cc"
4837  break;
4838 
4839  case 181: /* except_command: TRY stash_comment opt_sep opt_list END */
4840 #line 1313 "../libinterp/parse-tree/oct-parse.yy"
4841  {
4842  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4843 
4844  if (! ((yyval.tree_command_type) = parser.make_try_command ((yyvsp[-4].tok_val), (yyvsp[-1].tree_statement_list_type), 0, nullptr,
4845  (yyvsp[0].tok_val), (yyvsp[-3].comment_type), nullptr)))
4846  {
4847  // make_try_command deleted $4.
4848  YYABORT;
4849  }
4850  }
4851 #line 4852 "libinterp/parse-tree/oct-parse.cc"
4852  break;
4853 
4854  case 182: /* push_fcn_symtab: %empty */
4855 #line 1330 "../libinterp/parse-tree/oct-parse.yy"
4856  {
4857  if (! parser.push_fcn_symtab ())
4858  YYABORT;
4859 
4860  (yyval.dummy_type) = 0;
4861  }
4862 #line 4863 "libinterp/parse-tree/oct-parse.cc"
4863  break;
4864 
4865  case 183: /* param_list_beg: '(' */
4866 #line 1343 "../libinterp/parse-tree/oct-parse.yy"
4867  {
4868  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4869 
4870  (yyval.dummy_type) = 0;
4872  lexer.m_arguments_is_keyword = false;
4873 
4875  {
4876  // Will get a real name later.
4877  lexer.m_symtab_context.push (octave::symbol_scope ("parser:param_list_beg"));
4880  }
4881  }
4882 #line 4883 "libinterp/parse-tree/oct-parse.cc"
4883  break;
4884 
4885  case 184: /* param_list_end: ')' */
4886 #line 1361 "../libinterp/parse-tree/oct-parse.yy"
4887  {
4888  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4889 
4890  (yyval.dummy_type) = 0;
4894  }
4895 #line 4896 "libinterp/parse-tree/oct-parse.cc"
4896  break;
4897 
4898  case 185: /* opt_param_list: %empty */
4899 #line 1372 "../libinterp/parse-tree/oct-parse.yy"
4900  { (yyval.tree_parameter_list_type) = nullptr; }
4901 #line 4902 "libinterp/parse-tree/oct-parse.cc"
4902  break;
4903 
4904  case 186: /* opt_param_list: param_list */
4905 #line 1374 "../libinterp/parse-tree/oct-parse.yy"
4906  { (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type); }
4907 #line 4908 "libinterp/parse-tree/oct-parse.cc"
4908  break;
4909 
4910  case 187: /* param_list: param_list_beg param_list1 param_list_end */
4911 #line 1378 "../libinterp/parse-tree/oct-parse.yy"
4912  {
4913  if ((yyvsp[-1].tree_parameter_list_type))
4914  lexer.mark_as_variables ((yyvsp[-1].tree_parameter_list_type)->variable_names ());
4915 
4916  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
4917  }
4918 #line 4919 "libinterp/parse-tree/oct-parse.cc"
4919  break;
4920 
4921  case 188: /* param_list: param_list_beg error */
4922 #line 1385 "../libinterp/parse-tree/oct-parse.yy"
4923  {
4924  (yyval.tree_parameter_list_type) = nullptr;
4925  parser.bison_error ("invalid parameter list");
4926  YYABORT;
4927  }
4928 #line 4929 "libinterp/parse-tree/oct-parse.cc"
4929  break;
4930 
4931  case 189: /* param_list1: %empty */
4932 #line 1393 "../libinterp/parse-tree/oct-parse.yy"
4933  { (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::in); }
4934 #line 4935 "libinterp/parse-tree/oct-parse.cc"
4935  break;
4936 
4937  case 190: /* param_list1: param_list2 */
4938 #line 1395 "../libinterp/parse-tree/oct-parse.yy"
4939  {
4940  (yyvsp[0].tree_parameter_list_type)->mark_as_formal_parameters ();
4941 
4942  if (parser.validate_param_list ((yyvsp[0].tree_parameter_list_type), octave::tree_parameter_list::in))
4943  {
4944  lexer.mark_as_variables ((yyvsp[0].tree_parameter_list_type)->variable_names ());
4945  (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type);
4946  }
4947  else
4948  {
4949  delete (yyvsp[0].tree_parameter_list_type);
4950  YYABORT;
4951  }
4952  }
4953 #line 4954 "libinterp/parse-tree/oct-parse.cc"
4954  break;
4955 
4956  case 191: /* param_list2: param_list_elt */
4957 #line 1412 "../libinterp/parse-tree/oct-parse.yy"
4958  { (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::in, (yyvsp[0].tree_decl_elt_type)); }
4959 #line 4960 "libinterp/parse-tree/oct-parse.cc"
4960  break;
4961 
4962  case 192: /* param_list2: param_list2 ',' param_list_elt */
4963 #line 1414 "../libinterp/parse-tree/oct-parse.yy"
4964  {
4965  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4966 
4967  (yyval.tree_parameter_list_type) = parser.append_parameter_list ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_decl_elt_type));
4968  }
4969 #line 4970 "libinterp/parse-tree/oct-parse.cc"
4970  break;
4971 
4972  case 193: /* param_list_elt: decl_elt */
4973 #line 1422 "../libinterp/parse-tree/oct-parse.yy"
4974  { (yyval.tree_decl_elt_type) = (yyvsp[0].tree_decl_elt_type); }
4975 #line 4976 "libinterp/parse-tree/oct-parse.cc"
4976  break;
4977 
4978  case 194: /* param_list_elt: magic_tilde */
4979 #line 1424 "../libinterp/parse-tree/oct-parse.yy"
4980  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[0].tree_identifier_type)); }
4981 #line 4982 "libinterp/parse-tree/oct-parse.cc"
4982  break;
4983 
4984  case 195: /* return_list: '[' ']' */
4985 #line 1432 "../libinterp/parse-tree/oct-parse.yy"
4986  {
4987  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4988 
4990 
4991  (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::out);
4992  }
4993 #line 4994 "libinterp/parse-tree/oct-parse.cc"
4994  break;
4995 
4996  case 196: /* return_list: identifier */
4997 #line 1440 "../libinterp/parse-tree/oct-parse.yy"
4998  {
5000 
5001  octave::tree_parameter_list *tmp
5002  = parser.make_parameter_list (octave::tree_parameter_list::out, (yyvsp[0].tree_identifier_type));
5003 
5004  // Even though this parameter list can contain only
5005  // a single identifier, we still need to validate it
5006  // to check for varargin or varargout.
5007 
5008  if (parser.validate_param_list (tmp, octave::tree_parameter_list::out))
5009  (yyval.tree_parameter_list_type) = tmp;
5010  else
5011  {
5012  delete tmp;
5013  YYABORT;
5014  }
5015  }
5016 #line 5017 "libinterp/parse-tree/oct-parse.cc"
5017  break;
5018 
5019  case 197: /* return_list: '[' return_list1 ']' */
5020 #line 1459 "../libinterp/parse-tree/oct-parse.yy"
5021  {
5022  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5023 
5025 
5026  // Check for duplicate parameter names, varargin,
5027  // or varargout.
5028 
5029  if (parser.validate_param_list ((yyvsp[-1].tree_parameter_list_type), octave::tree_parameter_list::out))
5030  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
5031  else
5032  {
5033  delete (yyvsp[-1].tree_parameter_list_type);
5034  YYABORT;
5035  }
5036  }
5037 #line 5038 "libinterp/parse-tree/oct-parse.cc"
5038  break;
5039 
5040  case 198: /* return_list1: identifier */
5041 #line 1478 "../libinterp/parse-tree/oct-parse.yy"
5042  {
5043  (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::out, (yyvsp[0].tree_identifier_type));
5044  }
5045 #line 5046 "libinterp/parse-tree/oct-parse.cc"
5046  break;
5047 
5048  case 199: /* return_list1: return_list1 ',' identifier */
5049 #line 1482 "../libinterp/parse-tree/oct-parse.yy"
5050  {
5051  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5052 
5053  (yyval.tree_parameter_list_type) = parser.append_parameter_list ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_identifier_type));
5054  }
5055 #line 5056 "libinterp/parse-tree/oct-parse.cc"
5056  break;
5057 
5058  case 200: /* parsing_local_fcns: %empty */
5059 #line 1495 "../libinterp/parse-tree/oct-parse.yy"
5060  { parser.parsing_local_functions (true); }
5061 #line 5062 "libinterp/parse-tree/oct-parse.cc"
5062  break;
5063 
5064  case 201: /* push_script_symtab: %empty */
5065 #line 1499 "../libinterp/parse-tree/oct-parse.yy"
5066  {
5067  (yyval.dummy_type) = 0;
5068 
5069  // This scope may serve as the parent scope for local
5070  // functions in classdef files..
5071  lexer.m_symtab_context.push (octave::symbol_scope ("parser:push_script_symtab"));
5072  }
5073 #line 5074 "libinterp/parse-tree/oct-parse.cc"
5074  break;
5075 
5076  case 202: /* begin_file: push_script_symtab INPUT_FILE */
5077 #line 1509 "../libinterp/parse-tree/oct-parse.yy"
5078  { (yyval.dummy_type) = 0; }
5079 #line 5080 "libinterp/parse-tree/oct-parse.cc"
5080  break;
5081 
5082  case 203: /* file: begin_file opt_nl opt_list END_OF_INPUT */
5083 #line 1513 "../libinterp/parse-tree/oct-parse.yy"
5084  {
5085  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5086 
5088  {
5089  // Delete the dummy statement_list we created
5090  // after parsing the function. Any function
5091  // definitions found in the file have already
5092  // been stored in the symbol table or in
5093  // base_parser::m_primary_fcn.
5094 
5095  // Unused symbol table context.
5097 
5098  delete (yyvsp[-1].tree_statement_list_type);
5099 
5100  if (! parser.validate_primary_fcn ())
5101  YYABORT;
5102  }
5103  else
5104  {
5105  octave::tree_statement *end_of_script
5106  = parser.make_end ("endscript", true,
5107  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5108 
5109  parser.make_script ((yyvsp[-1].tree_statement_list_type), end_of_script);
5110 
5111  if (! parser.validate_primary_fcn ())
5112  YYABORT;
5113  }
5114 
5115  (yyval.tree_command_type) = nullptr;
5116  }
5117 #line 5118 "libinterp/parse-tree/oct-parse.cc"
5118  break;
5119 
5120  case 204: /* file: begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT */
5121 #line 1547 "../libinterp/parse-tree/oct-parse.yy"
5122  {
5123  OCTAVE_YYUSE ((yyvsp[-5].punct_type), (yyvsp[-2].punct_type), (yyvsp[0].tok_val));
5124 
5125  // Unused symbol table context.
5127 
5128  if (! parser.finish_classdef_file ((yyvsp[-4].tree_classdef_type), (yyvsp[-1].tree_statement_list_type)))
5129  YYABORT;
5130 
5131  (yyval.tree_command_type) = nullptr;
5132  }
5133 #line 5134 "libinterp/parse-tree/oct-parse.cc"
5134  break;
5135 
5136  case 205: /* function_beg: push_fcn_symtab FCN */
5137 #line 1565 "../libinterp/parse-tree/oct-parse.yy"
5138  {
5139  (yyval.tok_val) = (yyvsp[0].tok_val);
5143  }
5144 #line 5145 "libinterp/parse-tree/oct-parse.cc"
5145  break;
5146 
5147  case 206: /* fcn_name: identifier */
5148 #line 1574 "../libinterp/parse-tree/oct-parse.yy"
5149  {
5150  if (! ((yyval.tree_identifier_type) = parser.make_fcn_name ((yyvsp[0].tree_identifier_type))))
5151  {
5152  // make_fcn_name deleted $1.
5153  YYABORT;
5154  }
5155 
5157  }
5158 #line 5159 "libinterp/parse-tree/oct-parse.cc"
5159  break;
5160 
5161  case 207: /* fcn_name: GET '.' identifier */
5162 #line 1584 "../libinterp/parse-tree/oct-parse.yy"
5163  {
5164  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[-1].tok_val));
5165 
5166  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5167 
5168  lexer.m_parsed_function_name.top () = true;
5172  }
5173 #line 5174 "libinterp/parse-tree/oct-parse.cc"
5174  break;
5175 
5176  case 208: /* fcn_name: SET '.' identifier */
5177 #line 1595 "../libinterp/parse-tree/oct-parse.yy"
5178  {
5179  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[-1].tok_val));
5180 
5181  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5182 
5183  lexer.m_parsed_function_name.top () = true;
5187  }
5188 #line 5189 "libinterp/parse-tree/oct-parse.cc"
5189  break;
5190 
5191  case 209: /* function_end: END */
5192 #line 1608 "../libinterp/parse-tree/oct-parse.yy"
5193  {
5194  parser.endfunction_found (true);
5195 
5196  if (parser.end_token_ok ((yyvsp[0].tok_val), octave::token::function_end))
5197  (yyval.tree_statement_type) = parser.make_end ("endfunction", false,
5198  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5199  else
5200  {
5201  parser.end_token_error ((yyvsp[0].tok_val), octave::token::function_end);
5202  YYABORT;
5203  }
5204  }
5205 #line 5206 "libinterp/parse-tree/oct-parse.cc"
5206  break;
5207 
5208  case 210: /* function_end: END_OF_INPUT */
5209 #line 1621 "../libinterp/parse-tree/oct-parse.yy"
5210  {
5211 // A lot of tests are based on the assumption that this is OK
5212 // if (lexer.m_reading_script_file)
5213 // {
5214 // parser.bison_error ("function body open at end of script");
5215 // YYABORT;
5216 // }
5217 
5218  if (parser.endfunction_found ())
5219  {
5220  parser.bison_error ("inconsistent function endings -- "
5221  "if one function is explicitly ended, "
5222  "so must all the others");
5223  YYABORT;
5224  }
5225 
5228  {
5229  parser.bison_error ("function body open at end of input");
5230  YYABORT;
5231  }
5232 
5234  {
5235  parser.bison_error ("classdef body open at end of input");
5236  YYABORT;
5237  }
5238 
5239  (yyval.tree_statement_type) = parser.make_end ("endfunction", true,
5240  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5241  }
5242 #line 5243 "libinterp/parse-tree/oct-parse.cc"
5243  break;
5244 
5245  case 211: /* function: function_beg stash_comment fcn_name opt_param_list opt_sep function_body function_end */
5246 #line 1657 "../libinterp/parse-tree/oct-parse.yy"
5247  {
5248  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5249 
5250  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-6].tok_val), nullptr, (yyvsp[-4].tree_identifier_type), (yyvsp[-3].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-5].comment_type));
5251  }
5252 #line 5253 "libinterp/parse-tree/oct-parse.cc"
5253  break;
5254 
5255  case 212: /* function: function_beg stash_comment return_list '=' fcn_name opt_param_list opt_sep function_body function_end */
5256 #line 1664 "../libinterp/parse-tree/oct-parse.yy"
5257  {
5258  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-2].punct_type));
5259 
5260  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-8].tok_val), (yyvsp[-6].tree_parameter_list_type), (yyvsp[-4].tree_identifier_type), (yyvsp[-3].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-7].comment_type));
5261  }
5262 #line 5263 "libinterp/parse-tree/oct-parse.cc"
5263  break;
5264 
5265  case 213: /* function_body: at_first_executable_stmt opt_list */
5266 #line 1672 "../libinterp/parse-tree/oct-parse.yy"
5267  {
5268  OCTAVE_YYUSE ((yyvsp[-1].dummy_type));
5269 
5270  (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type);
5271  }
5272 #line 5273 "libinterp/parse-tree/oct-parse.cc"
5273  break;
5274 
5275  case 214: /* function_body: function_body1 opt_sep at_first_executable_stmt opt_list */
5276 #line 1678 "../libinterp/parse-tree/oct-parse.yy"
5277  {
5278  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5279 
5280  (yyval.tree_statement_list_type) = parser.append_function_body ((yyvsp[-3].tree_statement_list_type), (yyvsp[0].tree_statement_list_type));
5281  }
5282 #line 5283 "libinterp/parse-tree/oct-parse.cc"
5283  break;
5284 
5285  case 215: /* at_first_executable_stmt: %empty */
5286 #line 1687 "../libinterp/parse-tree/oct-parse.yy"
5287  {
5288  (yyval.dummy_type) = 0;
5289  lexer.m_arguments_is_keyword = false;
5290  }
5291 #line 5292 "libinterp/parse-tree/oct-parse.cc"
5292  break;
5293 
5294  case 216: /* function_body1: arguments_block */
5295 #line 1694 "../libinterp/parse-tree/oct-parse.yy"
5296  {
5297  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_arguments_block_type));
5298 
5299  (yyval.tree_statement_list_type) = parser.make_statement_list (stmt);
5300  }
5301 #line 5302 "libinterp/parse-tree/oct-parse.cc"
5302  break;
5303 
5304  case 217: /* function_body1: function_body1 opt_sep arguments_block */
5305 #line 1700 "../libinterp/parse-tree/oct-parse.yy"
5306  {
5307  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_arguments_block_type));
5308 
5309  (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), stmt, false);
5310  }
5311 #line 5312 "libinterp/parse-tree/oct-parse.cc"
5312  break;
5313 
5314  case 218: /* arguments_block: arguments_beg stash_comment opt_sep args_attr_list args_validation_list opt_sep END */
5315 #line 1709 "../libinterp/parse-tree/oct-parse.yy"
5316  {
5317  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
5318 
5319  octave::comment_list *lc = (yyvsp[-5].comment_type);
5320  octave::comment_list *tc = lexer.get_comment ();
5321 
5322  if (! ((yyval.tree_arguments_block_type) = parser.make_arguments_block ((yyvsp[-6].tok_val), (yyvsp[-3].tree_args_block_attribute_list_type), (yyvsp[-2].tree_args_block_validation_list_type), (yyvsp[0].tok_val), lc, tc)))
5323  {
5324  // make_arguments_block deleted $4, $5, LC, and TC.
5325  YYABORT;
5326  }
5327 
5329  }
5330 #line 5331 "libinterp/parse-tree/oct-parse.cc"
5331  break;
5332 
5333  case 219: /* arguments_beg: ARGUMENTS */
5334 #line 1726 "../libinterp/parse-tree/oct-parse.yy"
5335  {
5336  (yyval.tok_val) = (yyvsp[0].tok_val);
5337  lexer.m_arguments_is_keyword = false;
5338  }
5339 #line 5340 "libinterp/parse-tree/oct-parse.cc"
5340  break;
5341 
5342  case 220: /* args_attr_list: %empty */
5343 #line 1733 "../libinterp/parse-tree/oct-parse.yy"
5344  { (yyval.tree_args_block_attribute_list_type) = nullptr; }
5345 #line 5346 "libinterp/parse-tree/oct-parse.cc"
5346  break;
5347 
5348  case 221: /* args_attr_list: '(' identifier ')' */
5349 #line 1735 "../libinterp/parse-tree/oct-parse.yy"
5350  {
5351  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5352 
5353  // Error if $$ is nullptr.
5354  if (! ((yyval.tree_args_block_attribute_list_type) = parser.make_args_attribute_list ((yyvsp[-1].tree_identifier_type))))
5355  {
5356  // make_args_attribute_list deleted $2.
5357  YYABORT;
5358  }
5359  }
5360 #line 5361 "libinterp/parse-tree/oct-parse.cc"
5361  break;
5362 
5363  case 222: /* args_validation_list: arg_name arg_validation */
5364 #line 1749 "../libinterp/parse-tree/oct-parse.yy"
5365  {
5366  (yyvsp[0].tree_arg_validation_type)->arg_name ((yyvsp[-1].tree_expression_type));
5367  (yyval.tree_args_block_validation_list_type) = parser.make_args_validation_list ((yyvsp[0].tree_arg_validation_type));
5368  }
5369 #line 5370 "libinterp/parse-tree/oct-parse.cc"
5370  break;
5371 
5372  case 223: /* args_validation_list: args_validation_list sep arg_name arg_validation */
5373 #line 1754 "../libinterp/parse-tree/oct-parse.yy"
5374  {
5375  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5376 
5377  (yyvsp[0].tree_arg_validation_type)->arg_name ((yyvsp[-1].tree_expression_type));
5378  (yyval.tree_args_block_validation_list_type) = parser.append_args_validation_list ((yyvsp[-3].tree_args_block_validation_list_type), (yyvsp[0].tree_arg_validation_type));
5379  }
5380 #line 5381 "libinterp/parse-tree/oct-parse.cc"
5381  break;
5382 
5383  case 224: /* arg_name: identifier */
5384 #line 1767 "../libinterp/parse-tree/oct-parse.yy"
5385  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
5386 #line 5387 "libinterp/parse-tree/oct-parse.cc"
5387  break;
5388 
5389  case 225: /* arg_validation: size_spec class_name validation_fcns default_value */
5390 #line 1771 "../libinterp/parse-tree/oct-parse.yy"
5391  {
5392  if (! ((yyval.tree_arg_validation_type) = parser.make_arg_validation ((yyvsp[-3].tree_arg_size_spec_type), (yyvsp[-2].tree_identifier_type), (yyvsp[-1].tree_arg_validation_fcns_type), (yyvsp[0].tree_expression_type))))
5393  {
5394  // make_arg_validation deleted ...
5395  YYABORT;
5396  }
5397  }
5398 #line 5399 "libinterp/parse-tree/oct-parse.cc"
5399  break;
5400 
5401  case 226: /* size_spec: %empty */
5402 #line 1781 "../libinterp/parse-tree/oct-parse.yy"
5403  { (yyval.tree_arg_size_spec_type) = nullptr; }
5404 #line 5405 "libinterp/parse-tree/oct-parse.cc"
5405  break;
5406 
5407  case 227: /* size_spec: '(' arg_list ')' */
5408 #line 1783 "../libinterp/parse-tree/oct-parse.yy"
5409  {
5410  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5411 
5412  if (! ((yyval.tree_arg_size_spec_type) = parser.make_arg_size_spec ((yyvsp[-1].tree_argument_list_type))))
5413  {
5414  // make_arg_size_spec deleted $2.
5415  YYABORT;
5416  }
5417  }
5418 #line 5419 "libinterp/parse-tree/oct-parse.cc"
5419  break;
5420 
5421  case 228: /* class_name: %empty */
5422 #line 1795 "../libinterp/parse-tree/oct-parse.yy"
5423  { (yyval.tree_identifier_type) = nullptr; }
5424 #line 5425 "libinterp/parse-tree/oct-parse.cc"
5425  break;
5426 
5427  case 229: /* class_name: identifier */
5428 #line 1797 "../libinterp/parse-tree/oct-parse.yy"
5429  { (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type); }
5430 #line 5431 "libinterp/parse-tree/oct-parse.cc"
5431  break;
5432 
5433  case 230: /* validation_fcns: %empty */
5434 #line 1802 "../libinterp/parse-tree/oct-parse.yy"
5435  { (yyval.tree_arg_validation_fcns_type) = nullptr; }
5436 #line 5437 "libinterp/parse-tree/oct-parse.cc"
5437  break;
5438 
5439  case 231: /* validation_fcns: '{' arg_list '}' */
5440 #line 1804 "../libinterp/parse-tree/oct-parse.yy"
5441  {
5442  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5443 
5444  if (! ((yyval.tree_arg_validation_fcns_type) = parser.make_arg_validation_fcns ((yyvsp[-1].tree_argument_list_type))))
5445  {
5446  // make_arg_validation_fcns deleted $2.
5447  YYABORT;
5448  }
5449  }
5450 #line 5451 "libinterp/parse-tree/oct-parse.cc"
5451  break;
5452 
5453  case 232: /* default_value: %empty */
5454 #line 1816 "../libinterp/parse-tree/oct-parse.yy"
5455  { (yyval.tree_expression_type) = nullptr; }
5456 #line 5457 "libinterp/parse-tree/oct-parse.cc"
5457  break;
5458 
5459  case 233: /* default_value: '=' expression */
5460 #line 1818 "../libinterp/parse-tree/oct-parse.yy"
5461  {
5462  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5463 
5464  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
5465  }
5466 #line 5467 "libinterp/parse-tree/oct-parse.cc"
5467  break;
5468 
5469  case 234: /* classdef_beg: CLASSDEF */
5470 #line 1830 "../libinterp/parse-tree/oct-parse.yy"
5471  {
5473  {
5474  parser.bison_error ("classdef must appear inside a file containing only a class definition");
5475  YYABORT;
5476  }
5477 
5478  // Create invalid parent scope.
5479  lexer.m_symtab_context.push (octave::symbol_scope ());
5480  lexer.m_parsing_classdef = true;
5483 
5484  (yyval.tok_val) = (yyvsp[0].tok_val);
5485  }
5486 #line 5487 "libinterp/parse-tree/oct-parse.cc"
5487  break;
5488 
5489  case 235: /* classdef: classdef_beg stash_comment attr_list identifier opt_sep superclass_list class_body END */
5490 #line 1848 "../libinterp/parse-tree/oct-parse.yy"
5491  {
5492  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5493 
5494  octave::comment_list *lc = (yyvsp[-6].comment_type);
5495  octave::comment_list *tc = lexer.get_comment ();
5496 
5497  lexer.m_parsing_classdef = false;
5498 
5499  if (! ((yyval.tree_classdef_type) = parser.make_classdef ((yyvsp[-7].tok_val), (yyvsp[-5].tree_classdef_attribute_list_type), (yyvsp[-4].tree_identifier_type), (yyvsp[-2].tree_classdef_superclass_list_type), (yyvsp[-1].tree_classdef_body_type), (yyvsp[0].tok_val),
5500  lc, tc)))
5501  {
5502  // make_classdef deleted $3, $4, $6, $7, LC, and
5503  // TC.
5504  YYABORT;
5505  }
5506  }
5507 #line 5508 "libinterp/parse-tree/oct-parse.cc"
5508  break;
5509 
5510  case 236: /* attr_list: %empty */
5511 #line 1867 "../libinterp/parse-tree/oct-parse.yy"
5512  { (yyval.tree_classdef_attribute_list_type) = nullptr; }
5513 #line 5514 "libinterp/parse-tree/oct-parse.cc"
5514  break;
5515 
5516  case 237: /* attr_list: '(' attr_list1 ')' opt_sep */
5517 #line 1869 "../libinterp/parse-tree/oct-parse.yy"
5518  {
5519  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-1].tok_val), (yyvsp[0].punct_type));
5520 
5521  (yyval.tree_classdef_attribute_list_type) = (yyvsp[-2].tree_classdef_attribute_list_type);
5522  }
5523 #line 5524 "libinterp/parse-tree/oct-parse.cc"
5524  break;
5525 
5526  case 238: /* attr_list1: attr */
5527 #line 1877 "../libinterp/parse-tree/oct-parse.yy"
5528  { (yyval.tree_classdef_attribute_list_type) = parser.make_classdef_attribute_list ((yyvsp[0].tree_classdef_attribute_type)); }
5529 #line 5530 "libinterp/parse-tree/oct-parse.cc"
5530  break;
5531 
5532  case 239: /* attr_list1: attr_list1 ',' attr */
5533 #line 1879 "../libinterp/parse-tree/oct-parse.yy"
5534  {
5535  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5536 
5537  (yyval.tree_classdef_attribute_list_type) = parser.append_classdef_attribute ((yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[0].tree_classdef_attribute_type));
5538  }
5539 #line 5540 "libinterp/parse-tree/oct-parse.cc"
5540  break;
5541 
5542  case 240: /* attr: identifier */
5543 #line 1887 "../libinterp/parse-tree/oct-parse.yy"
5544  { (yyval.tree_classdef_attribute_type) = parser.make_classdef_attribute ((yyvsp[0].tree_identifier_type)); }
5545 #line 5546 "libinterp/parse-tree/oct-parse.cc"
5546  break;
5547 
5548  case 241: /* attr: identifier '=' expression */
5549 #line 1889 "../libinterp/parse-tree/oct-parse.yy"
5550  {
5551  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5552 
5553  (yyval.tree_classdef_attribute_type) = parser.make_classdef_attribute ((yyvsp[-2].tree_identifier_type), (yyvsp[0].tree_expression_type));
5554  }
5555 #line 5556 "libinterp/parse-tree/oct-parse.cc"
5556  break;
5557 
5558  case 242: /* attr: '~' identifier */
5559 #line 1895 "../libinterp/parse-tree/oct-parse.yy"
5560  {
5561  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5562 
5563  (yyval.tree_classdef_attribute_type) = parser.make_not_classdef_attribute ((yyvsp[0].tree_identifier_type));
5564  }
5565 #line 5566 "libinterp/parse-tree/oct-parse.cc"
5566  break;
5567 
5568  case 243: /* attr: '!' identifier */
5569 #line 1901 "../libinterp/parse-tree/oct-parse.yy"
5570  {
5571  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5572 
5573  (yyval.tree_classdef_attribute_type) = parser.make_not_classdef_attribute ((yyvsp[0].tree_identifier_type));
5574  }
5575 #line 5576 "libinterp/parse-tree/oct-parse.cc"
5576  break;
5577 
5578  case 244: /* superclass_list: %empty */
5579 #line 1909 "../libinterp/parse-tree/oct-parse.yy"
5580  {
5583 
5584  (yyval.tree_classdef_superclass_list_type) = nullptr;
5585  }
5586 #line 5587 "libinterp/parse-tree/oct-parse.cc"
5587  break;
5588 
5589  case 245: /* superclass_list: superclass_list1 opt_sep */
5590 #line 1916 "../libinterp/parse-tree/oct-parse.yy"
5591  {
5592  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5593 
5596 
5597  (yyval.tree_classdef_superclass_list_type) = (yyvsp[-1].tree_classdef_superclass_list_type);
5598  }
5599 #line 5600 "libinterp/parse-tree/oct-parse.cc"
5600  break;
5601 
5602  case 246: /* superclass_list1: EXPR_LT superclass */
5603 #line 1928 "../libinterp/parse-tree/oct-parse.yy"
5604  {
5605  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5606 
5607  (yyval.tree_classdef_superclass_list_type) = parser.make_classdef_superclass_list ((yyvsp[0].tree_classdef_superclass_type));
5608  }
5609 #line 5610 "libinterp/parse-tree/oct-parse.cc"
5610  break;
5611 
5612  case 247: /* superclass_list1: superclass_list1 EXPR_AND superclass */
5613 #line 1934 "../libinterp/parse-tree/oct-parse.yy"
5614  {
5615  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5616 
5617  (yyval.tree_classdef_superclass_list_type) = parser.append_classdef_superclass ((yyvsp[-2].tree_classdef_superclass_list_type), (yyvsp[0].tree_classdef_superclass_type));
5618  }
5619 #line 5620 "libinterp/parse-tree/oct-parse.cc"
5620  break;
5621 
5622  case 248: /* superclass: FQ_IDENT */
5623 #line 1942 "../libinterp/parse-tree/oct-parse.yy"
5624  { (yyval.tree_classdef_superclass_type) = parser.make_classdef_superclass ((yyvsp[0].tok_val)); }
5625 #line 5626 "libinterp/parse-tree/oct-parse.cc"
5626  break;
5627 
5628  case 249: /* class_body: %empty */
5629 #line 1946 "../libinterp/parse-tree/oct-parse.yy"
5630  {
5632  (yyval.tree_classdef_body_type) = nullptr;
5633  }
5634 #line 5635 "libinterp/parse-tree/oct-parse.cc"
5635  break;
5636 
5637  case 250: /* class_body: class_body1 opt_sep */
5638 #line 1951 "../libinterp/parse-tree/oct-parse.yy"
5639  {
5640  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5641 
5643  (yyval.tree_classdef_body_type) = (yyvsp[-1].tree_classdef_body_type);
5644  }
5645 #line 5646 "libinterp/parse-tree/oct-parse.cc"
5646  break;
5647 
5648  case 251: /* class_body1: properties_block */
5649 #line 1960 "../libinterp/parse-tree/oct-parse.yy"
5650  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_properties_block_type)); }
5651 #line 5652 "libinterp/parse-tree/oct-parse.cc"
5652  break;
5653 
5654  case 252: /* class_body1: methods_block */
5655 #line 1962 "../libinterp/parse-tree/oct-parse.yy"
5656  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_methods_block_type)); }
5657 #line 5658 "libinterp/parse-tree/oct-parse.cc"
5658  break;
5659 
5660  case 253: /* class_body1: events_block */
5661 #line 1964 "../libinterp/parse-tree/oct-parse.yy"
5662  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_events_block_type)); }
5663 #line 5664 "libinterp/parse-tree/oct-parse.cc"
5664  break;
5665 
5666  case 254: /* class_body1: enum_block */
5667 #line 1966 "../libinterp/parse-tree/oct-parse.yy"
5668  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_enum_block_type)); }
5669 #line 5670 "libinterp/parse-tree/oct-parse.cc"
5670  break;
5671 
5672  case 255: /* class_body1: class_body1 opt_sep properties_block */
5673 #line 1968 "../libinterp/parse-tree/oct-parse.yy"
5674  {
5675  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5676 
5677  (yyval.tree_classdef_body_type) = parser.append_classdef_properties_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_properties_block_type));
5678  }
5679 #line 5680 "libinterp/parse-tree/oct-parse.cc"
5680  break;
5681 
5682  case 256: /* class_body1: class_body1 opt_sep methods_block */
5683 #line 1974 "../libinterp/parse-tree/oct-parse.yy"
5684  {
5685  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5686 
5687  (yyval.tree_classdef_body_type) = parser.append_classdef_methods_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_methods_block_type));
5688  }
5689 #line 5690 "libinterp/parse-tree/oct-parse.cc"
5690  break;
5691 
5692  case 257: /* class_body1: class_body1 opt_sep events_block */
5693 #line 1980 "../libinterp/parse-tree/oct-parse.yy"
5694  {
5695  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5696 
5697  (yyval.tree_classdef_body_type) = parser.append_classdef_events_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_events_block_type));
5698  }
5699 #line 5700 "libinterp/parse-tree/oct-parse.cc"
5700  break;
5701 
5702  case 258: /* class_body1: class_body1 opt_sep enum_block */
5703 #line 1986 "../libinterp/parse-tree/oct-parse.yy"
5704  {
5705  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5706 
5707  (yyval.tree_classdef_body_type) = parser.append_classdef_enum_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_enum_block_type));
5708  }
5709 #line 5710 "libinterp/parse-tree/oct-parse.cc"
5710  break;
5711 
5712  case 259: /* properties_block: properties_beg stash_comment opt_sep attr_list property_list END */
5713 #line 1995 "../libinterp/parse-tree/oct-parse.yy"
5714  {
5715  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5716 
5717  octave::comment_list *lc = (yyvsp[-4].comment_type);
5718  octave::comment_list *tc = lexer.get_comment ();
5719 
5720  if (! ((yyval.tree_classdef_properties_block_type) = parser.make_classdef_properties_block
5721  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_property_list_type), (yyvsp[0].tok_val), lc, tc)))
5722  {
5723  // make_classdef_properties_block deleted $4,
5724  // $5, LC, and TC.
5725  YYABORT;
5726  }
5727  }
5728 #line 5729 "libinterp/parse-tree/oct-parse.cc"
5729  break;
5730 
5731  case 260: /* properties_beg: PROPERTIES */
5732 #line 2012 "../libinterp/parse-tree/oct-parse.yy"
5733  {
5735  (yyval.tok_val) = (yyvsp[0].tok_val);
5736  }
5737 #line 5738 "libinterp/parse-tree/oct-parse.cc"
5738  break;
5739 
5740  case 261: /* property_list: %empty */
5741 #line 2019 "../libinterp/parse-tree/oct-parse.yy"
5742  {
5744  (yyval.tree_classdef_property_list_type) = nullptr;
5745  }
5746 #line 5747 "libinterp/parse-tree/oct-parse.cc"
5747  break;
5748 
5749  case 262: /* property_list: property_list1 opt_sep */
5750 #line 2024 "../libinterp/parse-tree/oct-parse.yy"
5751  {
5752  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5753 
5755  (yyval.tree_classdef_property_list_type) = (yyvsp[-1].tree_classdef_property_list_type);
5756  }
5757 #line 5758 "libinterp/parse-tree/oct-parse.cc"
5758  break;
5759 
5760  case 263: /* property_list1: class_property */
5761 #line 2034 "../libinterp/parse-tree/oct-parse.yy"
5762  { (yyval.tree_classdef_property_list_type) = parser.make_classdef_property_list ((yyvsp[0].tree_classdef_property_type)); }
5763 #line 5764 "libinterp/parse-tree/oct-parse.cc"
5764  break;
5765 
5766  case 264: /* property_list1: property_list1 sep class_property */
5767 #line 2036 "../libinterp/parse-tree/oct-parse.yy"
5768  {
5769  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5770 
5771  // We don't look ahead to grab end-of-line comments.
5772  // Instead, they are grabbed when we see the
5773  // identifier that becomes the next element in the
5774  // list. If the element at the end of the list
5775  // doesn't have a doc string, see whether the
5776  // element we are adding is stroing an end-of-line
5777  // comment for us to use.
5778 
5779  octave::tree_classdef_property *last_elt = (yyvsp[-2].tree_classdef_property_list_type)->back ();
5780 
5781  if (! last_elt->have_doc_string ())
5782  {
5783  octave::comment_list *cl = (yyvsp[0].tree_classdef_property_type)->comments ();
5784 
5785  if (cl)
5786  {
5787  octave::comment_elt elt = cl->front ();
5788 
5789  if (elt.is_end_of_line ())
5790  last_elt->doc_string (elt.text ());
5791  }
5792  }
5793 
5794  (yyval.tree_classdef_property_list_type) = parser.append_classdef_property ((yyvsp[-2].tree_classdef_property_list_type), (yyvsp[0].tree_classdef_property_type));
5795  }
5796 #line 5797 "libinterp/parse-tree/oct-parse.cc"
5797  break;
5798 
5799  case 265: /* class_property: stash_comment identifier arg_validation */
5800 #line 2067 "../libinterp/parse-tree/oct-parse.yy"
5801  { (yyval.tree_classdef_property_type) = parser.make_classdef_property ((yyvsp[-2].comment_type), (yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_arg_validation_type)); }
5802 #line 5803 "libinterp/parse-tree/oct-parse.cc"
5803  break;
5804 
5805  case 266: /* methods_block: methods_beg stash_comment opt_sep attr_list methods_list END */
5806 #line 2071 "../libinterp/parse-tree/oct-parse.yy"
5807  {
5808  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5809 
5810  octave::comment_list *lc = (yyvsp[-4].comment_type);
5811  octave::comment_list *tc = lexer.get_comment ();
5812 
5813  if (! ((yyval.tree_classdef_methods_block_type) = parser.make_classdef_methods_block
5814  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_methods_list_type), (yyvsp[0].tok_val), lc, tc)))
5815  {
5816  // make_classdef_methods_block deleted $4, $5,
5817  // LC, and TC.
5818  YYABORT;
5819  }
5820  }
5821 #line 5822 "libinterp/parse-tree/oct-parse.cc"
5822  break;
5823 
5824  case 267: /* methods_beg: METHODS */
5825 #line 2088 "../libinterp/parse-tree/oct-parse.yy"
5826  {
5828  (yyval.tok_val) = (yyvsp[0].tok_val);
5829  }
5830 #line 5831 "libinterp/parse-tree/oct-parse.cc"
5831  break;
5832 
5833  case 268: /* method_decl1: identifier */
5834 #line 2095 "../libinterp/parse-tree/oct-parse.yy"
5835  {
5836  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[0].tree_identifier_type), nullptr)))
5837  YYABORT;
5838  }
5839 #line 5840 "libinterp/parse-tree/oct-parse.cc"
5840  break;
5841 
5842  case 269: /* method_decl1: identifier param_list */
5843 #line 2100 "../libinterp/parse-tree/oct-parse.yy"
5844  {
5845  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_parameter_list_type))))
5846  YYABORT;
5847  }
5848 #line 5849 "libinterp/parse-tree/oct-parse.cc"
5849  break;
5850 
5851  case 270: /* method_decl: stash_comment method_decl1 */
5852 #line 2107 "../libinterp/parse-tree/oct-parse.yy"
5853  { (yyval.tree_function_def_type) = parser.finish_classdef_external_method ((yyvsp[0].octave_user_function_type), nullptr, (yyvsp[-1].comment_type)); }
5854 #line 5855 "libinterp/parse-tree/oct-parse.cc"
5855  break;
5856 
5857  case 271: /* $@1: %empty */
5858 #line 2109 "../libinterp/parse-tree/oct-parse.yy"
5859  {
5860  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5861 
5863  lexer.m_parsed_function_name.push (false);
5864  }
5865 #line 5866 "libinterp/parse-tree/oct-parse.cc"
5866  break;
5867 
5868  case 272: /* method_decl: stash_comment return_list '=' $@1 method_decl1 */
5869 #line 2116 "../libinterp/parse-tree/oct-parse.yy"
5870  {
5873 
5874  (yyval.tree_function_def_type) = parser.finish_classdef_external_method ((yyvsp[0].octave_user_function_type), (yyvsp[-3].tree_parameter_list_type), (yyvsp[-4].comment_type));
5875  }
5876 #line 5877 "libinterp/parse-tree/oct-parse.cc"
5877  break;
5878 
5879  case 273: /* method: method_decl */
5880 #line 2125 "../libinterp/parse-tree/oct-parse.yy"
5881  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5882 #line 5883 "libinterp/parse-tree/oct-parse.cc"
5883  break;
5884 
5885  case 274: /* method: function */
5886 #line 2127 "../libinterp/parse-tree/oct-parse.yy"
5887  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5888 #line 5889 "libinterp/parse-tree/oct-parse.cc"
5889  break;
5890 
5891  case 275: /* methods_list: %empty */
5892 #line 2131 "../libinterp/parse-tree/oct-parse.yy"
5893  {
5895  (yyval.tree_classdef_methods_list_type) = nullptr;
5896  }
5897 #line 5898 "libinterp/parse-tree/oct-parse.cc"
5898  break;
5899 
5900  case 276: /* methods_list: methods_list1 opt_sep */
5901 #line 2136 "../libinterp/parse-tree/oct-parse.yy"
5902  {
5903  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5904 
5906  (yyval.tree_classdef_methods_list_type) = (yyvsp[-1].tree_classdef_methods_list_type);
5907  }
5908 #line 5909 "libinterp/parse-tree/oct-parse.cc"
5909  break;
5910 
5911  case 277: /* methods_list1: method */
5912 #line 2145 "../libinterp/parse-tree/oct-parse.yy"
5913  { (yyval.tree_classdef_methods_list_type) = parser.make_classdef_methods_list ((yyvsp[0].tree_function_def_type)); }
5914 #line 5915 "libinterp/parse-tree/oct-parse.cc"
5915  break;
5916 
5917  case 278: /* methods_list1: methods_list1 opt_sep method */
5918 #line 2147 "../libinterp/parse-tree/oct-parse.yy"
5919  {
5920  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5921 
5922  (yyval.tree_classdef_methods_list_type) = parser.append_classdef_method ((yyvsp[-2].tree_classdef_methods_list_type), (yyvsp[0].tree_function_def_type));
5923  }
5924 #line 5925 "libinterp/parse-tree/oct-parse.cc"
5925  break;
5926 
5927  case 279: /* events_block: events_beg stash_comment opt_sep attr_list events_list END */
5928 #line 2155 "../libinterp/parse-tree/oct-parse.yy"
5929  {
5930  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5931 
5932  octave::comment_list *lc = (yyvsp[-4].comment_type);
5933  octave::comment_list *tc = lexer.get_comment ();
5934 
5935  if (! ((yyval.tree_classdef_events_block_type) = parser.make_classdef_events_block
5936  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_events_list_type), (yyvsp[0].tok_val), lc, tc)))
5937  {
5938  // make_classdef_events_block deleted $4, $5,
5939  // LC, and TC.
5940  YYABORT;
5941  }
5942  }
5943 #line 5944 "libinterp/parse-tree/oct-parse.cc"
5944  break;
5945 
5946  case 280: /* events_beg: EVENTS */
5947 #line 2172 "../libinterp/parse-tree/oct-parse.yy"
5948  {
5950  (yyval.tok_val) = (yyvsp[0].tok_val);
5951  }
5952 #line 5953 "libinterp/parse-tree/oct-parse.cc"
5953  break;
5954 
5955  case 281: /* events_list: %empty */
5956 #line 2179 "../libinterp/parse-tree/oct-parse.yy"
5957  {
5959  (yyval.tree_classdef_events_list_type) = nullptr;
5960  }
5961 #line 5962 "libinterp/parse-tree/oct-parse.cc"
5962  break;
5963 
5964  case 282: /* events_list: events_list1 opt_sep */
5965 #line 2184 "../libinterp/parse-tree/oct-parse.yy"
5966  {
5967  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5968 
5970  (yyval.tree_classdef_events_list_type) = (yyvsp[-1].tree_classdef_events_list_type);
5971  }
5972 #line 5973 "libinterp/parse-tree/oct-parse.cc"
5973  break;
5974 
5975  case 283: /* events_list1: class_event */
5976 #line 2193 "../libinterp/parse-tree/oct-parse.yy"
5977  { (yyval.tree_classdef_events_list_type) = parser.make_classdef_events_list ((yyvsp[0].tree_classdef_event_type)); }
5978 #line 5979 "libinterp/parse-tree/oct-parse.cc"
5979  break;
5980 
5981  case 284: /* events_list1: events_list1 opt_sep class_event */
5982 #line 2195 "../libinterp/parse-tree/oct-parse.yy"
5983  {
5984  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5985 
5986  (yyval.tree_classdef_events_list_type) = parser.append_classdef_event ((yyvsp[-2].tree_classdef_events_list_type), (yyvsp[0].tree_classdef_event_type));
5987  }
5988 #line 5989 "libinterp/parse-tree/oct-parse.cc"
5989  break;
5990 
5991  case 285: /* class_event: stash_comment identifier */
5992 #line 2203 "../libinterp/parse-tree/oct-parse.yy"
5993  { (yyval.tree_classdef_event_type) = parser.make_classdef_event ((yyvsp[-1].comment_type), (yyvsp[0].tree_identifier_type)); }
5994 #line 5995 "libinterp/parse-tree/oct-parse.cc"
5995  break;
5996 
5997  case 286: /* enum_block: enumeration_beg stash_comment opt_sep attr_list enum_list END */
5998 #line 2207 "../libinterp/parse-tree/oct-parse.yy"
5999  {
6000  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
6001 
6002  octave::comment_list *lc = (yyvsp[-4].comment_type);
6003  octave::comment_list *tc = lexer.get_comment ();
6004 
6005  if (! ((yyval.tree_classdef_enum_block_type) = parser.make_classdef_enum_block
6006  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_enum_list_type), (yyvsp[0].tok_val), lc, tc)))
6007  {
6008  // make_classdef_enum_block deleted $4, $5, LC,
6009  // and TC.
6010  YYABORT;
6011  }
6012  }
6013 #line 6014 "libinterp/parse-tree/oct-parse.cc"
6014  break;
6015 
6016  case 287: /* enumeration_beg: ENUMERATION */
6017 #line 2224 "../libinterp/parse-tree/oct-parse.yy"
6018  {
6020  (yyval.tok_val) = (yyvsp[0].tok_val);
6021  }
6022 #line 6023 "libinterp/parse-tree/oct-parse.cc"
6023  break;
6024 
6025  case 288: /* enum_list: %empty */
6026 #line 2231 "../libinterp/parse-tree/oct-parse.yy"
6027  {
6029  (yyval.tree_classdef_enum_list_type) = nullptr;
6030  }
6031 #line 6032 "libinterp/parse-tree/oct-parse.cc"
6032  break;
6033 
6034  case 289: /* enum_list: enum_list1 opt_sep */
6035 #line 2236 "../libinterp/parse-tree/oct-parse.yy"
6036  {
6037  OCTAVE_YYUSE ((yyvsp[0].punct_type));
6038 
6040  (yyval.tree_classdef_enum_list_type) = (yyvsp[-1].tree_classdef_enum_list_type);
6041  }
6042 #line 6043 "libinterp/parse-tree/oct-parse.cc"
6043  break;
6044 
6045  case 290: /* enum_list1: class_enum */
6046 #line 2245 "../libinterp/parse-tree/oct-parse.yy"
6047  { (yyval.tree_classdef_enum_list_type) = parser.make_classdef_enum_list ((yyvsp[0].tree_classdef_enum_type)); }
6048 #line 6049 "libinterp/parse-tree/oct-parse.cc"
6049  break;
6050 
6051  case 291: /* enum_list1: enum_list1 opt_sep class_enum */
6052 #line 2247 "../libinterp/parse-tree/oct-parse.yy"
6053  {
6054  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
6055 
6056  (yyval.tree_classdef_enum_list_type) = parser.append_classdef_enum ((yyvsp[-2].tree_classdef_enum_list_type), (yyvsp[0].tree_classdef_enum_type));
6057  }
6058 #line 6059 "libinterp/parse-tree/oct-parse.cc"
6059  break;
6060 
6061  case 292: /* class_enum: stash_comment identifier '(' expression ')' */
6062 #line 2255 "../libinterp/parse-tree/oct-parse.yy"
6063  {
6064  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
6065 
6066  (yyval.tree_classdef_enum_type) = parser.make_classdef_enum ((yyvsp[-3].tree_identifier_type), (yyvsp[-1].tree_expression_type), (yyvsp[-4].comment_type));
6067  }
6068 #line 6069 "libinterp/parse-tree/oct-parse.cc"
6069  break;
6070 
6071  case 293: /* stmt_begin: %empty */
6072 #line 2267 "../libinterp/parse-tree/oct-parse.yy"
6073  {
6074  (yyval.dummy_type) = 0;
6076  }
6077 #line 6078 "libinterp/parse-tree/oct-parse.cc"
6078  break;
6079 
6080  case 294: /* anon_fcn_begin: %empty */
6081 #line 2274 "../libinterp/parse-tree/oct-parse.yy"
6082  {
6083  (yyval.dummy_type) = 0;
6086  }
6087 #line 6088 "libinterp/parse-tree/oct-parse.cc"
6088  break;
6089 
6090  case 295: /* stash_comment: %empty */
6091 #line 2282 "../libinterp/parse-tree/oct-parse.yy"
6092  { (yyval.comment_type) = lexer.get_comment (); }
6093 #line 6094 "libinterp/parse-tree/oct-parse.cc"
6094  break;
6095 
6096  case 296: /* parse_error: LEXICAL_ERROR */
6097 #line 2286 "../libinterp/parse-tree/oct-parse.yy"
6098  {
6099  (yyval.dummy_type) = 0;
6100  std::string msg = (yyvsp[0].tok_val)->text ();
6101  parser.bison_error (msg.c_str ());
6102  }
6103 #line 6104 "libinterp/parse-tree/oct-parse.cc"
6104  break;
6105 
6106  case 297: /* parse_error: error */
6107 #line 2292 "../libinterp/parse-tree/oct-parse.yy"
6108  { (yyval.dummy_type) = 0; }
6109 #line 6110 "libinterp/parse-tree/oct-parse.cc"
6110  break;
6111 
6112  case 298: /* sep_no_nl: ',' */
6113 #line 2296 "../libinterp/parse-tree/oct-parse.yy"
6114  {
6115  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6116 
6117  (yyval.punct_type) = ',';
6118  }
6119 #line 6120 "libinterp/parse-tree/oct-parse.cc"
6120  break;
6121 
6122  case 299: /* sep_no_nl: ';' */
6123 #line 2302 "../libinterp/parse-tree/oct-parse.yy"
6124  {
6125  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6126 
6127  (yyval.punct_type) = ';';
6128  }
6129 #line 6130 "libinterp/parse-tree/oct-parse.cc"
6130  break;
6131 
6132  case 300: /* sep_no_nl: sep_no_nl ',' */
6133 #line 2308 "../libinterp/parse-tree/oct-parse.yy"
6134  {
6135  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6136 
6137  (yyval.punct_type) = (yyvsp[-1].punct_type);
6138  }
6139 #line 6140 "libinterp/parse-tree/oct-parse.cc"
6140  break;
6141 
6142  case 301: /* sep_no_nl: sep_no_nl ';' */
6143 #line 2314 "../libinterp/parse-tree/oct-parse.yy"
6144  {
6145  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6146 
6147  (yyval.punct_type) = (yyvsp[-1].punct_type);
6148  }
6149 #line 6150 "libinterp/parse-tree/oct-parse.cc"
6150  break;
6151 
6152  case 302: /* opt_sep_no_nl: %empty */
6153 #line 2322 "../libinterp/parse-tree/oct-parse.yy"
6154  { (yyval.punct_type) = 0; }
6155 #line 6156 "libinterp/parse-tree/oct-parse.cc"
6156  break;
6157 
6158  case 303: /* opt_sep_no_nl: sep_no_nl */
6159 #line 2324 "../libinterp/parse-tree/oct-parse.yy"
6160  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6161 #line 6162 "libinterp/parse-tree/oct-parse.cc"
6162  break;
6163 
6164  case 304: /* opt_nl: %empty */
6165 #line 2328 "../libinterp/parse-tree/oct-parse.yy"
6166  { (yyval.punct_type) = 0; }
6167 #line 6168 "libinterp/parse-tree/oct-parse.cc"
6168  break;
6169 
6170  case 305: /* opt_nl: nl */
6171 #line 2330 "../libinterp/parse-tree/oct-parse.yy"
6172  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6173 #line 6174 "libinterp/parse-tree/oct-parse.cc"
6174  break;
6175 
6176  case 306: /* nl: '\n' */
6177 #line 2334 "../libinterp/parse-tree/oct-parse.yy"
6178  {
6179  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6180 
6181  (yyval.punct_type) = '\n';
6182  }
6183 #line 6184 "libinterp/parse-tree/oct-parse.cc"
6184  break;
6185 
6186  case 307: /* nl: nl '\n' */
6187 #line 2340 "../libinterp/parse-tree/oct-parse.yy"
6188  {
6189  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6190 
6191  (yyval.punct_type) = (yyvsp[-1].punct_type);
6192  }
6193 #line 6194 "libinterp/parse-tree/oct-parse.cc"
6194  break;
6195 
6196  case 308: /* sep: ',' */
6197 #line 2348 "../libinterp/parse-tree/oct-parse.yy"
6198  {
6199  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6200 
6201  (yyval.punct_type) = ',';
6202  }
6203 #line 6204 "libinterp/parse-tree/oct-parse.cc"
6204  break;
6205 
6206  case 309: /* sep: ';' */
6207 #line 2354 "../libinterp/parse-tree/oct-parse.yy"
6208  {
6209  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6210 
6211  (yyval.punct_type) = ';';
6212  }
6213 #line 6214 "libinterp/parse-tree/oct-parse.cc"
6214  break;
6215 
6216  case 310: /* sep: '\n' */
6217 #line 2360 "../libinterp/parse-tree/oct-parse.yy"
6218  {
6219  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6220 
6221  (yyval.punct_type) = '\n';
6222  }
6223 #line 6224 "libinterp/parse-tree/oct-parse.cc"
6224  break;
6225 
6226  case 311: /* sep: sep ',' */
6227 #line 2366 "../libinterp/parse-tree/oct-parse.yy"
6228  {
6229  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6230 
6231  (yyval.punct_type) = (yyvsp[-1].punct_type);
6232  }
6233 #line 6234 "libinterp/parse-tree/oct-parse.cc"
6234  break;
6235 
6236  case 312: /* sep: sep ';' */
6237 #line 2372 "../libinterp/parse-tree/oct-parse.yy"
6238  {
6239  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6240 
6241  (yyval.punct_type) = (yyvsp[-1].punct_type);
6242  }
6243 #line 6244 "libinterp/parse-tree/oct-parse.cc"
6244  break;
6245 
6246  case 313: /* sep: sep '\n' */
6247 #line 2378 "../libinterp/parse-tree/oct-parse.yy"
6248  {
6249  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6250 
6251  (yyval.punct_type) = (yyvsp[-1].punct_type);
6252  }
6253 #line 6254 "libinterp/parse-tree/oct-parse.cc"
6254  break;
6255 
6256  case 314: /* opt_sep: %empty */
6257 #line 2386 "../libinterp/parse-tree/oct-parse.yy"
6258  { (yyval.punct_type) = 0; }
6259 #line 6260 "libinterp/parse-tree/oct-parse.cc"
6260  break;
6261 
6262  case 315: /* opt_sep: sep */
6263 #line 2388 "../libinterp/parse-tree/oct-parse.yy"
6264  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6265 #line 6266 "libinterp/parse-tree/oct-parse.cc"
6266  break;
6267 
6268 
6269 #line 6270 "libinterp/parse-tree/oct-parse.cc"
6270 
6271  default: break;
6272  }
6273  /* User semantic actions sometimes alter yychar, and that requires
6274  that yytoken be updated with the new translation. We take the
6275  approach of translating immediately before every use of yytoken.
6276  One alternative is translating here after every semantic action,
6277  but that translation would be missed if the semantic action invokes
6278  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
6279  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
6280  incorrect destructor might then be invoked immediately. In the
6281  case of YYERROR or YYBACKUP, subsequent parser actions might lead
6282  to an incorrect destructor call or verbose syntax error message
6283  before the lookahead is translated. */
6284  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
6285 
6286  YYPOPSTACK (yylen);
6287  yylen = 0;
6288 
6289  *++yyvsp = yyval;
6290 
6291  /* Now 'shift' the result of the reduction. Determine what state
6292  that goes to, based on the state we popped back to and the rule
6293  number reduced by. */
6294  {
6295  const int yylhs = yyr1[yyn] - YYNTOKENS;
6296  const int yyi = yypgoto[yylhs] + *yyssp;
6297  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
6298  ? yytable[yyi]
6299  : yydefgoto[yylhs]);
6300  }
6301 
6302  goto yynewstate;
6303 
6304 
6305 /*--------------------------------------.
6306 | yyerrlab -- here on detecting error. |
6307 `--------------------------------------*/
6308 yyerrlab:
6309  /* Make sure we have latest lookahead translation. See comments at
6310  user semantic actions for why this is necessary. */
6311  yytoken = yychar == OCTAVE_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
6312  /* If not already recovering from an error, report this error. */
6313  if (!yyerrstatus)
6314  {
6315  ++yynerrs;
6316  yyerror (parser, YY_("syntax error"));
6317  }
6318 
6319  if (yyerrstatus == 3)
6320  {
6321  /* If just tried and failed to reuse lookahead token after an
6322  error, discard it. */
6323 
6324  if (yychar <= OCTAVE_EOF)
6325  {
6326  /* Return failure if at end of input. */
6327  if (yychar == OCTAVE_EOF)
6328  YYABORT;
6329  }
6330  else
6331  {
6332  yydestruct ("Error: discarding",
6333  yytoken, &yylval, parser);
6334  yychar = OCTAVE_EMPTY;
6335  }
6336  }
6337 
6338  /* Else will try to reuse lookahead token after shifting the error
6339  token. */
6340  goto yyerrlab1;
6341 
6342 
6343 /*---------------------------------------------------.
6344 | yyerrorlab -- error raised explicitly by YYERROR. |
6345 `---------------------------------------------------*/
6346 yyerrorlab:
6347  /* Pacify compilers when the user code never invokes YYERROR and the
6348  label yyerrorlab therefore never appears in user code. */
6349  if (0)
6350  YYERROR;
6351  ++yynerrs;
6352 
6353  /* Do not reclaim the symbols of the rule whose action triggered
6354  this YYERROR. */
6355  YYPOPSTACK (yylen);
6356  yylen = 0;
6358  yystate = *yyssp;
6359  goto yyerrlab1;
6360 
6361 
6362 /*-------------------------------------------------------------.
6363 | yyerrlab1 -- common code for both syntax error and YYERROR. |
6364 `-------------------------------------------------------------*/
6365 yyerrlab1:
6366  yyerrstatus = 3; /* Each real token shifted decrements this. */
6367 
6368  /* Pop stack until we find a state that shifts the error token. */
6369  for (;;)
6370  {
6371  yyn = yypact[yystate];
6372  if (!yypact_value_is_default (yyn))
6373  {
6374  yyn += YYSYMBOL_YYerror;
6375  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
6376  {
6377  yyn = yytable[yyn];
6378  if (0 < yyn)
6379  break;
6380  }
6381  }
6382 
6383  /* Pop the current state because it cannot handle the error token. */
6384  if (yyssp == yyss)
6385  YYABORT;
6386 
6387 
6388  yydestruct ("Error: popping",
6390  YYPOPSTACK (1);
6391  yystate = *yyssp;
6393  }
6394 
6396  *++yyvsp = yylval;
6398 
6399 
6400  /* Shift the error token. */
6401  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
6402 
6403  yystate = yyn;
6404  goto yynewstate;
6405 
6406 
6407 /*-------------------------------------.
6408 | yyacceptlab -- YYACCEPT comes here. |
6409 `-------------------------------------*/
6410 yyacceptlab:
6411  yyresult = 0;
6412  goto yyreturnlab;
6413 
6414 
6415 /*-----------------------------------.
6416 | yyabortlab -- YYABORT comes here. |
6417 `-----------------------------------*/
6418 yyabortlab:
6419  yyresult = 1;
6420  goto yyreturnlab;
6421 
6422 
6423 /*-----------------------------------------------------------.
6424 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
6425 `-----------------------------------------------------------*/
6426 yyexhaustedlab:
6427  yyerror (parser, YY_("memory exhausted"));
6428  yyresult = 2;
6429  goto yyreturnlab;
6430 
6431 
6432 /*----------------------------------------------------------.
6433 | yyreturnlab -- parsing is finished, clean up and return. |
6434 `----------------------------------------------------------*/
6435 yyreturnlab:
6436  if (yychar != OCTAVE_EMPTY)
6437  {
6438  /* Make sure we have latest lookahead translation. See comments at
6439  user semantic actions for why this is necessary. */
6440  yytoken = YYTRANSLATE (yychar);
6441  yydestruct ("Cleanup: discarding lookahead",
6442  yytoken, &yylval, parser);
6443  }
6444  /* Do not reclaim the symbols of the rule whose action triggered
6445  this YYABORT or YYACCEPT. */
6446  YYPOPSTACK (yylen);
6448  while (yyssp != yyss)
6449  {
6450  yydestruct ("Cleanup: popping",
6452  YYPOPSTACK (1);
6453  }
6454  yyps->yynew = 2;
6455  goto yypushreturn;
6456 
6457 
6458 /*-------------------------.
6459 | yypushreturn -- return. |
6460 `-------------------------*/
6461 yypushreturn:
6462 
6463  return yyresult;
6464 }
6465 #undef octave_nerrs
6466 #undef yystate
6467 #undef yyerrstatus
6468 #undef yyssa
6469 #undef yyss
6470 #undef yyssp
6471 #undef yyvsa
6472 #undef yyvs
6473 #undef yyvsp
6474 #undef yystacksize
6475 #line 2391 "../libinterp/parse-tree/oct-parse.yy"
6476 
6477 
6478 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
6479  // Restore prevailing warning state for remainder of the file.
6480 # pragma GCC diagnostic pop
6481 #endif
6482 
6483 // Generic error messages.
6484 
6485 #undef lexer
6486 #undef scanner
6487 
6488 static void
6489 yyerror (octave::base_parser& parser, const char *s)
6490 {
6491  parser.bison_error (s);
6492 }
6493 
6495 
6496  class parse_exception : public std::runtime_error
6497  {
6498  public:
6499 
6500  parse_exception (const std::string& message,
6501  const std::string& fcn_name = "",
6502  const std::string& file_name = "",
6503  int line = -1, int column = -1)
6504  : runtime_error (message), m_message (message),
6505  m_fcn_name (fcn_name), m_file_name (file_name),
6506  m_line (line), m_column (column)
6507  { }
6508 
6509  parse_exception (const parse_exception&) = default;
6510 
6511  parse_exception& operator = (const parse_exception&) = default;
6512 
6513  ~parse_exception (void) = default;
6514 
6515  std::string message (void) const { return m_message; }
6516 
6517  // Provided for std::exception interface.
6518  const char * what (void) const noexcept { return m_message.c_str (); }
6519 
6520  std::string fcn_name (void) const { return m_fcn_name; }
6521  std::string file_name (void) const { return m_file_name; }
6522 
6523  int line (void) const { return m_line; }
6524  int column (void) const { return m_column; }
6525 
6526  // virtual void display (std::ostream& os) const;
6527 
6528  private:
6529 
6530  std::string m_message;
6531 
6532  std::string m_fcn_name;
6533  std::string m_file_name;
6534  int m_line;
6536  };
6537 
6539  {
6540  public:
6541 
6543  : m_scope (), m_error_list ()
6544  { }
6545 
6547 
6549 
6550  ~parse_tree_validator (void) = default;
6551 
6552  symbol_scope get_scope (void) const { return m_scope; }
6553 
6554  bool ok (void) const { return m_error_list.empty (); }
6555 
6556  std::list<parse_exception> error_list (void) const
6557  {
6558  return m_error_list;
6559  }
6560 
6562  {
6563  unwind_protect_var<symbol_scope> restore_var (m_scope, script.scope ());
6564 
6565  tree_statement_list *stmt_list = script.body ();
6566 
6567  if (stmt_list)
6568  stmt_list->accept (*this);
6569  }
6570 
6572  {
6573  unwind_protect_var<symbol_scope> restore_var (m_scope, fcn.scope ());
6574 
6575  tree_statement_list *stmt_list = fcn.body ();
6576 
6577  if (stmt_list)
6578  stmt_list->accept (*this);
6579 
6580  std::map<std::string, octave_value> subfcns = fcn.subfunctions ();
6581 
6582  if (! subfcns.empty ())
6583  {
6584  for (auto& nm_val : subfcns)
6585  {
6586  octave_user_function *subfcn
6587  = nm_val.second.user_function_value ();
6588 
6589  if (subfcn)
6590  subfcn->accept (*this);
6591  }
6592  }
6593  }
6594 
6596  {
6597  if (idx_expr.is_word_list_cmd ())
6598  {
6599  std::string sym_nm = idx_expr.name ();
6600 
6601  if (m_scope.is_variable (sym_nm))
6602  {
6603  std::string message
6604  = sym_nm + ": invalid use of symbol as both variable and command";
6607  idx_expr.line (), idx_expr.column ());
6608 
6609  m_error_list.push_back (pe);
6610  }
6611  }
6612  }
6613 
6614  private:
6615 
6617 
6618  std::list<parse_exception> m_error_list;
6619  };
6620 
6621  template <typename LIST_T, typename ELT_T>
6622  static LIST_T *
6623  list_append (LIST_T *list, ELT_T elt)
6624  {
6625  list->append (elt);
6626  return list;
6627  }
6628 
6629  std::size_t
6631  {
6632  return m_info.size ();
6633  }
6634 
6635  void
6637  {
6638  m_info.push_back (elt);
6639  }
6640 
6641  void
6643  {
6644  push (value_type (scope, ""));
6645  }
6646 
6647  void
6649  {
6650  m_info.pop_back ();
6651  }
6652 
6653  bool
6655  {
6656  // Name can't be the same as any parent function or any other
6657  // function we've already seen. We could maintain a complex
6658  // tree structure of names, or we can just store the set of
6659  // full names of all the functions, which must be unique.
6660 
6661  std::string full_name;
6662 
6663  for (std::size_t i = 0; i < size()-1; i++)
6664  {
6665  const value_type& elt = m_info[i];
6666 
6667  if (name == elt.second)
6668  return false;
6669 
6670  full_name += elt.second + ">";
6671  }
6672 
6673  full_name += name;
6674 
6675  if (m_all_names.find (full_name) != m_all_names.end ())
6676  {
6677  // Return false (failure) if we are parsing a subfunction, local
6678  // function, or nested function. Otherwise, it is OK to have a
6679  // duplicate name.
6680 
6681  return ! (m_parser.parsing_subfunctions ()
6682  || m_parser.parsing_local_functions ()
6683  || m_parser.curr_fcn_depth () > 0);
6684  }
6685 
6686  m_all_names.insert (full_name);
6687 
6688  return true;
6689  }
6690 
6691  bool
6693  {
6694  if (! name_ok (name))
6695  return false;
6696 
6697  if (size () > 0)
6698  m_info.back().second = name;
6699 
6700  return true;
6701  }
6702 
6703  symbol_scope
6705  {
6706  return size () > 1 ? m_info[size()-2].first : symbol_scope ();
6707  }
6708 
6709  std::string
6711  {
6712  return m_info[size()-2].second;
6713  }
6714 
6716  {
6717  m_info.clear ();
6718  m_all_names.clear ();
6719  }
6720 
6722  : m_endfunction_found (false), m_autoloading (false),
6729  { }
6730 
6732  {
6733  delete &m_lexer;
6734 
6735  // FIXME: Deleting the internal Bison parser state structure does
6736  // not clean up any partial parse trees in the event of an interrupt or
6737  // error. It's not clear how to safely do that with the C language
6738  // parser that Bison generates. The C++ language parser that Bison
6739  // generates would do it for us automatically whenever an exception
6740  // is thrown while parsing input, but there is currently no C++
6741  // interface for a push parser.
6742 
6743  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6744  }
6745 
6746  void
6748  {
6749  m_endfunction_found = false;
6750  m_autoloading = false;
6752  m_parsing_subfunctions = false;
6753  m_parsing_local_functions = false;
6754  m_max_fcn_depth = -1;
6755  m_curr_fcn_depth = -1;
6757  m_curr_class_name = "";
6758  m_curr_package_name = "";
6761  m_subfunction_names.clear ();
6762  m_classdef_object.reset ();
6763  m_stmt_list.reset ();
6764 
6765  m_lexer.reset ();
6766 
6767  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6769  }
6770 
6771  // Error messages for mismatched end tokens.
6772 
6773  static std::string
6775  {
6776  std::string retval = "<unknown>";
6777 
6778  switch (ettype)
6779  {
6780  case token::simple_end:
6781  retval = "end";
6782  break;
6783 
6784  case token::classdef_end:
6785  retval = "endclassdef";
6786  break;
6787 
6789  retval = "endenumeration";
6790  break;
6791 
6792  case token::events_end:
6793  retval = "endevents";
6794  break;
6795 
6796  case token::for_end:
6797  retval = "endfor";
6798  break;
6799 
6800  case token::function_end:
6801  retval = "endfunction";
6802  break;
6803 
6804  case token::if_end:
6805  retval = "endif";
6806  break;
6807 
6808  case token::methods_end:
6809  retval = "endmethods";
6810  break;
6811 
6812  case token::parfor_end:
6813  retval = "endparfor";
6814  break;
6815 
6816  case token::properties_end:
6817  retval = "endproperties";
6818  break;
6819 
6820  case token::spmd_end:
6821  retval = "endspmd";
6822  break;
6823 
6824  case token::switch_end:
6825  retval = "endswitch";
6826  break;
6827 
6828  case token::try_catch_end:
6829  retval = "end_try_catch";
6830  break;
6831 
6833  retval = "end_unwind_protect";
6834  break;
6835 
6836  case token::while_end:
6837  retval = "endwhile";
6838  break;
6839 
6840  default:
6841  panic_impossible ();
6842  break;
6843  }
6844 
6845  return retval;
6846  }
6847 
6848  void
6849  base_parser::statement_list (std::shared_ptr<tree_statement_list>& lst)
6850  {
6851  if (! lst)
6852  return;
6853 
6854  if (m_stmt_list)
6855  {
6856  // Append additional code to existing statement list.
6857 
6858  while (! lst->empty ())
6859  {
6860  m_stmt_list->push_back (lst->front ());
6861  lst->pop_front ();
6862  }
6863  }
6864  else
6865  m_stmt_list = lst;
6866  }
6867 
6868  void
6870  {
6871  std::string msg = ("'" + end_token_as_string (expected)
6872  + "' command matched by '"
6873  + end_token_as_string (tok->ettype ()) + "'");
6874 
6875  bison_error (msg, tok->beg_pos ());
6876  }
6877 
6878  // Check to see that end tokens are properly matched.
6879 
6880  bool
6882  {
6883  token::end_tok_type ettype = tok->ettype ();
6884 
6885  return ettype == expected || ettype == token::simple_end;
6886  }
6887 
6888  bool
6890  {
6891  m_curr_fcn_depth++;
6892 
6895 
6896  // Will get a real name later.
6897  m_lexer.m_symtab_context.push (symbol_scope ("parser:push_fcn_symtab"));
6899 
6902  {
6905  }
6906 
6908  {
6909  bison_error ("nested functions not implemented in this context");
6910 
6911  return false;
6912  }
6913 
6914  return true;
6915  }
6916 
6917  // Make a constant.
6918 
6919  tree_constant *
6921  {
6922  int l = tok_val->line ();
6923  int c = tok_val->column ();
6924 
6925  int op = tok_val->token_value ();
6926 
6927  tree_constant *retval = nullptr;
6928 
6929  switch (op)
6930  {
6931  case ':':
6932  {
6934  retval = new tree_constant (tmp);
6935  }
6936  break;
6937 
6938  case NUMBER:
6939  {
6940  retval = new tree_constant (tok_val->number (), l, c);
6941  retval->stash_original_text (tok_val->text_rep ());
6942  }
6943  break;
6944 
6945  case DQ_STRING:
6946  case SQ_STRING:
6947  {
6948  std::string txt = tok_val->text ();
6949 
6950  char delim = op == DQ_STRING ? '"' : '\'';
6951  octave_value tmp (txt, delim);
6952 
6953  if (txt.empty ())
6954  {
6955  if (op == DQ_STRING)
6957  else
6959  }
6960 
6961  retval = new tree_constant (tmp, l, c);
6962 
6963  if (op == DQ_STRING)
6964  txt = undo_string_escapes (txt);
6965 
6966  // FIXME: maybe this should also be handled by
6967  // tok_val->text_rep () for character strings?
6968  retval->stash_original_text (delim + txt + delim);
6969  }
6970  break;
6971 
6972  default:
6973  panic_impossible ();
6974  break;
6975  }
6976 
6977  return retval;
6978  }
6979 
6980  tree_black_hole *
6982  {
6983  return new tree_black_hole ();
6984  }
6985 
6986  // Make a function handle.
6987 
6988  tree_fcn_handle *
6990  {
6991  int l = tok_val->line ();
6992  int c = tok_val->column ();
6993 
6994  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
6995 
6996  return retval;
6997  }
6998 
6999  // Make an anonymous function handle.
7000 
7003  tree_expression *expr,
7004  const filepos& at_pos)
7005  {
7006  // FIXME: We need to examine EXPR and issue an error if any
7007  // sub-expression contains an assignment, compound assignment,
7008  // increment, or decrement operator.
7009 
7010  anon_fcn_validator validator (param_list, expr);
7011 
7012  if (! validator.ok ())
7013  {
7014  delete param_list;
7015  delete expr;
7016 
7017  bison_error (validator.message (), validator.line (),
7018  validator.column ());
7019 
7020  return nullptr;
7021  }
7022 
7025 
7027 
7028  expr->set_print_flag (false);
7029 
7030  fcn_scope.mark_static ();
7031 
7032  int at_line = at_pos.line ();
7033  int at_column = at_pos.column ();
7034 
7035  tree_anon_fcn_handle *retval
7036  = new tree_anon_fcn_handle (param_list, expr, fcn_scope,
7037  parent_scope, at_line, at_column);
7038 
7039  std::ostringstream buf;
7040 
7041  tree_print_code tpc (buf);
7042 
7043  retval->accept (tpc);
7044 
7045  std::string file = m_lexer.m_fcn_file_full_name;
7046  if (! file.empty ())
7047  buf << ": file: " << file;
7048  else if (m_lexer.input_from_terminal ())
7049  buf << ": *terminal input*";
7050  else if (m_lexer.input_from_eval_string ())
7051  buf << ": *eval string*";
7052  buf << ": line: " << at_line << " column: " << at_column;
7053 
7054  std::string scope_name = buf.str ();
7055 
7056  fcn_scope.cache_name (scope_name);
7057 
7058  // FIXME: Stash the filename. This does not work and produces
7059  // errors when executed.
7060  //retval->stash_file_name (m_lexer.m_fcn_file_name);
7061 
7062  return retval;
7063  }
7064 
7065  // Build a colon expression.
7066 
7067  tree_expression *
7069  tree_expression *limit,
7070  tree_expression *incr)
7071  {
7072  tree_expression *retval = nullptr;
7073 
7074  if (! base || ! limit)
7075  {
7076  delete base;
7077  delete limit;
7078  delete incr;
7079 
7080  return retval;
7081  }
7082 
7083  int l = base->line ();
7084  int c = base->column ();
7085 
7086  tree_colon_expression *expr
7087  = new tree_colon_expression (base, limit, incr, l, c);
7088 
7089  retval = expr;
7090 
7091  if (base->is_constant () && limit->is_constant ()
7092  && (! incr || incr->is_constant ()))
7093  {
7094  interpreter& interp = __get_interpreter__ ();
7095 
7096  try
7097  {
7098  // If the evaluation generates a warning message, restore
7099  // the previous value of last_warning_message and skip the
7100  // conversion to a constant value.
7101 
7102  error_system& es = interp.get_error_system ();
7103 
7104  unwind_action restore_last_warning_message
7106  es.last_warning_message (""));
7107 
7108  unwind_action restore_discard_warning_messages
7110  es.discard_warning_messages (true));
7111 
7112  tree_evaluator& tw = interp.get_evaluator ();
7113 
7114  octave_value tmp = expr->evaluate (tw);
7115 
7116  std::string msg = es.last_warning_message ();
7117 
7118  if (msg.empty ())
7119  {
7120  tree_constant *tc_retval
7121  = new tree_constant (tmp, expr->line (), expr->column ());
7122 
7123  std::ostringstream buf;
7124 
7125  tree_print_code tpc (buf);
7126 
7127  expr->accept (tpc);
7128 
7129  tc_retval->stash_original_text (buf.str ());
7130 
7131  delete expr;
7132 
7133  retval = tc_retval;
7134  }
7135  }
7136  catch (const execution_exception&)
7137  {
7138  interp.recover_from_exception ();
7139  }
7140  }
7141 
7142  return retval;
7143  }
7144 
7145  // Build a binary expression.
7146 
7147  tree_expression *
7149  token *tok_val, tree_expression *op2)
7150  {
7152 
7153  switch (op)
7154  {
7155  case POW:
7157  break;
7158 
7159  case EPOW:
7161  break;
7162 
7163  case '+':
7165  break;
7166 
7167  case '-':
7169  break;
7170 
7171  case '*':
7173  break;
7174 
7175  case '/':
7177  break;
7178 
7179  case EMUL:
7181  break;
7182 
7183  case EDIV:
7185  break;
7186 
7187  case LEFTDIV:
7189  break;
7190 
7191  case ELEFTDIV:
7193  break;
7194 
7195  case EXPR_LT:
7196  t = octave_value::op_lt;
7197  break;
7198 
7199  case EXPR_LE:
7200  t = octave_value::op_le;
7201  break;
7202 
7203  case EXPR_EQ:
7204  t = octave_value::op_eq;
7205  break;
7206 
7207  case EXPR_GE:
7208  t = octave_value::op_ge;
7209  break;
7210 
7211  case EXPR_GT:
7212  t = octave_value::op_gt;
7213  break;
7214 
7215  case EXPR_NE:
7216  t = octave_value::op_ne;
7217  break;
7218 
7219  case EXPR_AND:
7221  break;
7222 
7223  case EXPR_OR:
7225  break;
7226 
7227  default:
7228  panic_impossible ();
7229  break;
7230  }
7231 
7232  int l = tok_val->line ();
7233  int c = tok_val->column ();
7234 
7235  return maybe_compound_binary_expression (op1, op2, l, c, t);
7236  }
7237 
7238  void
7240  {
7241  if (expr->is_binary_expression ())
7242  {
7243  tree_binary_expression *binexp
7244  = dynamic_cast<tree_binary_expression *> (expr);
7245 
7246  tree_expression *lhs = binexp->lhs ();
7247  tree_expression *rhs = binexp->rhs ();
7248 
7251 
7252  // Operands may have changed.
7253  binexp->lhs (lhs);
7254  binexp->rhs (rhs);
7255 
7256  octave_value::binary_op op_type = binexp->op_type ();
7257  if (op_type == octave_value::op_el_and
7258  || op_type == octave_value::op_el_or)
7259  {
7260  binexp->preserve_operands ();
7261 
7262  int line = expr->line ();
7263  int column = expr->column ();
7264 
7265  delete expr;
7266 
7268  (lhs, rhs, line, column, op_type);
7269  }
7270  }
7271  }
7272 
7273  // Build a boolean expression.
7274 
7275  tree_expression *
7277  token *tok_val, tree_expression *op2)
7278  {
7280 
7281  switch (op)
7282  {
7283  case EXPR_AND_AND:
7285  break;
7286 
7287  case EXPR_OR_OR:
7289  break;
7290 
7291  default:
7292  panic_impossible ();
7293  break;
7294  }
7295 
7296  int l = tok_val->line ();
7297  int c = tok_val->column ();
7298 
7299  return new tree_boolean_expression (op1, op2, l, c, t);
7300  }
7301 
7302  // Build a prefix expression.
7303 
7304  tree_expression *
7306  {
7308 
7309  switch (op)
7310  {
7311  case '~':
7312  case '!':
7314  break;
7315 
7316  case '+':
7318  break;
7319 
7320  case '-':
7322  break;
7323 
7324  case PLUS_PLUS:
7326  break;
7327 
7328  case MINUS_MINUS:
7330  break;
7331 
7332  default:
7333  panic_impossible ();
7334  break;
7335  }
7336 
7337  int l = tok_val->line ();
7338  int c = tok_val->column ();
7339 
7340  return new tree_prefix_expression (op1, l, c, t);
7341  }
7342 
7343  // Build a postfix expression.
7344 
7345  tree_expression *
7347  {
7349 
7350  switch (op)
7351  {
7352  case HERMITIAN:
7354  break;
7355 
7356  case TRANSPOSE:
7358  break;
7359 
7360  case PLUS_PLUS:
7362  break;
7363 
7364  case MINUS_MINUS:
7366  break;
7367 
7368  default:
7369  panic_impossible ();
7370  break;
7371  }
7372 
7373  int l = tok_val->line ();
7374  int c = tok_val->column ();
7375 
7376  return new tree_postfix_expression (op1, l, c, t);
7377  }
7378 
7379  // Build an unwind-protect command.
7380 
7381  tree_command *
7383  tree_statement_list *body,
7384  tree_statement_list *cleanup_stmts,
7385  token *end_tok,
7386  comment_list *lc,
7387  comment_list *mc)
7388  {
7389  tree_command *retval = nullptr;
7390 
7391  if (end_token_ok (end_tok, token::unwind_protect_end))
7392  {
7394 
7395  int l = unwind_tok->line ();
7396  int c = unwind_tok->column ();
7397 
7398  retval = new tree_unwind_protect_command (body, cleanup_stmts,
7399  lc, mc, tc, l, c);
7400  }
7401  else
7402  {
7403  delete body;
7404  delete cleanup_stmts;
7405 
7407  }
7408 
7409  return retval;
7410  }
7411 
7412  // Build a try-catch command.
7413 
7414  tree_command *
7416  tree_statement_list *body,
7417  char catch_sep,
7418  tree_statement_list *cleanup_stmts,
7419  token *end_tok,
7420  comment_list *lc,
7421  comment_list *mc)
7422  {
7423  tree_command *retval = nullptr;
7424 
7425  if (end_token_ok (end_tok, token::try_catch_end))
7426  {
7428 
7429  int l = try_tok->line ();
7430  int c = try_tok->column ();
7431 
7432  tree_identifier *id = nullptr;
7433 
7434  if (! catch_sep && cleanup_stmts && ! cleanup_stmts->empty ())
7435  {
7436  tree_statement *stmt = cleanup_stmts->front ();
7437 
7438  if (stmt)
7439  {
7440  tree_expression *expr = stmt->expression ();
7441 
7442  if (expr && expr->is_identifier ())
7443  {
7444  id = dynamic_cast<tree_identifier *> (expr);
7445 
7446  cleanup_stmts->pop_front ();
7447 
7448  stmt->set_expression (nullptr);
7449  delete stmt;
7450  }
7451  }
7452  }
7453 
7454  retval = new tree_try_catch_command (body, cleanup_stmts, id,
7455  lc, mc, tc, l, c);
7456  }
7457  else
7458  {
7459  delete body;
7460  delete cleanup_stmts;
7461 
7463  }
7464 
7465  return retval;
7466  }
7467 
7468  // Build a while command.
7469 
7470  tree_command *
7472  tree_expression *expr,
7473  tree_statement_list *body,
7474  token *end_tok,
7475  comment_list *lc)
7476  {
7477  tree_command *retval = nullptr;
7478 
7480 
7481  if (end_token_ok (end_tok, token::while_end))
7482  {
7484 
7485  m_lexer.m_looping--;
7486 
7487  int l = while_tok->line ();
7488  int c = while_tok->column ();
7489 
7490  retval = new tree_while_command (expr, body, lc, tc, l, c);
7491  }
7492  else
7493  {
7494  delete expr;
7495  delete body;
7496 
7497  end_token_error (end_tok, token::while_end);
7498  }
7499 
7500  return retval;
7501  }
7502 
7503  // Build a do-until command.
7504 
7505  tree_command *
7507  tree_statement_list *body,
7508  tree_expression *expr,
7509  comment_list *lc)
7510  {
7512 
7514 
7515  m_lexer.m_looping--;
7516 
7517  int l = until_tok->line ();
7518  int c = until_tok->column ();
7519 
7520  return new tree_do_until_command (expr, body, lc, tc, l, c);
7521  }
7522 
7523  // Build a for command.
7524 
7525  tree_command *
7526  base_parser::make_for_command (int tok_id, token *for_tok,
7527  tree_argument_list *lhs,
7528  tree_expression *expr,
7529  tree_expression *maxproc,
7530  tree_statement_list *body,
7531  token *end_tok,
7532  comment_list *lc)
7533  {
7534  tree_command *retval = nullptr;
7535 
7536  bool parfor = tok_id == PARFOR;
7537 
7538  if (end_token_ok (end_tok, parfor ? token::parfor_end : token::for_end))
7539  {
7540  expr->mark_as_for_cmd_expr ();
7541 
7543 
7544  m_lexer.m_looping--;
7545 
7546  int l = for_tok->line ();
7547  int c = for_tok->column ();
7548 
7549  if (lhs->length () == 1)
7550  {
7551  tree_expression *tmp = lhs->remove_front ();
7552 
7553  m_lexer.mark_as_variable (tmp->name ());
7554 
7555  retval = new tree_simple_for_command (parfor, tmp, expr, maxproc,
7556  body, lc, tc, l, c);
7557 
7558  delete lhs;
7559  }
7560  else
7561  {
7562  if (parfor)
7563  {
7564  delete lhs;
7565  delete expr;
7566  delete maxproc;
7567  delete body;
7568 
7569  bison_error ("invalid syntax for parfor statement");
7570  }
7571 
7573 
7574  retval = new tree_complex_for_command (lhs, expr, body,
7575  lc, tc, l, c);
7576  }
7577  }
7578  else
7579  {
7580  delete lhs;
7581  delete expr;
7582  delete maxproc;
7583  delete body;
7584 
7585  end_token_error (end_tok, parfor ? token::parfor_end : token::for_end);
7586  }
7587 
7588  return retval;
7589  }
7590 
7591  // Build a break command.
7592 
7593  tree_command *
7595  {
7596  int l = break_tok->line ();
7597  int c = break_tok->column ();
7598 
7599  if (! m_lexer.m_looping)
7600  {
7601  bison_error ("break must appear within a loop");
7602  return nullptr;
7603  }
7604  else
7605  return new tree_break_command (l, c);
7606  }
7607 
7608  // Build a continue command.
7609 
7610  tree_command *
7612  {
7613  int l = continue_tok->line ();
7614  int c = continue_tok->column ();
7615 
7616  if (! m_lexer.m_looping)
7617  {
7618  bison_error ("continue must appear within a loop");
7619  return nullptr;
7620  }
7621  else
7622  return new tree_continue_command (l, c);
7623  }
7624 
7625  // Build a return command.
7626 
7627  tree_command *
7629  {
7630  int l = return_tok->line ();
7631  int c = return_tok->column ();
7632 
7633  return new tree_return_command (l, c);
7634  }
7635 
7636  // Build an spmd command.
7637 
7640  token *end_tok, comment_list *lc,
7641  comment_list *tc)
7642  {
7643  tree_spmd_command *retval = nullptr;
7644 
7645  if (end_token_ok (end_tok, token::spmd_end))
7646  {
7647  int l = spmd_tok->line ();
7648  int c = spmd_tok->column ();
7649 
7650  retval = new tree_spmd_command (body, lc, tc, l, c);
7651  }
7652  else
7653  {
7654  delete body;
7655  delete lc;
7656  delete tc;
7657 
7658  end_token_error (end_tok, token::spmd_end);
7659  }
7660 
7661  return retval;
7662  }
7663 
7664  // Start an if command.
7665 
7668  tree_statement_list *list)
7669  {
7671 
7672  // Line and column will be set in finish_if_command.
7673 
7674  tree_if_clause *t = new tree_if_clause (expr, list);
7675 
7676  return new tree_if_command_list (t);
7677  }
7678 
7679  // Finish an if command.
7680 
7681  tree_if_command *
7683  tree_if_command_list *list,
7684  token *end_tok,
7685  comment_list *lc)
7686  {
7687  tree_if_command *retval = nullptr;
7688 
7689  if (end_token_ok (end_tok, token::if_end))
7690  {
7692 
7693  int l = if_tok->line ();
7694  int c = if_tok->column ();
7695 
7696  if (list && ! list->empty ())
7697  {
7698  tree_if_clause *elt = list->front ();
7699 
7700  if (elt)
7701  {
7702  elt->line (l);
7703  elt->column (c);
7704  }
7705  }
7706 
7707  retval = new tree_if_command (list, lc, tc, l, c);
7708  }
7709  else
7710  {
7711  delete list;
7712 
7713  end_token_error (end_tok, token::if_end);
7714  }
7715 
7716  return retval;
7717  }
7718 
7719  // Build an elseif clause.
7720 
7721  tree_if_clause *
7723  tree_expression *expr,
7724  tree_statement_list *list,
7725  comment_list *lc)
7726  {
7728 
7729  int l = elseif_tok->line ();
7730  int c = elseif_tok->column ();
7731 
7732  return new tree_if_clause (expr, list, lc, l, c);
7733  }
7734 
7735  tree_if_clause *
7737  tree_statement_list *list)
7738  {
7739  int l = else_tok->line ();
7740  int c = else_tok->column ();
7741 
7742  return new tree_if_clause (list, lc, l, c);
7743  }
7744 
7747  tree_if_clause *clause)
7748  {
7749  return list_append (list, clause);
7750  }
7751 
7752  // Finish a switch command.
7753 
7756  tree_expression *expr,
7757  tree_switch_case_list *list,
7758  token *end_tok,
7759  comment_list *lc)
7760  {
7761  tree_switch_command *retval = nullptr;
7762 
7763  if (end_token_ok (end_tok, token::switch_end))
7764  {
7766 
7767  int l = switch_tok->line ();
7768  int c = switch_tok->column ();
7769 
7770  if (list && ! list->empty ())
7771  {
7772  tree_switch_case *elt = list->front ();
7773 
7774  if (elt)
7775  {
7776  elt->line (l);
7777  elt->column (c);
7778  }
7779  }
7780 
7781  retval = new tree_switch_command (expr, list, lc, tc, l, c);
7782  }
7783  else
7784  {
7785  delete expr;
7786  delete list;
7787 
7789  }
7790 
7791  return retval;
7792  }
7793 
7796  {
7797  return new tree_switch_case_list (switch_case);
7798  }
7799 
7800  // Build a switch case.
7801 
7804  tree_expression *expr,
7805  tree_statement_list *list,
7806  comment_list *lc)
7807  {
7809 
7810  int l = case_tok->line ();
7811  int c = case_tok->column ();
7812 
7813  return new tree_switch_case (expr, list, lc, l, c);
7814  }
7815 
7818  tree_statement_list *list)
7819  {
7820  int l = default_tok->line ();
7821  int c = default_tok->column ();
7822 
7823  return new tree_switch_case (list, lc, l, c);
7824  }
7825 
7828  tree_switch_case *elt)
7829  {
7830  return list_append (list, elt);
7831  }
7832 
7833  // Build an assignment to a variable.
7834 
7835  tree_expression *
7837  token *eq_tok, tree_expression *rhs)
7838  {
7840 
7841  switch (op)
7842  {
7843  case '=':
7845  break;
7846 
7847  case ADD_EQ:
7849  break;
7850 
7851  case SUB_EQ:
7853  break;
7854 
7855  case MUL_EQ:
7857  break;
7858 
7859  case DIV_EQ:
7861  break;
7862 
7863  case LEFTDIV_EQ:
7865  break;
7866 
7867  case POW_EQ:
7869  break;
7870 
7871  case EMUL_EQ:
7873  break;
7874 
7875  case EDIV_EQ:
7877  break;
7878 
7879  case ELEFTDIV_EQ:
7881  break;
7882 
7883  case EPOW_EQ:
7885  break;
7886 
7887  case AND_EQ:
7889  break;
7890 
7891  case OR_EQ:
7893  break;
7894 
7895  default:
7896  panic_impossible ();
7897  break;
7898  }
7899 
7900  int l = eq_tok->line ();
7901  int c = eq_tok->column ();
7902 
7903  if (! lhs->is_simple_assign_lhs () && t != octave_value::op_asn_eq)
7904  {
7905  // Multiple assignments like [x,y] OP= rhs are only valid for
7906  // '=', not '+=', etc.
7907 
7908  delete lhs;
7909  delete rhs;
7910 
7911  bison_error ("computed multiple assignment not allowed",
7912  eq_tok->beg_pos ());
7913 
7914  return nullptr;
7915  }
7916 
7917  if (lhs->is_simple_assign_lhs ())
7918  {
7919  // We are looking at a simple assignment statement like x = rhs;
7920 
7921  tree_expression *tmp = lhs->remove_front ();
7922 
7923  if ((tmp->is_identifier () || tmp->is_index_expression ())
7924  && iskeyword (tmp->name ()))
7925  {
7926  std::string kw = tmp->name ();
7927 
7928  delete tmp;
7929  delete lhs;
7930  delete rhs;
7931 
7932  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7933  eq_tok->beg_pos ());
7934 
7935  return nullptr;
7936  }
7937 
7938  delete lhs;
7939 
7940  m_lexer.mark_as_variable (tmp->name ());
7941 
7942  return new tree_simple_assignment (tmp, rhs, false, l, c, t);
7943  }
7944  else
7945  {
7946  std::list<std::string> names = lhs->variable_names ();
7947 
7948  for (const auto& kw : names)
7949  {
7950  if (iskeyword (kw))
7951  {
7952  delete lhs;
7953  delete rhs;
7954 
7955  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7956  eq_tok->beg_pos ());
7957 
7958  return nullptr;
7959  }
7960  }
7961 
7962  m_lexer.mark_as_variables (names);
7963 
7964  return new tree_multi_assignment (lhs, rhs, false, l, c);
7965  }
7966  }
7967 
7968  void
7970  tree_statement *end_script)
7971  {
7972  if (! cmds)
7973  cmds = new tree_statement_list ();
7974 
7975  cmds->append (end_script);
7976 
7977  symbol_scope script_scope = m_lexer.m_symtab_context.curr_scope ();
7978 
7979  script_scope.cache_name (m_lexer.m_fcn_file_full_name);
7981  script_scope.cache_dir_name (m_lexer.m_dir_name);
7982 
7983  octave_user_script *script
7985  m_lexer.m_fcn_file_name, script_scope,
7986  cmds, m_lexer.m_help_text);
7987 
7989  m_lexer.m_help_text = "";
7990 
7991  sys::time now;
7992 
7993  script->stash_fcn_file_time (now);
7994  script->stash_dir_name (m_lexer.m_dir_name);
7995 
7996  m_primary_fcn = octave_value (script);
7997  }
7998 
7999  tree_identifier *
8001  {
8002  std::string id_name = id->name ();
8003 
8004  // Make classdef local functions unique from classdef methods.
8005 
8007  id_name = m_lexer.m_fcn_file_name + ">" + id_name;
8008 
8009  if (! m_function_scopes.name_current_scope (id_name))
8010  {
8011  bison_error ("duplicate subfunction or nested function name",
8012  id->line (), id->column ());
8013 
8014  delete id;
8015  return nullptr;
8016  }
8017 
8019  curr_scope.cache_name (id_name);
8020 
8021  m_lexer.m_parsed_function_name.top () = true;
8023 
8024  return id;
8025  }
8026 
8027  // Define a function.
8028 
8029  // FIXME: combining start_function, finish_function, and
8030  // recover_from_parsing_function should be possible, but it makes
8031  // for a large mess. Maybe this could be a bit better organized?
8032 
8035  tree_parameter_list *ret_list,
8036  tree_identifier *id,
8037  tree_parameter_list *param_list,
8038  tree_statement_list *body,
8039  tree_statement *end_fcn_stmt,
8040  comment_list *lc)
8041  {
8042  int l = fcn_tok->line ();
8043  int c = fcn_tok->column ();
8044 
8045  octave_user_function *tmp_fcn
8046  = start_function (id, param_list, body, end_fcn_stmt);
8047 
8048  tree_function_def *retval = finish_function (ret_list, tmp_fcn, lc, l, c);
8049 
8051 
8052  return retval;
8053  }
8054 
8055  // Begin defining a function.
8056 
8059  tree_parameter_list *param_list,
8060  tree_statement_list *body,
8061  tree_statement *end_fcn_stmt)
8062  {
8063  // We'll fill in the return list later.
8064 
8065  std::string id_name = id->name ();
8066 
8067  delete id;
8068 
8070  id_name.insert (0, "get.");
8072  id_name.insert (0, "set.");
8073 
8076 
8077  if (! body)
8078  body = new tree_statement_list ();
8079 
8080  body->append (end_fcn_stmt);
8081 
8084  param_list, nullptr, body);
8085 
8087 
8088  fcn->stash_trailing_comment (tc);
8089  fcn->stash_fcn_end_location (end_fcn_stmt->line (),
8090  end_fcn_stmt->column ());
8091 
8092  // If input is coming from a file, issue a warning if the name of
8093  // the file does not match the name of the function stated in the
8094  // file. Matlab doesn't provide a diagnostic (it ignores the stated
8095  // name).
8098  {
8099  // FIXME: should m_lexer.m_fcn_file_name already be
8100  // preprocessed when we get here? It seems to only be a
8101  // problem with relative filenames.
8102 
8103  std::string nm = m_lexer.m_fcn_file_name;
8104 
8105  std::size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
8106 
8107  if (pos != std::string::npos)
8108  nm = m_lexer.m_fcn_file_name.substr (pos+1);
8109 
8110  if (nm != id_name)
8111  {
8113  ("Octave:function-name-clash",
8114  "function name '%s' does not agree with function filename '%s'",
8115  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
8116 
8117  id_name = nm;
8118  }
8119  }
8120 
8121  sys::time now;
8122 
8124  fcn->stash_fcn_file_time (now);
8127  fcn->mark_as_system_fcn_file ();
8128  fcn->stash_function_name (id_name);
8129 
8131  {
8133  fcn->mark_relative ();
8134 
8136  {
8138  {
8139  if (m_curr_class_name == id_name)
8141  else
8142  fcn->mark_as_classdef_method ();
8143  }
8144  else
8145  {
8146  if (m_curr_class_name == id_name)
8148  else
8149  fcn->mark_as_legacy_method ();
8150  }
8151 
8153  }
8154 
8155  std::string nm = fcn->fcn_file_name ();
8156 
8157  sys::file_stat fs (nm);
8158 
8159  if (fs && fs.is_newer (now))
8160  warning_with_id ("Octave:future-time-stamp",
8161  "time stamp for '%s' is in the future", nm.c_str ());
8162  }
8163  else if (! m_lexer.input_from_tmp_history_file ()
8164  && ! m_lexer.m_force_script
8166  && m_lexer.m_fcn_file_name == id_name)
8167  {
8168  warning ("function '%s' defined within script file '%s'",
8169  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
8170  }
8171 
8172  // Record help text for functions other than nested functions.
8173  // We cannot currently record help for nested functions (bug #46008)
8174  // because the doc_string of the outermost function is read first,
8175  // whereas this function is called for the innermost function first.
8176  // We could have a stack of help_text in lexer.
8177  if (! m_lexer.m_help_text.empty () && m_curr_fcn_depth == 0)
8178  {
8179  fcn->document (m_lexer.m_help_text);
8180 
8181  m_lexer.m_help_text = "";
8182  }
8183 
8186  m_primary_fcn = octave_value (fcn);
8187 
8188  return fcn;
8189  }
8190 
8191  tree_statement *
8192  base_parser::make_end (const std::string& type, bool eof,
8193  const filepos& beg_pos, const filepos& /*end_pos*/)
8194  {
8195  int l = beg_pos.line ();
8196  int c = beg_pos.column ();
8197 
8198  return make_statement (new tree_no_op_command (type, eof, l, c));
8199  }
8200 
8203  octave_user_function *fcn,
8204  comment_list *lc,
8205  int l, int c)
8206  {
8207  tree_function_def *retval = nullptr;
8208 
8209  if (! ret_list)
8211 
8212  ret_list->mark_as_formal_parameters ();
8213 
8214  if (fcn)
8215  {
8216  std::string fcn_nm = fcn->name ();
8217  std::string file = fcn->fcn_file_name ();
8218 
8219  std::string tmp = fcn_nm;
8220  if (! file.empty ())
8221  tmp += ": " + file;
8222 
8223  symbol_scope fcn_scope = fcn->scope ();
8224  fcn_scope.cache_name (tmp);
8225  fcn_scope.cache_fcn_name (fcn_nm);
8226  fcn_scope.cache_fcn_file_name (file);
8227  fcn_scope.cache_dir_name (m_lexer.m_dir_name);
8228 
8229  if (lc)
8230  fcn->stash_leading_comment (lc);
8231 
8232  fcn->define_ret_list (ret_list);
8233 
8235  {
8236  fcn->stash_fcn_location (l, c);
8237 
8238  octave_value ov_fcn (fcn);
8239 
8241  {
8242  fcn->mark_as_nested_function ();
8243  fcn_scope.set_nesting_depth (m_curr_fcn_depth);
8244 
8246  fcn_scope.set_parent (pscope);
8248 
8249  pscope.install_nestfunction (fcn_nm, ov_fcn, fcn_scope);
8250 
8251  // For nested functions, the list of parent functions is
8252  // set in symbol_scope::update_nest.
8253  }
8254  else
8255  {
8256  fcn->mark_as_subfunction ();
8257  m_subfunction_names.push_back (fcn_nm);
8258 
8259  fcn_scope.set_parent (m_primary_fcn_scope);
8262 
8263  m_primary_fcn_scope.install_subfunction (fcn_nm, ov_fcn);
8264  }
8265  }
8266 
8267  if (m_curr_fcn_depth == 0)
8268  fcn_scope.update_nest ();
8269 
8271  {
8272  // We are either reading a script file or defining a function
8273  // at the command line, so this definition creates a
8274  // tree_function object that is placed in the parse tree.
8275  // Otherwise, it is just inserted in the symbol table,
8276  // either as a subfunction or nested function (see above),
8277  // or as the primary function for the file, via
8278  // m_primary_fcn (see also load_fcn_from_file,,
8279  // parse_fcn_file, and
8280  // fcn_info::fcn_info_rep::find_user_function).
8281 
8283  {
8285  fcn->time_parsed ());
8287  }
8288 
8289  retval = new tree_function_def (fcn, l, c);
8290  }
8291  }
8292 
8293  return retval;
8294  }
8295 
8298  tree_statement_list *list)
8299  {
8300  if (list)
8301  {
8302  for (const auto& elt : *list)
8303  list_append (body, elt);
8304 
8305  list->clear ();
8306  delete (list);
8307  }
8308 
8309  return body;
8310  }
8311 
8314  tree_args_block_attribute_list *attr_list,
8315  tree_args_block_validation_list *validation_list,
8316  token *end_tok,
8317  comment_list *lc, comment_list *tc)
8318  {
8319  tree_arguments_block *retval = nullptr;
8320 
8321  if (end_token_ok (end_tok, token::arguments_end))
8322  {
8323  filepos beg_pos = arguments_tok->beg_pos ();
8324 
8325  int l = beg_pos.line ();
8326  int c = beg_pos.column ();
8327 
8328  retval = new tree_arguments_block (attr_list, validation_list, l, c);
8329  }
8330  else
8331  {
8332  delete attr_list;
8333  delete validation_list;
8334 
8335  delete lc;
8336  delete tc;
8337  }
8338 
8339  return retval;
8340  }
8341 
8344  tree_identifier *class_name,
8345  tree_arg_validation_fcns *validation_fcns,
8346  tree_expression *default_value)
8347  {
8348  // FIXME: Validate arguments and convert to more specific types
8349  // (std::string for arg_name and class_name, etc).
8350 
8351  return new tree_arg_validation (size_spec, class_name,
8352  validation_fcns, default_value);
8353  }
8354 
8357  {
8358  // FIXME: Validate argument and convert to more specific type
8359  // (std::string for attribute_name).
8360 
8361  return new tree_args_block_attribute_list (attribute_name);
8362  }
8363 
8366  {
8367  return new tree_args_block_validation_list (arg_validation);
8368  }
8369 
8372  tree_arg_validation *arg_validation)
8373  {
8374  return list_append (list, arg_validation);
8375  }
8376 
8379  {
8380  // FIXME: Validate argument.
8381 
8382  return new tree_arg_size_spec (size_args);
8383  }
8384 
8387  {
8388  // FIXME: Validate argument.
8389 
8390  return new tree_arg_validation_fcns (fcn_args);
8391  }
8392 
8393  void
8395  {
8397 
8400  m_parsing_subfunctions = true;
8401 
8402  m_curr_fcn_depth--;
8404 
8409  }
8410 
8411  // A CLASSDEF block defines a class that has a constructor and other
8412  // methods, but it is not an executable command. Parsing the block
8413  // makes some changes in the symbol table (inserting the constructor
8414  // and methods, and adding to the list of known objects) and creates
8415  // a parse tree containing meta information about the class.
8416 
8417  // LC contains comments appearing before the classdef keyword.
8418  // TC contains comments appearing between the classdef elements
8419  // and the final end token for the classdef block.
8420 
8421  tree_classdef *
8424  tree_identifier *id,
8426  tree_classdef_body *body, token *end_tok,
8427  comment_list *lc, comment_list *tc)
8428  {
8429  tree_classdef *retval = nullptr;
8430 
8432 
8433  std::string cls_name = id->name ();
8434 
8435  std::string full_name = m_lexer.m_fcn_file_full_name;
8436  std::string short_name = m_lexer.m_fcn_file_name;
8437 
8438  std::size_t pos
8439  = short_name.find_last_of (sys::file_ops::dir_sep_chars ());
8440 
8441  if (pos != std::string::npos)
8442  short_name = short_name.substr (pos+1);
8443 
8444  if (short_name != cls_name)
8445  {
8446  int l = id->line ();
8447  int c = id->column ();
8448 
8449  delete a;
8450  delete id;
8451  delete sc;
8452  delete body;
8453  delete lc;
8454  delete tc;
8455 
8456  bison_error ("invalid classdef definition, the class name must match the filename", l, c);
8457 
8458  }
8459  else
8460  {
8461  if (end_token_ok (end_tok, token::classdef_end))
8462  {
8463  int l = tok_val->line ();
8464  int c = tok_val->column ();
8465 
8466  if (! body)
8467  body = new tree_classdef_body ();
8468 
8470  a, id, sc, body, lc, tc,
8471  m_curr_package_name, full_name, l, c);
8472  }
8473  else
8474  {
8475  delete a;
8476  delete id;
8477  delete sc;
8478  delete body;
8479  delete lc;
8480  delete tc;
8481 
8483  }
8484  }
8485 
8486  return retval;
8487  }
8488 
8489  // LC contains comments appearing before the properties keyword.
8490  // If this properties block appears first in the list of classdef
8491  // elements, this comment list will be used for the help text for the
8492  // classdef block.
8493 
8494  // TC contains comments appearing between the list of properties
8495  // and the final end token for the properties block and may be used to
8496  // find the doc string for the final property in the list.
8497 
8502  token *end_tok,
8503  comment_list *lc,
8504  comment_list *tc)
8505  {
8506  tree_classdef_properties_block *retval = nullptr;
8507 
8508  if (end_token_ok (end_tok, token::properties_end))
8509  {
8510  int l = tok_val->line ();
8511  int c = tok_val->column ();
8512 
8513  if (plist)
8514  {
8515  // If the element at the end of the list doesn't have a doc
8516  // string, see whether the first element of TC is an
8517  // end-of-line comment for us to use.
8518 
8519  if (tc)
8520  {
8521  tree_classdef_property *last_elt = plist->back ();
8522 
8523  if (! last_elt->have_doc_string ())
8524  {
8525  comment_elt first_comment_elt = tc->front ();
8526 
8527  if (first_comment_elt.is_end_of_line ())
8528  {
8529  std::string eol_comment = first_comment_elt.text ();
8530 
8531  last_elt->doc_string (eol_comment);
8532  }
8533  }
8534  }
8535  }
8536  else
8537  plist = new tree_classdef_property_list ();
8538 
8539  retval = new tree_classdef_properties_block (a, plist, lc, tc, l, c);
8540  }
8541  else
8542  {
8543  delete a;
8544  delete plist;
8545  delete lc;
8546  delete tc;
8547 
8549  }
8550 
8551  return retval;
8552  }
8553 
8556  {
8557  return new tree_classdef_property_list (prop);
8558  }
8559 
8562  tree_arg_validation *av)
8563  {
8564  av->arg_name (id);
8565 
8566  if (av->size_spec () || av->class_name () || av->validation_fcns ())
8567  warning ("size, class, and validation function specifications are not yet supported for classdef properties; INCORRECT RESULTS ARE POSSIBLE!");
8568 
8569  return new tree_classdef_property (av, lc);
8570  }
8571 
8572  // LC contains comments appearing before the methods keyword.
8573  // If this methods block appears first in the list of classdef
8574  // elements, this comment list will be used for the help text for the
8575  // classdef block.
8576 
8581  token *end_tok, comment_list *lc,
8582  comment_list *tc)
8583  {
8584  tree_classdef_methods_block *retval = nullptr;
8585 
8586  if (end_token_ok (end_tok, token::methods_end))
8587  {
8588  int l = tok_val->line ();
8589  int c = tok_val->column ();
8590 
8591  if (! mlist)
8592  mlist = new tree_classdef_methods_list ();
8593 
8594  retval = new tree_classdef_methods_block (a, mlist, lc, tc, l, c);
8595  }
8596  else
8597  {
8598  delete a;
8599  delete mlist;
8600  delete lc;
8601  delete tc;
8602 
8604  }
8605 
8606  return retval;
8607  }
8608 
8609  // LC contains comments appearing before the events keyword.
8610  // If this events block appears first in the list of classdef
8611  // elements, this comment list will be used for the help text for the
8612  // classdef block.
8613 
8614  // TC contains comments appearing between the list of events and
8615  // the final end token for the events block and may be used to find
8616  // the doc string for the final event in the list.
8617 
8622  token *end_tok,
8623  comment_list *lc,
8624  comment_list *tc)
8625  {
8626  tree_classdef_events_block *retval = nullptr;
8627 
8628  if (end_token_ok (end_tok, token::events_end))
8629  {
8630  int l = tok_val->line ();
8631  int c = tok_val->column ();
8632 
8633  if (! elist)
8634  elist = new tree_classdef_events_list ();
8635 
8636  retval = new tree_classdef_events_block (a, elist, lc, tc, l, c);
8637  }
8638  else
8639  {
8640  delete a;
8641  delete elist;
8642  delete lc;
8643  delete tc;
8644 
8646  }
8647 
8648  return retval;
8649  }
8650 
8653  {
8654  return new tree_classdef_events_list (e);
8655  }
8656 
8659  {
8660  return new tree_classdef_event (id, lc);
8661  }
8662 
8663  // LC contains comments appearing before the enumeration keyword.
8664  // If this enumeration block appears first in the list of classdef
8665  // elements, this comment list will be used for the help text for the
8666  // classdef block.
8667 
8668  // TC contains comments appearing between the list of
8669  // enumerations and the final end token for the enumeration block and
8670  // may be used to find the doc string for the final enumeration in the
8671  // list.
8672 
8676  tree_classdef_enum_list *elist,
8677  token *end_tok,
8678  comment_list *lc,
8679  comment_list *tc)
8680  {
8681  tree_classdef_enum_block *retval = nullptr;
8682 
8683  if (end_token_ok (end_tok, token::enumeration_end))
8684  {
8685  int l = tok_val->line ();
8686  int c = tok_val->column ();
8687 
8688  if (! elist)
8689  elist = new tree_classdef_enum_list ();
8690 
8691  retval = new tree_classdef_enum_block (a, elist, lc, tc, l, c);
8692  }
8693  else
8694  {
8695  delete a;
8696  delete elist;
8697  delete lc;
8698  delete tc;
8699 
8701  }
8702 
8703  return retval;
8704  }
8705 
8708  {
8709  return new tree_classdef_enum_list (e);
8710  }
8711 
8714  comment_list *lc)
8715  {
8716  return new tree_classdef_enum (id, expr, lc);
8717  }
8718 
8722  {
8723  return list_append (list, elt);
8724  }
8725 
8728  tree_classdef_event *elt)
8729  {
8730  return list_append (list, elt);
8731  }
8732 
8735  tree_classdef_enum *elt)
8736  {
8737  return list_append (list, elt);
8738  }
8739 
8742  {
8743  return new tree_classdef_superclass_list (sc);
8744  }
8745 
8748  {
8749  return new tree_classdef_superclass (fqident->text ());
8750  }
8751 
8755  {
8756  return list_append (list, elt);
8757  }
8758 
8761  {
8762  return new tree_classdef_attribute_list (attr);
8763  }
8764 
8767  tree_expression *expr)
8768  {
8769  return (expr
8770  ? new tree_classdef_attribute (id, expr)
8771  : new tree_classdef_attribute (id));
8772  }
8773 
8776  {
8777  return new tree_classdef_attribute (id, false);
8778  }
8779 
8783  {
8784  return list_append (list, elt);
8785  }
8786 
8789  {
8790  return new tree_classdef_body (pb);
8791  }
8792 
8795  {
8796  return new tree_classdef_body (mb);
8797  }
8798 
8801  {
8802  return new tree_classdef_body (evb);
8803  }
8804 
8807  {
8808  return new tree_classdef_body (enb);
8809  }
8810 
8814  {
8815  return list_append (body, block);
8816  }
8817 
8821  {
8822  return list_append (body, block);
8823  }
8824 
8828  {
8829  return list_append (body, block);
8830  }
8831 
8834  tree_classdef_enum_block *block)
8835  {
8836  return list_append (body, block);
8837  }
8838 
8841  tree_parameter_list *pl)
8842  {
8843  octave_user_function* retval = nullptr;
8844 
8845  // External methods are only allowed within @-folders. In this case,
8846  // m_curr_class_name will be non-empty.
8847 
8848  if (! m_curr_class_name.empty ())
8849  {
8850 
8851  std::string mname = id->name ();
8852 
8853  // Methods that cannot be declared outside the classdef file:
8854  // - methods with '.' character (e.g. property accessors)
8855  // - class constructor
8856  // - 'delete'
8857 
8858  if (mname.find_first_of (".") == std::string::npos
8859  && mname != "delete"
8860  && mname != m_curr_class_name)
8861  {
8862  // Create a dummy function that is used until the real method
8863  // is loaded.
8864 
8865  retval = new octave_user_function (symbol_scope (), pl);
8866 
8867  retval->stash_function_name (mname);
8868 
8869  int l = id->line ();
8870  int c = id->column ();
8871 
8872  retval->stash_fcn_location (l, c);
8873  }
8874  else
8875  bison_error ("invalid external method declaration, an external "
8876  "method cannot be the class constructor, 'delete' "
8877  "or have a dot (.) character in its name");
8878  }
8879  else
8880  bison_error ("external methods are only allowed in @-folders");
8881 
8882  if (! retval)
8883  delete id;
8884 
8885  return retval;
8886  }
8887 
8890  tree_parameter_list *ret_list,
8891  comment_list *cl)
8892  {
8893  if (! ret_list)
8895 
8896  fcn->define_ret_list (ret_list);
8897 
8898  if (cl)
8899  fcn->stash_leading_comment (cl);
8900 
8901  int l = fcn->beginning_line ();
8902  int c = fcn->beginning_column ();
8903 
8904  return new tree_function_def (fcn, l, c);
8905  }
8906 
8909  {
8910  octave_value fcn;
8911 
8912  if (fcn_def)
8913  fcn = fcn_def->function ();
8914 
8915  delete fcn_def;
8916 
8917  return new tree_classdef_methods_list (fcn);
8918  }
8919 
8922  tree_function_def *fcn_def)
8923  {
8924  octave_value fcn;
8925 
8926  if (fcn_def)
8927  {
8928  fcn = fcn_def->function ();
8929 
8930  delete fcn_def;
8931  }
8932 
8933  return list_append (list, fcn);
8934  }
8935 
8936  bool
8938  tree_statement_list *local_fcns)
8939  {
8940  parse_tree_validator validator;
8941 
8942  cls->accept (validator);
8943 
8944  if (local_fcns)
8945  {
8946  for (tree_statement *elt : *local_fcns)
8947  {
8948  tree_command *cmd = elt->command ();
8949 
8950  tree_function_def *fcn_def
8951  = dynamic_cast<tree_function_def *> (cmd);
8952 
8953  fcn_def->accept (validator);
8954  }
8955  }
8956 
8957  if (! validator.ok ())
8958  {
8959  delete cls;
8960  delete local_fcns;
8961 
8962  bison_error (validator.error_list ());
8963 
8964  return false;
8965  }
8966 
8967  // Require all validations to succeed before installing any local
8968  // functions or defining the classdef object for later use.
8969 
8970  if (local_fcns)
8971  {
8972  symbol_table& symtab = __get_symbol_table__ ();
8973 
8974  for (tree_statement *elt : *local_fcns)
8975  {
8976  tree_command *cmd = elt->command ();
8977 
8978  tree_function_def *fcn_def
8979  = dynamic_cast<tree_function_def *> (cmd);
8980 
8981  octave_value ov_fcn = fcn_def->function ();
8982  octave_user_function *fcn = ov_fcn.user_function_value ();
8983 
8984  std::string nm = fcn->name ();
8985  std::string file = fcn->fcn_file_name ();
8986 
8987  symtab.install_local_function (nm, ov_fcn, file);
8988  }
8989 
8990  delete local_fcns;
8991  }
8992 
8993  // FIXME: Is it possible for the following condition to be false?
8995  m_classdef_object = std::shared_ptr<tree_classdef> (cls);
8996 
8997  return true;
8998  }
8999 
9000  // Make an index expression.
9001 
9004  tree_argument_list *args,
9005  char type)
9006  {
9007  tree_index_expression *retval = nullptr;
9008 
9009  if (args && args->has_magic_tilde ())
9010  {
9011  delete expr;
9012  delete args;
9013 
9014  bison_error ("invalid use of empty argument (~) in index expression");
9015  }
9016  else
9017  {
9018  int l = expr->line ();
9019  int c = expr->column ();
9020 
9021  if (! expr->is_postfix_indexed ())
9022  expr->set_postfix_index (type);
9023 
9024  if (expr->is_index_expression ())
9025  {
9027  = dynamic_cast<tree_index_expression *> (expr);
9028 
9029  retval = tmp->append (args, type);
9030  }
9031  else
9032  retval = new tree_index_expression (expr, args, l, c, type);
9033  }
9034 
9035  return retval;
9036  }
9037 
9038  // Make an indirect reference expression.
9039 
9042  const std::string& elt)
9043  {
9044  tree_index_expression *retval = nullptr;
9045 
9046  int l = expr->line ();
9047  int c = expr->column ();
9048 
9049  if (! expr->is_postfix_indexed ())
9050  expr->set_postfix_index ('.');
9051 
9052  if (expr->is_index_expression ())
9053  {
9055  = dynamic_cast<tree_index_expression *> (expr);
9056 
9057  retval = tmp->append (elt);
9058  }
9059  else
9060  retval = new tree_index_expression (expr, elt, l, c);
9061 
9063 
9064  return retval;
9065  }
9066 
9067  // Make an indirect reference expression with dynamic field name.
9068 
9071  tree_expression *elt)
9072  {
9073  tree_index_expression *retval = nullptr;
9074 
9075  int l = expr->line ();
9076  int c = expr->column ();
9077 
9078  if (! expr->is_postfix_indexed ())
9079  expr->set_postfix_index ('.');
9080 
9081  if (expr->is_index_expression ())
9082  {
9084  = dynamic_cast<tree_index_expression *> (expr);
9085 
9086  retval = list_append (tmp, elt);
9087  }
9088  else
9089  retval = new tree_index_expression (expr, elt, l, c);
9090 
9092 
9093  return retval;
9094  }
9095 
9096  // Make a declaration command.
9097 
9100  tree_decl_init_list *lst)
9101  {
9102  tree_decl_command *retval = nullptr;
9103 
9104  int l = tok_val->line ();
9105  int c = tok_val->column ();
9106 
9107  if (lst)
9109 
9110  switch (tok)
9111  {
9112  case GLOBAL:
9113  {
9114  retval = new tree_decl_command ("global", lst, l, c);
9115  retval->mark_global ();
9116  }
9117  break;
9118 
9119  case PERSISTENT:
9120  if (m_curr_fcn_depth >= 0)
9121  {
9122  retval = new tree_decl_command ("persistent", lst, l, c);
9123  retval->mark_persistent ();
9124  }
9125  else
9126  {
9128  warning ("ignoring persistent declaration near line %d of file '%s'",
9129  l, m_lexer.m_fcn_file_full_name.c_str ());
9130  else
9131  warning ("ignoring persistent declaration near line %d", l);
9132  }
9133  break;
9134 
9135  default:
9136  panic_impossible ();
9137  break;
9138  }
9139 
9140  return retval;
9141  }
9142 
9145  {
9146  return new tree_decl_init_list (elt);
9147  }
9148 
9151  tree_decl_elt *elt)
9152  {
9153  return list_append (list, elt);
9154  }
9155 
9156  tree_decl_elt *
9158  tree_expression *expr)
9159  {
9160  return expr ? new tree_decl_elt (id, expr) : new tree_decl_elt (id);
9161  }
9162 
9163  bool
9166  {
9167  std::set<std::string> dict;
9168 
9169  for (tree_decl_elt *elt : *lst)
9170  {
9171  tree_identifier *id = elt->ident ();
9172 
9173  if (id)
9174  {
9175  std::string name = id->name ();
9176 
9177  if (id->is_black_hole ())
9178  {
9179  if (type != tree_parameter_list::in)
9180  {
9181  bison_error ("invalid use of ~ in output list");
9182  return false;
9183  }
9184  }
9185  else if (iskeyword (name))
9186  {
9187  bison_error ("invalid use of keyword '" + name
9188  + "' in parameter list");
9189  return false;
9190  }
9191  else if (dict.find (name) != dict.end ())
9192  {
9193  bison_error ("'" + name
9194  + "' appears more than once in parameter list");
9195  return false;
9196  }
9197  else
9198  dict.insert (name);
9199  }
9200  }
9201 
9202  std::string va_type = (type == tree_parameter_list::in
9203  ? "varargin" : "varargout");
9204 
9205  std::size_t len = lst->length ();
9206 
9207  if (len > 0)
9208  {
9209  tree_decl_elt *elt = lst->back ();
9210 
9211  tree_identifier *id = elt->ident ();
9212 
9213  if (id && id->name () == va_type)
9214  {
9215  if (len == 1)
9216  lst->mark_varargs_only ();
9217  else
9218  lst->mark_varargs ();
9219 
9220  tree_parameter_list::iterator p = lst->end ();
9221  --p;
9222  delete *p;
9223  lst->erase (p);
9224  }
9225  }
9226 
9227  return true;
9228  }
9229 
9230  bool
9232  {
9233  bool retval = true;
9234 
9235  tree_array_list *al = dynamic_cast<tree_array_list *> (e);
9236 
9237  for (tree_argument_list* row : *al)
9238  {
9239  if (row && row->has_magic_tilde ())
9240  {
9241  retval = false;
9242 
9243  if (e->is_matrix ())
9244  bison_error ("invalid use of tilde (~) in matrix expression");
9245  else
9246  bison_error ("invalid use of tilde (~) in cell expression");
9247 
9248  break;
9249  }
9250  }
9251 
9252  return retval;
9253  }
9254 
9257  {
9258  tree_argument_list *retval = nullptr;
9259 
9260  if (e->is_constant ())
9261  {
9263 
9264  octave_value ov = e->evaluate (tw);
9265 
9266  delete e;
9267 
9268  if (ov.isempty ())
9269  bison_error ("invalid empty left hand side of assignment");
9270  else
9271  bison_error ("invalid constant left hand side of assignment");
9272  }
9273  else
9274  {
9275  bool is_simple_assign = true;
9276 
9277  tree_argument_list *tmp = nullptr;
9278 
9279  if (e->is_matrix ())
9280  {
9281  tree_matrix *mat = dynamic_cast<tree_matrix *> (e);
9282 
9283  if (mat && mat->size () == 1)
9284  {
9285  tmp = mat->front ();
9286  mat->pop_front ();
9287  delete e;
9288  is_simple_assign = false;
9289  }
9290  }
9291  else
9292  tmp = new tree_argument_list (e);
9293 
9294  if (tmp && tmp->is_valid_lvalue_list ())
9295  {
9297  retval = tmp;
9298  }
9299  else
9300  {
9301  delete tmp;
9302 
9303  bison_error ("invalid left hand side of assignment");
9304  }
9305 
9306  if (retval && is_simple_assign)
9307  retval->mark_as_simple_assign_lhs ();
9308  }
9309 
9310  return retval;
9311  }
9312 
9313  // Finish building an array_list.
9314 
9315  tree_expression *
9317  token */*open_delim*/, token *close_delim)
9318  {
9319  tree_expression *retval = array_list;
9320 
9321  array_list->set_location (close_delim->line (), close_delim->column ());
9322 
9323  if (array_list->all_elements_are_constant ())
9324  {
9325  interpreter& interp = __get_interpreter__ ();
9326 
9327  try
9328  {
9329  // If the evaluation generates a warning message, restore
9330  // the previous value of last_warning_message and skip the
9331  // conversion to a constant value.
9332 
9333  error_system& es = interp.get_error_system ();
9334 
9335  unwind_action restore_last_warning_message
9337  es.last_warning_message (""));
9338 
9339  unwind_action restore_discard_warning_messages
9341  es.discard_warning_messages (true));
9342 
9343  tree_evaluator& tw = interp.get_evaluator ();
9344 
9345  octave_value tmp = array_list->evaluate (tw);
9346 
9347  std::string msg = es.last_warning_message ();
9348 
9349  if (msg.empty ())
9350  {
9351  tree_constant *tc_retval
9352  = new tree_constant (tmp, close_delim->line (),
9353  close_delim->column ());
9354 
9355  std::ostringstream buf;
9356 
9357  tree_print_code tpc (buf);
9358 
9359  array_list->accept (tpc);
9360 
9361  tc_retval->stash_original_text (buf.str ());
9362 
9363  delete array_list;
9364 
9365  retval = tc_retval;
9366  }
9367  }
9368  catch (const execution_exception&)
9369  {
9370  interp.recover_from_exception ();
9371  }
9372  }
9373 
9374  return retval;
9375  }
9376 
9377  // Finish building a matrix list.
9378 
9379  tree_expression *
9381  token *close_delim)
9382  {
9383  return (m
9384  ? finish_array_list (m, open_delim, close_delim)
9386  close_delim->line (), close_delim->column ()));
9387  }
9388 
9389  tree_matrix *
9391  {
9392  return row ? new tree_matrix (row) : nullptr;
9393  }
9394 
9395  tree_matrix *
9397  {
9398  if (! matrix)
9399  return make_matrix (row);
9400 
9401  return row ? list_append (matrix, row) : matrix;
9402  }
9403 
9404  // Finish building a cell list.
9405 
9406  tree_expression *
9408  token *close_delim)
9409  {
9410  return (c
9411  ? finish_array_list (c, open_delim, close_delim)
9412  : new tree_constant (octave_value (Cell ()),
9413  close_delim->line (), close_delim->column ()));
9414  }
9415 
9416  tree_cell *
9418  {
9419  return row ? new tree_cell (row) : nullptr;
9420  }
9421 
9422  tree_cell *
9424  {
9425  if (! cell)
9426  return make_cell (row);
9427 
9428  return row ? list_append (cell, row) : cell;
9429  }
9430 
9431  tree_identifier *
9433  {
9434  // Find the token in the symbol table.
9436 
9437  std::string nm = ident->text ();
9438 
9439  symbol_record sr = (scope ? scope.insert (nm) : symbol_record (nm));
9440 
9441 
9442  int l = ident->line ();
9443  int c = ident->column ();
9444 
9445  return new tree_identifier (sr, l, c);
9446  }
9447 
9450  {
9451  std::string meth = superclassref->superclass_method_name ();
9452  std::string cls = superclassref->superclass_class_name ();
9453 
9454  int l = superclassref->line ();
9455  int c = superclassref->column ();
9456 
9457  return new tree_superclass_ref (meth, cls, l, c);
9458  }
9459 
9462  {
9463  std::string cls = metaquery->text ();
9464 
9465  int l = metaquery->line ();
9466  int c = metaquery->column ();
9467 
9468  return new tree_metaclass_query (cls, l, c);
9469  }
9470 
9473  char sep, bool warn_missing_semi)
9474  {
9475  tree_statement *tmp = list->back ();
9476 
9477  switch (sep)
9478  {
9479  case ';':
9480  tmp->set_print_flag (false);
9481  break;
9482 
9483  case 0:
9484  case ',':
9485  case '\n':
9486  tmp->set_print_flag (true);
9487  if (warn_missing_semi)
9488  maybe_warn_missing_semi (list);
9489  break;
9490 
9491  default:
9492  warning ("unrecognized separator type!");
9493  break;
9494  }
9495 
9496  // Even if a statement is null, we add it to the list then remove it
9497  // here so that the print flag is applied to the correct statement.
9498 
9499  if (tmp->is_null_statement ())
9500  {
9501  list->pop_back ();
9502  delete tmp;
9503  }
9504 
9505  return list;
9506  }
9507 
9508  // Finish building a statement.
9509  template <typename T>
9510  tree_statement *
9512  {
9513  comment_list *comment = m_lexer.get_comment ();
9514 
9515  return new tree_statement (arg, comment);
9516  }
9517 
9520  {
9521  return new tree_statement_list (stmt);
9522  }
9523 
9526  char sep, tree_statement *stmt,
9527  bool warn_missing_semi)
9528  {
9529  set_stmt_print_flag (list, sep, warn_missing_semi);
9530 
9531  return list_append (list, stmt);
9532  }
9533 
9536  {
9537  return new tree_argument_list (expr);
9538  }
9539 
9542  tree_expression *expr)
9543  {
9544  return list_append (list, expr);
9545  }
9546 
9549  {
9550  return new tree_parameter_list (io);
9551  }
9552 
9555  tree_decl_elt *t)
9556  {
9557  return new tree_parameter_list (io, t);
9558  }
9559 
9562  tree_identifier *id)
9563  {
9564  return new tree_parameter_list (io, id);
9565  }
9566 
9569  tree_decl_elt *t)
9570  {
9571  return list_append (list, t);
9572  }
9573 
9576  tree_identifier *id)
9577  {
9578  return list_append (list, new tree_decl_elt (id));
9579  }
9580 
9581  void
9583  {
9585  }
9586 
9587  // FIXME: this function partially duplicates do_dbtype in debug.cc.
9588  static std::string
9589  get_file_line (const std::string& name, int line)
9590  {
9591  // NAME should be an absolute file name and the file should exist.
9592 
9593  std::ifstream fs = sys::ifstream (name.c_str (), std::ios::in);
9594 
9595  std::string text;
9596 
9597  if (fs)
9598  {
9599  int i = 1;
9600 
9601  do
9602  {
9603  if (! std::getline (fs, text))
9604  {
9605  text = "";
9606  break;
9607  }
9608  }
9609  while (i++ < line);
9610  }
9611 
9612  return text;
9613  }
9614 
9615  void
9616  base_parser::bison_error (const std::string& str)
9617  {
9618  bison_error (str, m_lexer.m_filepos);
9619  }
9620 
9621  void
9622  base_parser::bison_error (const std::string& str, const filepos& pos)
9623  {
9624  bison_error (str, pos.line (), pos.column ());
9625  }
9626 
9627  void
9628  base_parser::bison_error (const std::string& str, int err_line, int err_col)
9629  {
9630  std::ostringstream output_buf;
9631 
9634  output_buf << "parse error near line " << err_line
9635  << " of file " << m_lexer.m_fcn_file_full_name;
9636  else
9637  output_buf << "parse error:";
9638 
9639  if (str != "parse error")
9640  output_buf << "\n\n " << str;
9641 
9642  output_buf << "\n\n";
9643 
9644  std::string curr_line;
9645 
9648  curr_line = get_file_line (m_lexer.m_fcn_file_full_name, err_line);
9649  else
9650  curr_line = m_lexer.m_current_input_line;
9651 
9652  // Adjust the error column for display because it is 1-based in the
9653  // lexer for easier reporting.
9654  err_col--;
9655 
9656  if (! curr_line.empty ())
9657  {
9658  // FIXME: we could do better if we just cached lines from the
9659  // input file in a list. See also functions for managing input
9660  // buffers in lex.ll.
9661 
9662  std::size_t len = curr_line.length ();
9663 
9664  if (curr_line[len-1] == '\n')
9665  curr_line.resize (len-1);
9666 
9667  // Print the line, maybe with a pointer near the error token.
9668 
9669  output_buf << ">>> " << curr_line << "\n";
9670 
9671  if (err_col == 0)
9672  err_col = len;
9673 
9674  for (int i = 0; i < err_col + 3; i++)
9675  output_buf << " ";
9676 
9677  output_buf << "^";
9678  }
9679 
9680  output_buf << "\n";
9681 
9682  m_parse_error_msg = output_buf.str ();
9683  }
9684 
9685  void
9687  {
9688  bison_error (pe.message (), pe.line (), pe.column ());
9689  }
9690 
9691  void
9692  base_parser::bison_error (const std::list<parse_exception>& pe_list)
9693  {
9694  // For now, we just report the first error found. Reporting all
9695  // errors will require a bit more refactoring.
9696 
9697  parse_exception pe = pe_list.front ();
9698 
9699  bison_error (pe.message (), pe.line (), pe.column ());
9700  }
9701 
9702  int
9704  {
9705  int status = -1;
9706 
9707  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
9708 
9709  try
9710  {
9711  status = octave_pull_parse (pstate, *this);
9712  }
9713  catch (const execution_exception&)
9714  {
9715  // FIXME: In previous versions, we emitted a parse error here
9716  // but that is not always correct because the error could have
9717  // happened inside a GUI callback functions executing in the
9718  // readline event_hook loop. Maybe we need a separate exception
9719  // class for parse errors?
9720 
9721  throw;
9722  }
9723  catch (const exit_exception&)
9724  {
9725  throw;
9726  }
9727  catch (const interrupt_exception&)
9728  {
9729  throw;
9730  }
9731  catch (...)
9732  {
9733  std::string file = m_lexer.m_fcn_file_full_name;
9734 
9735  if (file.empty ())
9736  error ("unexpected exception while parsing input");
9737  else
9738  error ("unexpected exception while parsing %s", file.c_str ());
9739  }
9740 
9741  if (status != 0)
9742  parse_error ("%s", m_parse_error_msg.c_str ());
9743 
9744  return status;
9745  }
9746 
9747  // Parse input from INPUT. Pass TRUE for EOF if the end of INPUT should
9748  // finish the parse.
9749 
9750  int
9751  push_parser::run (const std::string& input, bool eof)
9752  {
9753  int status = -1;
9754 
9755  dynamic_cast<push_lexer&> (m_lexer).append_input (input, eof);
9756 
9757  do
9758  {
9759  YYSTYPE lval;
9760 
9761  int token = octave_lex (&lval, m_lexer.m_scanner);
9762 
9763  if (token < 0)
9764  {
9765  // TOKEN == -2 means that the lexer recognized a comment
9766  // and we should be at the end of the buffer but not the
9767  // end of the file so we should return 0 to indicate
9768  // "complete input" instead of -1 to request more input.
9769 
9770  status = (token == -2 ? 0 : -1);
9771 
9772  if (! eof && m_lexer.at_end_of_buffer ())
9773  return status;
9774 
9775  break;
9776  }
9777 
9778  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
9779 
9780  try
9781  {
9782  status = octave_push_parse (pstate, token, &lval, *this);
9783  }
9784  catch (execution_exception& e)
9785  {
9786  std::string file = m_lexer.m_fcn_file_full_name;
9787 
9788  if (file.empty ())
9789  error (e, "parse error");
9790  else
9791  error (e, "parse error in %s", file.c_str ());
9792  }
9793  catch (const exit_exception&)
9794  {
9795  throw;
9796  }
9797  catch (interrupt_exception &)
9798  {
9799  throw;
9800  }
9801  catch (...)
9802  {
9803  std::string file = m_lexer.m_fcn_file_full_name;
9804 
9805  if (file.empty ())
9806  error ("unexpected exception while parsing input");
9807  else
9808  error ("unexpected exception while parsing %s", file.c_str ());
9809  }
9810  }
9811  while (status == YYPUSH_MORE || ! m_lexer.at_end_of_buffer ());
9812 
9813  if (status != 0)
9814  parse_error ("%s", m_parse_error_msg.c_str ());
9815 
9816  return status;
9817  }
9818 
9819  int
9821  {
9822  if (! m_reader)
9823  error ("push_parser::run requires valid input_reader");
9824 
9825  int exit_status = 0;
9826 
9828 
9829  std::string prompt
9830  = command_editor::decode_prompt_string (input_sys.PS1 ());
9831 
9832  do
9833  {
9834  // Reset status each time through the read loop so that
9835  // it won't be set to -1 and cause us to exit the outer
9836  // loop early if there is an exception while reading
9837  // input or parsing.
9838 
9839  exit_status = 0;
9840 
9841  bool eof = false;
9842  std::string input_line = m_reader->get_input (prompt, eof);
9843 
9844  if (eof)
9845  {
9846  exit_status = EOF;
9847  break;
9848  }
9849 
9850  exit_status = run (input_line, false);
9851 
9852  prompt = command_editor::decode_prompt_string (input_sys.PS2 ());
9853  }
9854  while (exit_status < 0);
9855 
9856  return exit_status;
9857  }
9858 
9859  octave_value
9860  parse_fcn_file (interpreter& interp, const std::string& full_file,
9861  const std::string& file, const std::string& dir_name,
9862  const std::string& dispatch_type,
9863  const std::string& package_name, bool require_file,
9864  bool force_script, bool autoload, bool relative_lookup)
9865  {
9866  octave_value retval;
9867 
9868  FILE *ffile = nullptr;
9869 
9870  if (! full_file.empty ())
9871  {
9872  // Check that m-file is not overly large which can segfault interpreter.
9873  const int max_file_size = 512 * 1024 * 1024; // 512 MB
9874  sys::file_stat fs (full_file);
9875 
9876  if (fs && fs.size () > max_file_size)
9877  {
9878  error ("file '%s' is too large, > 512 MB", full_file.c_str ());
9879 
9880  return octave_value ();
9881  }
9882 
9883  ffile = sys::fopen (full_file, "rb");
9884  }
9885 
9886  if (! ffile)
9887  {
9888  if (require_file)
9889  error ("no such file, '%s'", full_file.c_str ());
9890 
9891  return octave_value ();
9892  }
9893 
9894  unwind_action act ([=] (void) { ::fclose (ffile); });
9895 
9896  // get the encoding for this folder
9897  input_system& input_sys = interp.get_input_system ();
9898  parser parser (ffile, interp, input_sys.dir_encoding (dir_name));
9899 
9900  parser.m_curr_class_name = dispatch_type;
9901  parser.m_curr_package_name = package_name;
9902  parser.m_autoloading = autoload;
9903  parser.m_fcn_file_from_relative_lookup = relative_lookup;
9904 
9905  parser.m_lexer.m_force_script = force_script;
9907  parser.m_lexer.m_parsing_class_method = ! dispatch_type.empty ();
9908 
9910  parser.m_lexer.m_fcn_file_full_name = full_file;
9911  parser.m_lexer.m_dir_name = dir_name;
9912  parser.m_lexer.m_package_name = package_name;
9913 
9914  int err = parser.run ();
9915 
9916  if (err)
9917  error ("parse error while reading file %s", full_file.c_str ());
9918 
9920 
9922  && parser.classdef_object ())
9923  {
9924  // Convert parse tree for classdef object to
9925  // meta.class info (and stash it in the symbol
9926  // table?). Return pointer to constructor?
9927 
9928  if (ov_fcn.is_defined ())
9929  panic_impossible ();
9930 
9931  bool is_at_folder = ! dispatch_type.empty ();
9932 
9933  std::shared_ptr<tree_classdef> cdef_obj
9934  = parser.classdef_object();
9935 
9936  return cdef_obj->make_meta_class (interp, is_at_folder);
9937  }
9938  else if (ov_fcn.is_defined ())
9939  {
9940  octave_function *fcn = ov_fcn.function_value ();
9941 
9942  fcn->maybe_relocate_end ();
9943 
9945  {
9947  parser.m_subfunction_names.reverse ();
9948 
9950  }
9951 
9952  return ov_fcn;
9953  }
9954 
9955  return octave_value ();
9956  }
9957 
9958  bool
9960  {
9961  m_lexer.m_end_of_input = at_eof;
9962 
9963  if (lst)
9964  {
9965  parse_tree_validator validator;
9966 
9967  lst->accept (validator);
9968 
9969  if (! validator.ok ())
9970  {
9971  delete lst;
9972 
9973  bison_error (validator.error_list ());
9974 
9975  return false;
9976  }
9977  }
9978 
9979  std::shared_ptr<tree_statement_list> tmp_lst (lst);
9980 
9981  statement_list (tmp_lst);
9982 
9983  return true;
9984  }
9985 
9986  // Check script or function for semantic errors.
9987  bool
9989  {
9991 
9992  if (code)
9993  {
9994  parse_tree_validator validator;
9995 
9996  code->accept (validator);
9997 
9998  if (! validator.ok ())
9999  {
10000  bison_error (validator.error_list ());
10001 
10002  return false;
10003  }
10004  }
10005 
10006  return true;
10007  }
10008 
10009  // Maybe print a warning if an assignment expression is used as the
10010  // test in a logical expression.
10011 
10012  void
10014  {
10015  if (expr->is_assignment_expression ()
10016  && expr->paren_count () < 2)
10017  {
10018  if (m_lexer.m_fcn_file_full_name.empty ())
10020  ("Octave:assign-as-truth-value",
10021  "suggest parenthesis around assignment used as truth value");
10022  else
10024  ("Octave:assign-as-truth-value",
10025  "suggest parenthesis around assignment used as truth value near line %d, column %d in file '%s'",
10026  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
10027  }
10028  }
10029 
10030  // Maybe print a warning about switch labels that aren't constants.
10031 
10032  void
10034  {
10035  if (! expr->is_constant ())
10036  {
10037  if (m_lexer.m_fcn_file_full_name.empty ())
10038  warning_with_id ("Octave:variable-switch-label",
10039  "variable switch label");
10040  else
10042  ("Octave:variable-switch-label",
10043  "variable switch label near line %d, column %d in file '%s'",
10044  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
10045  }
10046  }
10047 
10048  void
10050  {
10051  if (m_curr_fcn_depth >= 0)
10052  {
10053  tree_statement *tmp = t->back ();
10054 
10055  if (tmp->is_expression ())
10057  ("Octave:missing-semicolon",
10058  "missing semicolon near line %d, column %d in file '%s'",
10059  tmp->line (), tmp->column (), m_lexer.m_fcn_file_full_name.c_str ());
10060  }
10061  }
10062 
10063  std::string
10064  get_help_from_file (const std::string& nm, bool& symbol_found,
10065  std::string& full_file)
10066  {
10067  std::string retval;
10068 
10069  full_file = fcn_file_in_path (nm);
10070 
10071  std::string file = full_file;
10072 
10073  std::size_t file_len = file.length ();
10074 
10075  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
10076  || (file_len > 4 && file.substr (file_len-4) == ".mex")
10077  || (file_len > 2 && file.substr (file_len-2) == ".m"))
10078  {
10079  file = sys::env::base_pathname (file);
10080  file = file.substr (0, file.find_last_of ('.'));
10081 
10082  std::size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
10083  if (pos != std::string::npos)
10084  file = file.substr (pos+1);
10085  }
10086 
10087  if (! file.empty ())
10088  {
10089  interpreter& interp = __get_interpreter__ ();
10090 
10091  symbol_found = true;
10092 
10093  octave_value ov_fcn
10094  = parse_fcn_file (interp, full_file, file, "", "", "", true,
10095  false, false, false);
10096 
10097  if (ov_fcn.is_defined ())
10098  {
10099  octave_function *fcn = ov_fcn.function_value ();
10100 
10101  if (fcn)
10102  retval = fcn->doc_string ();
10103  }
10104  }
10105 
10106  return retval;
10107  }
10108 
10109  std::string
10110  get_help_from_file (const std::string& nm, bool& symbol_found)
10111  {
10112  std::string file;
10113  return get_help_from_file (nm, symbol_found, file);
10114  }
10115 
10116  octave_value
10117  load_fcn_from_file (const std::string& file_name,
10118  const std::string& dir_name,
10119  const std::string& dispatch_type,
10120  const std::string& package_name,
10121  const std::string& fcn_name, bool autoload)
10122  {
10123  octave_value retval;
10124 
10125  unwind_protect frame;
10126 
10127  std::string nm = file_name;
10128 
10129  std::size_t nm_len = nm.length ();
10130 
10131  std::string file;
10132 
10133  bool relative_lookup = false;
10134 
10135  file = nm;
10136 
10137  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
10138  || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
10139  || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
10140  {
10141  nm = sys::env::base_pathname (file);
10142  nm = nm.substr (0, nm.find_last_of ('.'));
10143 
10144  std::size_t pos = nm.find_last_of (sys::file_ops::dir_sep_str ());
10145  if (pos != std::string::npos)
10146  nm = nm.substr (pos+1);
10147  }
10148 
10149  relative_lookup = ! sys::env::absolute_pathname (file);
10150 
10151  file = sys::env::make_absolute (file);
10152 
10153  int len = file.length ();
10154 
10155  interpreter& interp = __get_interpreter__ ();
10156 
10157  dynamic_loader& dyn_loader = interp.get_dynamic_loader ();
10158 
10159  if (len > 4 && file.substr (len-4, len-1) == ".oct")
10160  {
10161  if (autoload && ! fcn_name.empty ())
10162  nm = fcn_name;
10163 
10164  octave_function *tmpfcn
10165  = dyn_loader.load_oct (nm, file, relative_lookup);
10166 
10167  if (tmpfcn)
10168  {
10169  tmpfcn->stash_package_name (package_name);
10170  retval = octave_value (tmpfcn);
10171  }
10172  }
10173  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
10174  {
10175  // Temporarily load m-file version of mex-file, if it exists,
10176  // to get the help-string to use.
10177 
10178  std::string doc_string;
10179 
10180  octave_value ov_fcn
10181  = parse_fcn_file (interp, file.substr (0, len - 2), nm, dir_name,
10182  dispatch_type, package_name, false,
10183  autoload, autoload, relative_lookup);
10184 
10185  if (ov_fcn.is_defined ())
10186  {
10187  octave_function *tmpfcn = ov_fcn.function_value ();
10188 
10189  if (tmpfcn)
10190  doc_string = tmpfcn->doc_string ();
10191  }
10192 
10193  octave_function *tmpfcn
10194  = dyn_loader.load_mex (nm, file, relative_lookup);
10195 
10196  if (tmpfcn)
10197  {
10198  tmpfcn->document (doc_string);
10199  tmpfcn->stash_package_name (package_name);
10200 
10201  retval = octave_value (tmpfcn);
10202  }
10203  }
10204  else if (len > 2)
10205  {
10206  retval = parse_fcn_file (interp, file, nm, dir_name,
10207  dispatch_type, package_name, true,
10208  autoload, autoload, relative_lookup);
10209  }
10210 
10211  return retval;
10212  }
10213 
10214 DEFMETHOD (autoload, interp, args, ,
10215  doc: /* -*- texinfo -*-
10216 @deftypefn {} {@var{autoload_map} =} autoload ()
10217 @deftypefnx {} {} autoload (@var{function}, @var{file})
10218 @deftypefnx {} {} autoload (@dots{}, "remove")
10219 Define @var{function} to autoload from @var{file}.
10220 
10221 The second argument, @var{file}, should be an absolute filename or a file
10222 name in the same directory as the function or script from which the autoload
10223 command was run. @var{file} @emph{should not} depend on the Octave load
10224 path.
10225 
10226 Normally, calls to @code{autoload} appear in PKG_ADD script files that are
10227 evaluated when a directory is added to Octave's load path. To avoid having
10228 to hardcode directory names in @var{file}, if @var{file} is in the same
10229 directory as the PKG_ADD script then
10230 
10231 @example
10232 autoload ("foo", "bar.oct");
10233 @end example
10234 
10235 @noindent
10236 will load the function @code{foo} from the file @code{bar.oct}. The above
10237 usage when @code{bar.oct} is not in the same directory, or usages such as
10238 
10239 @example
10240 autoload ("foo", file_in_loadpath ("bar.oct"))
10241 @end example
10242 
10243 @noindent
10244 are strongly discouraged, as their behavior may be unpredictable.
10245 
10246 With no arguments, return a structure containing the current autoload map.
10247 
10248 If a third argument @qcode{"remove"} is given, the function is cleared and
10249 not loaded anymore during the current Octave session.
10250 
10251 @seealso{PKG_ADD}
10252 @end deftypefn */)
10253 {
10254  int nargin = args.length ();
10255 
10256  if (nargin == 1 || nargin > 3)
10257  print_usage ();
10258 
10259  tree_evaluator& tw = interp.get_evaluator ();
10260 
10261  if (nargin == 0)
10262  return octave_value (tw.get_autoload_map ());
10263  else
10264  {
10265  string_vector argv = args.make_argv ("autoload");
10266 
10267  if (nargin == 2)
10268  tw.add_autoload (argv[1], argv[2]);
10269  else if (nargin == 3)
10270  {
10271  if (argv[3] != "remove")
10272  error_with_id ("Octave:invalid-input-arg",
10273  "autoload: third argument can only be 'remove'");
10274 
10275  tw.remove_autoload (argv[1], argv[2]);
10276  }
10277  }
10278 
10279  return octave_value_list ();
10280 }
10281 
10282 DEFMETHOD (mfilename, interp, args, ,
10283  doc: /* -*- texinfo -*-
10284 @deftypefn {} {} mfilename ()
10285 @deftypefnx {} {} mfilename ("fullpath")
10286 @deftypefnx {} {} mfilename ("fullpathext")
10287 Return the name of the currently executing file.
10288 
10289 The base name of the currently executing script or function is returned without
10290 any extension. If called from outside an m-file, such as the command line,
10291 return the empty string.
10292 
10293 Given the argument @qcode{"fullpath"}, include the directory part of the
10294 filename, but not the extension.
10295 
10296 Given the argument @qcode{"fullpathext"}, include the directory part of
10297 the filename and the extension.
10298 @seealso{inputname, dbstack}
10299 @end deftypefn */)
10300 {
10301  int nargin = args.length ();
10302 
10303  if (nargin > 1)
10304  print_usage ();
10305 
10306  std::string opt;
10307 
10308  if (nargin == 1)
10309  opt = args(0).xstring_value ("mfilename: option argument must be a string");
10310 
10311  return octave_value (interp.mfilename (opt));
10312 }
10313 
10314  // Execute the contents of a script file. For compatibility with
10315  // Matlab, also execute a function file by calling the function it
10316  // defines with no arguments and nargout = 0.
10317 
10318  void
10319  source_file (const std::string& file_name, const std::string& context,
10320  bool verbose, bool require_file)
10321  {
10322  interpreter& interp = __get_interpreter__ ();
10323 
10324  interp.source_file (file_name, context, verbose, require_file);
10325  }
10326 
10327 DEFMETHOD (source, interp, args, ,
10328  doc: /* -*- texinfo -*-
10329 @deftypefn {} {} source (@var{file})
10330 @deftypefnx {} {} source (@var{file}, @var{context})
10331 Parse and execute the contents of @var{file}.
10332 
10333 Without specifying @var{context}, this is equivalent to executing commands
10334 from a script file, but without requiring the file to be named
10335 @file{@var{file}.m} or to be on the execution path.
10336 
10337 Instead of the current context, the script may be executed in either the
10338 context of the function that called the present function
10339 (@qcode{"caller"}), or the top-level context (@qcode{"base"}).
10340 @seealso{run}
10341 @end deftypefn */)
10342 {
10343  int nargin = args.length ();
10344 
10345  if (nargin < 1 || nargin > 2)
10346  print_usage ();
10347 
10348  std::string file_name
10349  = args(0).xstring_value ("source: FILE must be a string");
10350 
10351  std::string context;
10352  if (nargin == 2)
10353  context = args(1).xstring_value ("source: CONTEXT must be a string");
10354 
10355  interp.source_file (file_name, context);
10356 
10357  return octave_value_list ();
10358 }
10359 
10360  //! Evaluate an Octave function (built-in or interpreted) and return
10361  //! the list of result values.
10362  //!
10363  //! @param name The name of the function to call.
10364  //! @param args The arguments to the function.
10365  //! @param nargout The number of output arguments expected.
10366  //! @return A list of output values. The length of the list is not
10367  //! necessarily the same as @c nargout.
10368 
10370  feval (const char *name, const octave_value_list& args, int nargout)
10371  {
10372  interpreter& interp = __get_interpreter__ ();
10373 
10374  return interp.feval (name, args, nargout);
10375  }
10376 
10378  feval (const std::string& name, const octave_value_list& args, int nargout)
10379  {
10380  interpreter& interp = __get_interpreter__ ();
10381 
10382  return interp.feval (name, args, nargout);
10383  }
10384 
10386  feval (octave_function *fcn, const octave_value_list& args, int nargout)
10387  {
10388  interpreter& interp = __get_interpreter__ ();
10389 
10390  return interp.feval (fcn, args, nargout);
10391  }
10392 
10394  feval (const octave_value& val, const octave_value_list& args, int nargout)
10395  {
10396  interpreter& interp = __get_interpreter__ ();
10397 
10398  return interp.feval (val, args, nargout);
10399  }
10400 
10402  feval (const octave_value_list& args, int nargout)
10403  {
10404  interpreter& interp = __get_interpreter__ ();
10405 
10406  return interp.feval (args, nargout);
10407  }
10408 
10409 DEFMETHOD (feval, interp, args, nargout,
10410  doc: /* -*- texinfo -*-
10411 @deftypefn {} {} feval (@var{name}, @dots{})
10412 Evaluate the function named @var{name}.
10413 
10414 Any arguments after the first are passed as inputs to the named function.
10415 For example,
10416 
10417 @example
10418 @group
10419 feval ("acos", -1)
10420  @result{} 3.1416
10421 @end group
10422 @end example
10423 
10424 @noindent
10425 calls the function @code{acos} with the argument @samp{-1}.
10426 
10427 The function @code{feval} can also be used with function handles of any sort
10428 (@pxref{Function Handles}). Historically, @code{feval} was the only way to
10429 call user-supplied functions in strings, but function handles are now
10430 preferred due to the cleaner syntax they offer. For example,
10431 
10432 @example
10433 @group
10434 @var{f} = @@exp;
10435 feval (@var{f}, 1)
10436  @result{} 2.7183
10437 @var{f} (1)
10438  @result{} 2.7183
10439 @end group
10440 @end example
10441 
10442 @noindent
10443 are equivalent ways to call the function referred to by @var{f}. If it
10444 cannot be predicted beforehand whether @var{f} is a function handle,
10445 function name in a string, or inline function then @code{feval} can be used
10446 instead.
10447 @end deftypefn */)
10448 {
10449  if (args.length () == 0)
10450  print_usage ();
10451 
10452  return interp.feval (args, nargout);
10453 }
10454 
10455 DEFMETHOD (builtin, interp, args, nargout,
10456  doc: /* -*- texinfo -*-
10457 @deftypefn {} {[@dots{}] =} builtin (@var{f}, @dots{})
10458 Call the base function @var{f} even if @var{f} is overloaded to another
10459 function for the given type signature.
10460 
10461 This is normally useful when doing object-oriented programming and there is
10462 a requirement to call one of Octave's base functions rather than the
10463 overloaded one of a new class.
10464 
10465 A trivial example which redefines the @code{sin} function to be the
10466 @code{cos} function shows how @code{builtin} works.
10467 
10468 @example
10469 @group
10470 sin (0)
10471  @result{} 0
10472 function y = sin (x), y = cos (x); endfunction
10473 sin (0)
10474  @result{} 1
10475 builtin ("sin", 0)
10476  @result{} 0
10477 @end group
10478 @end example
10479 @end deftypefn */)
10480 {
10481  octave_value_list retval;
10482 
10483  if (args.length () == 0)
10484  print_usage ();
10485 
10486  const std::string name (args(0).xstring_value ("builtin: function name (F) must be a string"));
10487 
10488  symbol_table& symtab = interp.get_symbol_table ();
10489 
10490  octave_value fcn = symtab.builtin_find (name);
10491 
10492  if (fcn.is_defined ())
10493  retval = interp.feval (fcn.function_value (), args.splice (0, 1), nargout);
10494  else
10495  error ("builtin: lookup for symbol '%s' failed", name.c_str ());
10496 
10497  return retval;
10498 }
10499 
10500  void
10502  {
10503  if (*lst)
10504  {
10505  delete *lst;
10506  *lst = nullptr;
10507  }
10508  }
10509 
10510 DEFMETHOD (eval, interp, args, nargout,
10511  doc: /* -*- texinfo -*-
10512 @deftypefn {} {} eval (@var{try})
10513 @deftypefnx {} {} eval (@var{try}, @var{catch})
10514 Parse the string @var{try} and evaluate it as if it were an Octave
10515 program.
10516 
10517 If execution fails, evaluate the optional string @var{catch}.
10518 
10519 The string @var{try} is evaluated in the current context, so any results
10520 remain available after @code{eval} returns.
10521 
10522 The following example creates the variable @var{A} with the approximate
10523 value of 3.1416 in the current workspace.
10524 
10525 @example
10526 eval ("A = acos(-1);");
10527 @end example
10528 
10529 If an error occurs during the evaluation of @var{try} then the @var{catch}
10530 string is evaluated, as the following example shows:
10531 
10532 @example
10533 @group
10534 eval ('error ("This is a bad example");',
10535  'printf ("This error occurred:\n%s\n", lasterr ());');
10536  @print{} This error occurred:
10537  This is a bad example
10538 @end group
10539 @end example
10540 
10541 Programming Note: if you are only using @code{eval} as an error-capturing
10542 mechanism, rather than for the execution of arbitrary code strings,
10543 Consider using try/catch blocks or unwind_protect/unwind_protect_cleanup
10544 blocks instead. These techniques have higher performance and don't
10545 introduce the security considerations that the evaluation of arbitrary code
10546 does.
10547 @seealso{evalin, evalc, assignin, feval}
10548 @end deftypefn */)
10549 {
10550  int nargin = args.length ();
10551 
10552  if (nargin < 1 || nargin > 2)
10553  print_usage ();
10554 
10555  if (! args(0).is_string () || args(0).rows () > 1 || args(0).ndims () != 2)
10556  error ("eval: TRY must be a string");
10557 
10558  std::string try_code = args(0).string_value ();
10559 
10560  if (nargin == 1)
10561  return interp.eval (try_code, nargout);
10562  else
10563  {
10564  if (! args(1).is_string () || args(1).rows () > 1
10565  || args(1).ndims () != 2)
10566  error ("eval: CATCH must be a string");
10567 
10568  std::string catch_code = args(1).string_value ();
10569 
10570  return interp.eval (try_code, catch_code, nargout);
10571  }
10572 }
10573 
10574 /*
10575 
10576 %!shared x
10577 %! x = 1;
10578 
10579 %!assert (eval ("x"), 1)
10580 %!assert (eval ("x;"))
10581 %!assert (eval ("x;"), 1)
10582 
10583 %!test
10584 %! y = eval ("x");
10585 %! assert (y, 1);
10586 
10587 %!test
10588 %! y = eval ("x;");
10589 %! assert (y, 1);
10590 
10591 %!test
10592 %! eval ("x = 1;");
10593 %! assert (x,1);
10594 
10595 %!test
10596 %! eval ("flipud = 2;");
10597 %! assert (flipud, 2);
10598 
10599 %!function y = __f ()
10600 %! eval ("flipud = 2;");
10601 %! y = flipud;
10602 %!endfunction
10603 %!assert (__f(), 2)
10604 
10605 %!test <*35645>
10606 %! [a,] = gcd (1,2);
10607 %! [a,b,] = gcd (1, 2);
10608 
10609 ## Can't assign to a keyword
10610 %!error eval ("switch = 13;")
10611 
10612 %!shared str
10613 %! str = "disp ('hello');";
10614 %! str(:,:,2) = str(:,:,1);
10615 
10616 %!error <TRY must be a string> eval (1)
10617 %!error <TRY must be a string> eval (['a';'b'])
10618 %!error <TRY must be a string> eval (str)
10619 
10620 %!error <CATCH must be a string> eval (str(:,:,1), 1)
10621 %!error <CATCH must be a string> eval (str(:,:,1), ['a';'b'])
10622 %!error <CATCH must be a string> eval (str(:,:,1), str)
10623 
10624 */
10625 
10626 DEFMETHOD (assignin, interp, args, ,
10627  doc: /* -*- texinfo -*-
10628 @deftypefn {} {} assignin (@var{context}, @var{varname}, @var{value})
10629 Assign @var{value} to @var{varname} in context @var{context}, which
10630 may be either @qcode{"base"} or @qcode{"caller"}.
10631 @seealso{evalin}
10632 @end deftypefn */)
10633 {
10634  if (args.length () != 3)
10635  print_usage ();
10636 
10637  std::string context
10638  = args(0).xstring_value ("assignin: CONTEXT must be a string");
10639 
10640  std::string varname
10641  = args(1).xstring_value ("assignin: VARNAME must be a string");
10642 
10643  interp.assignin (context, varname, args(2));
10644 
10645  return octave_value_list ();
10646 }
10647 
10648 /*
10649 
10650 %!error assignin ("base", "switch", "13")
10651 
10652 */
10653 
10654 DEFMETHOD (evalin, interp, args, nargout,
10655  doc: /* -*- texinfo -*-
10656 @deftypefn {} {} evalin (@var{context}, @var{try})
10657 @deftypefnx {} {} evalin (@var{context}, @var{try}, @var{catch})
10658 Like @code{eval}, except that the expressions are evaluated in the context
10659 @var{context}, which may be either @qcode{"caller"} or @qcode{"base"}.
10660 @seealso{eval, assignin}
10661 @end deftypefn */)
10662 {
10663  int nargin = args.length ();
10664 
10665  if (nargin < 2 || nargin > 3)
10666  print_usage ();
10667 
10668  std::string context
10669  = args(0).xstring_value ("evalin: CONTEXT must be a string");
10670 
10671  std::string try_code
10672  = args(1).xstring_value ("evalin: TRY must be a string");
10673 
10674  if (nargin == 3)
10675  {
10676  std::string catch_code
10677  = args(2).xstring_value ("evalin: CATCH must be a string");
10678 
10679  return interp.evalin (context, try_code, catch_code, nargout);
10680  }
10681 
10682  return interp.evalin (context, try_code, nargout);
10683 }
10684 
10685 DEFMETHOD (evalc, interp, args, nargout,
10686  doc: /* -*- texinfo -*-
10687 @deftypefn {} {@var{s} =} evalc (@var{try})
10688 @deftypefnx {} {@var{s} =} evalc (@var{try}, @var{catch})
10689 Parse and evaluate the string @var{try} as if it were an Octave program,
10690 while capturing the output into the return variable @var{s}.
10691 
10692 If execution fails, evaluate the optional string @var{catch}.
10693 
10694 This function behaves like @code{eval}, but any output or warning messages
10695 which would normally be written to the console are captured and returned in
10696 the string @var{s}.
10697 
10698 The @code{diary} is disabled during the execution of this function. When
10699 @code{system} is used, any output produced by external programs is
10700 @emph{not} captured, unless their output is captured by the @code{system}
10701 function itself.
10702 
10703 @example
10704 @group
10705 s = evalc ("t = 42"), t
10706  @result{} s = t = 42
10707 
10708  @result{} t = 42
10709 @end group
10710 @end example
10711 @seealso{eval, diary}
10712 @end deftypefn */)
10713 {
10714  int nargin = args.length ();
10715 
10716  if (nargin == 0 || nargin > 2)
10717  print_usage ();
10718 
10719  // Flush pending output and redirect stdout/stderr to capturing
10720  // buffer.
10721 
10722  octave_stdout.flush ();
10723  std::cerr.flush ();
10724 
10725  std::stringbuf buffer;
10726 
10727  std::streambuf *old_out_buf = octave_stdout.rdbuf (&buffer);
10728  std::streambuf *old_err_buf = std::cerr.rdbuf (&buffer);
10729 
10730  // Restore previous output buffers no matter how control exits this
10731  // function. There's no need to flush here. That has already
10732  // happened for the normal execution path. If an error happens during
10733  // the eval, then the message is stored in the exception object and we
10734  // will display it later, after the buffers have been restored.
10735 
10736  unwind_action act ([=] (void)
10737  {
10738  octave_stdout.rdbuf (old_out_buf);
10739  std::cerr.rdbuf (old_err_buf);
10740  });
10741 
10742  // Call standard eval function.
10743 
10744  int eval_nargout = std::max (0, nargout - 1);
10745 
10746  octave_value_list retval = Feval (interp, args, eval_nargout);
10747 
10748  // Make sure we capture all pending output.
10749 
10750  octave_stdout.flush ();
10751  std::cerr.flush ();
10752 
10753  retval.prepend (buffer.str ());
10754 
10755  return retval;
10756 }
10757 
10758 /*
10759 
10760 %!test
10761 %! [old_fmt, old_spacing] = format ();
10762 %! unwind_protect
10763 %! format short;
10764 %! str = evalc ("1");
10765 %! assert (str, "ans = 1\n");
10766 %! unwind_protect_cleanup
10767 %! format (old_fmt);
10768 %! format (old_spacing);
10769 %! end_unwind_protect
10770 
10771 %!assert (evalc ("1;"), "")
10772 
10773 %!test
10774 %! [s, y] = evalc ("1");
10775 %! assert (s, "");
10776 %! assert (y, 1);
10777 
10778 %!test
10779 %! [s, y] = evalc ("1;");
10780 %! assert (s, "");
10781 %! assert (y, 1);
10782 
10783 %!test
10784 %! [old_fmt, old_spacing] = format ();
10785 %! unwind_protect
10786 %! format short;
10787 %! str = evalc ("y = 2");
10788 %! assert (str, "y = 2\n");
10789 %! assert (y, 2);
10790 %! unwind_protect_cleanup
10791 %! format (old_fmt);
10792 %! format (old_spacing);
10793 %! end_unwind_protect
10794 
10795 %!test
10796 %! assert (evalc ("y = 3;"), "");
10797 %! assert (y, 3);
10798 
10799 %!test
10800 %! [s, a, b] = evalc ("deal (1, 2)");
10801 %! assert (s, "");
10802 %! assert (a, 1);
10803 %! assert (b, 2);
10804 
10805 %!function [a, b] = __f_evalc ()
10806 %! printf ("foo");
10807 %! fprintf (stdout, "bar ");
10808 %! disp (pi);
10809 %! a = 1;
10810 %! b = 2;
10811 %!endfunction
10812 %!test
10813 %! [old_fmt, old_spacing] = format ();
10814 %! unwind_protect
10815 %! format short;
10816 %! [s, a, b] = evalc ("__f_evalc ()");
10817 %! assert (s, "foobar 3.1416\n");
10818 %! assert (a, 1);
10819 %! assert (b, 2);
10820 %! unwind_protect_cleanup
10821 %! format (old_fmt);
10822 %! format (old_spacing);
10823 %! end_unwind_protect
10824 
10825 %!error <foo> (evalc ("error ('foo')"))
10826 %!error <bar> (evalc ("error ('foo')", "error ('bar')"))
10827 
10828 %!test
10829 %! warning ("off", "quiet", "local");
10830 %! str = evalc ("warning ('foo')");
10831 %! assert (str(1:13), "warning: foo\n");
10832 
10833 %!test
10834 %! warning ("off", "quiet", "local");
10835 %! str = evalc ("error ('foo')", "warning ('bar')");
10836 %! assert (str(1:13), "warning: bar\n");
10837 
10838 %!error evalc ("switch = 13;")
10839 
10840 */
10841 
10842 DEFUN (__parser_debug_flag__, args, nargout,
10843  doc: /* -*- texinfo -*-
10844 @deftypefn {} {@var{val} =} __parser_debug_flag__ ()
10845 @deftypefnx {} {@var{old_val} =} __parser_debug_flag__ (@var{new_val})
10846 Query or set the internal flag that determines whether Octave's parser
10847 prints debug information as it processes an expression.
10848 @seealso{__lexer_debug_flag__}
10849 @end deftypefn */)
10850 {
10851  octave_value retval;
10852 
10853  bool debug_flag = octave_debug;
10854 
10855  retval = set_internal_variable (debug_flag, args, nargout,
10856  "__parser_debug_flag__");
10857 
10858  octave_debug = debug_flag;
10859 
10860  return retval;
10861 }
10862 
10863 DEFMETHOD (__parse_file__, interp, args, ,
10864  doc: /* -*- texinfo -*-
10865 @deftypefn {} {} __parse_file__ (@var{file}, @var{verbose})
10866 Undocumented internal function.
10867 @end deftypefn */)
10868 {
10869  octave_value retval;
10870 
10871  int nargin = args.length ();
10872 
10873  if (nargin < 1 || nargin > 2)
10874  print_usage ();
10875 
10876  std::string file
10877  = args(0).xstring_value ("__parse_file__: expecting filename as argument");
10878 
10879  std::string full_file = sys::file_ops::tilde_expand (file);
10880 
10881  full_file = sys::env::make_absolute (full_file);
10882 
10883  std::string dir_name;
10884 
10885  std::size_t file_len = file.length ();
10886 
10887  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
10888  || (file_len > 4 && file.substr (file_len-4) == ".mex")
10889  || (file_len > 2 && file.substr (file_len-2) == ".m"))
10890  {
10891  file = sys::env::base_pathname (file);
10892  file = file.substr (0, file.find_last_of ('.'));
10893 
10894  std::size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
10895  if (pos != std::string::npos)
10896  {
10897  dir_name = file.substr (0, pos);
10898  file = file.substr (pos+1);
10899  }
10900  }
10901 
10902  if (nargin == 2)
10903  octave_stdout << "parsing " << full_file << std::endl;
10904 
10905  octave_value ov_fcn
10906  = parse_fcn_file (interp, full_file, file, dir_name, "", "", true,
10907  false, false, false);
10908 
10909  return retval;
10910 }
10911 
OCTAVE_END_NAMESPACE(octave)
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:230
Definition: Cell.h:43
int column(void) const
bool ok(void) const
std::string message(void) const
int line(void) const
comment_list * get_comment(void)
Definition: lex.h:584
comment_buffer m_comment_buf
Definition: lex.h:723
bool input_from_tmp_history_file(void)
Definition: lex.cc:6767
virtual bool input_from_eval_string(void) const
Definition: lex.h:731
void * m_scanner
Definition: lex.h:717
bool at_end_of_buffer(void) const
Definition: lex.h:632
void prep_for_file(void)
Definition: lex.cc:5403
comment_list * get_comment(void)
Definition: lex.h:668
virtual bool input_from_terminal(void) const
Definition: lex.h:727
virtual void reset(void)
Definition: lex.cc:5380
iterator end(void)
Definition: base-list.h:68
void pop_back(void)
Definition: base-list.h:89
elt_type & back(void)
Definition: base-list.h:80
std::size_t size(void) const
Definition: base-list.h:52
void pop_front(void)
Definition: base-list.h:88
void append(const elt_type &s)
Definition: base-list.h:92
elt_type & front(void)
Definition: base-list.h:79
std::size_t length(void) const
Definition: base-list.h:53
bool empty(void) const
Definition: base-list.h:50
std::list< tree_decl_elt * >::iterator iterator
Definition: base-list.h:43
iterator erase(iterator pos)
Definition: base-list.h:55
std::deque< value_type > m_info
Definition: parse.h:160
OCTINTERP_API void clear(void)
Definition: oct-parse.cc:6715
OCTINTERP_API bool name_ok(const std::string &name)
Definition: oct-parse.cc:6654
OCTINTERP_API bool name_current_scope(const std::string &name)
Definition: oct-parse.cc:6692
OCTINTERP_API std::string parent_name(void) const
Definition: oct-parse.cc:6710
OCTINTERP_API std::size_t size(void) const
Definition: oct-parse.cc:6630
OCTINTERP_API symbol_scope parent_scope(void) const
Definition: oct-parse.cc:6704
OCTINTERP_API void pop(void)
Definition: oct-parse.cc:6648
OCTINTERP_API void push(const value_type &elt)
Definition: oct-parse.cc:6636
std::pair< symbol_scope, std::string > value_type
Definition: parse.h:117
OCTINTERP_API tree_argument_list * append_argument_list(tree_argument_list *list, tree_expression *expr)
Definition: oct-parse.cc:9541
OCTINTERP_API tree_arg_validation * make_arg_validation(tree_arg_size_spec *size_spec, tree_identifier *class_name, tree_arg_validation_fcns *validation_fcns, tree_expression *default_value)
Definition: oct-parse.cc:8343
OCTINTERP_API tree_decl_command * make_decl_command(int tok, token *tok_val, tree_decl_init_list *lst)
Definition: oct-parse.cc:9099
OCTINTERP_API tree_statement * make_statement(T *arg)
OCTINTERP_API bool validate_primary_fcn(void)
Definition: oct-parse.cc:9988
std::shared_ptr< tree_statement_list > m_stmt_list
Definition: parse.h:798
OCTINTERP_API tree_classdef_attribute_list * append_classdef_attribute(tree_classdef_attribute_list *list, tree_classdef_attribute *elt)
Definition: oct-parse.cc:8781
OCTINTERP_API void disallow_command_syntax(void)
Definition: oct-parse.cc:9582
OCTINTERP_API tree_command * make_unwind_command(token *unwind_tok, tree_statement_list *body, tree_statement_list *cleanup, token *end_tok, comment_list *lc, comment_list *mc)
Definition: oct-parse.cc:7382
OCTINTERP_API tree_cell * make_cell(tree_argument_list *row)
Definition: oct-parse.cc:9417
OCTINTERP_API tree_fcn_handle * make_fcn_handle(token *tok_val)
Definition: oct-parse.cc:6989
int m_max_fcn_depth
Definition: parse.h:762
OCTINTERP_API tree_switch_command * finish_switch_command(token *switch_tok, tree_expression *expr, tree_switch_case_list *list, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7755
OCTINTERP_API tree_switch_case_list * make_switch_case_list(tree_switch_case *switch_case)
Definition: oct-parse.cc:7795
OCTINTERP_API void recover_from_parsing_function(void)
Definition: oct-parse.cc:8394
OCTINTERP_API tree_argument_list * validate_matrix_for_assignment(tree_expression *e)
Definition: oct-parse.cc:9256
octave_value m_primary_fcn
Definition: parse.h:787
OCTINTERP_API tree_classdef_attribute_list * make_classdef_attribute_list(tree_classdef_attribute *attr)
Definition: oct-parse.cc:8760
OCTINTERP_API tree_classdef_body * make_classdef_body(tree_classdef_properties_block *pb)
Definition: oct-parse.cc:8788
OCTINTERP_API tree_expression * make_assign_op(int op, tree_argument_list *lhs, token *eq_tok, tree_expression *rhs)
Definition: oct-parse.cc:7836
OCTINTERP_API tree_if_command * finish_if_command(token *if_tok, tree_if_command_list *list, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7682
parent_scope_info m_function_scopes
Definition: parse.h:784
OCTINTERP_API tree_classdef_properties_block * make_classdef_properties_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_property_list *plist, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8499
OCTINTERP_API bool validate_array_list(tree_expression *e)
Definition: oct-parse.cc:9231
OCTINTERP_API tree_function_def * finish_classdef_external_method(octave_user_function *fcn, tree_parameter_list *ret_list, comment_list *cl)
Definition: oct-parse.cc:8889
OCTINTERP_API base_parser(base_lexer &lxr)
Definition: oct-parse.cc:6721
OCTINTERP_API tree_identifier * make_identifier(token *ident)
Definition: oct-parse.cc:9432
OCTINTERP_API tree_classdef_events_list * make_classdef_events_list(tree_classdef_event *e)
Definition: oct-parse.cc:8652
OCTINTERP_API tree_index_expression * make_indirect_ref(tree_expression *expr, const std::string &)
Definition: oct-parse.cc:9041
OCTINTERP_API tree_matrix * append_matrix_row(tree_matrix *matrix, tree_argument_list *row)
Definition: oct-parse.cc:9396
OCTINTERP_API bool finish_input(tree_statement_list *lst, bool at_eof=false)
Definition: oct-parse.cc:9959
OCTINTERP_API tree_classdef * make_classdef(token *tok_val, tree_classdef_attribute_list *a, tree_identifier *id, tree_classdef_superclass_list *sc, tree_classdef_body *body, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8422
OCTINTERP_API tree_parameter_list * make_parameter_list(tree_parameter_list::in_or_out io)
Definition: oct-parse.cc:9548
OCTINTERP_API tree_parameter_list * append_parameter_list(tree_parameter_list *list, tree_decl_elt *t)
Definition: oct-parse.cc:9568
OCTINTERP_API tree_classdef_property * make_classdef_property(comment_list *lc, tree_identifier *id, tree_arg_validation *av)
Definition: oct-parse.cc:8561
OCTINTERP_API tree_classdef_superclass_list * make_classdef_superclass_list(tree_classdef_superclass *sc)
Definition: oct-parse.cc:8741
OCTINTERP_API tree_if_command_list * append_if_clause(tree_if_command_list *list, tree_if_clause *clause)
Definition: oct-parse.cc:7746
OCTINTERP_API tree_command * make_return_command(token *return_tok)
Definition: oct-parse.cc:7628
virtual ~base_parser(void)
Definition: oct-parse.cc:6731
bool m_endfunction_found
Definition: parse.h:742
OCTINTERP_API tree_identifier * make_fcn_name(tree_identifier *id)
Definition: oct-parse.cc:8000
OCTINTERP_API tree_cell * append_cell_row(tree_cell *cell, tree_argument_list *row)
Definition: oct-parse.cc:9423
OCTINTERP_API tree_matrix * make_matrix(tree_argument_list *row)
Definition: oct-parse.cc:9390
OCTINTERP_API void reset(void)
Definition: oct-parse.cc:6747
OCTINTERP_API tree_command * make_for_command(int tok_id, token *for_tok, tree_argument_list *lhs, tree_expression *expr, tree_expression *maxproc, tree_statement_list *body, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7526
OCTINTERP_API tree_expression * make_binary_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:7148
base_lexer & m_lexer
Definition: parse.h:801
OCTINTERP_API tree_decl_elt * make_decl_elt(tree_identifier *id, token *eq_op=nullptr, tree_expression *expr=nullptr)
Definition: oct-parse.cc:9157
OCTINTERP_API tree_command * make_do_until_command(token *until_tok, tree_statement_list *body, tree_expression *expr, comment_list *lc)
Definition: oct-parse.cc:7506
OCTINTERP_API tree_command * make_continue_command(token *continue_tok)
Definition: oct-parse.cc:7611
OCTINTERP_API tree_if_clause * make_else_clause(token *else_tok, comment_list *lc, tree_statement_list *list)
Definition: oct-parse.cc:7736
OCTINTERP_API tree_command * make_while_command(token *while_tok, tree_expression *expr, tree_statement_list *body, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7471
OCTINTERP_API tree_command * make_try_command(token *try_tok, tree_statement_list *body, char catch_sep, tree_statement_list *cleanup, token *end_tok, comment_list *lc, comment_list *mc)
Definition: oct-parse.cc:7415
std::string m_curr_class_name
Definition: parse.h:777
OCTINTERP_API tree_switch_case_list * append_switch_case(tree_switch_case_list *list, tree_switch_case *elt)
Definition: oct-parse.cc:7827
OCTINTERP_API tree_black_hole * make_black_hole(void)
Definition: oct-parse.cc:6981
OCTINTERP_API void maybe_warn_variable_switch_label(tree_expression *expr)
Definition: oct-parse.cc:10033
OCTINTERP_API tree_classdef_property_list * append_classdef_property(tree_classdef_property_list *list, tree_classdef_property *elt)
Definition: oct-parse.cc:8720
OCTINTERP_API tree_classdef_attribute * make_not_classdef_attribute(tree_identifier *id)
Definition: oct-parse.cc:8775
OCTINTERP_API tree_statement * make_end(const std::string &type, bool eof, const filepos &beg_pos, const filepos &end_pos)
Definition: oct-parse.cc:8192
bool m_parsing_local_functions
Definition: parse.h:758
OCTINTERP_API tree_classdef_body * append_classdef_enum_block(tree_classdef_body *body, tree_classdef_enum_block *block)
Definition: oct-parse.cc:8833
std::string m_curr_package_name
Definition: parse.h:781
bool m_fcn_file_from_relative_lookup
Definition: parse.h:749
OCTINTERP_API tree_args_block_attribute_list * make_args_attribute_list(tree_identifier *attribute_name)
Definition: oct-parse.cc:8356
OCTINTERP_API tree_function_def * make_function(token *fcn_tok, tree_parameter_list *ret_list, tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_fcn_stmt, comment_list *lc)
Definition: oct-parse.cc:8034
symbol_scope m_primary_fcn_scope
Definition: parse.h:773
OCTINTERP_API tree_statement_list * make_statement_list(tree_statement *stmt)
Definition: oct-parse.cc:9519
OCTINTERP_API octave_user_function * start_function(tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_function)
Definition: oct-parse.cc:8058
OCTINTERP_API tree_classdef_enum_list * append_classdef_enum(tree_classdef_enum_list *list, tree_classdef_enum *elt)
Definition: oct-parse.cc:8734
OCTINTERP_API tree_classdef_methods_block * make_classdef_methods_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_methods_list *mlist, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8578
OCTINTERP_API tree_constant * make_constant(token *tok_val)
Definition: oct-parse.cc:6920
OCTINTERP_API void end_token_error(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6869
OCTINTERP_API bool finish_classdef_file(tree_classdef *cls, tree_statement_list *local_fcns)
Definition: oct-parse.cc:8937
OCTINTERP_API void maybe_convert_to_braindead_shortcircuit(tree_expression *&expr)
Definition: oct-parse.cc:7239
std::shared_ptr< tree_statement_list > statement_list(void) const
Definition: parse.h:194
OCTINTERP_API tree_metaclass_query * make_metaclass_query(token *metaquery)
Definition: oct-parse.cc:9461
OCTINTERP_API tree_classdef_events_block * make_classdef_events_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_events_list *elist, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8619
OCTINTERP_API void maybe_warn_missing_semi(tree_statement_list *)
Definition: oct-parse.cc:10049
OCTINTERP_API tree_classdef_body * append_classdef_properties_block(tree_classdef_body *body, tree_classdef_properties_block *block)
Definition: oct-parse.cc:8812
std::list< std::string > m_subfunction_names
Definition: parse.h:792
OCTINTERP_API tree_switch_case * make_switch_case(token *case_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7803
OCTINTERP_API tree_switch_case * make_default_switch_case(token *default_tok, comment_list *lc, tree_statement_list *list)
Definition: oct-parse.cc:7817
OCTINTERP_API tree_expression * finish_matrix(tree_matrix *m, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9380
OCTINTERP_API tree_classdef_superclass * make_classdef_superclass(token *fqident)
Definition: oct-parse.cc:8747
bool m_autoloading
Definition: parse.h:745
void parsing_local_functions(bool flag)
Definition: parse.h:209
OCTINTERP_API tree_anon_fcn_handle * make_anon_fcn_handle(tree_parameter_list *param_list, tree_expression *expr, const filepos &at_pos)
Definition: oct-parse.cc:7002
OCTINTERP_API tree_command * make_break_command(token *break_tok)
Definition: oct-parse.cc:7594
OCTINTERP_API tree_statement_list * append_statement_list(tree_statement_list *list, char sep, tree_statement *stmt, bool warn_missing_semi)
Definition: oct-parse.cc:9525
OCTINTERP_API bool push_fcn_symtab(void)
Definition: oct-parse.cc:6889
OCTINTERP_API tree_classdef_methods_list * make_classdef_methods_list(tree_function_def *fcn_def)
Definition: oct-parse.cc:8908
OCTINTERP_API tree_expression * make_prefix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7305
OCTINTERP_API tree_statement_list * append_function_body(tree_statement_list *body, tree_statement_list *list)
Definition: oct-parse.cc:8297
OCTINTERP_API tree_classdef_enum * make_classdef_enum(tree_identifier *id, tree_expression *expr, comment_list *lc)
Definition: oct-parse.cc:8713
bool m_parsing_subfunctions
Definition: parse.h:753
OCTINTERP_API bool validate_param_list(tree_parameter_list *lst, tree_parameter_list::in_or_out type)
Definition: oct-parse.cc:9164
OCTINTERP_API tree_spmd_command * make_spmd_command(token *spmd_tok, tree_statement_list *body, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:7639
OCTINTERP_API tree_decl_init_list * make_decl_init_list(tree_decl_elt *elt)
Definition: oct-parse.cc:9144
OCTINTERP_API tree_classdef_enum_block * make_classdef_enum_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_enum_list *elist, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8674
OCTINTERP_API octave_user_function * start_classdef_external_method(tree_identifier *id, tree_parameter_list *pl)
Definition: oct-parse.cc:8840
void endfunction_found(bool flag)
Definition: parse.h:224
OCTINTERP_API tree_decl_init_list * append_decl_init_list(tree_decl_init_list *list, tree_decl_elt *elt)
Definition: oct-parse.cc:9150
OCTINTERP_API void bison_error(const std::string &s)
Definition: oct-parse.cc:9616
OCTINTERP_API tree_classdef_body * append_classdef_events_block(tree_classdef_body *body, tree_classdef_events_block *block)
Definition: oct-parse.cc:8826
OCTINTERP_API tree_index_expression * make_index_expression(tree_expression *expr, tree_argument_list *args, char type)
Definition: oct-parse.cc:9003
OCTINTERP_API tree_args_block_validation_list * append_args_validation_list(tree_args_block_validation_list *list, tree_arg_validation *arg_validation)
Definition: oct-parse.cc:8371
OCTINTERP_API tree_classdef_superclass_list * append_classdef_superclass(tree_classdef_superclass_list *list, tree_classdef_superclass *elt)
Definition: oct-parse.cc:8753
OCTINTERP_API tree_if_command_list * start_if_command(tree_expression *expr, tree_statement_list *list)
Definition: oct-parse.cc:7667
OCTINTERP_API tree_arg_size_spec * make_arg_size_spec(tree_argument_list *size_args)
Definition: oct-parse.cc:8378
OCTINTERP_API tree_expression * make_postfix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7346
OCTINTERP_API tree_expression * finish_array_list(tree_array_list *a, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9316
void * m_parser_state
Definition: parse.h:804
OCTINTERP_API tree_classdef_events_list * append_classdef_event(tree_classdef_events_list *list, tree_classdef_event *elt)
Definition: oct-parse.cc:8727
OCTINTERP_API tree_if_clause * make_elseif_clause(token *elseif_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7722
OCTINTERP_API tree_statement_list * set_stmt_print_flag(tree_statement_list *, char, bool)
Definition: oct-parse.cc:9472
std::shared_ptr< tree_classdef > m_classdef_object
Definition: parse.h:795
OCTINTERP_API tree_expression * finish_cell(tree_cell *c, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9407
OCTINTERP_API tree_arguments_block * make_arguments_block(token *arguments_tok, tree_args_block_attribute_list *attr_list, tree_args_block_validation_list *validation_list, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8313
int m_curr_fcn_depth
Definition: parse.h:769
OCTINTERP_API tree_classdef_methods_list * append_classdef_method(tree_classdef_methods_list *list, tree_function_def *fcn_def)
Definition: oct-parse.cc:8921
OCTINTERP_API tree_classdef_body * append_classdef_methods_block(tree_classdef_body *body, tree_classdef_methods_block *block)
Definition: oct-parse.cc:8819
OCTINTERP_API tree_expression * make_boolean_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:7276
OCTINTERP_API tree_expression * make_colon_expression(tree_expression *base, tree_expression *limit, tree_expression *incr=nullptr)
Definition: oct-parse.cc:7068
OCTINTERP_API tree_superclass_ref * make_superclass_ref(token *superclassref)
Definition: oct-parse.cc:9449
OCTINTERP_API tree_classdef_enum_list * make_classdef_enum_list(tree_classdef_enum *e)
Definition: oct-parse.cc:8707
OCTINTERP_API void make_script(tree_statement_list *cmds, tree_statement *end_script)
Definition: oct-parse.cc:7969
OCTINTERP_API tree_argument_list * make_argument_list(tree_expression *expr)
Definition: oct-parse.cc:9535
void classdef_object(const std::shared_ptr< tree_classdef > &obj)
Definition: parse.h:182
OCTINTERP_API tree_args_block_validation_list * make_args_validation_list(tree_arg_validation *arg_validation)
Definition: oct-parse.cc:8365
OCTINTERP_API tree_classdef_property_list * make_classdef_property_list(tree_classdef_property *prop)
Definition: oct-parse.cc:8555
OCTINTERP_API tree_classdef_attribute * make_classdef_attribute(tree_identifier *id, tree_expression *expr=nullptr)
Definition: oct-parse.cc:8766
OCTINTERP_API tree_classdef_event * make_classdef_event(comment_list *lc, tree_identifier *id)
Definition: oct-parse.cc:8658
OCTINTERP_API tree_arg_validation_fcns * make_arg_validation_fcns(tree_argument_list *fcn_args)
Definition: oct-parse.cc:8386
std::string m_parse_error_msg
Definition: parse.h:739
OCTINTERP_API bool end_token_ok(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6881
OCTINTERP_API void maybe_warn_assign_as_truth_value(tree_expression *expr)
Definition: oct-parse.cc:10013
OCTINTERP_API tree_function_def * finish_function(tree_parameter_list *ret_list, octave_user_function *fcn, comment_list *lc, int l, int c)
Definition: oct-parse.cc:8202
static std::string decode_prompt_string(const std::string &s)
Definition: cmd-edit.cc:1278
std::string text(void) const
Definition: comment-list.h:75
bool is_end_of_line(void) const
Definition: comment-list.h:81
octave_function * load_oct(const std::string &fcn_name, const std::string &file_name="", bool relative=false)
Definition: dynamic-ld.cc:149
octave_function * load_mex(const std::string &fcn_name, const std::string &file_name="", bool relative=false)
Definition: dynamic-ld.cc:229
void set_discard_warning_messages(bool flag)
Definition: error.h:102
void set_last_warning_message(const std::string &val)
Definition: error.h:205
OCTINTERP_API octave_value discard_warning_messages(const octave_value_list &args, int nargout)
Definition: error.cc:299
OCTINTERP_API octave_value last_warning_message(const octave_value_list &args, int nargout)
Definition: error.cc:343
void line(int l)
Definition: filepos.h:49
void column(int c)
Definition: filepos.h:50
octave_value PS2(const octave_value_list &args, int nargout)
octave_value PS1(const octave_value_list &args, int nargout)
void source_file(const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true)
error_system & get_error_system(void)
Definition: interpreter.h:251
tree_evaluator & get_evaluator(void)
dynamic_loader & get_dynamic_loader(void)
Definition: interpreter.h:278
octave_value_list feval(const char *name, const octave_value_list &args=octave_value_list(), int nargout=0)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
void recover_from_exception(void)
input_system & get_input_system(void)
Definition: interpreter.h:263
Definition: lex.h:766
bool input_from_eval_string(void) const
Definition: lex.h:815
symbol_scope curr_scope(void) const
Definition: lex.cc:5091
void push(const symbol_scope &scope)
Definition: lex.h:75
symbol_scope parent_scope(void) const
Definition: lex.cc:5100
bool m_looking_at_parameter_list
Definition: lex.h:371
bool m_reading_classdef_file
Definition: lex.h:438
bool m_looking_at_anon_fcn_args
Definition: lex.h:365
std::string m_help_text
Definition: lex.h:489
std::string m_package_name
Definition: lex.h:504
void mark_as_variables(const std::list< std::string > &lst)
Definition: lex.cc:5248
filepos m_filepos
Definition: lex.h:470
bool m_arguments_is_keyword
Definition: lex.h:389
std::string m_current_input_line
Definition: lex.h:483
bool m_end_of_input
Definition: lex.h:355
bool m_allow_command_syntax
Definition: lex.h:358
int m_looping
Definition: lex.h:451
bool m_parsing_classdef_set_method
Definition: lex.h:422
bool m_parsing_anon_fcn_body
Definition: lex.h:396
std::stack< bool > m_parsed_function_name
Definition: lex.h:513
bool m_at_beginning_of_statement
Definition: lex.h:362
std::string m_fcn_file_full_name
Definition: lex.h:498
bool m_looking_at_return_list
Definition: lex.h:368
bool m_parsing_classdef_get_method
Definition: lex.h:419
bool m_parsing_classdef_decl
Definition: lex.h:407
bool m_looking_at_matrix_or_assign_lhs
Definition: lex.h:379
bool m_parsing_classdef_superclass
Definition: lex.h:411
bool m_looking_for_object_index
Definition: lex.h:382
bbp_nesting_level m_nesting_level
Definition: lex.h:520
bool m_parsing_classdef
Definition: lex.h:402
bool m_reading_script_file
Definition: lex.h:435
bool m_classdef_element_names_are_keywords
Definition: lex.h:393
bool m_reading_fcn_file
Definition: lex.h:432
std::string m_function_text
Definition: lex.h:492
std::string m_fcn_file_name
Definition: lex.h:495
bool m_looking_at_decl_list
Definition: lex.h:375
symbol_table_context m_symtab_context
Definition: lex.h:516
bool m_parsing_class_method
Definition: lex.h:399
bool m_buffer_function_text
Definition: lex.h:442
bool m_force_script
Definition: lex.h:429
void mark_as_variable(const std::string &nm)
Definition: lex.cc:5239
std::string m_dir_name
Definition: lex.h:501
bool m_maybe_classdef_get_set_method
Definition: lex.h:416
bool m_looking_at_indirect_ref
Definition: lex.h:386
int m_looking_at_function_handle
Definition: lex.h:457
int m_defining_fcn
Definition: lex.h:454
virtual std::string doc_string(const std::string &="") const
Definition: ov-fcn.h:221
virtual void maybe_relocate_end(void)
Definition: ov-fcn.h:194
void mark_relative(void)
Definition: ov-fcn.h:204
void document(const std::string &ds)
Definition: ov-fcn.h:218
void stash_dir_name(const std::string &dir)
Definition: ov-fcn.h:174
void stash_dispatch_class(const std::string &nm)
Definition: ov-fcn.h:148
std::string name(void) const
Definition: ov-fcn.h:208
void stash_package_name(const std::string &pack)
Definition: ov-fcn.h:152
virtual void accept(octave::tree_walker &)
Definition: ov-fcn.h:225
virtual void stash_subfunction_names(const std::list< std::string > &)
Definition: ov-fcn.h:199
static const octave_value instance
Definition: ov-null-mat.h:52
static const octave_value instance
Definition: ov-null-mat.h:96
static const octave_value instance
Definition: ov-null-mat.h:73
void stash_fcn_file_name(const std::string &nm)
Definition: ov-usr-fcn.h:96
std::string fcn_file_name(void) const
Definition: ov-usr-fcn.h:107
octave::tree_statement_list * body(void)
Definition: ov-usr-fcn.h:120
octave::sys::time time_parsed(void) const
Definition: ov-usr-fcn.h:109
void cache_function_text(const std::string &text, const octave::sys::time &timestamp)
Definition: ov-usr-fcn.cc:118
void stash_fcn_file_time(const octave::sys::time &t)
Definition: ov-usr-fcn.h:101
octave::symbol_scope scope(void)
Definition: ov-usr-fcn.h:94
void stash_trailing_comment(octave::comment_list *tc)
Definition: ov-usr-fcn.h:260
void stash_function_name(const std::string &s)
Definition: ov-usr-fcn.h:311
void mark_as_system_fcn_file(void)
Definition: ov-usr-fcn.cc:340
octave_user_function * define_ret_list(octave::tree_parameter_list *t)
Definition: ov-usr-fcn.cc:240
void mark_as_classdef_method(void)
Definition: ov-usr-fcn.h:373
octave_user_function * user_function_value(bool=false)
Definition: ov-usr-fcn.h:228
int beginning_column(void) const
Definition: ov-usr-fcn.h:243
void mark_as_classdef_constructor(void)
Definition: ov-usr-fcn.h:357
void accept(octave::tree_walker &tw)
Definition: ov-usr-fcn.cc:499
void mark_as_legacy_constructor(void)
Definition: ov-usr-fcn.h:349
std::map< std::string, octave_value > subfunctions(void) const
Definition: ov-usr-fcn.cc:408
void stash_leading_comment(octave::comment_list *lc)
Definition: ov-usr-fcn.h:258
int beginning_line(void) const
Definition: ov-usr-fcn.h:242
void stash_fcn_location(int line, int col)
Definition: ov-usr-fcn.h:236
void stash_fcn_end_location(int line, int col)
Definition: ov-usr-fcn.h:245
void mark_as_legacy_method(void)
Definition: ov-usr-fcn.h:365
void mark_as_subfunction(void)
Definition: ov-usr-fcn.h:313
void mark_as_nested_function(void)
Definition: ov-usr-fcn.h:343
octave_value_list & prepend(const octave_value &val)
Definition: ovl.cc:80
OCTINTERP_API octave_function * function_value(bool silent=false) const
unary_op
Definition: ov.h:77
@ op_hermitian
Definition: ov.h:82
@ op_uminus
Definition: ov.h:80
@ op_not
Definition: ov.h:78
@ op_transpose
Definition: ov.h:81
@ unknown_unary_op
Definition: ov.h:86
@ op_uplus
Definition: ov.h:79
@ op_incr
Definition: ov.h:83
@ op_decr
Definition: ov.h:84
bool is_defined(void) const
Definition: ov.h:637
assign_op
Definition: ov.h:132
@ op_pow_eq
Definition: ov.h:139
@ op_asn_eq
Definition: ov.h:133
@ op_add_eq
Definition: ov.h:134
@ op_el_pow_eq
Definition: ov.h:143
@ op_mul_eq
Definition: ov.h:136
@ op_div_eq
Definition: ov.h:137
@ op_el_and_eq
Definition: ov.h:144
@ op_el_ldiv_eq
Definition: ov.h:142
@ op_sub_eq
Definition: ov.h:135
@ op_el_mul_eq
Definition: ov.h:140
@ op_el_or_eq
Definition: ov.h:145
@ unknown_assign_op
Definition: ov.h:147
@ op_el_div_eq
Definition: ov.h:141
@ op_ldiv_eq
Definition: ov.h:138
OCTINTERP_API octave_user_function * user_function_value(bool silent=false) const
OCTINTERP_API octave_user_code * user_code_value(bool silent=false) const
@ magic_colon_t
Definition: ov.h:168
binary_op
Definition: ov.h:90
@ op_ldiv
Definition: ov.h:96
@ op_ne
Definition: ov.h:102
@ unknown_binary_op
Definition: ov.h:111
@ op_el_or
Definition: ov.h:108
@ op_el_ldiv
Definition: ov.h:106
@ op_pow
Definition: ov.h:95
@ op_ge
Definition: ov.h:100
@ op_div
Definition: ov.h:94
@ op_el_pow
Definition: ov.h:105
@ op_mul
Definition: ov.h:93
@ op_add
Definition: ov.h:91
@ op_sub
Definition: ov.h:92
@ op_el_mul
Definition: ov.h:103
@ op_le
Definition: ov.h:98
@ op_lt
Definition: ov.h:97
@ op_gt
Definition: ov.h:101
@ op_eq
Definition: ov.h:99
@ op_el_and
Definition: ov.h:107
@ op_el_div
Definition: ov.h:104
bool isempty(void) const
Definition: ov.h:646
OCTINTERP_API octave_idx_type length(void) const
std::string m_file_name
Definition: oct-parse.cc:6533
parse_exception(const parse_exception &)=default
int column(void) const
Definition: oct-parse.cc:6524
parse_exception(const std::string &message, const std::string &fcn_name="", const std::string &file_name="", int line=-1, int column=-1)
Definition: oct-parse.cc:6500
std::string fcn_name(void) const
Definition: oct-parse.cc:6520
std::string message(void) const
Definition: oct-parse.cc:6515
const char * what(void) const noexcept
Definition: oct-parse.cc:6518
std::string m_message
Definition: oct-parse.cc:6530
std::string file_name(void) const
Definition: oct-parse.cc:6521
~parse_exception(void)=default
std::string m_fcn_name
Definition: oct-parse.cc:6532
int line(void) const
Definition: oct-parse.cc:6523
void visit_octave_user_script(octave_user_script &script)
Definition: oct-parse.cc:6561
symbol_scope m_scope
Definition: oct-parse.cc:6616
void visit_index_expression(tree_index_expression &idx_expr)
Definition: oct-parse.cc:6595
void visit_octave_user_function(octave_user_function &fcn)
Definition: oct-parse.cc:6571
symbol_scope get_scope(void) const
Definition: oct-parse.cc:6552
std::list< parse_exception > m_error_list
Definition: oct-parse.cc:6618
~parse_tree_validator(void)=default
bool ok(void) const
Definition: oct-parse.cc:6554
parse_tree_validator & operator=(const parse_tree_validator &)=delete
std::list< parse_exception > error_list(void) const
Definition: oct-parse.cc:6556
parse_tree_validator(const parse_tree_validator &)=delete
Definition: parse.h:829
OCTINTERP_API int run(void)
Definition: oct-parse.cc:9703
OCTINTERP_API int run(void)
Definition: oct-parse.cc:9820
interpreter & m_interpreter
Definition: parse.h:905
std::shared_ptr< input_reader > m_reader
Definition: parse.h:907
void mark_static(void)
Definition: symscope.h:441
void mark_primary_fcn_scope(void)
Definition: symscope.h:643
std::string fcn_file_name(void) const
Definition: symscope.h:633
void cache_fcn_name(const std::string &name)
Definition: symscope.h:587
bool is_variable(const std::string &nm) const
Definition: symscope.h:671
void set_parent(const symbol_scope &p)
Definition: symscope.h:609
void install_subfunction(const std::string &name, const octave_value &fval)
Definition: symscope.h:496
void update_nest(void)
Definition: symscope.h:676
symbol_record insert(const std::string &name)
Definition: symscope.h:485
void cache_fcn_file_name(const std::string &name)
Definition: symscope.h:621
std::string fcn_name(void) const
Definition: symscope.h:582
void set_nesting_depth(std::size_t depth)
Definition: symscope.h:425
void set_primary_parent(const symbol_scope &p)
Definition: symscope.h:615
void cache_name(const std::string &name)
Definition: symscope.h:576
void install_nestfunction(const std::string &name, const octave_value &fval, const symbol_scope &fcn_scope)
Definition: symscope.h:503
void cache_dir_name(const std::string &name)
Definition: symscope.h:627
octave_value builtin_find(const std::string &name, const symbol_scope &search_scope=symbol_scope())
Definition: symtab.cc:190
void install_local_function(const std::string &name, const octave_value &fcn, const std::string &file_name)
Definition: symtab.cc:356
Definition: token.h:39
std::string text(void) const
Definition: token.cc:97
std::string text_rep(void) const
Definition: token.cc:138
int line(void) const
Definition: token.h:116
std::string superclass_method_name(void) const
Definition: token.cc:124
filepos beg_pos(void) const
Definition: token.h:109
octave_value number(void) const
Definition: token.cc:104
end_tok_type ettype(void) const
Definition: token.cc:117
int token_value(void) const
Definition: token.h:106
end_tok_type
Definition: token.h:53
@ events_end
Definition: token.h:58
@ methods_end
Definition: token.h:62
@ enumeration_end
Definition: token.h:57
@ unwind_protect_end
Definition: token.h:67
@ try_catch_end
Definition: token.h:66
@ properties_end
Definition: token.h:64
@ switch_end
Definition: token.h:65
@ simple_end
Definition: token.h:54
@ classdef_end
Definition: token.h:56
@ arguments_end
Definition: token.h:55
@ if_end
Definition: token.h:61
@ parfor_end
Definition: token.h:63
@ for_end
Definition: token.h:59
@ function_end
Definition: token.h:60
@ while_end
Definition: token.h:69
@ spmd_end
Definition: token.h:68
std::string superclass_class_name(void) const
Definition: token.cc:131
int column(void) const
Definition: token.h:117
void accept(tree_walker &tw)
tree_arg_size_spec * size_spec(void)
void arg_name(tree_expression *name)
tree_identifier * class_name(void)
tree_arg_validation_fcns * validation_fcns(void)
bool has_magic_tilde(void) const
Definition: pt-arg-list.h:72
bool is_valid_lvalue_list(void) const
Definition: pt-arg-list.cc:81
std::list< std::string > variable_names(void) const
Definition: pt-arg-list.cc:116
tree_expression * remove_front(void)
Definition: pt-arg-list.h:82
void mark_as_simple_assign_lhs(void)
Definition: pt-arg-list.h:92
bool is_simple_assign_lhs(void)
Definition: pt-arg-list.h:94
void accept(tree_walker &tw)
bool all_elements_are_constant(void) const
tree_expression * rhs(void)
Definition: pt-binop.h:91
tree_expression * lhs(void)
Definition: pt-binop.h:90
void preserve_operands(void)
Definition: pt-binop.h:80
octave_value::binary_op op_type(void) const
Definition: pt-binop.h:88
bool have_doc_string(void) const
Definition: pt-classdef.h:343
void doc_string(const std::string &txt)
Definition: pt-classdef.h:339
void accept(tree_walker &tw)
Definition: pt-classdef.h:820
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition: pt-colon.cc:54
void accept(tree_walker &tw)
Definition: pt-colon.h:101
void stash_original_text(const std::string &s)
Definition: pt-const.h:98
void mark_global(void)
Definition: pt-decl.h:189
void mark_persistent(void)
Definition: pt-decl.h:195
tree_identifier * ident(void)
Definition: pt-decl.h:88
std::list< std::string > variable_names(void) const
Definition: pt-decl.h:148
void add_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:4642
void remove_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:4650
octave_map get_autoload_map(void) const
Definition: pt-eval.cc:4582
virtual bool is_binary_expression(void) const
Definition: pt-exp.h:80
virtual bool is_index_expression(void) const
Definition: pt-exp.h:72
virtual bool is_assignment_expression(void) const
Definition: pt-exp.h:74
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
virtual std::string name(void) const
Definition: pt-exp.h:106
tree_expression * set_postfix_index(char type)
Definition: pt-exp.h:120
virtual bool is_constant(void) const
Definition: pt-exp.h:64
int paren_count(void) const
Definition: pt-exp.h:92
void mark_as_for_cmd_expr(void)
Definition: pt-exp.h:110
tree_expression * set_print_flag(bool print)
Definition: pt-exp.h:126
bool is_postfix_indexed(void) const
Definition: pt-exp.h:94
virtual bool is_matrix(void) const
Definition: pt-exp.h:66
virtual bool is_identifier(void) const
Definition: pt-exp.h:70
octave_value function(void)
Definition: pt-cmd.h:119
void accept(tree_walker &tw)
Definition: pt-cmd.h:114
virtual bool is_black_hole(void) const
Definition: pt-id.h:75
std::string name(void) const
Definition: pt-id.h:73
std::string name(void) const
Definition: pt-idx.cc:139
bool is_word_list_cmd(void) const
Definition: pt-idx.h:96
tree_index_expression * append(tree_argument_list *lst=nullptr, char t='(')
Definition: pt-idx.cc:81
void mark_varargs_only(void)
Definition: pt-misc.h:83
void mark_varargs(void)
Definition: pt-misc.h:81
void mark_as_formal_parameters(void)
Definition: pt-misc.cc:48
void accept(tree_walker &tw)
Definition: pt-stmt.h:199
bool is_null_statement(void) const
Definition: pt-stmt.h:105
int column(void) const
Definition: pt-stmt.cc:127
void set_print_flag(bool print_flag)
Definition: pt-stmt.cc:64
int line(void) const
Definition: pt-stmt.cc:119
bool is_expression(void) const
Definition: pt-stmt.h:80
void set_expression(tree_expression *e)
Definition: pt-stmt.h:120
tree_expression * expression(void)
Definition: pt-stmt.h:101
virtual int column(void) const
Definition: pt.h:62
virtual int line(void) const
Definition: pt.h:60
void set_location(int l, int c)
Definition: pt.h:68
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
OCTINTERP_API void print_usage(void)
Definition: defun-int.h:72
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
Definition: defun.h:111
#define DEFUN(name, args_name, nargout_name, doc)
Macro to define a builtin function.
Definition: defun.h:56
void error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1024
void warning(const char *fmt,...)
Definition: error.cc:1054
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1069
void parse_error(const char *fmt,...)
Definition: error.cc:1084
void error(const char *fmt,...)
Definition: error.cc:979
void message(const char *name, const char *fmt,...)
Definition: error.cc:947
#define panic_impossible()
Definition: error.h:508
std::string dir_sep_str(void)
Definition: file-ops.cc:240
std::string tilde_expand(const std::string &name)
Definition: file-ops.cc:283
interpreter & __get_interpreter__(void)
symbol_table & __get_symbol_table__(void)
tree_evaluator & __get_evaluator__(void)
bool iskeyword(const std::string &s)
Definition: lex.cc:1359
std::FILE * fopen(const std::string &filename, const std::string &mode)
Definition: lo-sysdep.cc:314
std::ifstream ifstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:424
T octave_idx_type m
Definition: mx-inlines.cc:773
OCTAVE_EXPORT octave_value_list Feval(octave::interpreter &interp, const octave_value_list &args, int nargout)
Definition: oct-parse.cc:10548
static const yytype_uint8 yyr1[]
Definition: oct-parse.cc:1469
void * malloc(unsigned)
#define yyss
Definition: oct-parse.cc:3080
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: oct-parse.cc:598
#define YYMAXDEPTH
Definition: oct-parse.cc:1719
#define YYSTACK_FREE
Definition: oct-parse.cc:636
static const yytype_int8 yytranslate[]
Definition: oct-parse.cc:750
yysymbol_kind_t
Definition: oct-parse.cc:193
@ YYSYMBOL_END
Definition: oct-parse.cc:252
@ YYSYMBOL_POW
Definition: oct-parse.cc:247
@ YYSYMBOL_spmd_command
Definition: oct-parse.cc:347
@ YYSYMBOL_INPUT_FILE
Definition: oct-parse.cc:291
@ YYSYMBOL_param_list_beg
Definition: oct-parse.cc:350
@ YYSYMBOL_CLASSDEF
Definition: oct-parse.cc:277
@ YYSYMBOL_TRANSPOSE
Definition: oct-parse.cc:244
@ YYSYMBOL_method_decl
Definition: oct-parse.cc:398
@ YYSYMBOL_function_body
Definition: oct-parse.cc:367
@ YYSYMBOL_opt_list
Definition: oct-parse.cc:297
@ YYSYMBOL_class_name
Definition: oct-parse.cc:377
@ YYSYMBOL_7_
Definition: oct-parse.cc:202
@ YYSYMBOL_matrix
Definition: oct-parse.cc:311
@ YYSYMBOL_3_
Definition: oct-parse.cc:198
@ YYSYMBOL_EXPR_NE
Definition: oct-parse.cc:236
@ YYSYMBOL_MINUS_MINUS
Definition: oct-parse.cc:246
@ YYSYMBOL_power_expr
Definition: oct-parse.cc:324
@ YYSYMBOL_param_list2
Definition: oct-parse.cc:355
@ YYSYMBOL_YYUNDEF
Definition: oct-parse.cc:197
@ YYSYMBOL_anon_fcn_begin
Definition: oct-parse.cc:414
@ YYSYMBOL_EXPR_LT
Definition: oct-parse.cc:233
@ YYSYMBOL_class_body1
Definition: oct-parse.cc:389
@ YYSYMBOL_properties_block
Definition: oct-parse.cc:390
@ YYSYMBOL_14_
Definition: oct-parse.cc:209
@ YYSYMBOL_function_beg
Definition: oct-parse.cc:363
@ YYSYMBOL_TRY
Definition: oct-parse.cc:272
@ YYSYMBOL_function_body1
Definition: oct-parse.cc:369
@ YYSYMBOL_parse_error
Definition: oct-parse.cc:416
@ YYSYMBOL_19_
Definition: oct-parse.cc:214
@ YYSYMBOL_class_property
Definition: oct-parse.cc:394
@ YYSYMBOL_magic_tilde
Definition: oct-parse.cc:320
@ YYSYMBOL_UNTIL
Definition: oct-parse.cc:259
@ YYSYMBOL_classdef_beg
Definition: oct-parse.cc:380
@ YYSYMBOL_204_1
Definition: oct-parse.cc:399
@ YYSYMBOL_enumeration_beg
Definition: oct-parse.cc:409
@ YYSYMBOL_begin_file
Definition: oct-parse.cc:361
@ YYSYMBOL_jump_command
Definition: oct-parse.cc:346
@ YYSYMBOL_HERMITIAN
Definition: oct-parse.cc:243
@ YYSYMBOL_17_
Definition: oct-parse.cc:212
@ YYSYMBOL_IF
Definition: oct-parse.cc:261
@ YYSYMBOL_LEFTDIV
Definition: oct-parse.cc:239
@ YYSYMBOL_enum_block
Definition: oct-parse.cc:408
@ YYSYMBOL_PROPERTIES
Definition: oct-parse.cc:278
@ YYSYMBOL_list1
Definition: oct-parse.cc:299
@ YYSYMBOL_method
Definition: oct-parse.cc:400
@ YYSYMBOL_ELSEIF
Definition: oct-parse.cc:262
@ YYSYMBOL_simple_list
Definition: oct-parse.cc:295
@ YYSYMBOL_property_list1
Definition: oct-parse.cc:393
@ YYSYMBOL_classdef
Definition: oct-parse.cc:381
@ YYSYMBOL_at_first_executable_stmt
Definition: oct-parse.cc:368
@ YYSYMBOL_switch_case
Definition: oct-parse.cc:343
@ YYSYMBOL_case_list1
Definition: oct-parse.cc:342
@ YYSYMBOL_UNARY
Definition: oct-parse.cc:292
@ YYSYMBOL_NUMBER
Definition: oct-parse.cc:249
@ YYSYMBOL_superclass_list1
Definition: oct-parse.cc:386
@ YYSYMBOL_file
Definition: oct-parse.cc:362
@ YYSYMBOL_return_list
Definition: oct-parse.cc:357
@ YYSYMBOL_YYerror
Definition: oct-parse.cc:196
@ YYSYMBOL_BREAK
Definition: oct-parse.cc:267
@ YYSYMBOL_SET
Definition: oct-parse.cc:286
@ YYSYMBOL_arg_name
Definition: oct-parse.cc:374
@ YYSYMBOL_OR_EQ
Definition: oct-parse.cc:228
@ YYSYMBOL_12_
Definition: oct-parse.cc:207
@ YYSYMBOL_constant
Definition: oct-parse.cc:310
@ YYSYMBOL_opt_sep_no_nl
Definition: oct-parse.cc:418
@ YYSYMBOL_push_fcn_symtab
Definition: oct-parse.cc:349
@ YYSYMBOL_EXPR_AND
Definition: oct-parse.cc:231
@ YYSYMBOL_property_list
Definition: oct-parse.cc:392
@ YYSYMBOL_loop_command
Definition: oct-parse.cc:345
@ YYSYMBOL_sep_no_nl
Definition: oct-parse.cc:417
@ YYSYMBOL_21_n_
Definition: oct-parse.cc:216
@ YYSYMBOL_methods_block
Definition: oct-parse.cc:395
@ YYSYMBOL_10_
Definition: oct-parse.cc:205
@ YYSYMBOL_LEXICAL_ERROR
Definition: oct-parse.cc:289
@ YYSYMBOL_parsing_local_fcns
Definition: oct-parse.cc:359
@ YYSYMBOL_attr_list1
Definition: oct-parse.cc:383
@ YYSYMBOL_EXPR_LE
Definition: oct-parse.cc:234
@ YYSYMBOL_assign_lhs
Definition: oct-parse.cc:327
@ YYSYMBOL_EXPR_GT
Definition: oct-parse.cc:238
@ YYSYMBOL_FCN
Definition: oct-parse.cc:287
@ YYSYMBOL_CATCH
Definition: oct-parse.cc:273
@ YYSYMBOL_args_validation_list
Definition: oct-parse.cc:373
@ YYSYMBOL_simple_expr
Definition: oct-parse.cc:326
@ YYSYMBOL_if_cmd_list
Definition: oct-parse.cc:336
@ YYSYMBOL_magic_colon
Definition: oct-parse.cc:319
@ YYSYMBOL_opt_fcn_list
Definition: oct-parse.cc:300
@ YYSYMBOL_enum_list
Definition: oct-parse.cc:410
@ YYSYMBOL_LEFTDIV_EQ
Definition: oct-parse.cc:221
@ YYSYMBOL_events_beg
Definition: oct-parse.cc:404
@ YYSYMBOL_8_
Definition: oct-parse.cc:203
@ YYSYMBOL_EXPR_OR_OR
Definition: oct-parse.cc:230
@ YYSYMBOL_indirect_ref_op
Definition: oct-parse.cc:322
@ YYSYMBOL_function
Definition: oct-parse.cc:366
@ YYSYMBOL_9_
Definition: oct-parse.cc:204
@ YYSYMBOL_cell_or_matrix_row
Definition: oct-parse.cc:315
@ YYSYMBOL_class_event
Definition: oct-parse.cc:407
@ YYSYMBOL_function_end
Definition: oct-parse.cc:365
@ YYSYMBOL_properties_beg
Definition: oct-parse.cc:391
@ YYSYMBOL_fcn_list
Definition: oct-parse.cc:301
@ YYSYMBOL_expression
Definition: oct-parse.cc:329
@ YYSYMBOL_PARFOR
Definition: oct-parse.cc:256
@ YYSYMBOL_METAQUERY
Definition: oct-parse.cc:282
@ YYSYMBOL_args_attr_list
Definition: oct-parse.cc:372
@ YYSYMBOL_DQ_STRING
Definition: oct-parse.cc:253
@ YYSYMBOL_events_list1
Definition: oct-parse.cc:406
@ YYSYMBOL_if_cmd_list1
Definition: oct-parse.cc:337
@ YYSYMBOL_methods_list1
Definition: oct-parse.cc:402
@ YYSYMBOL_ELEFTDIV_EQ
Definition: oct-parse.cc:225
@ YYSYMBOL_11_
Definition: oct-parse.cc:206
@ YYSYMBOL_methods_beg
Definition: oct-parse.cc:396
@ YYSYMBOL_ARGUMENTS
Definition: oct-parse.cc:288
@ YYSYMBOL_param_list
Definition: oct-parse.cc:353
@ YYSYMBOL_superclass_identifier
Definition: oct-parse.cc:307
@ YYSYMBOL_EMUL
Definition: oct-parse.cc:240
@ YYSYMBOL_events_block
Definition: oct-parse.cc:403
@ YYSYMBOL_simple_list1
Definition: oct-parse.cc:296
@ YYSYMBOL_word_list_cmd
Definition: oct-parse.cc:304
@ YYSYMBOL_ENUMERATION
Definition: oct-parse.cc:281
@ YYSYMBOL_SUPERCLASSREF
Definition: oct-parse.cc:283
@ YYSYMBOL_attr_list
Definition: oct-parse.cc:382
@ YYSYMBOL_string
Definition: oct-parse.cc:309
@ YYSYMBOL_superclass_list
Definition: oct-parse.cc:385
@ YYSYMBOL_default_value
Definition: oct-parse.cc:379
@ YYSYMBOL_identifier
Definition: oct-parse.cc:306
@ YYSYMBOL_nl
Definition: oct-parse.cc:420
@ YYSYMBOL_15_
Definition: oct-parse.cc:210
@ YYSYMBOL_6_
Definition: oct-parse.cc:201
@ YYSYMBOL_ELSE
Definition: oct-parse.cc:263
@ YYSYMBOL_primary_expr
Definition: oct-parse.cc:318
@ YYSYMBOL_20_
Definition: oct-parse.cc:215
@ YYSYMBOL_switch_command
Definition: oct-parse.cc:340
@ YYSYMBOL_FUNC_RET
Definition: oct-parse.cc:269
@ YYSYMBOL_EXPR_GE
Definition: oct-parse.cc:237
@ YYSYMBOL_cell_rows
Definition: oct-parse.cc:314
@ YYSYMBOL_sep
Definition: oct-parse.cc:421
@ YYSYMBOL_END_OF_INPUT
Definition: oct-parse.cc:290
@ YYSYMBOL_CONTINUE
Definition: oct-parse.cc:268
@ YYSYMBOL_EMUL_EQ
Definition: oct-parse.cc:223
@ YYSYMBOL_MUL_EQ
Definition: oct-parse.cc:219
@ YYSYMBOL_EPOW_EQ
Definition: oct-parse.cc:226
@ YYSYMBOL_EPOW
Definition: oct-parse.cc:248
@ YYSYMBOL_FCN_HANDLE
Definition: oct-parse.cc:276
@ YYSYMBOL_opt_param_list
Definition: oct-parse.cc:352
@ YYSYMBOL_attr
Definition: oct-parse.cc:384
@ YYSYMBOL_arguments_block
Definition: oct-parse.cc:370
@ YYSYMBOL_stash_comment
Definition: oct-parse.cc:415
@ YYSYMBOL_WHILE
Definition: oct-parse.cc:257
@ YYSYMBOL_18_
Definition: oct-parse.cc:213
@ YYSYMBOL_class_enum
Definition: oct-parse.cc:412
@ YYSYMBOL_declaration
Definition: oct-parse.cc:331
@ YYSYMBOL_arg_list
Definition: oct-parse.cc:321
@ YYSYMBOL_UNWIND
Definition: oct-parse.cc:270
@ YYSYMBOL_else_clause
Definition: oct-parse.cc:339
@ YYSYMBOL_param_list_end
Definition: oct-parse.cc:351
@ YYSYMBOL_GET
Definition: oct-parse.cc:285
@ YYSYMBOL_matrix_rows
Definition: oct-parse.cc:312
@ YYSYMBOL_SWITCH
Definition: oct-parse.cc:264
@ YYSYMBOL_return_list1
Definition: oct-parse.cc:358
@ YYSYMBOL_SUB_EQ
Definition: oct-parse.cc:218
@ YYSYMBOL_opt_sep
Definition: oct-parse.cc:422
@ YYSYMBOL_fcn_handle
Definition: oct-parse.cc:316
@ YYSYMBOL_decl_init_list
Definition: oct-parse.cc:332
@ YYSYMBOL_YYACCEPT
Definition: oct-parse.cc:293
@ YYSYMBOL_statement
Definition: oct-parse.cc:303
@ YYSYMBOL_EXPR_AND_AND
Definition: oct-parse.cc:229
@ YYSYMBOL_4_
Definition: oct-parse.cc:199
@ YYSYMBOL_EXPR_EQ
Definition: oct-parse.cc:235
@ YYSYMBOL_assign_expr
Definition: oct-parse.cc:328
@ YYSYMBOL_param_list_elt
Definition: oct-parse.cc:356
@ YYSYMBOL_arguments_beg
Definition: oct-parse.cc:371
@ YYSYMBOL_EDIV
Definition: oct-parse.cc:241
@ YYSYMBOL_select_command
Definition: oct-parse.cc:334
@ YYSYMBOL_YYEOF
Definition: oct-parse.cc:195
@ YYSYMBOL_list
Definition: oct-parse.cc:298
@ YYSYMBOL_GLOBAL
Definition: oct-parse.cc:274
@ YYSYMBOL_13_
Definition: oct-parse.cc:208
@ YYSYMBOL_opt_nl
Definition: oct-parse.cc:419
@ YYSYMBOL_decl_elt
Definition: oct-parse.cc:333
@ YYSYMBOL_SPMD
Definition: oct-parse.cc:260
@ YYSYMBOL_AND_EQ
Definition: oct-parse.cc:227
@ YYSYMBOL_size_spec
Definition: oct-parse.cc:376
@ YYSYMBOL_push_script_symtab
Definition: oct-parse.cc:360
@ YYSYMBOL_class_body
Definition: oct-parse.cc:388
@ YYSYMBOL_input
Definition: oct-parse.cc:294
@ YYSYMBOL_oper_expr
Definition: oct-parse.cc:323
@ YYSYMBOL_DO
Definition: oct-parse.cc:258
@ YYSYMBOL_POW_EQ
Definition: oct-parse.cc:222
@ YYSYMBOL_colon_expr
Definition: oct-parse.cc:325
@ YYSYMBOL_methods_list
Definition: oct-parse.cc:401
@ YYSYMBOL_cell
Definition: oct-parse.cc:313
@ YYSYMBOL_SQ_STRING
Definition: oct-parse.cc:254
@ YYSYMBOL_case_list
Definition: oct-parse.cc:341
@ YYSYMBOL_CASE
Definition: oct-parse.cc:265
@ YYSYMBOL_default_case
Definition: oct-parse.cc:344
@ YYSYMBOL_meta_identifier
Definition: oct-parse.cc:308
@ YYSYMBOL_word_list
Definition: oct-parse.cc:305
@ YYSYMBOL_YYEMPTY
Definition: oct-parse.cc:194
@ YYSYMBOL_method_decl1
Definition: oct-parse.cc:397
@ YYSYMBOL_CLEANUP
Definition: oct-parse.cc:271
@ YYSYMBOL_OTHERWISE
Definition: oct-parse.cc:266
@ YYSYMBOL_PERSISTENT
Definition: oct-parse.cc:275
@ YYSYMBOL_EDIV_EQ
Definition: oct-parse.cc:224
@ YYSYMBOL_EXPR_OR
Definition: oct-parse.cc:232
@ YYSYMBOL_STRUCT_ELT
Definition: oct-parse.cc:250
@ YYSYMBOL_fcn_name
Definition: oct-parse.cc:364
@ YYSYMBOL_except_command
Definition: oct-parse.cc:348
@ YYSYMBOL_superclass
Definition: oct-parse.cc:387
@ YYSYMBOL_DIV_EQ
Definition: oct-parse.cc:220
@ YYSYMBOL_16_
Definition: oct-parse.cc:211
@ YYSYMBOL_fcn_list1
Definition: oct-parse.cc:302
@ YYSYMBOL_NAME
Definition: oct-parse.cc:251
@ YYSYMBOL_5_
Definition: oct-parse.cc:200
@ YYSYMBOL_ADD_EQ
Definition: oct-parse.cc:217
@ YYSYMBOL_ELEFTDIV
Definition: oct-parse.cc:242
@ YYSYMBOL_PLUS_PLUS
Definition: oct-parse.cc:245
@ YYSYMBOL_FOR
Definition: oct-parse.cc:255
@ YYSYMBOL_arg_validation
Definition: oct-parse.cc:375
@ YYSYMBOL_enum_list1
Definition: oct-parse.cc:411
@ YYSYMBOL_validation_fcns
Definition: oct-parse.cc:378
@ YYSYMBOL_FQ_IDENT
Definition: oct-parse.cc:284
@ YYSYMBOL_events_list
Definition: oct-parse.cc:405
@ YYSYMBOL_if_command
Definition: oct-parse.cc:335
@ YYSYMBOL_param_list1
Definition: oct-parse.cc:354
@ YYSYMBOL_command
Definition: oct-parse.cc:330
@ YYSYMBOL_elseif_clause
Definition: oct-parse.cc:338
@ YYSYMBOL_METHODS
Definition: oct-parse.cc:279
@ YYSYMBOL_stmt_begin
Definition: oct-parse.cc:413
@ YYSYMBOL_EVENTS
Definition: oct-parse.cc:280
@ YYSYMBOL_anon_fcn_handle
Definition: oct-parse.cc:317
octave_value load_fcn_from_file(const std::string &file_name, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, const std::string &fcn_name, bool autoload)
Definition: oct-parse.cc:10117
void cleanup_statement_list(tree_statement_list **lst)
Definition: oct-parse.cc:10501
#define YY_ASSERT(E)
Definition: oct-parse.cc:618
#define yyerrstatus
Definition: oct-parse.cc:3078
#define YY_(Msgid)
Definition: oct-parse.cc:552
#define YYNOMEM
Definition: oct-parse.cc:1551
#define yypstate
Definition: oct-parse.cc:75
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
Definition: oct-parse.cc:10370
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: oct-parse.cc:599
#define YYNSTATES
Definition: oct-parse.cc:735
#define YYSTYPE
Definition: oct-parse.cc:67
#define yypull_parse
Definition: oct-parse.cc:71
#define yypstate_delete
Definition: oct-parse.cc:74
#define YY_IGNORE_USELESS_CAST_END
Definition: oct-parse.cc:614
#define yypstate_clear
Definition: oct-parse.cc:73
#define yypstate_new
Definition: oct-parse.cc:72
short yytype_int16
Definition: oct-parse.cc:463
octave_value parse_fcn_file(interpreter &interp, const std::string &full_file, const std::string &file, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup)
Definition: oct-parse.cc:9860
static const yytype_int16 yydefact[]
Definition: oct-parse.cc:969
#define YYABORT
Definition: oct-parse.cc:1549
#define YYSTACK_BYTES(N)
Definition: oct-parse.cc:679
int octave_pull_parse(octave_pstate *yyps, octave::base_parser &parser)
Definition: oct-parse.cc:3064
yytype_int16 yy_state_t
Definition: oct-parse.cc:539
int octave_push_parse(octave_pstate *yyps, int yypushed_char, OCTAVE_STYPE const *yypushed_val, octave::base_parser &parser)
Definition: oct-parse.cc:3141
static const yytype_int16 yydefgoto[]
Definition: oct-parse.cc:1050
#define YY_REDUCE_PRINT(Rule)
Definition: oct-parse.cc:1702
#define YY_CAST(Type, Val)
Definition: oct-parse.cc:174
static const yytype_int16 yypact[]
Definition: oct-parse.cc:904
#define yylex
Definition: oct-parse.cc:76
#define YYMALLOC
Definition: oct-parse.cc:649
#define YY_NULLPTR
Definition: oct-parse.cc:186
static std::string get_file_line(const std::string &name, int line)
Definition: oct-parse.cc:9589
#define YYFINAL
Definition: oct-parse.cc:724
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
Definition: oct-parse.cc:828
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Definition: oct-parse.cc:1700
static const yytype_int16 yypgoto[]
Definition: oct-parse.cc:1032
#define YY_INITIAL_VALUE(Value)
Definition: oct-parse.cc:595
#define yyparse
Definition: oct-parse.cc:69
#define YYNTOKENS
Definition: oct-parse.cc:729
unsigned char yytype_uint8
Definition: oct-parse.cc:484
#define YY_STACK_PRINT(Bottom, Top)
Definition: oct-parse.cc:1701
#define YYSIZE_T
Definition: oct-parse.cc:525
#define yydebug
Definition: oct-parse.cc:78
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: oct-parse.cc:613
#define yyssa
Definition: oct-parse.cc:3079
std::string get_help_from_file(const std::string &nm, bool &symbol_found, std::string &full_file)
Definition: oct-parse.cc:10064
static const yytype_int8 yyr2[]
Definition: oct-parse.cc:1506
#define YYPTRDIFF_T
Definition: oct-parse.cc:511
#define yynerrs
Definition: oct-parse.cc:79
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, OCTAVE_STYPE *yyvaluep, octave::base_parser &parser)
Definition: oct-parse.cc:1761
static std::string end_token_as_string(token::end_tok_type ettype)
Definition: oct-parse.cc:6774
#define yyvsp
Definition: oct-parse.cc:3084
static const yytype_int16 yytable[]
Definition: oct-parse.cc:1070
#define scanner
Definition: oct-parse.cc:147
#define YYACCEPT
Definition: oct-parse.cc:1548
#define yytable_value_is_error(Yyn)
Definition: oct-parse.cc:899
#define YYTRANSLATE(YYX)
Definition: oct-parse.cc:743
#define yyssp
Definition: oct-parse.cc:3081
#define yystacksize
Definition: oct-parse.cc:3085
#define YY_ATTRIBUTE_UNUSED
Definition: oct-parse.cc:569
#define yyvs
Definition: oct-parse.cc:3083
@ YYENOMEM
Definition: oct-parse.cc:1543
static const yytype_uint8 yystos[]
Definition: oct-parse.cc:1406
#define yystate
Definition: oct-parse.cc:3077
#define YYFREE
Definition: oct-parse.cc:655
#define YYPOPSTACK(N)
int yy_state_fast_t
Definition: oct-parse.cc:542
unsigned short yytype_uint16
Definition: oct-parse.cc:495
static LIST_T * list_append(LIST_T *list, ELT_T elt)
Definition: oct-parse.cc:6623
int octave_lex(OCTAVE_STYPE *, void *)
The main scanner function which does all the work.
Definition: lex.cc:1645
#define YYLAST
Definition: oct-parse.cc:726
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: oct-parse.cc:690
#define yypact_value_is_default(Yyn)
Definition: oct-parse.cc:894
#define YYINITDEPTH
Definition: oct-parse.cc:1708
#define yypush_parse
Definition: oct-parse.cc:70
signed char yytype_int8
Definition: oct-parse.cc:455
void free(void *)
void source_file(const std::string &file_name, const std::string &context, bool verbose, bool require_file)
Definition: oct-parse.cc:10319
#define YYERROR
Definition: oct-parse.cc:1550
#define YYSIZEOF(X)
Definition: oct-parse.cc:535
#define OCTAVE_YYUSE(X,...)
Definition: oct-parse.cc:155
static const yytype_int16 yycheck[]
Definition: oct-parse.cc:1237
#define YYSTACK_ALLOC
Definition: oct-parse.cc:635
#define yyvsa
Definition: oct-parse.cc:3082
#define YYDPRINTF(Args)
Definition: oct-parse.cc:1699
#define YY_USE(E)
Definition: oct-parse.cc:575
#define yyerror
Definition: oct-parse.cc:77
@ YYPUSH_MORE
Definition: oct-parse.h:227
@ LEFTDIV
Definition: oct-parse.h:87
@ EDIV
Definition: oct-parse.h:89
@ PLUS_PLUS
Definition: oct-parse.h:93
@ OCTAVE_EOF
Definition: oct-parse.h:62
@ DIV_EQ
Definition: oct-parse.h:68
@ NUMBER
Definition: oct-parse.h:97
@ ELEFTDIV
Definition: oct-parse.h:90
@ EXPR_LT
Definition: oct-parse.h:81
@ DQ_STRING
Definition: oct-parse.h:101
@ MINUS_MINUS
Definition: oct-parse.h:94
@ POW
Definition: oct-parse.h:95
@ TRANSPOSE
Definition: oct-parse.h:92
@ OR_EQ
Definition: oct-parse.h:76
@ EXPR_AND_AND
Definition: oct-parse.h:77
@ EXPR_NE
Definition: oct-parse.h:84
@ EXPR_OR_OR
Definition: oct-parse.h:78
@ EPOW_EQ
Definition: oct-parse.h:74
@ OCTAVE_error
Definition: oct-parse.h:63
@ EPOW
Definition: oct-parse.h:96
@ SQ_STRING
Definition: oct-parse.h:102
@ MUL_EQ
Definition: oct-parse.h:67
@ AND_EQ
Definition: oct-parse.h:75
@ EMUL_EQ
Definition: oct-parse.h:71
@ POW_EQ
Definition: oct-parse.h:70
@ OCTAVE_UNDEF
Definition: oct-parse.h:64
@ ADD_EQ
Definition: oct-parse.h:65
@ SUB_EQ
Definition: oct-parse.h:66
@ PERSISTENT
Definition: oct-parse.h:123
@ FOR
Definition: oct-parse.h:103
@ EXPR_LE
Definition: oct-parse.h:82
@ PARFOR
Definition: oct-parse.h:104
@ EXPR_GE
Definition: oct-parse.h:85
@ OCTAVE_EMPTY
Definition: oct-parse.h:61
@ EXPR_OR
Definition: oct-parse.h:80
@ EMUL
Definition: oct-parse.h:88
@ LEFTDIV_EQ
Definition: oct-parse.h:69
@ HERMITIAN
Definition: oct-parse.h:91
@ EDIV_EQ
Definition: oct-parse.h:72
@ ELEFTDIV_EQ
Definition: oct-parse.h:73
@ EXPR_GT
Definition: oct-parse.h:86
@ EXPR_EQ
Definition: oct-parse.h:83
@ GLOBAL
Definition: oct-parse.h:122
@ EXPR_AND
Definition: oct-parse.h:79
static int input(yyscan_t yyscanner)
#define yylval
#define yyalloc
yysymbol_kind_t
short yytype_int16
unsigned char yytype_uint8
int yy_state_fast_t
signed char yytype_int8
yytype_int8 yy_state_t
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
#define octave_stdout
Definition: pager.h:314
int octave_debug
tree_binary_expression * maybe_compound_binary_expression(tree_expression *a, tree_expression *b, int l, int c, octave_value::binary_op t)
Definition: pt-cbinop.cc:203
static bool absolute_pathname(const std::string &s)
Definition: shared-fcns.h:148
static std::string dir_sep_chars
Definition: shared-fcns.h:96
yy_state_fast_t yystate
Definition: oct-parse.cc:1727
yy_state_t * yyssp
Definition: oct-parse.cc:1740
yy_state_t * yyss
Definition: oct-parse.cc:1739
OCTAVE_STYPE * yyvsp
Definition: oct-parse.cc:1745
OCTAVE_STYPE * yyvs
Definition: oct-parse.cc:1744
OCTAVE_STYPE yyvs_alloc
Definition: oct-parse.cc:671
yy_state_t yyss_alloc
Definition: oct-parse.cc:670
static string_vector make_absolute(const string_vector &sv)
Definition: utils.cc:536
std::string undo_string_escapes(const std::string &s)
Definition: utils.cc:1033
std::string fcn_file_in_path(const std::string &name)
Definition: utils.cc:742
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
Definition: variables.cc:584
F77_RET_T len
Definition: xerbla.cc:61