GNU Octave  9.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(...)
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 {
670  yy_state_t yyss_alloc;
671  YYSTYPE yyvs_alloc;
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 1538
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 578
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, 1661, 1669, 1675, 1685, 1691, 1697, 1705, 1723,
814  1731, 1732, 1746, 1751, 1764, 1768, 1779, 1780, 1793, 1794,
815  1800, 1801, 1814, 1815, 1827, 1845, 1860, 1861, 1869, 1871,
816  1879, 1881, 1887, 1893, 1902, 1908, 1920, 1926, 1934, 1939,
817  1943, 1952, 1954, 1956, 1958, 1960, 1966, 1972, 1978, 1987,
818  2004, 2012, 2016, 2026, 2028, 2059, 2063, 2080, 2087, 2092,
819  2099, 2102, 2101, 2117, 2119, 2124, 2128, 2137, 2139, 2147,
820  2164, 2172, 2176, 2185, 2187, 2195, 2199, 2216, 2224, 2228,
821  2237, 2239, 2247, 2260, 2267, 2275, 2280, 2286, 2290, 2296,
822  2302, 2308, 2317, 2318, 2323, 2324, 2328, 2334, 2342, 2348,
823  2354, 2360, 2366, 2372, 2381, 2382
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 (-465)
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  742, -465, 337, 337, 337, 337, 1338, 610, 610, 104,
907  -465, -465, 337, 337, -465, -465, -465, -465, -465, -465,
908  -465, -465, -465, -465, -465, -465, -465, -465, -465, -465,
909  -23, -23, -465, -465, -465, -465, 128, -4, 40, -465,
910  -465, 152, -465, -465, -465, -465, -465, -465, -465, -465,
911  -465, 667, -465, 838, 238, -465, -465, -465, -465, -465,
912  -465, -465, -465, -465, -465, -465, 63, 42, 155, -465,
913  -465, -465, -465, 177, -465, -465, 29, 29, 29, 29,
914  149, -465, 337, 1323, 117, -465, -465, -465, 153, -465,
915  140, -465, -465, 46, -465, 29, 29, 1349, 1407, 1338,
916  286, 286, 1338, 1338, 286, 286, 188, -23, -465, -23,
917  -465, -465, -465, 914, -465, 152, -465, 337, 337, 337,
918  337, 337, 1163, 1178, -465, 337, 337, 337, 337, -465,
919  -465, -465, -465, 1418, 1418, 10, 337, 337, 337, 337,
920  337, 337, 337, 337, 337, 337, 1338, 1338, 1338, 1338,
921  1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, 1338, -465,
922  -465, -465, 994, 179, 6, -465, -465, -465, 198, -465,
923  610, 1323, -465, 610, -465, -465, -465, -465, 195, 208,
924  -465, 510, 1338, 979, 236, 1338, 237, -465, -465, -465,
925  -465, 307, 1074, 1074, -465, 187, 147, 286, 1074, 1074,
926  1338, -465, -465, -465, 1434, 729, 729, 29, 29, -465,
927  37, -465, 84, 29, 29, 29, 29, 1418, 1418, 1418,
928  1418, 1418, 1418, -465, 101, 101, 1338, -465, 213, 249,
929  325, 261, -465, -465, -465, -465, -465, -465, -465, -465,
930  -465, -465, -465, -465, -465, -465, -465, -465, -465, -465,
931  -465, -465, 163, -465, 286, -465, -465, -465, -465, 14,
932  229, 258, 274, 275, 104, 1323, -465, -465, -465, -465,
933  -465, -465, -465, 7, -465, -465, 913, 1338, 925, 1338,
934  286, -465, -465, -465, 218, 252, 286, -465, -465, -465,
935  -465, -465, 159, 217, 51, -465, 337, -465, 1323, -465,
936  101, 101, 101, 101, 101, 101, 1243, 1258, -465, -465,
937  11, 283, -465, 834, -465, 300, 286, -465, -465, 92,
938  -23, -23, -38, 286, -465, -465, 1338, -465, 1338, -465,
939  1074, 1338, -465, 1074, 286, 286, -465, -465, 257, 159,
940  -465, -465, -465, -465, -465, 1485, -465, 38, -465, 150,
941  1338, -465, -465, -465, 5, -23, 227, -465, -23, -465,
942  -465, -465, 104, -465, 311, 286, 305, 286, 277, -465,
943  -465, 1338, 1074, 286, 286, -465, -465, -465, 286, 286,
944  -465, -465, 319, -23, -23, 329, 57, -465, 286, 241,
945  -465, 286, -465, -465, 286, 247, 286, 1074, 1338, 1074,
946  -465, -465, -465, 1338, 1074, 1074, 1074, -465, -465, -465,
947  1338, 286, 5, 306, -465, 227, -465, -465, -44, 1074,
948  286, -465, -465, 1074, 288, 339, 292, 286, -465, -465,
949  296, 299, -465, -465, -465, 271, -465, 154, -465, 247,
950  -465, -465, -465, -465, 247, 286, 304, -465, 286, -465,
951  1074, 286, -465, -465, -465, -465, 290, 271, -465, -44,
952  1074, -465, 358, -465, 1074, -465, 1074, -465, -465, -465,
953  -465, -465, 286, -465, -465, -465, -465, -465, -465, -465,
954  -465, -465, -465, -465, -23, -23, 313, -465, 314, 290,
955  286, 286, 286, 286, 370, -465, 286, 374, -465, -465,
956  -465, -465, -465, -465, 300, 300, 300, 300, -465, 138,
957  332, 1323, -465, -23, 330, -9, 330, 330, 374, -465,
958  86, -465, 375, 341, 286, -465, -23, -465, -465, -465,
959  343, 286, 19, 344, 286, -465, -23, 346, 286, -465,
960  -23, -465, -465, 1323, 389, -465, 106, -465, 374, -465,
961  53, 61, 391, -465, -465, 330, -465, -465, 330, 396,
962  151, 1338, -465, -465, -465, -465, -465, -465, -465, -465,
963  1338, -465, -465, -23, 397, 104, -465, -465
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, 295, 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, 215, 314, 9, 0, 9,
1011  169, 293, 159, 0, 9, 9, 9, 99, 242, 243,
1012  0, 314, 0, 244, 204, 16, 295, 219, 0, 9,
1013  314, 216, 295, 9, 0, 0, 0, 314, 293, 168,
1014  0, 0, 241, 237, 239, 0, 295, 314, 18, 215,
1015  209, 210, 211, 213, 215, 314, 0, 171, 314, 173,
1016  9, 314, 179, 180, 248, 246, 249, 0, 245, 0,
1017  9, 217, 220, 172, 9, 158, 9, 260, 267, 280,
1018  287, 295, 314, 251, 295, 252, 295, 253, 295, 254,
1019  295, 247, 212, 214, 0, 0, 0, 167, 0, 250,
1020  314, 314, 314, 314, 0, 224, 314, 226, 174, 235,
1021  255, 256, 257, 258, 236, 236, 236, 236, 221, 315,
1022  0, 0, 222, 228, 261, 295, 281, 288, 226, 218,
1023  0, 229, 230, 0, 314, 263, 0, 274, 273, 277,
1024  0, 314, 0, 0, 314, 283, 0, 0, 314, 290,
1025  0, 223, 227, 0, 232, 259, 295, 262, 226, 266,
1026  295, 268, 0, 270, 279, 282, 285, 286, 289, 0,
1027  0, 0, 225, 264, 265, 278, 269, 271, 284, 291,
1028  0, 231, 233, 0, 0, 268, 272, 292
1029 };
1030 
1031 /* YYPGOTO[NTERM-NUM]. */
1032 static const yytype_int16 yypgoto[] =
1033 {
1034  -465, -465, -465, -465, -125, -465, -465, -465, -465, -465,
1035  4, -465, -465, 0, -465, -465, -21, -465, -465, -465,
1036  -465, -465, -5, -465, -465, 2, -166, -70, -81, -215,
1037  22, -98, -465, 335, -90, -465, 31, -465, -465, 379,
1038  -64, -465, -465, -465, -465, -465, -465, -465, -465, -465,
1039  72, 74, -465, -465, -465, -465, -465, -465, -465, 52,
1040  -8, -465, -465, 142, -116, -465, -465, -465, -465, -465,
1041  -465, 95, -39, -344, -18, -22, -465, -17, -465, -465,
1042  -465, -83, -464, -465, -465, -465, -465, -465, -465, -127,
1043  -465, 16, -465, -465, -26, -465, -465, -54, -465, -465,
1044  -465, -110, -52, -465, -135, -465, -465, -111, -465, -465,
1045  -49, -465, -465, -465, -113, -46, -465, -465, -465, -114,
1046  -183, -465, 214, -465, 407, 408, -465, -465, -248, 211
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, 442, 71, 418, 419, 420, 421, 422, 485,
1060  496, 497, 512, 513, 522, 544, 562, 256, 257, 355,
1061  386, 387, 436, 437, 455, 471, 472, 473, 474, 523,
1062  524, 525, 475, 476, 553, 528, 573, 529, 530, 531,
1063  477, 478, 533, 534, 535, 479, 480, 537, 538, 539,
1064  280, 181, 526, 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, 168, 91, 39, 267, 313, 184, 186, 310,
1073  310, 286, 392, 440, 383, 384, 175, 111, 15, 259,
1074  116, 226, 350, 176, 76, 77, 78, 79, 317, 177,
1075  106, 106, 259, 15, 95, 96, 225, 80, 89, 89,
1076  122, 210, 212, 201, 123, 201, 124, 174, -275, 297,
1077  380, 441, 260, 261, 541, 175, 298, 298, -189, 10,
1078  11, 15, 15, 15, -196, 227, 351, 284, 285, 411,
1079  15, 438, 92, 293, 294, 15, 412, 129, 130, 131,
1080  132, 133, 134, -182, 564, 310, 310, 310, 310, 310,
1081  310, 112, 276, 106, 203, 278, 260, 261, 542, 267,
1082  299, 268, 15, 298, 78, 298, 357, 106, 343, 106,
1083  -276, 358, 306, 41, 89, 92, 307, 202, 124, 300,
1084  301, 302, 303, 304, 305, 281, 282, 283, 110, 344,
1085  187, 169, 267, 194, 197, 223, 223, 170, 160, 204,
1086  205, 206, 207, 208, 365, -182, 367, 213, 214, 215,
1087  216, 308, 309, 89, 89, 159, 172, 281, 282, 283,
1088  173, 167, 41, -315, 262, 266, 381, 571, 270, 298,
1089  298, 527, 171, 188, 189, 190, 161, 238, 239, 240,
1090  241, 242, 243, 244, 245, 246, 247, 248, 249, 250,
1091  457, 200, 41, 41, 15, 268, 165, 166, 41, 41,
1092  258, 89, 269, 176, 89, 368, 527, 271, 370, 177,
1093  16, 17, 275, 80, 288, 289, 80, 265, 427, 223,
1094  223, 223, 223, 223, 223, 347, 349, 273, 268, 336,
1095  337, 295, 97, 98, 99, 100, 101, 102, 103, 277,
1096  279, 146, 104, 105, 287, 451, 320, 402, 509, 138,
1097  139, 140, 141, 142, 143, 144, 145, 311, 312, 318,
1098  147, 148, 149, 150, 151, 152, 153, 154, 155, 156,
1099  157, 158, 424, 106, 426, 321, 546, -196, 322, 429,
1100  430, 431, 331, 136, 164, 138, 139, 140, 141, 142,
1101  143, 144, 145, 342, 443, 352, 269, 138, 446, 140,
1102  141, 142, 143, 144, 145, 188, 189, 190, 327, 332,
1103  329, 354, 193, 41, 375, 198, 199, 353, 345, -182,
1104  359, 360, 361, 396, 398, 465, 281, 282, 283, 269,
1105  41, 407, 410, 41, 400, 483, 414, 89, 89, 486,
1106  417, 487, 2, 3, 435, 447, 4, 5, 6, 449,
1107  7, 448, 8, 452, 385, 388, 453, 364, 393, 366,
1108  454, 463, 369, 140, 141, 142, 143, 144, 145, 484,
1109  498, 499, 41, 467, 468, 469, 470, 514, 515, 516,
1110  517, 382, 508, 408, 409, 511, -295, 12, 13, 519,
1111  543, 14, 561, 15, 567, 16, 17, 41, 545, 41,
1112  549, 554, 401, 557, 41, 41, 41, 570, 292, 577,
1113  109, 376, 385, 377, 394, 325, 552, 362, 32, 41,
1114  482, 459, 460, 41, 33, 34, 518, 461, 434, 425,
1115  520, 481, 183, 183, 428, 500, 563, 501, 576, 565,
1116  502, 432, 568, 503, 569, 113, 114, 0, 0, 0,
1117  41, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1118  41, 0, 560, 0, 41, 314, 41, 0, 0, 0,
1119  315, 228, 229, 230, 231, 232, 233, 234, 235, 236,
1120  237, 0, 0, 0, 494, 495, 0, 0, 0, 0,
1121  0, 330, 0, 0, 0, 0, 0, 333, 0, 0,
1122  0, 0, 334, 335, 0, 0, 0, 0, 0, 495,
1123  0, 274, 0, 521, 0, 2, 3, 0, 0, 4,
1124  5, 6, 0, 7, 0, 8, 548, 356, 9, 0,
1125  0, 0, 551, 0, 363, 0, 556, 0, 0, 0,
1126  559, 0, 89, 566, 0, 371, 372, 0, 0, 0,
1127  373, 374, 0, 0, 0, 0, 378, 0, 379, 0,
1128  12, 13, 0, 0, 14, 0, 15, 566, 16, 17,
1129  0, 0, 0, 575, 89, 0, 397, 395, 399, 0,
1130  0, 0, 0, 0, 403, 404, 0, 0, 0, 405,
1131  406, 32, 572, 0, 0, 0, 0, 33, 34, 413,
1132  0, 574, 415, 0, 0, 416, 0, 423, 0, 0,
1133  0, 0, 0, 0, 81, 2, 3, 0, 0, 82,
1134  5, 6, 433, 7, 0, 8, 0, 0, 9, 83,
1135  439, 444, 0, 0, 0, 0, 445, 0, 450, 0,
1136  0, 0, 0, 0, 0, 0, 0, 0, 458, 0,
1137  456, 0, 0, 0, 0, 0, 462, 0, 0, 464,
1138  12, 13, 466, 0, 14, 0, 15, 0, 16, 17,
1139  0, 117, 118, 119, 120, 121, 0, 0, 122, 0,
1140  0, 0, 123, 489, 124, 488, 0, 0, 490, 0,
1141  491, 32, 492, 0, 493, 0, 0, 33, 34, 0,
1142  0, 504, 505, 506, 507, 0, 0, 510, 0, 0,
1143  0, 125, 126, 127, 128, 129, 130, 131, 132, 133,
1144  134, 0, 0, 0, 0, 0, 0, 0, 0, 532,
1145  536, 540, 0, 0, 0, 547, 120, 121, 0, 0,
1146  122, 0, 550, 1, 123, 555, 124, 2, 3, 558,
1147  0, 4, 5, 6, 0, 7, 0, 8, 0, 0,
1148  9, 10, 11, -302, 532, 0, 0, 0, 0, 536,
1149  0, 0, 540, 125, 126, 127, 128, 129, 130, 131,
1150  132, 133, 134, 0, 0, 0, 0, 0, 0, 0,
1151  0, 0, 12, 13, 0, 0, 14, 0, 15, 0,
1152  16, 17, 18, 19, 20, 21, 0, 22, 23, 0,
1153  0, 24, 0, 0, 25, 26, 27, 28, 0, 29,
1154  0, 30, 31, 32, 0, 0, 0, 0, 0, 33,
1155  34, 0, 0, 0, -182, 0, 35, -302, -201, 2,
1156  3, -120, 0, 4, 5, 6, 0, 7, 0, 8,
1157  0, 0, 9, 281, 282, 283, 0, 0, 0, 0,
1158  -120, -120, -120, -120, -120, -120, -120, -120, -120, -120,
1159  -120, -120, 136, 137, 138, 139, 140, 141, 142, 143,
1160  144, 145, 0, 0, 12, 13, 0, 0, 14, 0,
1161  15, 0, 16, 17, 18, 19, 20, 21, 0, 22,
1162  23, 0, 0, 24, 0, 0, 25, 26, 27, 28,
1163  0, 29, 0, 30, 31, 32, 326, 0, 0, 2,
1164  3, 33, 34, 4, 5, 6, -182, 7, 328, 8,
1165  -201, 0, 9, 165, 166, 147, 148, 149, 150, 151,
1166  152, 153, 154, 155, 156, 157, 158, 147, 148, 149,
1167  150, 151, 152, 153, 154, 155, 156, 157, 158, 0,
1168  0, 0, 0, 0, 12, 13, 0, 0, 14, 0,
1169  15, 0, 16, 17, 18, 19, 20, 21, 0, 22,
1170  23, 0, 0, 24, 0, 0, 25, 26, 27, 28,
1171  0, 29, 0, 30, 31, 32, 0, 0, 0, 2,
1172  3, 33, 34, 4, 5, 6, -182, 7, 0, 8,
1173  -201, 0, 9, 136, 137, 138, 139, 140, 141, 142,
1174  143, 144, 145, 0, 0, 0, 0, 0, 0, 0,
1175  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1176  0, 0, 0, 0, 12, 13, 0, 0, 14, 0,
1177  15, 0, 16, 17, 18, 19, 20, 21, 0, 22,
1178  23, 0, 0, 24, 0, 0, 25, 26, 27, 28,
1179  0, 29, 0, 30, 31, 32, 251, 0, 0, 2,
1180  3, 33, 34, 4, 5, 6, -182, 7, 0, 8,
1181  -201, 0, 9, 0, 0, 0, 0, 0, 0, 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, 12, 13, 0, 0, 14, 0,
1185  15, 0, 16, 17, 18, 19, 20, 21, 0, 22,
1186  23, 0, 0, 24, 0, 0, 25, 26, 27, 28,
1187  0, 29, 0, 30, 31, 32, 0, 0, 0, 0,
1188  0, 33, 34, 0, 0, 0, -182, 81, 2, 3,
1189  -201, 0, 82, 5, 6, 209, 7, 0, 8, 0,
1190  0, 9, 81, 2, 3, 0, 0, 82, 5, 6,
1191  0, 7, 0, 8, 211, 0, 9, 0, 0, 0,
1192  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1193  0, 0, 0, 12, 13, 0, 0, 14, 0, 15,
1194  0, 16, 17, 0, 0, 0, 0, 0, 12, 13,
1195  0, 0, 14, 0, 15, 0, 16, 17, 0, 0,
1196  0, 0, 0, 0, 32, 0, 0, 81, 2, 3,
1197  33, 34, 82, 5, 6, 346, 7, 0, 8, 32,
1198  0, 9, 81, 2, 3, 33, 34, 82, 5, 6,
1199  0, 7, 0, 8, 348, 0, 9, 0, 0, 0,
1200  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1201  0, 0, 0, 12, 13, 0, 0, 14, 0, 15,
1202  0, 16, 17, 0, 0, 0, 0, 0, 12, 13,
1203  0, 0, 14, 0, 15, 0, 16, 17, 0, 0,
1204  0, 0, 0, 0, 32, 0, 0, 81, 2, 3,
1205  33, 34, 82, 5, 6, 0, 7, 0, 8, 32,
1206  0, 9, 0, 2, 3, 33, 34, 4, 5, 6,
1207  0, 7, 0, 8, 2, 3, 9, 0, 4, 5,
1208  182, 0, 7, 0, 8, 0, 0, 0, 0, 0,
1209  0, 0, 0, 12, 13, 0, 0, 14, 0, 15,
1210  0, 16, 17, 0, 0, 0, 0, 0, 12, 13,
1211  0, 0, 14, 0, 15, 0, 16, 17, 0, 12,
1212  13, 0, 0, 14, 32, 15, 0, 16, 17, 0,
1213  33, 34, 2, 3, 0, 0, 4, 5, 185, 32,
1214  7, 0, 8, 217, 218, 33, 34, 219, 220, 6,
1215  32, 7, 0, 8, 0, 0, 33, 34, 296, 118,
1216  119, 120, 121, 0, 0, 122, 0, 0, 0, 123,
1217  0, 124, 0, 0, 0, 0, 0, 12, 13, 0,
1218  0, 14, 0, 15, 0, 16, 17, 0, 221, 222,
1219  0, 0, 14, 0, 15, 0, 16, 17, 125, 126,
1220  127, 128, 129, 130, 131, 132, 133, 134, 32, 0,
1221  118, 119, 120, 121, 33, 34, 122, 0, 0, 32,
1222  123, 0, 124, 0, 0, 33, 34, 0, 0, 0,
1223  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1224  0, 0, 0, 0, 0, 0, 0, 0, 0, 125,
1225  126, 127, 128, 129, 130, 131, 132, 133, 134
1226 };
1227 
1228 static const yytype_int16 yycheck[] =
1229 {
1230  0, 9, 83, 8, 0, 171, 254, 97, 98, 224,
1231  225, 194, 356, 57, 9, 10, 9, 21, 56, 13,
1232  41, 11, 11, 93, 2, 3, 4, 5, 14, 93,
1233  30, 31, 13, 56, 12, 13, 134, 6, 7, 8,
1234  11, 122, 123, 107, 15, 109, 17, 1, 57, 12,
1235  12, 95, 90, 91, 518, 9, 19, 19, 12, 19,
1236  20, 56, 56, 56, 3, 55, 55, 192, 193, 12,
1237  56, 415, 11, 198, 199, 56, 19, 48, 49, 50,
1238  51, 52, 53, 92, 548, 300, 301, 302, 303, 304,
1239  305, 95, 182, 93, 115, 185, 90, 91, 12, 265,
1240  16, 171, 56, 19, 82, 19, 14, 107, 57, 109,
1241  57, 19, 11, 113, 83, 11, 15, 113, 17, 217,
1242  218, 219, 220, 221, 222, 19, 20, 21, 0, 78,
1243  99, 14, 298, 102, 103, 133, 134, 20, 96, 117,
1244  118, 119, 120, 121, 327, 92, 329, 125, 126, 127,
1245  128, 50, 51, 122, 123, 92, 16, 19, 20, 21,
1246  20, 12, 162, 57, 164, 170, 16, 16, 173, 19,
1247  19, 515, 19, 19, 20, 21, 21, 146, 147, 148,
1248  149, 150, 151, 152, 153, 154, 155, 156, 157, 158,
1249  36, 3, 192, 193, 56, 265, 19, 20, 198, 199,
1250  21, 170, 171, 273, 173, 330, 550, 12, 333, 273,
1251  58, 59, 181, 182, 67, 68, 185, 19, 401, 217,
1252  218, 219, 220, 221, 222, 306, 307, 19, 298, 70,
1253  71, 200, 18, 19, 20, 21, 22, 23, 24, 3,
1254  3, 3, 28, 29, 57, 428, 17, 372, 496, 36,
1255  37, 38, 39, 40, 41, 42, 43, 226, 95, 259,
1256  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1257  32, 33, 397, 273, 399, 17, 524, 3, 3, 404,
1258  405, 406, 64, 34, 70, 36, 37, 38, 39, 40,
1259  41, 42, 43, 76, 419, 12, 265, 36, 423, 38,
1260  39, 40, 41, 42, 43, 19, 20, 21, 277, 57,
1261  279, 11, 101, 313, 57, 104, 105, 313, 296, 92,
1262  320, 321, 322, 12, 19, 450, 19, 20, 21, 298,
1263  330, 12, 3, 333, 57, 460, 95, 306, 307, 464,
1264  93, 466, 5, 6, 38, 57, 9, 10, 11, 57,
1265  13, 12, 15, 57, 354, 355, 57, 326, 358, 328,
1266  89, 57, 331, 38, 39, 40, 41, 42, 43, 11,
1267  57, 57, 372, 83, 84, 85, 86, 504, 505, 506,
1268  507, 350, 12, 383, 384, 11, 56, 50, 51, 57,
1269  15, 54, 3, 56, 3, 58, 59, 397, 57, 399,
1270  57, 57, 371, 57, 404, 405, 406, 11, 197, 12,
1271  31, 339, 412, 339, 362, 273, 532, 322, 81, 419,
1272  459, 439, 444, 423, 87, 88, 509, 444, 412, 398,
1273  511, 457, 97, 98, 403, 489, 546, 489, 573, 550,
1274  489, 410, 555, 489, 558, 38, 38, -1, -1, -1,
1275  450, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1276  460, -1, 543, -1, 464, 254, 466, -1, -1, -1,
1277  256, 136, 137, 138, 139, 140, 141, 142, 143, 144,
1278  145, -1, -1, -1, 484, 485, -1, -1, -1, -1,
1279  -1, 280, -1, -1, -1, -1, -1, 286, -1, -1,
1280  -1, -1, 288, 289, -1, -1, -1, -1, -1, 509,
1281  -1, 1, -1, 513, -1, 5, 6, -1, -1, 9,
1282  10, 11, -1, 13, -1, 15, 526, 316, 18, -1,
1283  -1, -1, 532, -1, 323, -1, 536, -1, -1, -1,
1284  540, -1, 511, 551, -1, 334, 335, -1, -1, -1,
1285  336, 337, -1, -1, -1, -1, 342, -1, 344, -1,
1286  50, 51, -1, -1, 54, -1, 56, 575, 58, 59,
1287  -1, -1, -1, 573, 543, -1, 365, 363, 367, -1,
1288  -1, -1, -1, -1, 373, 374, -1, -1, -1, 378,
1289  379, 81, 561, -1, -1, -1, -1, 87, 88, 388,
1290  -1, 570, 391, -1, -1, 394, -1, 396, -1, -1,
1291  -1, -1, -1, -1, 4, 5, 6, -1, -1, 9,
1292  10, 11, 411, 13, -1, 15, -1, -1, 18, 19,
1293  416, 420, -1, -1, -1, -1, 422, -1, 427, -1,
1294  -1, -1, -1, -1, -1, -1, -1, -1, 437, -1,
1295  436, -1, -1, -1, -1, -1, 445, -1, -1, 448,
1296  50, 51, 451, -1, 54, -1, 56, -1, 58, 59,
1297  -1, 4, 5, 6, 7, 8, -1, -1, 11, -1,
1298  -1, -1, 15, 472, 17, 471, -1, -1, 474, -1,
1299  476, 81, 478, -1, 480, -1, -1, 87, 88, -1,
1300  -1, 490, 491, 492, 493, -1, -1, 496, -1, -1,
1301  -1, 44, 45, 46, 47, 48, 49, 50, 51, 52,
1302  53, -1, -1, -1, -1, -1, -1, -1, -1, 515,
1303  516, 517, -1, -1, -1, 524, 7, 8, -1, -1,
1304  11, -1, 531, 1, 15, 534, 17, 5, 6, 538,
1305  -1, 9, 10, 11, -1, 13, -1, 15, -1, -1,
1306  18, 19, 20, 21, 550, -1, -1, -1, -1, 555,
1307  -1, -1, 558, 44, 45, 46, 47, 48, 49, 50,
1308  51, 52, 53, -1, -1, -1, -1, -1, -1, -1,
1309  -1, -1, 50, 51, -1, -1, 54, -1, 56, -1,
1310  58, 59, 60, 61, 62, 63, -1, 65, 66, -1,
1311  -1, 69, -1, -1, 72, 73, 74, 75, -1, 77,
1312  -1, 79, 80, 81, -1, -1, -1, -1, -1, 87,
1313  88, -1, -1, -1, 92, -1, 94, 95, 96, 5,
1314  6, 3, -1, 9, 10, 11, -1, 13, -1, 15,
1315  -1, -1, 18, 19, 20, 21, -1, -1, -1, -1,
1316  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1317  32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1318  42, 43, -1, -1, 50, 51, -1, -1, 54, -1,
1319  56, -1, 58, 59, 60, 61, 62, 63, -1, 65,
1320  66, -1, -1, 69, -1, -1, 72, 73, 74, 75,
1321  -1, 77, -1, 79, 80, 81, 3, -1, -1, 5,
1322  6, 87, 88, 9, 10, 11, 92, 13, 3, 15,
1323  96, -1, 18, 19, 20, 22, 23, 24, 25, 26,
1324  27, 28, 29, 30, 31, 32, 33, 22, 23, 24,
1325  25, 26, 27, 28, 29, 30, 31, 32, 33, -1,
1326  -1, -1, -1, -1, 50, 51, -1, -1, 54, -1,
1327  56, -1, 58, 59, 60, 61, 62, 63, -1, 65,
1328  66, -1, -1, 69, -1, -1, 72, 73, 74, 75,
1329  -1, 77, -1, 79, 80, 81, -1, -1, -1, 5,
1330  6, 87, 88, 9, 10, 11, 92, 13, -1, 15,
1331  96, -1, 18, 34, 35, 36, 37, 38, 39, 40,
1332  41, 42, 43, -1, -1, -1, -1, -1, -1, -1,
1333  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1334  -1, -1, -1, -1, 50, 51, -1, -1, 54, -1,
1335  56, -1, 58, 59, 60, 61, 62, 63, -1, 65,
1336  66, -1, -1, 69, -1, -1, 72, 73, 74, 75,
1337  -1, 77, -1, 79, 80, 81, 82, -1, -1, 5,
1338  6, 87, 88, 9, 10, 11, 92, 13, -1, 15,
1339  96, -1, 18, -1, -1, -1, -1, -1, -1, -1,
1340  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1341  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1342  -1, -1, -1, -1, 50, 51, -1, -1, 54, -1,
1343  56, -1, 58, 59, 60, 61, 62, 63, -1, 65,
1344  66, -1, -1, 69, -1, -1, 72, 73, 74, 75,
1345  -1, 77, -1, 79, 80, 81, -1, -1, -1, -1,
1346  -1, 87, 88, -1, -1, -1, 92, 4, 5, 6,
1347  96, -1, 9, 10, 11, 12, 13, -1, 15, -1,
1348  -1, 18, 4, 5, 6, -1, -1, 9, 10, 11,
1349  -1, 13, -1, 15, 16, -1, 18, -1, -1, -1,
1350  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1351  -1, -1, -1, 50, 51, -1, -1, 54, -1, 56,
1352  -1, 58, 59, -1, -1, -1, -1, -1, 50, 51,
1353  -1, -1, 54, -1, 56, -1, 58, 59, -1, -1,
1354  -1, -1, -1, -1, 81, -1, -1, 4, 5, 6,
1355  87, 88, 9, 10, 11, 12, 13, -1, 15, 81,
1356  -1, 18, 4, 5, 6, 87, 88, 9, 10, 11,
1357  -1, 13, -1, 15, 16, -1, 18, -1, -1, -1,
1358  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1359  -1, -1, -1, 50, 51, -1, -1, 54, -1, 56,
1360  -1, 58, 59, -1, -1, -1, -1, -1, 50, 51,
1361  -1, -1, 54, -1, 56, -1, 58, 59, -1, -1,
1362  -1, -1, -1, -1, 81, -1, -1, 4, 5, 6,
1363  87, 88, 9, 10, 11, -1, 13, -1, 15, 81,
1364  -1, 18, -1, 5, 6, 87, 88, 9, 10, 11,
1365  -1, 13, -1, 15, 5, 6, 18, -1, 9, 10,
1366  11, -1, 13, -1, 15, -1, -1, -1, -1, -1,
1367  -1, -1, -1, 50, 51, -1, -1, 54, -1, 56,
1368  -1, 58, 59, -1, -1, -1, -1, -1, 50, 51,
1369  -1, -1, 54, -1, 56, -1, 58, 59, -1, 50,
1370  51, -1, -1, 54, 81, 56, -1, 58, 59, -1,
1371  87, 88, 5, 6, -1, -1, 9, 10, 11, 81,
1372  13, -1, 15, 5, 6, 87, 88, 9, 10, 11,
1373  81, 13, -1, 15, -1, -1, 87, 88, 4, 5,
1374  6, 7, 8, -1, -1, 11, -1, -1, -1, 15,
1375  -1, 17, -1, -1, -1, -1, -1, 50, 51, -1,
1376  -1, 54, -1, 56, -1, 58, 59, -1, 50, 51,
1377  -1, -1, 54, -1, 56, -1, 58, 59, 44, 45,
1378  46, 47, 48, 49, 50, 51, 52, 53, 81, -1,
1379  5, 6, 7, 8, 87, 88, 11, -1, -1, 81,
1380  15, -1, 17, -1, -1, 87, 88, -1, -1, -1,
1381  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1382  -1, -1, -1, -1, -1, -1, -1, -1, -1, 44,
1383  45, 46, 47, 48, 49, 50, 51, 52, 53
1384 };
1385 
1386 /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of
1387  state STATE-NUM. */
1388 static const yytype_uint8 yystos[] =
1389 {
1390  0, 1, 5, 6, 9, 10, 11, 13, 15, 18,
1391  19, 20, 50, 51, 54, 56, 58, 59, 60, 61,
1392  62, 63, 65, 66, 69, 72, 73, 74, 75, 77,
1393  79, 80, 81, 87, 88, 94, 99, 100, 101, 108,
1394  109, 111, 112, 113, 114, 115, 116, 118, 121, 122,
1395  123, 128, 130, 131, 132, 133, 134, 135, 136, 139,
1396  140, 145, 150, 151, 152, 153, 154, 165, 166, 167,
1397  168, 171, 221, 222, 223, 111, 128, 128, 128, 128,
1398  134, 4, 9, 19, 117, 120, 124, 125, 126, 134,
1399  119, 120, 11, 155, 158, 128, 128, 220, 220, 220,
1400  220, 220, 220, 220, 220, 220, 111, 137, 138, 137,
1401  0, 21, 95, 222, 223, 110, 114, 4, 5, 6,
1402  7, 8, 11, 15, 17, 44, 45, 46, 47, 48,
1403  49, 50, 51, 52, 53, 127, 34, 35, 36, 37,
1404  38, 39, 40, 41, 42, 43, 3, 22, 23, 24,
1405  25, 26, 27, 28, 29, 30, 31, 32, 33, 92,
1406  96, 21, 224, 225, 220, 19, 20, 12, 126, 14,
1407  20, 19, 16, 20, 1, 9, 125, 138, 159, 160,
1408  161, 219, 11, 131, 132, 11, 132, 134, 19, 20,
1409  21, 226, 227, 227, 134, 141, 142, 134, 227, 227,
1410  3, 138, 108, 114, 128, 128, 128, 128, 128, 12,
1411  126, 16, 126, 128, 128, 128, 128, 5, 6, 9,
1412  10, 50, 51, 123, 129, 129, 11, 55, 131, 131,
1413  131, 131, 131, 131, 131, 131, 131, 131, 134, 134,
1414  134, 134, 134, 134, 134, 134, 134, 134, 134, 134,
1415  134, 82, 102, 103, 104, 108, 185, 186, 21, 13,
1416  90, 91, 111, 162, 169, 19, 120, 124, 125, 134,
1417  120, 12, 156, 19, 1, 134, 132, 3, 132, 3,
1418  218, 19, 20, 21, 102, 102, 218, 57, 67, 68,
1419  143, 144, 227, 102, 102, 134, 4, 12, 19, 16,
1420  129, 129, 129, 129, 129, 129, 11, 15, 50, 51,
1421  127, 134, 95, 226, 227, 220, 164, 14, 111, 163,
1422  17, 17, 3, 157, 158, 161, 3, 134, 3, 134,
1423  227, 64, 57, 227, 220, 220, 70, 71, 146, 147,
1424  148, 149, 76, 57, 78, 128, 12, 126, 16, 126,
1425  11, 55, 12, 108, 11, 187, 227, 14, 19, 111,
1426  111, 111, 169, 227, 134, 218, 134, 218, 102, 134,
1427  102, 227, 227, 220, 220, 57, 148, 149, 220, 220,
1428  12, 16, 134, 9, 10, 111, 188, 189, 111, 105,
1429  106, 107, 171, 111, 157, 220, 12, 227, 19, 227,
1430  57, 134, 102, 227, 227, 227, 227, 12, 111, 111,
1431  3, 12, 19, 227, 95, 227, 227, 93, 172, 173,
1432  174, 175, 176, 227, 102, 134, 102, 218, 134, 102,
1433  102, 102, 134, 227, 189, 38, 190, 191, 171, 220,
1434  57, 95, 170, 102, 227, 220, 102, 57, 12, 57,
1435  227, 218, 57, 57, 89, 192, 220, 36, 227, 172,
1436  173, 175, 227, 57, 227, 102, 227, 83, 84, 85,
1437  86, 193, 194, 195, 196, 200, 201, 208, 209, 213,
1438  214, 192, 170, 102, 11, 177, 102, 102, 220, 227,
1439  220, 220, 220, 220, 111, 111, 178, 179, 57, 57,
1440  195, 200, 208, 213, 227, 227, 227, 227, 12, 226,
1441  227, 11, 180, 181, 187, 187, 187, 187, 179, 57,
1442  126, 111, 182, 197, 198, 199, 220, 171, 203, 205,
1443  206, 207, 220, 210, 211, 212, 220, 215, 216, 217,
1444  220, 180, 12, 15, 183, 57, 226, 227, 111, 57,
1445  227, 111, 162, 202, 57, 227, 111, 57, 227, 111,
1446  126, 3, 184, 199, 180, 205, 158, 3, 212, 217,
1447  11, 16, 134, 204, 134, 111, 202, 12
1448 };
1449 
1450 /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */
1451 static const yytype_uint8 yyr1[] =
1452 {
1453  0, 98, 99, 99, 99, 100, 100, 101, 101, 102,
1454  102, 103, 104, 104, 105, 105, 106, 107, 107, 108,
1455  108, 108, 109, 110, 110, 111, 112, 113, 114, 114,
1456  115, 115, 116, 117, 117, 118, 119, 119, 120, 120,
1457  120, 120, 120, 120, 121, 122, 122, 123, 123, 123,
1458  123, 123, 123, 123, 123, 124, 125, 126, 126, 126,
1459  126, 126, 126, 127, 128, 128, 128, 128, 128, 128,
1460  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1461  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1462  128, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1463  129, 129, 129, 129, 129, 129, 130, 130, 131, 131,
1464  131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1465  132, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1466  133, 133, 133, 133, 134, 134, 134, 135, 135, 135,
1467  135, 135, 135, 135, 135, 136, 136, 137, 137, 138,
1468  138, 139, 139, 140, 141, 141, 142, 142, 143, 144,
1469  145, 146, 146, 146, 146, 147, 147, 148, 149, 150,
1470  150, 150, 150, 150, 150, 151, 151, 151, 152, 153,
1471  153, 153, 154, 155, 156, 157, 157, 158, 158, 159,
1472  159, 160, 160, 161, 161, 162, 162, 162, 163, 163,
1473  164, 165, 166, 167, 167, 168, 169, 169, 169, 170,
1474  170, 171, 171, 172, 172, 173, 174, 174, 175, 176,
1475  177, 177, 178, 178, 179, 180, 181, 181, 182, 182,
1476  183, 183, 184, 184, 185, 186, 187, 187, 188, 188,
1477  189, 189, 189, 189, 190, 190, 191, 191, 192, 193,
1478  193, 194, 194, 194, 194, 194, 194, 194, 194, 195,
1479  196, 197, 197, 198, 198, 199, 200, 201, 202, 202,
1480  203, 204, 203, 205, 205, 206, 206, 207, 207, 208,
1481  209, 210, 210, 211, 211, 212, 213, 214, 215, 215,
1482  216, 216, 217, 218, 219, 220, 221, 221, 222, 222,
1483  222, 222, 223, 223, 224, 224, 225, 225, 226, 226,
1484  226, 226, 226, 226, 227, 227
1485 };
1486 
1487 /* YYR2[RULE-NUM] -- Number of symbols on the right-hand side of rule RULE-NUM. */
1488 static const yytype_int8 yyr2[] =
1489 {
1490  0, 2, 2, 2, 1, 1, 2, 1, 3, 0,
1491  1, 2, 1, 3, 0, 1, 2, 1, 3, 1,
1492  1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1493  1, 1, 3, 1, 3, 3, 1, 3, 0, 1,
1494  1, 2, 2, 3, 1, 4, 4, 1, 1, 1,
1495  1, 1, 1, 1, 3, 1, 1, 1, 1, 1,
1496  3, 3, 3, 1, 1, 2, 2, 3, 4, 3,
1497  4, 2, 2, 3, 5, 2, 2, 2, 2, 2,
1498  2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1499  3, 1, 2, 2, 3, 4, 3, 4, 3, 5,
1500  2, 2, 2, 2, 2, 2, 3, 5, 1, 1,
1501  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1502  1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1503  3, 3, 3, 3, 1, 1, 1, 1, 1, 1,
1504  1, 1, 1, 1, 1, 2, 2, 1, 2, 1,
1505  3, 1, 1, 4, 1, 2, 4, 2, 7, 4,
1506  6, 0, 1, 1, 2, 1, 2, 7, 4, 7,
1507  6, 9, 10, 9, 12, 1, 1, 1, 5, 9,
1508  9, 5, 0, 1, 1, 0, 1, 3, 2, 0,
1509  1, 1, 3, 1, 1, 2, 1, 3, 1, 3,
1510  0, 0, 2, 4, 7, 2, 1, 3, 3, 1,
1511  1, 8, 10, 2, 4, 0, 1, 3, 7, 1,
1512  0, 3, 2, 4, 1, 4, 0, 3, 0, 1,
1513  0, 3, 0, 2, 1, 10, 0, 4, 1, 3,
1514  1, 3, 2, 2, 0, 2, 2, 3, 1, 0,
1515  2, 1, 1, 1, 1, 3, 3, 3, 3, 6,
1516  1, 0, 2, 1, 3, 3, 6, 1, 1, 2,
1517  2, 0, 5, 1, 1, 0, 2, 1, 3, 6,
1518  1, 0, 2, 1, 3, 2, 6, 1, 0, 2,
1519  1, 3, 5, 0, 0, 0, 1, 1, 1, 1,
1520  2, 2, 0, 1, 0, 1, 1, 2, 1, 1,
1521  1, 2, 2, 2, 0, 1
1522 };
1523 
1524 
1525 enum { YYENOMEM = -2 };
1526 
1527 #define yyerrok (yyerrstatus = 0)
1528 #define yyclearin (yychar = OCTAVE_EMPTY)
1529 
1530 #define YYACCEPT goto yyacceptlab
1531 #define YYABORT goto yyabortlab
1532 #define YYERROR goto yyerrorlab
1533 #define YYNOMEM goto yyexhaustedlab
1534 
1535 
1536 #define YYRECOVERING() (!!yyerrstatus)
1537 
1538 #define YYBACKUP(Token, Value) \
1539  do \
1540  if (yychar == OCTAVE_EMPTY) \
1541  { \
1542  yychar = (Token); \
1543  yylval = (Value); \
1544  YYPOPSTACK (yylen); \
1545  yystate = *yyssp; \
1546  goto yybackup; \
1547  } \
1548  else \
1549  { \
1550  yyerror (parser, YY_("syntax error: cannot back up")); \
1551  YYERROR; \
1552  } \
1553  while (0)
1554 
1555 /* Backward compatibility with an undocumented macro.
1556  Use OCTAVE_error or OCTAVE_UNDEF. */
1557 #define YYERRCODE OCTAVE_UNDEF
1558 
1559 
1560 /* Enable debugging if requested. */
1561 #if OCTAVE_DEBUG
1562 
1563 # ifndef YYFPRINTF
1564 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1565 # define YYFPRINTF fprintf
1566 # endif
1567 
1568 # define YYDPRINTF(Args) \
1569 do { \
1570  if (yydebug) \
1571  YYFPRINTF Args; \
1572 } while (0)
1573 
1574 
1575 
1576 
1577 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1578 do { \
1579  if (yydebug) \
1580  { \
1581  YYFPRINTF (stderr, "%s ", Title); \
1582  yy_symbol_print (stderr, \
1583  Kind, Value, parser); \
1584  YYFPRINTF (stderr, "\n"); \
1585  } \
1586 } while (0)
1587 
1588 
1589 /*-----------------------------------.
1590 | Print this symbol's value on YYO. |
1591 `-----------------------------------*/
1592 
1593 static void
1594 yy_symbol_value_print (FILE *yyo,
1595  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1596 {
1597  FILE *yyoutput = yyo;
1598  YY_USE (yyoutput);
1599  YY_USE (parser);
1600  if (!yyvaluep)
1601  return;
1603  YY_USE (yykind);
1605 }
1606 
1607 
1608 /*---------------------------.
1609 | Print this symbol on YYO. |
1610 `---------------------------*/
1611 
1612 static void
1613 yy_symbol_print (FILE *yyo,
1614  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1615 {
1616  YYFPRINTF (yyo, "%s %s (",
1617  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1618 
1619  yy_symbol_value_print (yyo, yykind, yyvaluep, parser);
1620  YYFPRINTF (yyo, ")");
1621 }
1622 
1623 /*------------------------------------------------------------------.
1624 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1625 | TOP (included). |
1626 `------------------------------------------------------------------*/
1627 
1628 static void
1629 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1630 {
1631  YYFPRINTF (stderr, "Stack now");
1632  for (; yybottom <= yytop; yybottom++)
1633  {
1634  int yybot = *yybottom;
1635  YYFPRINTF (stderr, " %d", yybot);
1636  }
1637  YYFPRINTF (stderr, "\n");
1638 }
1639 
1640 # define YY_STACK_PRINT(Bottom, Top) \
1641 do { \
1642  if (yydebug) \
1643  yy_stack_print ((Bottom), (Top)); \
1644 } while (0)
1645 
1646 
1647 /*------------------------------------------------.
1648 | Report that the YYRULE is going to be reduced. |
1649 `------------------------------------------------*/
1650 
1651 static void
1652 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1653  int yyrule, octave::base_parser& parser)
1654 {
1655  int yylno = yyrline[yyrule];
1656  int yynrhs = yyr2[yyrule];
1657  int yyi;
1658  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1659  yyrule - 1, yylno);
1660  /* The symbols being reduced. */
1661  for (yyi = 0; yyi < yynrhs; yyi++)
1662  {
1663  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1664  yy_symbol_print (stderr,
1665  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1666  &yyvsp[(yyi + 1) - (yynrhs)], parser);
1667  YYFPRINTF (stderr, "\n");
1668  }
1669 }
1670 
1671 # define YY_REDUCE_PRINT(Rule) \
1672 do { \
1673  if (yydebug) \
1674  yy_reduce_print (yyssp, yyvsp, Rule, parser); \
1675 } while (0)
1676 
1677 /* Nonzero means print parse trace. It is left uninitialized so that
1678  multiple parsers can coexist. */
1679 int yydebug;
1680 #else /* !OCTAVE_DEBUG */
1681 # define YYDPRINTF(Args) ((void) 0)
1682 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1683 # define YY_STACK_PRINT(Bottom, Top)
1684 # define YY_REDUCE_PRINT(Rule)
1685 #endif /* !OCTAVE_DEBUG */
1686 
1687 
1688 /* YYINITDEPTH -- initial size of the parser's stacks. */
1689 #ifndef YYINITDEPTH
1690 # define YYINITDEPTH 200
1691 #endif
1692 
1693 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1694  if the built-in stack extension method is used).
1695 
1696  Do not make this value too large; the results are undefined if
1697  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1698  evaluated with infinite-precision integer arithmetic. */
1699 
1700 #ifndef YYMAXDEPTH
1701 # define YYMAXDEPTH 10000
1702 #endif
1703 /* Parser data structure. */
1704 struct yypstate
1705  {
1706  /* Number of syntax errors so far. */
1707  int yynerrs;
1708 
1710  /* Number of tokens to shift before error messages enabled. */
1711  int yyerrstatus;
1712 
1713  /* Refer to the stacks through separate pointers, to allow yyoverflow
1714  to reallocate them elsewhere. */
1715 
1716  /* Their size. */
1718 
1719  /* The state stack: array, bottom, top. */
1721  yy_state_t *yyss;
1722  yy_state_t *yyssp;
1723 
1724  /* The semantic value stack: array, bottom, top. */
1726  YYSTYPE *yyvs;
1727  YYSTYPE *yyvsp;
1728  /* Whether this instance has not started parsing yet.
1729  * If 2, it corresponds to a finished parsing. */
1730  int yynew;
1731  };
1732 
1733 
1734 
1735 
1736 
1737 
1738 /*-----------------------------------------------.
1739 | Release the memory associated to this symbol. |
1740 `-----------------------------------------------*/
1741 
1742 static void
1743 yydestruct (const char *yymsg,
1744  yysymbol_kind_t yykind, YYSTYPE *yyvaluep, octave::base_parser& parser)
1745 {
1746  YY_USE (yyvaluep);
1747  YY_USE (parser);
1748  if (!yymsg)
1749  yymsg = "Deleting";
1750  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
1751 
1753  switch (yykind)
1754  {
1755  case YYSYMBOL_3_: /* '=' */
1756 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1757  { }
1758 #line 1759 "libinterp/parse-tree/oct-parse.cc"
1759  break;
1760 
1761  case YYSYMBOL_4_: /* ':' */
1762 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1763  { }
1764 #line 1765 "libinterp/parse-tree/oct-parse.cc"
1765  break;
1766 
1767  case YYSYMBOL_5_: /* '-' */
1768 #line 340 "../libinterp/parse-tree/oct-parse.yy"
1769  { }
1770 #line 1771 "libinterp/parse-tree/oct-parse.cc"
1771  break;
1772 
1773  case YYSYMBOL_6_: /* '+' */
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_7_: /* '*' */
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_8_: /* '/' */
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_9_: /* '~' */
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_10_: /* '!' */
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_11_: /* '(' */
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_12_: /* ')' */
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_13_: /* '[' */
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_14_: /* ']' */
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_15_: /* '{' */
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_16_: /* '}' */
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_17_: /* '.' */
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_18_: /* '@' */
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_19_: /* ',' */
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_20_: /* ';' */
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_21_n_: /* '\n' */
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_ADD_EQ: /* ADD_EQ */
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_SUB_EQ: /* SUB_EQ */
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_MUL_EQ: /* MUL_EQ */
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_DIV_EQ: /* DIV_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_LEFTDIV_EQ: /* LEFTDIV_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_POW_EQ: /* POW_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_EMUL_EQ: /* EMUL_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_EDIV_EQ: /* EDIV_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_ELEFTDIV_EQ: /* ELEFTDIV_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_EPOW_EQ: /* EPOW_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_AND_EQ: /* AND_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_OR_EQ: /* OR_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_EXPR_AND_AND: /* EXPR_AND_AND */
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_EXPR_OR_OR: /* EXPR_OR_OR */
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_EXPR_AND: /* EXPR_AND */
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_OR: /* EXPR_OR */
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_LT: /* EXPR_LT */
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_LE: /* EXPR_LE */
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_EQ: /* EXPR_EQ */
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_NE: /* EXPR_NE */
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_GE: /* EXPR_GE */
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_GT: /* EXPR_GT */
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_LEFTDIV: /* LEFTDIV */
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_EMUL: /* EMUL */
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_EDIV: /* EDIV */
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_ELEFTDIV: /* ELEFTDIV */
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_HERMITIAN: /* HERMITIAN */
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_TRANSPOSE: /* TRANSPOSE */
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_PLUS_PLUS: /* PLUS_PLUS */
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_MINUS_MINUS: /* MINUS_MINUS */
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_POW: /* POW */
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_EPOW: /* EPOW */
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_NUMBER: /* NUMBER */
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_STRUCT_ELT: /* STRUCT_ELT */
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_NAME: /* NAME */
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_END: /* END */
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_DQ_STRING: /* DQ_STRING */
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_SQ_STRING: /* SQ_STRING */
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_FOR: /* FOR */
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_PARFOR: /* PARFOR */
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_WHILE: /* WHILE */
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_DO: /* DO */
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_UNTIL: /* UNTIL */
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_SPMD: /* SPMD */
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_IF: /* IF */
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_ELSEIF: /* ELSEIF */
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_ELSE: /* ELSE */
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_SWITCH: /* SWITCH */
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_CASE: /* CASE */
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_OTHERWISE: /* OTHERWISE */
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_BREAK: /* BREAK */
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_CONTINUE: /* CONTINUE */
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_FUNC_RET: /* FUNC_RET */
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_UNWIND: /* UNWIND */
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_CLEANUP: /* CLEANUP */
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_TRY: /* TRY */
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_CATCH: /* CATCH */
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_GLOBAL: /* GLOBAL */
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_PERSISTENT: /* PERSISTENT */
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_FCN_HANDLE: /* FCN_HANDLE */
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_CLASSDEF: /* CLASSDEF */
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_PROPERTIES: /* PROPERTIES */
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_METHODS: /* METHODS */
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_EVENTS: /* EVENTS */
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_ENUMERATION: /* ENUMERATION */
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_METAQUERY: /* METAQUERY */
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_SUPERCLASSREF: /* SUPERCLASSREF */
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_FQ_IDENT: /* FQ_IDENT */
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_GET: /* GET */
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_SET: /* SET */
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_FCN: /* FCN */
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_ARGUMENTS: /* ARGUMENTS */
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_LEXICAL_ERROR: /* LEXICAL_ERROR */
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_END_OF_INPUT: /* END_OF_INPUT */
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_UNARY: /* UNARY */
2314 #line 343 "../libinterp/parse-tree/oct-parse.yy"
2315  { }
2316 #line 2317 "libinterp/parse-tree/oct-parse.cc"
2317  break;
2318 
2319  case YYSYMBOL_input: /* input */
2320 #line 345 "../libinterp/parse-tree/oct-parse.yy"
2321  { delete ((*yyvaluep).tree_type); }
2322 #line 2323 "libinterp/parse-tree/oct-parse.cc"
2323  break;
2324 
2325  case YYSYMBOL_simple_list: /* simple_list */
2326 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2327  { delete ((*yyvaluep).tree_statement_list_type); }
2328 #line 2329 "libinterp/parse-tree/oct-parse.cc"
2329  break;
2330 
2331  case YYSYMBOL_simple_list1: /* simple_list1 */
2332 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2333  { delete ((*yyvaluep).tree_statement_list_type); }
2334 #line 2335 "libinterp/parse-tree/oct-parse.cc"
2335  break;
2336 
2337  case YYSYMBOL_opt_list: /* opt_list */
2338 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2339  { delete ((*yyvaluep).tree_statement_list_type); }
2340 #line 2341 "libinterp/parse-tree/oct-parse.cc"
2341  break;
2342 
2343  case YYSYMBOL_list: /* 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_list1: /* 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_fcn_list: /* opt_fcn_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_fcn_list: /* fcn_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_fcn_list1: /* fcn_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_statement: /* statement */
2374 #line 369 "../libinterp/parse-tree/oct-parse.yy"
2375  { delete ((*yyvaluep).tree_statement_type); }
2376 #line 2377 "libinterp/parse-tree/oct-parse.cc"
2377  break;
2378 
2379  case YYSYMBOL_word_list_cmd: /* word_list_cmd */
2380 #line 356 "../libinterp/parse-tree/oct-parse.yy"
2381  { delete ((*yyvaluep).tree_index_expression_type); }
2382 #line 2383 "libinterp/parse-tree/oct-parse.cc"
2383  break;
2384 
2385  case YYSYMBOL_word_list: /* word_list */
2386 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2387  { delete ((*yyvaluep).tree_argument_list_type); }
2388 #line 2389 "libinterp/parse-tree/oct-parse.cc"
2389  break;
2390 
2391  case YYSYMBOL_identifier: /* identifier */
2392 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2393  { delete ((*yyvaluep).tree_identifier_type); }
2394 #line 2395 "libinterp/parse-tree/oct-parse.cc"
2395  break;
2396 
2397  case YYSYMBOL_superclass_identifier: /* superclass_identifier */
2398 #line 351 "../libinterp/parse-tree/oct-parse.yy"
2399  { delete ((*yyvaluep).tree_superclass_ref_type); }
2400 #line 2401 "libinterp/parse-tree/oct-parse.cc"
2401  break;
2402 
2403  case YYSYMBOL_meta_identifier: /* meta_identifier */
2404 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2405  { delete ((*yyvaluep).tree_metaclass_query_type); }
2406 #line 2407 "libinterp/parse-tree/oct-parse.cc"
2407  break;
2408 
2409  case YYSYMBOL_string: /* string */
2410 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2411  { delete ((*yyvaluep).tree_constant_type); }
2412 #line 2413 "libinterp/parse-tree/oct-parse.cc"
2413  break;
2414 
2415  case YYSYMBOL_constant: /* constant */
2416 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2417  { delete ((*yyvaluep).tree_constant_type); }
2418 #line 2419 "libinterp/parse-tree/oct-parse.cc"
2419  break;
2420 
2421  case YYSYMBOL_matrix: /* matrix */
2422 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2423  { delete ((*yyvaluep).tree_expression_type); }
2424 #line 2425 "libinterp/parse-tree/oct-parse.cc"
2425  break;
2426 
2427  case YYSYMBOL_matrix_rows: /* matrix_rows */
2428 #line 346 "../libinterp/parse-tree/oct-parse.yy"
2429  { delete ((*yyvaluep).tree_matrix_type); }
2430 #line 2431 "libinterp/parse-tree/oct-parse.cc"
2431  break;
2432 
2433  case YYSYMBOL_cell: /* cell */
2434 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2435  { delete ((*yyvaluep).tree_expression_type); }
2436 #line 2437 "libinterp/parse-tree/oct-parse.cc"
2437  break;
2438 
2439  case YYSYMBOL_cell_rows: /* cell_rows */
2440 #line 347 "../libinterp/parse-tree/oct-parse.yy"
2441  { delete ((*yyvaluep).tree_cell_type); }
2442 #line 2443 "libinterp/parse-tree/oct-parse.cc"
2443  break;
2444 
2445  case YYSYMBOL_cell_or_matrix_row: /* cell_or_matrix_row */
2446 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2447  { delete ((*yyvaluep).tree_argument_list_type); }
2448 #line 2449 "libinterp/parse-tree/oct-parse.cc"
2449  break;
2450 
2451  case YYSYMBOL_fcn_handle: /* fcn_handle */
2452 #line 350 "../libinterp/parse-tree/oct-parse.yy"
2453  { delete ((*yyvaluep).tree_fcn_handle_type); }
2454 #line 2455 "libinterp/parse-tree/oct-parse.cc"
2455  break;
2456 
2457  case YYSYMBOL_anon_fcn_handle: /* anon_fcn_handle */
2458 #line 354 "../libinterp/parse-tree/oct-parse.yy"
2459  { delete ((*yyvaluep).tree_anon_fcn_handle_type); }
2460 #line 2461 "libinterp/parse-tree/oct-parse.cc"
2461  break;
2462 
2463  case YYSYMBOL_primary_expr: /* primary_expr */
2464 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2465  { delete ((*yyvaluep).tree_expression_type); }
2466 #line 2467 "libinterp/parse-tree/oct-parse.cc"
2467  break;
2468 
2469  case YYSYMBOL_magic_colon: /* magic_colon */
2470 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2471  { delete ((*yyvaluep).tree_constant_type); }
2472 #line 2473 "libinterp/parse-tree/oct-parse.cc"
2473  break;
2474 
2475  case YYSYMBOL_magic_tilde: /* magic_tilde */
2476 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2477  { delete ((*yyvaluep).tree_identifier_type); }
2478 #line 2479 "libinterp/parse-tree/oct-parse.cc"
2479  break;
2480 
2481  case YYSYMBOL_arg_list: /* arg_list */
2482 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2483  { delete ((*yyvaluep).tree_argument_list_type); }
2484 #line 2485 "libinterp/parse-tree/oct-parse.cc"
2485  break;
2486 
2487  case YYSYMBOL_oper_expr: /* oper_expr */
2488 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2489  { delete ((*yyvaluep).tree_expression_type); }
2490 #line 2491 "libinterp/parse-tree/oct-parse.cc"
2491  break;
2492 
2493  case YYSYMBOL_power_expr: /* power_expr */
2494 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2495  { delete ((*yyvaluep).tree_expression_type); }
2496 #line 2497 "libinterp/parse-tree/oct-parse.cc"
2497  break;
2498 
2499  case YYSYMBOL_colon_expr: /* colon_expr */
2500 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2501  { delete ((*yyvaluep).tree_expression_type); }
2502 #line 2503 "libinterp/parse-tree/oct-parse.cc"
2503  break;
2504 
2505  case YYSYMBOL_simple_expr: /* simple_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_assign_lhs: /* assign_lhs */
2512 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2513  { delete ((*yyvaluep).tree_argument_list_type); }
2514 #line 2515 "libinterp/parse-tree/oct-parse.cc"
2515  break;
2516 
2517  case YYSYMBOL_assign_expr: /* assign_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_expression: /* expression */
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_command: /* command */
2530 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2531  { delete ((*yyvaluep).tree_command_type); }
2532 #line 2533 "libinterp/parse-tree/oct-parse.cc"
2533  break;
2534 
2535  case YYSYMBOL_declaration: /* declaration */
2536 #line 368 "../libinterp/parse-tree/oct-parse.yy"
2537  { delete ((*yyvaluep).tree_decl_command_type); }
2538 #line 2539 "libinterp/parse-tree/oct-parse.cc"
2539  break;
2540 
2541  case YYSYMBOL_decl_init_list: /* decl_init_list */
2542 #line 367 "../libinterp/parse-tree/oct-parse.yy"
2543  { delete ((*yyvaluep).tree_decl_init_list_type); }
2544 #line 2545 "libinterp/parse-tree/oct-parse.cc"
2545  break;
2546 
2547  case YYSYMBOL_decl_elt: /* decl_elt */
2548 #line 366 "../libinterp/parse-tree/oct-parse.yy"
2549  { delete ((*yyvaluep).tree_decl_elt_type); }
2550 #line 2551 "libinterp/parse-tree/oct-parse.cc"
2551  break;
2552 
2553  case YYSYMBOL_select_command: /* select_command */
2554 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2555  { delete ((*yyvaluep).tree_command_type); }
2556 #line 2557 "libinterp/parse-tree/oct-parse.cc"
2557  break;
2558 
2559  case YYSYMBOL_if_command: /* if_command */
2560 #line 360 "../libinterp/parse-tree/oct-parse.yy"
2561  { delete ((*yyvaluep).tree_if_command_type); }
2562 #line 2563 "libinterp/parse-tree/oct-parse.cc"
2563  break;
2564 
2565  case YYSYMBOL_if_cmd_list: /* if_cmd_list */
2566 #line 362 "../libinterp/parse-tree/oct-parse.yy"
2567  { delete ((*yyvaluep).tree_if_command_list_type); }
2568 #line 2569 "libinterp/parse-tree/oct-parse.cc"
2569  break;
2570 
2571  case YYSYMBOL_if_cmd_list1: /* if_cmd_list1 */
2572 #line 362 "../libinterp/parse-tree/oct-parse.yy"
2573  { delete ((*yyvaluep).tree_if_command_list_type); }
2574 #line 2575 "libinterp/parse-tree/oct-parse.cc"
2575  break;
2576 
2577  case YYSYMBOL_elseif_clause: /* elseif_clause */
2578 #line 361 "../libinterp/parse-tree/oct-parse.yy"
2579  { delete ((*yyvaluep).tree_if_clause_type); }
2580 #line 2581 "libinterp/parse-tree/oct-parse.cc"
2581  break;
2582 
2583  case YYSYMBOL_else_clause: /* else_clause */
2584 #line 361 "../libinterp/parse-tree/oct-parse.yy"
2585  { delete ((*yyvaluep).tree_if_clause_type); }
2586 #line 2587 "libinterp/parse-tree/oct-parse.cc"
2587  break;
2588 
2589  case YYSYMBOL_switch_command: /* switch_command */
2590 #line 363 "../libinterp/parse-tree/oct-parse.yy"
2591  { delete ((*yyvaluep).tree_switch_command_type); }
2592 #line 2593 "libinterp/parse-tree/oct-parse.cc"
2593  break;
2594 
2595  case YYSYMBOL_case_list: /* case_list */
2596 #line 365 "../libinterp/parse-tree/oct-parse.yy"
2597  { delete ((*yyvaluep).tree_switch_case_list_type); }
2598 #line 2599 "libinterp/parse-tree/oct-parse.cc"
2599  break;
2600 
2601  case YYSYMBOL_case_list1: /* case_list1 */
2602 #line 365 "../libinterp/parse-tree/oct-parse.yy"
2603  { delete ((*yyvaluep).tree_switch_case_list_type); }
2604 #line 2605 "libinterp/parse-tree/oct-parse.cc"
2605  break;
2606 
2607  case YYSYMBOL_switch_case: /* switch_case */
2608 #line 364 "../libinterp/parse-tree/oct-parse.yy"
2609  { delete ((*yyvaluep).tree_switch_case_type); }
2610 #line 2611 "libinterp/parse-tree/oct-parse.cc"
2611  break;
2612 
2613  case YYSYMBOL_default_case: /* default_case */
2614 #line 364 "../libinterp/parse-tree/oct-parse.yy"
2615  { delete ((*yyvaluep).tree_switch_case_type); }
2616 #line 2617 "libinterp/parse-tree/oct-parse.cc"
2617  break;
2618 
2619  case YYSYMBOL_loop_command: /* loop_command */
2620 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2621  { delete ((*yyvaluep).tree_command_type); }
2622 #line 2623 "libinterp/parse-tree/oct-parse.cc"
2623  break;
2624 
2625  case YYSYMBOL_jump_command: /* jump_command */
2626 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2627  { delete ((*yyvaluep).tree_command_type); }
2628 #line 2629 "libinterp/parse-tree/oct-parse.cc"
2629  break;
2630 
2631  case YYSYMBOL_spmd_command: /* spmd_command */
2632 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2633  { delete ((*yyvaluep).tree_command_type); }
2634 #line 2635 "libinterp/parse-tree/oct-parse.cc"
2635  break;
2636 
2637  case YYSYMBOL_except_command: /* except_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_opt_param_list: /* opt_param_list */
2644 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2645  { delete ((*yyvaluep).tree_parameter_list_type); }
2646 #line 2647 "libinterp/parse-tree/oct-parse.cc"
2647  break;
2648 
2649  case YYSYMBOL_param_list: /* param_list */
2650 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2651  { delete ((*yyvaluep).tree_parameter_list_type); }
2652 #line 2653 "libinterp/parse-tree/oct-parse.cc"
2653  break;
2654 
2655  case YYSYMBOL_param_list1: /* param_list1 */
2656 #line 358 "../libinterp/parse-tree/oct-parse.yy"
2657  { delete ((*yyvaluep).tree_parameter_list_type); }
2658 #line 2659 "libinterp/parse-tree/oct-parse.cc"
2659  break;
2660 
2661  case YYSYMBOL_param_list2: /* param_list2 */
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_elt: /* param_list_elt */
2668 #line 366 "../libinterp/parse-tree/oct-parse.yy"
2669  { delete ((*yyvaluep).tree_decl_elt_type); }
2670 #line 2671 "libinterp/parse-tree/oct-parse.cc"
2671  break;
2672 
2673  case YYSYMBOL_return_list: /* return_list */
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_return_list1: /* return_list1 */
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_file: /* file */
2686 #line 359 "../libinterp/parse-tree/oct-parse.yy"
2687  { delete ((*yyvaluep).tree_command_type); }
2688 #line 2689 "libinterp/parse-tree/oct-parse.cc"
2689  break;
2690 
2691  case YYSYMBOL_function_beg: /* function_beg */
2692 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2693  { }
2694 #line 2695 "libinterp/parse-tree/oct-parse.cc"
2695  break;
2696 
2697  case YYSYMBOL_fcn_name: /* fcn_name */
2698 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2699  { delete ((*yyvaluep).tree_identifier_type); }
2700 #line 2701 "libinterp/parse-tree/oct-parse.cc"
2701  break;
2702 
2703  case YYSYMBOL_function_end: /* function_end */
2704 #line 369 "../libinterp/parse-tree/oct-parse.yy"
2705  { delete ((*yyvaluep).tree_statement_type); }
2706 #line 2707 "libinterp/parse-tree/oct-parse.cc"
2707  break;
2708 
2709  case YYSYMBOL_function: /* function */
2710 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2711  { delete ((*yyvaluep).tree_function_def_type); }
2712 #line 2713 "libinterp/parse-tree/oct-parse.cc"
2713  break;
2714 
2715  case YYSYMBOL_function_body: /* function_body */
2716 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2717  { delete ((*yyvaluep).tree_statement_list_type); }
2718 #line 2719 "libinterp/parse-tree/oct-parse.cc"
2719  break;
2720 
2721  case YYSYMBOL_function_body1: /* function_body1 */
2722 #line 370 "../libinterp/parse-tree/oct-parse.yy"
2723  { delete ((*yyvaluep).tree_statement_list_type); }
2724 #line 2725 "libinterp/parse-tree/oct-parse.cc"
2725  break;
2726 
2727  case YYSYMBOL_arguments_block: /* arguments_block */
2728 #line 371 "../libinterp/parse-tree/oct-parse.yy"
2729  { delete ((*yyvaluep).tree_arguments_block_type); }
2730 #line 2731 "libinterp/parse-tree/oct-parse.cc"
2731  break;
2732 
2733  case YYSYMBOL_arguments_beg: /* arguments_beg */
2734 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2735  { }
2736 #line 2737 "libinterp/parse-tree/oct-parse.cc"
2737  break;
2738 
2739  case YYSYMBOL_args_attr_list: /* args_attr_list */
2740 #line 372 "../libinterp/parse-tree/oct-parse.yy"
2741  { delete ((*yyvaluep).tree_args_block_attribute_list_type); }
2742 #line 2743 "libinterp/parse-tree/oct-parse.cc"
2743  break;
2744 
2745  case YYSYMBOL_args_validation_list: /* args_validation_list */
2746 #line 373 "../libinterp/parse-tree/oct-parse.yy"
2747  { delete ((*yyvaluep).tree_args_block_validation_list_type); }
2748 #line 2749 "libinterp/parse-tree/oct-parse.cc"
2749  break;
2750 
2751  case YYSYMBOL_arg_name: /* arg_name */
2752 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2753  { delete ((*yyvaluep).tree_expression_type); }
2754 #line 2755 "libinterp/parse-tree/oct-parse.cc"
2755  break;
2756 
2757  case YYSYMBOL_arg_validation: /* arg_validation */
2758 #line 374 "../libinterp/parse-tree/oct-parse.yy"
2759  { delete ((*yyvaluep).tree_arg_validation_type); }
2760 #line 2761 "libinterp/parse-tree/oct-parse.cc"
2761  break;
2762 
2763  case YYSYMBOL_size_spec: /* size_spec */
2764 #line 375 "../libinterp/parse-tree/oct-parse.yy"
2765  { delete ((*yyvaluep).tree_arg_size_spec_type); }
2766 #line 2767 "libinterp/parse-tree/oct-parse.cc"
2767  break;
2768 
2769  case YYSYMBOL_class_name: /* class_name */
2770 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2771  { delete ((*yyvaluep).tree_identifier_type); }
2772 #line 2773 "libinterp/parse-tree/oct-parse.cc"
2773  break;
2774 
2775  case YYSYMBOL_validation_fcns: /* validation_fcns */
2776 #line 376 "../libinterp/parse-tree/oct-parse.yy"
2777  { delete ((*yyvaluep).tree_arg_validation_fcns_type); }
2778 #line 2779 "libinterp/parse-tree/oct-parse.cc"
2779  break;
2780 
2781  case YYSYMBOL_default_value: /* default_value */
2782 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2783  { delete ((*yyvaluep).tree_expression_type); }
2784 #line 2785 "libinterp/parse-tree/oct-parse.cc"
2785  break;
2786 
2787  case YYSYMBOL_classdef_beg: /* classdef_beg */
2788 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2789  { }
2790 #line 2791 "libinterp/parse-tree/oct-parse.cc"
2791  break;
2792 
2793  case YYSYMBOL_classdef: /* classdef */
2794 #line 379 "../libinterp/parse-tree/oct-parse.yy"
2795  { delete ((*yyvaluep).tree_classdef_type); }
2796 #line 2797 "libinterp/parse-tree/oct-parse.cc"
2797  break;
2798 
2799  case YYSYMBOL_attr_list: /* attr_list */
2800 #line 381 "../libinterp/parse-tree/oct-parse.yy"
2801  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2802 #line 2803 "libinterp/parse-tree/oct-parse.cc"
2803  break;
2804 
2805  case YYSYMBOL_attr_list1: /* attr_list1 */
2806 #line 381 "../libinterp/parse-tree/oct-parse.yy"
2807  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2808 #line 2809 "libinterp/parse-tree/oct-parse.cc"
2809  break;
2810 
2811  case YYSYMBOL_attr: /* attr */
2812 #line 380 "../libinterp/parse-tree/oct-parse.yy"
2813  { delete ((*yyvaluep).tree_classdef_attribute_type); }
2814 #line 2815 "libinterp/parse-tree/oct-parse.cc"
2815  break;
2816 
2817  case YYSYMBOL_superclass_list: /* superclass_list */
2818 #line 383 "../libinterp/parse-tree/oct-parse.yy"
2819  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2820 #line 2821 "libinterp/parse-tree/oct-parse.cc"
2821  break;
2822 
2823  case YYSYMBOL_superclass_list1: /* superclass_list1 */
2824 #line 383 "../libinterp/parse-tree/oct-parse.yy"
2825  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2826 #line 2827 "libinterp/parse-tree/oct-parse.cc"
2827  break;
2828 
2829  case YYSYMBOL_superclass: /* superclass */
2830 #line 382 "../libinterp/parse-tree/oct-parse.yy"
2831  { delete ((*yyvaluep).tree_classdef_superclass_type); }
2832 #line 2833 "libinterp/parse-tree/oct-parse.cc"
2833  break;
2834 
2835  case YYSYMBOL_class_body: /* class_body */
2836 #line 384 "../libinterp/parse-tree/oct-parse.yy"
2837  { delete ((*yyvaluep).tree_classdef_body_type); }
2838 #line 2839 "libinterp/parse-tree/oct-parse.cc"
2839  break;
2840 
2841  case YYSYMBOL_class_body1: /* class_body1 */
2842 #line 384 "../libinterp/parse-tree/oct-parse.yy"
2843  { delete ((*yyvaluep).tree_classdef_body_type); }
2844 #line 2845 "libinterp/parse-tree/oct-parse.cc"
2845  break;
2846 
2847  case YYSYMBOL_properties_block: /* properties_block */
2848 #line 387 "../libinterp/parse-tree/oct-parse.yy"
2849  { delete ((*yyvaluep).tree_classdef_properties_block_type); }
2850 #line 2851 "libinterp/parse-tree/oct-parse.cc"
2851  break;
2852 
2853  case YYSYMBOL_properties_beg: /* properties_beg */
2854 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2855  { }
2856 #line 2857 "libinterp/parse-tree/oct-parse.cc"
2857  break;
2858 
2859  case YYSYMBOL_property_list: /* property_list */
2860 #line 386 "../libinterp/parse-tree/oct-parse.yy"
2861  { delete ((*yyvaluep).tree_classdef_property_list_type); }
2862 #line 2863 "libinterp/parse-tree/oct-parse.cc"
2863  break;
2864 
2865  case YYSYMBOL_property_list1: /* property_list1 */
2866 #line 386 "../libinterp/parse-tree/oct-parse.yy"
2867  { delete ((*yyvaluep).tree_classdef_property_list_type); }
2868 #line 2869 "libinterp/parse-tree/oct-parse.cc"
2869  break;
2870 
2871  case YYSYMBOL_class_property: /* class_property */
2872 #line 385 "../libinterp/parse-tree/oct-parse.yy"
2873  { delete ((*yyvaluep).tree_classdef_property_type); }
2874 #line 2875 "libinterp/parse-tree/oct-parse.cc"
2875  break;
2876 
2877  case YYSYMBOL_methods_block: /* methods_block */
2878 #line 389 "../libinterp/parse-tree/oct-parse.yy"
2879  { delete ((*yyvaluep).tree_classdef_methods_block_type); }
2880 #line 2881 "libinterp/parse-tree/oct-parse.cc"
2881  break;
2882 
2883  case YYSYMBOL_methods_beg: /* methods_beg */
2884 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2885  { }
2886 #line 2887 "libinterp/parse-tree/oct-parse.cc"
2887  break;
2888 
2889  case YYSYMBOL_method_decl1: /* method_decl1 */
2890 #line 377 "../libinterp/parse-tree/oct-parse.yy"
2891  { delete ((*yyvaluep).octave_user_function_type); }
2892 #line 2893 "libinterp/parse-tree/oct-parse.cc"
2893  break;
2894 
2895  case YYSYMBOL_method_decl: /* method_decl */
2896 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2897  { delete ((*yyvaluep).tree_function_def_type); }
2898 #line 2899 "libinterp/parse-tree/oct-parse.cc"
2899  break;
2900 
2901  case YYSYMBOL_method: /* method */
2902 #line 353 "../libinterp/parse-tree/oct-parse.yy"
2903  { delete ((*yyvaluep).tree_function_def_type); }
2904 #line 2905 "libinterp/parse-tree/oct-parse.cc"
2905  break;
2906 
2907  case YYSYMBOL_methods_list: /* methods_list */
2908 #line 388 "../libinterp/parse-tree/oct-parse.yy"
2909  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
2910 #line 2911 "libinterp/parse-tree/oct-parse.cc"
2911  break;
2912 
2913  case YYSYMBOL_methods_list1: /* methods_list1 */
2914 #line 388 "../libinterp/parse-tree/oct-parse.yy"
2915  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
2916 #line 2917 "libinterp/parse-tree/oct-parse.cc"
2917  break;
2918 
2919  case YYSYMBOL_events_block: /* events_block */
2920 #line 392 "../libinterp/parse-tree/oct-parse.yy"
2921  { delete ((*yyvaluep).tree_classdef_events_block_type); }
2922 #line 2923 "libinterp/parse-tree/oct-parse.cc"
2923  break;
2924 
2925  case YYSYMBOL_events_beg: /* events_beg */
2926 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2927  { }
2928 #line 2929 "libinterp/parse-tree/oct-parse.cc"
2929  break;
2930 
2931  case YYSYMBOL_events_list: /* events_list */
2932 #line 391 "../libinterp/parse-tree/oct-parse.yy"
2933  { delete ((*yyvaluep).tree_classdef_events_list_type); }
2934 #line 2935 "libinterp/parse-tree/oct-parse.cc"
2935  break;
2936 
2937  case YYSYMBOL_events_list1: /* events_list1 */
2938 #line 391 "../libinterp/parse-tree/oct-parse.yy"
2939  { delete ((*yyvaluep).tree_classdef_events_list_type); }
2940 #line 2941 "libinterp/parse-tree/oct-parse.cc"
2941  break;
2942 
2943  case YYSYMBOL_class_event: /* class_event */
2944 #line 390 "../libinterp/parse-tree/oct-parse.yy"
2945  { delete ((*yyvaluep).tree_classdef_event_type); }
2946 #line 2947 "libinterp/parse-tree/oct-parse.cc"
2947  break;
2948 
2949  case YYSYMBOL_enum_block: /* enum_block */
2950 #line 395 "../libinterp/parse-tree/oct-parse.yy"
2951  { delete ((*yyvaluep).tree_classdef_enum_block_type); }
2952 #line 2953 "libinterp/parse-tree/oct-parse.cc"
2953  break;
2954 
2955  case YYSYMBOL_enumeration_beg: /* enumeration_beg */
2956 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2957  { }
2958 #line 2959 "libinterp/parse-tree/oct-parse.cc"
2959  break;
2960 
2961  case YYSYMBOL_enum_list: /* enum_list */
2962 #line 394 "../libinterp/parse-tree/oct-parse.yy"
2963  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
2964 #line 2965 "libinterp/parse-tree/oct-parse.cc"
2965  break;
2966 
2967  case YYSYMBOL_enum_list1: /* enum_list1 */
2968 #line 394 "../libinterp/parse-tree/oct-parse.yy"
2969  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
2970 #line 2971 "libinterp/parse-tree/oct-parse.cc"
2971  break;
2972 
2973  case YYSYMBOL_class_enum: /* class_enum */
2974 #line 393 "../libinterp/parse-tree/oct-parse.yy"
2975  { delete ((*yyvaluep).tree_classdef_enum_type); }
2976 #line 2977 "libinterp/parse-tree/oct-parse.cc"
2977  break;
2978 
2979  case YYSYMBOL_stash_comment: /* stash_comment */
2980 #line 342 "../libinterp/parse-tree/oct-parse.yy"
2981  { }
2982 #line 2983 "libinterp/parse-tree/oct-parse.cc"
2983  break;
2984 
2985  case YYSYMBOL_sep_no_nl: /* sep_no_nl */
2986 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2987  { }
2988 #line 2989 "libinterp/parse-tree/oct-parse.cc"
2989  break;
2990 
2991  case YYSYMBOL_opt_sep_no_nl: /* opt_sep_no_nl */
2992 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2993  { }
2994 #line 2995 "libinterp/parse-tree/oct-parse.cc"
2995  break;
2996 
2997  case YYSYMBOL_opt_nl: /* opt_nl */
2998 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2999  { }
3000 #line 3001 "libinterp/parse-tree/oct-parse.cc"
3001  break;
3002 
3003  case YYSYMBOL_nl: /* 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_sep: /* sep */
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_sep: /* opt_sep */
3016 #line 341 "../libinterp/parse-tree/oct-parse.yy"
3017  { }
3018 #line 3019 "libinterp/parse-tree/oct-parse.cc"
3019  break;
3020 
3021  default:
3022  break;
3023  }
3025 }
3026 
3027 
3028 
3029 
3030 
3031 int
3032 yyparse (octave::base_parser& parser)
3033 {
3034  yypstate *yyps = yypstate_new ();
3035  if (!yyps)
3036  {
3037  yyerror (parser, YY_("memory exhausted"));
3038  return 2;
3039  }
3040  int yystatus = yypull_parse (yyps, parser);
3041  yypstate_delete (yyps);
3042  return yystatus;
3043 }
3044 
3045 int
3046 yypull_parse (yypstate *yyps, octave::base_parser& parser)
3047 {
3048  YY_ASSERT (yyps);
3049  int yystatus;
3050  do {
3051  YYSTYPE yylval;
3052  int yychar = yylex (&yylval, scanner);
3053  yystatus = yypush_parse (yyps, yychar, &yylval, parser);
3054  } while (yystatus == YYPUSH_MORE);
3055  return yystatus;
3056 }
3057 
3058 #define octave_nerrs yyps->octave_nerrs
3059 #define yystate yyps->yystate
3060 #define yyerrstatus yyps->yyerrstatus
3061 #define yyssa yyps->yyssa
3062 #define yyss yyps->yyss
3063 #define yyssp yyps->yyssp
3064 #define yyvsa yyps->yyvsa
3065 #define yyvs yyps->yyvs
3066 #define yyvsp yyps->yyvsp
3067 #define yystacksize yyps->yystacksize
3068 
3069 /* Initialize the parser data structure. */
3070 static void
3071 yypstate_clear (yypstate *yyps)
3072 {
3073  yynerrs = 0;
3074  yystate = 0;
3075  yyerrstatus = 0;
3076 
3077  yyssp = yyss;
3078  yyvsp = yyvs;
3079 
3080  /* Initialize the state stack, in case yypcontext_expected_tokens is
3081  called before the first call to yyparse. */
3082  *yyssp = 0;
3083  yyps->yynew = 1;
3084 }
3085 
3086 /* Initialize the parser data structure. */
3087 yypstate *
3089 {
3090  yypstate *yyps;
3091  yyps = YY_CAST (yypstate *, YYMALLOC (sizeof *yyps));
3092  if (!yyps)
3093  return YY_NULLPTR;
3095  yyss = yyssa;
3096  yyvs = yyvsa;
3097  yypstate_clear (yyps);
3098  return yyps;
3099 }
3100 
3101 void
3103 {
3104  if (yyps)
3105  {
3106 #ifndef yyoverflow
3107  /* If the stack was reallocated but the parse did not complete, then the
3108  stack still needs to be freed. */
3109  if (yyss != yyssa)
3110  YYSTACK_FREE (yyss);
3111 #endif
3112  YYFREE (yyps);
3113  }
3114 }
3115 
3116 
3117 
3118 /*---------------.
3119 | yypush_parse. |
3120 `---------------*/
3121 
3122 int
3124  int yypushed_char, YYSTYPE const *yypushed_val, octave::base_parser& parser)
3125 {
3126 /* Lookahead token kind. */
3127 int yychar;
3128 
3129 
3130 /* The semantic value of the lookahead symbol. */
3131 /* Default value used for initialization, for pacifying older GCCs
3132  or non-GCC compilers. */
3133 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
3134 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
3135 
3136  int yyn;
3137  /* The return value of yyparse. */
3138  int yyresult;
3139  /* Lookahead symbol kind. */
3141  /* The variables used to return semantic value and location from the
3142  action routines. */
3143  YYSTYPE yyval;
3144 
3145 
3146 
3147 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3148 
3149  /* The number of symbols on the RHS of the reduced rule.
3150  Keep to zero when no symbol should be popped. */
3151  int yylen = 0;
3152 
3153  switch (yyps->yynew)
3154  {
3155  case 0:
3156  yyn = yypact[yystate];
3157  goto yyread_pushed_token;
3158 
3159  case 2:
3160  yypstate_clear (yyps);
3161  break;
3162 
3163  default:
3164  break;
3165  }
3166 
3167  YYDPRINTF ((stderr, "Starting parse\n"));
3168 
3169  yychar = OCTAVE_EMPTY; /* Cause a token to be read. */
3170 
3171  goto yysetstate;
3172 
3173 
3174 /*------------------------------------------------------------.
3175 | yynewstate -- push a new state, which is found in yystate. |
3176 `------------------------------------------------------------*/
3177 yynewstate:
3178  /* In all cases, when you get here, the value and location stacks
3179  have just been pushed. So pushing a state here evens the stacks. */
3180  yyssp++;
3181 
3182 
3183 /*--------------------------------------------------------------------.
3184 | yysetstate -- set current state (the top of the stack) to yystate. |
3185 `--------------------------------------------------------------------*/
3186 yysetstate:
3187  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3188  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
3193 
3194  if (yyss + yystacksize - 1 <= yyssp)
3195 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
3196  YYNOMEM;
3197 #else
3198  {
3199  /* Get the current used size of the three stacks, in elements. */
3200  YYPTRDIFF_T yysize = yyssp - yyss + 1;
3201 
3202 # if defined yyoverflow
3203  {
3204  /* Give user a chance to reallocate the stack. Use copies of
3205  these so that the &'s don't force the real ones into
3206  memory. */
3207  yy_state_t *yyss1 = yyss;
3208  YYSTYPE *yyvs1 = yyvs;
3209 
3210  /* Each stack pointer address is followed by the size of the
3211  data in use in that stack, in bytes. This used to be a
3212  conditional around just the two extra args, but that might
3213  be undefined if yyoverflow is a macro. */
3214  yyoverflow (YY_("memory exhausted"),
3215  &yyss1, yysize * YYSIZEOF (*yyssp),
3216  &yyvs1, yysize * YYSIZEOF (*yyvsp),
3217  &yystacksize);
3218  yyss = yyss1;
3219  yyvs = yyvs1;
3220  }
3221 # else /* defined YYSTACK_RELOCATE */
3222  /* Extend the stack our own way. */
3223  if (YYMAXDEPTH <= yystacksize)
3224  YYNOMEM;
3225  yystacksize *= 2;
3226  if (YYMAXDEPTH < yystacksize)
3228 
3229  {
3230  yy_state_t *yyss1 = yyss;
3231  union yyalloc *yyptr =
3232  YY_CAST (union yyalloc *,
3234  if (! yyptr)
3235  YYNOMEM;
3236  YYSTACK_RELOCATE (yyss_alloc, yyss);
3237  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3238 # undef YYSTACK_RELOCATE
3239  if (yyss1 != yyssa)
3240  YYSTACK_FREE (yyss1);
3241  }
3242 # endif
3243 
3244  yyssp = yyss + yysize - 1;
3245  yyvsp = yyvs + yysize - 1;
3246 
3248  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
3249  YY_CAST (long, yystacksize)));
3251 
3252  if (yyss + yystacksize - 1 <= yyssp)
3253  YYABORT;
3254  }
3255 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
3256 
3257 
3258  if (yystate == YYFINAL)
3259  YYACCEPT;
3260 
3261  goto yybackup;
3262 
3263 
3264 /*-----------.
3265 | yybackup. |
3266 `-----------*/
3267 yybackup:
3268  /* Do appropriate processing given the current state. Read a
3269  lookahead token if we need one and don't already have one. */
3270 
3271  /* First try to decide what to do without reference to lookahead token. */
3272  yyn = yypact[yystate];
3273  if (yypact_value_is_default (yyn))
3274  goto yydefault;
3275 
3276  /* Not known => get a lookahead token if don't already have one. */
3277 
3278  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
3279  if (yychar == OCTAVE_EMPTY)
3280  {
3281  if (!yyps->yynew)
3282  {
3283  YYDPRINTF ((stderr, "Return for a new token:\n"));
3284  yyresult = YYPUSH_MORE;
3285  goto yypushreturn;
3286  }
3287  yyps->yynew = 0;
3288 yyread_pushed_token:
3289  YYDPRINTF ((stderr, "Reading a token\n"));
3290  yychar = yypushed_char;
3291  if (yypushed_val)
3292  yylval = *yypushed_val;
3293  }
3294 
3295  if (yychar <= OCTAVE_EOF)
3296  {
3297  yychar = OCTAVE_EOF;
3298  yytoken = YYSYMBOL_YYEOF;
3299  YYDPRINTF ((stderr, "Now at end of input.\n"));
3300  }
3301  else if (yychar == OCTAVE_error)
3302  {
3303  /* The scanner already issued an error message, process directly
3304  to error recovery. But do not keep the error token as
3305  lookahead, it is too special and may lead us to an endless
3306  loop in error recovery. */
3307  yychar = OCTAVE_UNDEF;
3308  yytoken = YYSYMBOL_YYerror;
3309  goto yyerrlab1;
3310  }
3311  else
3312  {
3313  yytoken = YYTRANSLATE (yychar);
3314  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3315  }
3316 
3317  /* If the proper action on seeing token YYTOKEN is to reduce or to
3318  detect an error, take that action. */
3319  yyn += yytoken;
3320  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3321  goto yydefault;
3322  yyn = yytable[yyn];
3323  if (yyn <= 0)
3324  {
3325  if (yytable_value_is_error (yyn))
3326  goto yyerrlab;
3327  yyn = -yyn;
3328  goto yyreduce;
3329  }
3330 
3331  /* Count tokens shifted since error; after three, turn off error
3332  status. */
3333  if (yyerrstatus)
3334  yyerrstatus--;
3335 
3336  /* Shift the lookahead token. */
3337  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3338  yystate = yyn;
3340  *++yyvsp = yylval;
3342 
3343  /* Discard the shifted token. */
3344  yychar = OCTAVE_EMPTY;
3345  goto yynewstate;
3346 
3347 
3348 /*-----------------------------------------------------------.
3349 | yydefault -- do the default action for the current state. |
3350 `-----------------------------------------------------------*/
3351 yydefault:
3352  yyn = yydefact[yystate];
3353  if (yyn == 0)
3354  goto yyerrlab;
3355  goto yyreduce;
3356 
3357 
3358 /*-----------------------------.
3359 | yyreduce -- do a reduction. |
3360 `-----------------------------*/
3361 yyreduce:
3362  /* yyn is the number of a rule to reduce with. */
3363  yylen = yyr2[yyn];
3364 
3365  /* If YYLEN is nonzero, implement the default value of the action:
3366  '$$ = $1'.
3367 
3368  Otherwise, the following line sets YYVAL to garbage.
3369  This behavior is undocumented and Bison
3370  users should not rely upon it. Assigning to YYVAL
3371  unconditionally makes the parser a bit smaller, and it avoids a
3372  GCC warning that YYVAL may be used uninitialized. */
3373  yyval = yyvsp[1-yylen];
3374 
3375 
3376  YY_REDUCE_PRINT (yyn);
3377  switch (yyn)
3378  {
3379  case 2: /* input: simple_list '\n' */
3380 #line 416 "../libinterp/parse-tree/oct-parse.yy"
3381  {
3382  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3383 
3384  (yyval.tree_type) = nullptr;
3385 
3386  if (! parser.finish_input ((yyvsp[-1].tree_statement_list_type)))
3387  YYABORT;
3388  else
3389  YYACCEPT;
3390  }
3391 #line 3392 "libinterp/parse-tree/oct-parse.cc"
3392  break;
3393 
3394  case 3: /* input: simple_list END_OF_INPUT */
3395 #line 427 "../libinterp/parse-tree/oct-parse.yy"
3396  {
3397  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3398 
3399  (yyval.tree_type) = nullptr;
3400 
3401  if (! parser.finish_input ((yyvsp[-1].tree_statement_list_type), true))
3402  YYABORT;
3403  else
3404  YYACCEPT;
3405  }
3406 #line 3407 "libinterp/parse-tree/oct-parse.cc"
3407  break;
3408 
3409  case 4: /* input: parse_error */
3410 #line 438 "../libinterp/parse-tree/oct-parse.yy"
3411  {
3412  (yyval.tree_type) = nullptr;
3413  YYABORT;
3414  }
3415 #line 3416 "libinterp/parse-tree/oct-parse.cc"
3416  break;
3417 
3418  case 5: /* simple_list: opt_sep_no_nl */
3419 #line 445 "../libinterp/parse-tree/oct-parse.yy"
3420  {
3421  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3422 
3423  (yyval.tree_statement_list_type) = nullptr;
3424  }
3425 #line 3426 "libinterp/parse-tree/oct-parse.cc"
3426  break;
3427 
3428  case 6: /* simple_list: simple_list1 opt_sep_no_nl */
3429 #line 451 "../libinterp/parse-tree/oct-parse.yy"
3430  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), false); }
3431 #line 3432 "libinterp/parse-tree/oct-parse.cc"
3432  break;
3433 
3434  case 7: /* simple_list1: statement */
3435 #line 455 "../libinterp/parse-tree/oct-parse.yy"
3436  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3437 #line 3438 "libinterp/parse-tree/oct-parse.cc"
3438  break;
3439 
3440  case 8: /* simple_list1: simple_list1 sep_no_nl statement */
3441 #line 457 "../libinterp/parse-tree/oct-parse.yy"
3442  { (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); }
3443 #line 3444 "libinterp/parse-tree/oct-parse.cc"
3444  break;
3445 
3446  case 9: /* opt_list: %empty */
3447 #line 461 "../libinterp/parse-tree/oct-parse.yy"
3448  { (yyval.tree_statement_list_type) = nullptr; }
3449 #line 3450 "libinterp/parse-tree/oct-parse.cc"
3450  break;
3451 
3452  case 10: /* opt_list: list */
3453 #line 463 "../libinterp/parse-tree/oct-parse.yy"
3454  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3455 #line 3456 "libinterp/parse-tree/oct-parse.cc"
3456  break;
3457 
3458  case 11: /* list: list1 opt_sep */
3459 #line 467 "../libinterp/parse-tree/oct-parse.yy"
3460  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), true); }
3461 #line 3462 "libinterp/parse-tree/oct-parse.cc"
3462  break;
3463 
3464  case 12: /* list1: statement */
3465 #line 471 "../libinterp/parse-tree/oct-parse.yy"
3466  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3467 #line 3468 "libinterp/parse-tree/oct-parse.cc"
3468  break;
3469 
3470  case 13: /* list1: list1 sep statement */
3471 #line 473 "../libinterp/parse-tree/oct-parse.yy"
3472  { (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); }
3473 #line 3474 "libinterp/parse-tree/oct-parse.cc"
3474  break;
3475 
3476  case 14: /* opt_fcn_list: %empty */
3477 #line 477 "../libinterp/parse-tree/oct-parse.yy"
3478  { (yyval.tree_statement_list_type) = nullptr; }
3479 #line 3480 "libinterp/parse-tree/oct-parse.cc"
3480  break;
3481 
3482  case 15: /* opt_fcn_list: fcn_list */
3483 #line 479 "../libinterp/parse-tree/oct-parse.yy"
3484  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3485 #line 3486 "libinterp/parse-tree/oct-parse.cc"
3486  break;
3487 
3488  case 16: /* fcn_list: fcn_list1 opt_sep */
3489 #line 483 "../libinterp/parse-tree/oct-parse.yy"
3490  {
3491  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3492 
3493  (yyval.tree_statement_list_type) = (yyvsp[-1].tree_statement_list_type);
3494  }
3495 #line 3496 "libinterp/parse-tree/oct-parse.cc"
3496  break;
3497 
3498  case 17: /* fcn_list1: function */
3499 #line 491 "../libinterp/parse-tree/oct-parse.yy"
3500  {
3501  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3502  (yyval.tree_statement_list_type) = parser.make_statement_list (stmt);
3503  }
3504 #line 3505 "libinterp/parse-tree/oct-parse.cc"
3505  break;
3506 
3507  case 18: /* fcn_list1: fcn_list1 opt_sep function */
3508 #line 496 "../libinterp/parse-tree/oct-parse.yy"
3509  {
3510  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3511  (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), stmt, false);
3512  }
3513 #line 3514 "libinterp/parse-tree/oct-parse.cc"
3514  break;
3515 
3516  case 19: /* statement: expression */
3517 #line 503 "../libinterp/parse-tree/oct-parse.yy"
3518  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_expression_type)); }
3519 #line 3520 "libinterp/parse-tree/oct-parse.cc"
3520  break;
3521 
3522  case 20: /* statement: command */
3523 #line 505 "../libinterp/parse-tree/oct-parse.yy"
3524  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_command_type)); }
3525 #line 3526 "libinterp/parse-tree/oct-parse.cc"
3526  break;
3527 
3528  case 21: /* statement: word_list_cmd */
3529 #line 507 "../libinterp/parse-tree/oct-parse.yy"
3530  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_index_expression_type)); }
3531 #line 3532 "libinterp/parse-tree/oct-parse.cc"
3532  break;
3533 
3534  case 22: /* word_list_cmd: identifier word_list */
3535 #line 519 "../libinterp/parse-tree/oct-parse.yy"
3536  {
3537  (yyval.tree_index_expression_type) = parser.make_index_expression ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_argument_list_type), '(');
3538  if (! (yyval.tree_index_expression_type))
3539  {
3540  // make_index_expression deleted $1 and $2.
3541  YYABORT;
3542  }
3543  (yyval.tree_index_expression_type)->mark_word_list_cmd ();
3544  }
3545 #line 3546 "libinterp/parse-tree/oct-parse.cc"
3546  break;
3547 
3548  case 23: /* word_list: string */
3549 #line 531 "../libinterp/parse-tree/oct-parse.yy"
3550  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_constant_type)); }
3551 #line 3552 "libinterp/parse-tree/oct-parse.cc"
3552  break;
3553 
3554  case 24: /* word_list: word_list string */
3555 #line 533 "../libinterp/parse-tree/oct-parse.yy"
3556  { (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-1].tree_argument_list_type), (yyvsp[0].tree_constant_type)); }
3557 #line 3558 "libinterp/parse-tree/oct-parse.cc"
3558  break;
3559 
3560  case 25: /* identifier: NAME */
3561 #line 541 "../libinterp/parse-tree/oct-parse.yy"
3562  { (yyval.tree_identifier_type) = parser.make_identifier ((yyvsp[0].tok_val)); }
3563 #line 3564 "libinterp/parse-tree/oct-parse.cc"
3564  break;
3565 
3566  case 26: /* superclass_identifier: SUPERCLASSREF */
3567 #line 546 "../libinterp/parse-tree/oct-parse.yy"
3568  { (yyval.tree_superclass_ref_type) = parser.make_superclass_ref ((yyvsp[0].tok_val)); }
3569 #line 3570 "libinterp/parse-tree/oct-parse.cc"
3570  break;
3571 
3572  case 27: /* meta_identifier: METAQUERY */
3573 #line 550 "../libinterp/parse-tree/oct-parse.yy"
3574  { (yyval.tree_metaclass_query_type) = parser.make_metaclass_query ((yyvsp[0].tok_val)); }
3575 #line 3576 "libinterp/parse-tree/oct-parse.cc"
3576  break;
3577 
3578  case 28: /* string: DQ_STRING */
3579 #line 554 "../libinterp/parse-tree/oct-parse.yy"
3580  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3581 #line 3582 "libinterp/parse-tree/oct-parse.cc"
3582  break;
3583 
3584  case 29: /* string: SQ_STRING */
3585 #line 556 "../libinterp/parse-tree/oct-parse.yy"
3586  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3587 #line 3588 "libinterp/parse-tree/oct-parse.cc"
3588  break;
3589 
3590  case 30: /* constant: NUMBER */
3591 #line 560 "../libinterp/parse-tree/oct-parse.yy"
3592  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3593 #line 3594 "libinterp/parse-tree/oct-parse.cc"
3594  break;
3595 
3596  case 31: /* constant: string */
3597 #line 562 "../libinterp/parse-tree/oct-parse.yy"
3598  { (yyval.tree_constant_type) = (yyvsp[0].tree_constant_type); }
3599 #line 3600 "libinterp/parse-tree/oct-parse.cc"
3600  break;
3601 
3602  case 32: /* matrix: '[' matrix_rows ']' */
3603 #line 566 "../libinterp/parse-tree/oct-parse.yy"
3604  { (yyval.tree_expression_type) = parser.finish_matrix ((yyvsp[-1].tree_matrix_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3605 #line 3606 "libinterp/parse-tree/oct-parse.cc"
3606  break;
3607 
3608  case 33: /* matrix_rows: cell_or_matrix_row */
3609 #line 570 "../libinterp/parse-tree/oct-parse.yy"
3610  { (yyval.tree_matrix_type) = parser.make_matrix ((yyvsp[0].tree_argument_list_type)); }
3611 #line 3612 "libinterp/parse-tree/oct-parse.cc"
3612  break;
3613 
3614  case 34: /* matrix_rows: matrix_rows ';' cell_or_matrix_row */
3615 #line 572 "../libinterp/parse-tree/oct-parse.yy"
3616  {
3617  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3618 
3619  (yyval.tree_matrix_type) = parser.append_matrix_row ((yyvsp[-2].tree_matrix_type), (yyvsp[0].tree_argument_list_type));
3620  }
3621 #line 3622 "libinterp/parse-tree/oct-parse.cc"
3622  break;
3623 
3624  case 35: /* cell: '{' cell_rows '}' */
3625 #line 580 "../libinterp/parse-tree/oct-parse.yy"
3626  { (yyval.tree_expression_type) = parser.finish_cell ((yyvsp[-1].tree_cell_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3627 #line 3628 "libinterp/parse-tree/oct-parse.cc"
3628  break;
3629 
3630  case 36: /* cell_rows: cell_or_matrix_row */
3631 #line 584 "../libinterp/parse-tree/oct-parse.yy"
3632  { (yyval.tree_cell_type) = parser.make_cell ((yyvsp[0].tree_argument_list_type)); }
3633 #line 3634 "libinterp/parse-tree/oct-parse.cc"
3634  break;
3635 
3636  case 37: /* cell_rows: cell_rows ';' cell_or_matrix_row */
3637 #line 586 "../libinterp/parse-tree/oct-parse.yy"
3638  {
3639  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3640 
3641  (yyval.tree_cell_type) = parser.append_cell_row ((yyvsp[-2].tree_cell_type), (yyvsp[0].tree_argument_list_type));
3642  }
3643 #line 3644 "libinterp/parse-tree/oct-parse.cc"
3644  break;
3645 
3646  case 38: /* cell_or_matrix_row: %empty */
3647 #line 602 "../libinterp/parse-tree/oct-parse.yy"
3648  { (yyval.tree_argument_list_type) = nullptr; }
3649 #line 3650 "libinterp/parse-tree/oct-parse.cc"
3650  break;
3651 
3652  case 39: /* cell_or_matrix_row: ',' */
3653 #line 604 "../libinterp/parse-tree/oct-parse.yy"
3654  {
3655  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3656 
3657  (yyval.tree_argument_list_type) = nullptr;
3658  }
3659 #line 3660 "libinterp/parse-tree/oct-parse.cc"
3660  break;
3661 
3662  case 40: /* cell_or_matrix_row: arg_list */
3663 #line 610 "../libinterp/parse-tree/oct-parse.yy"
3664  { (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type); }
3665 #line 3666 "libinterp/parse-tree/oct-parse.cc"
3666  break;
3667 
3668  case 41: /* cell_or_matrix_row: arg_list ',' */
3669 #line 612 "../libinterp/parse-tree/oct-parse.yy"
3670  {
3671  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3672 
3673  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3674  }
3675 #line 3676 "libinterp/parse-tree/oct-parse.cc"
3676  break;
3677 
3678  case 42: /* cell_or_matrix_row: ',' arg_list */
3679 #line 618 "../libinterp/parse-tree/oct-parse.yy"
3680  {
3681  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3682 
3683  (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type);
3684  }
3685 #line 3686 "libinterp/parse-tree/oct-parse.cc"
3686  break;
3687 
3688  case 43: /* cell_or_matrix_row: ',' arg_list ',' */
3689 #line 624 "../libinterp/parse-tree/oct-parse.yy"
3690  {
3691  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3692 
3693  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3694  }
3695 #line 3696 "libinterp/parse-tree/oct-parse.cc"
3696  break;
3697 
3698  case 44: /* fcn_handle: FCN_HANDLE */
3699 #line 632 "../libinterp/parse-tree/oct-parse.yy"
3700  { (yyval.tree_fcn_handle_type) = parser.make_fcn_handle ((yyvsp[0].tok_val)); }
3701 #line 3702 "libinterp/parse-tree/oct-parse.cc"
3702  break;
3703 
3704  case 45: /* anon_fcn_handle: '@' param_list anon_fcn_begin expression */
3705 #line 640 "../libinterp/parse-tree/oct-parse.yy"
3706  {
3707  (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 ());
3708  if (! (yyval.tree_anon_fcn_handle_type))
3709  {
3710  // make_anon_fcn_handle deleted $2 and $4.
3711  YYABORT;
3712  }
3713 
3716  }
3717 #line 3718 "libinterp/parse-tree/oct-parse.cc"
3718  break;
3719 
3720  case 46: /* anon_fcn_handle: '@' param_list anon_fcn_begin error */
3721 #line 652 "../libinterp/parse-tree/oct-parse.yy"
3722  {
3723  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-2].tree_parameter_list_type));
3724 
3726 
3727  (yyval.tree_anon_fcn_handle_type) = nullptr;
3728  parser.bison_error ("anonymous function bodies must be single expressions");
3729  YYABORT;
3730  }
3731 #line 3732 "libinterp/parse-tree/oct-parse.cc"
3732  break;
3733 
3734  case 47: /* primary_expr: identifier */
3735 #line 664 "../libinterp/parse-tree/oct-parse.yy"
3736  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
3737 #line 3738 "libinterp/parse-tree/oct-parse.cc"
3738  break;
3739 
3740  case 48: /* primary_expr: constant */
3741 #line 666 "../libinterp/parse-tree/oct-parse.yy"
3742  { (yyval.tree_expression_type) = (yyvsp[0].tree_constant_type); }
3743 #line 3744 "libinterp/parse-tree/oct-parse.cc"
3744  break;
3745 
3746  case 49: /* primary_expr: fcn_handle */
3747 #line 668 "../libinterp/parse-tree/oct-parse.yy"
3748  { (yyval.tree_expression_type) = (yyvsp[0].tree_fcn_handle_type); }
3749 #line 3750 "libinterp/parse-tree/oct-parse.cc"
3750  break;
3751 
3752  case 50: /* primary_expr: matrix */
3753 #line 670 "../libinterp/parse-tree/oct-parse.yy"
3754  {
3756  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
3757  }
3758 #line 3759 "libinterp/parse-tree/oct-parse.cc"
3759  break;
3760 
3761  case 51: /* primary_expr: cell */
3762 #line 675 "../libinterp/parse-tree/oct-parse.yy"
3763  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3764 #line 3765 "libinterp/parse-tree/oct-parse.cc"
3765  break;
3766 
3767  case 52: /* primary_expr: meta_identifier */
3768 #line 677 "../libinterp/parse-tree/oct-parse.yy"
3769  { (yyval.tree_expression_type) = (yyvsp[0].tree_metaclass_query_type); }
3770 #line 3771 "libinterp/parse-tree/oct-parse.cc"
3771  break;
3772 
3773  case 53: /* primary_expr: superclass_identifier */
3774 #line 679 "../libinterp/parse-tree/oct-parse.yy"
3775  { (yyval.tree_expression_type) = (yyvsp[0].tree_superclass_ref_type); }
3776 #line 3777 "libinterp/parse-tree/oct-parse.cc"
3777  break;
3778 
3779  case 54: /* primary_expr: '(' expression ')' */
3780 #line 681 "../libinterp/parse-tree/oct-parse.yy"
3781  {
3782  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3783 
3784  (yyval.tree_expression_type) = (yyvsp[-1].tree_expression_type)->mark_in_parens ();
3785  }
3786 #line 3787 "libinterp/parse-tree/oct-parse.cc"
3787  break;
3788 
3789  case 55: /* magic_colon: ':' */
3790 #line 689 "../libinterp/parse-tree/oct-parse.yy"
3791  { (yyval.tree_constant_type) = parser.make_constant ((yyvsp[0].tok_val)); }
3792 #line 3793 "libinterp/parse-tree/oct-parse.cc"
3793  break;
3794 
3795  case 56: /* magic_tilde: '~' */
3796 #line 693 "../libinterp/parse-tree/oct-parse.yy"
3797  {
3798  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3799 
3800  (yyval.tree_identifier_type) = parser.make_black_hole ();
3801  }
3802 #line 3803 "libinterp/parse-tree/oct-parse.cc"
3803  break;
3804 
3805  case 57: /* arg_list: expression */
3806 #line 701 "../libinterp/parse-tree/oct-parse.yy"
3807  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_expression_type)); }
3808 #line 3809 "libinterp/parse-tree/oct-parse.cc"
3809  break;
3810 
3811  case 58: /* arg_list: magic_colon */
3812 #line 703 "../libinterp/parse-tree/oct-parse.yy"
3813  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_constant_type)); }
3814 #line 3815 "libinterp/parse-tree/oct-parse.cc"
3815  break;
3816 
3817  case 59: /* arg_list: magic_tilde */
3818 #line 705 "../libinterp/parse-tree/oct-parse.yy"
3819  { (yyval.tree_argument_list_type) = parser.make_argument_list ((yyvsp[0].tree_identifier_type)); }
3820 #line 3821 "libinterp/parse-tree/oct-parse.cc"
3821  break;
3822 
3823  case 60: /* arg_list: arg_list ',' magic_colon */
3824 #line 707 "../libinterp/parse-tree/oct-parse.yy"
3825  {
3826  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3827 
3828  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_constant_type));
3829  }
3830 #line 3831 "libinterp/parse-tree/oct-parse.cc"
3831  break;
3832 
3833  case 61: /* arg_list: arg_list ',' magic_tilde */
3834 #line 713 "../libinterp/parse-tree/oct-parse.yy"
3835  {
3836  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3837 
3838  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_identifier_type));
3839  }
3840 #line 3841 "libinterp/parse-tree/oct-parse.cc"
3841  break;
3842 
3843  case 62: /* arg_list: arg_list ',' expression */
3844 #line 719 "../libinterp/parse-tree/oct-parse.yy"
3845  {
3846  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3847 
3848  (yyval.tree_argument_list_type) = parser.append_argument_list ((yyvsp[-2].tree_argument_list_type), (yyvsp[0].tree_expression_type));
3849  }
3850 #line 3851 "libinterp/parse-tree/oct-parse.cc"
3851  break;
3852 
3853  case 63: /* indirect_ref_op: '.' */
3854 #line 727 "../libinterp/parse-tree/oct-parse.yy"
3855  {
3856  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3857 
3858  (yyval.dummy_type) = 0;
3860  }
3861 #line 3862 "libinterp/parse-tree/oct-parse.cc"
3862  break;
3863 
3864  case 64: /* oper_expr: primary_expr */
3865 #line 736 "../libinterp/parse-tree/oct-parse.yy"
3866  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3867 #line 3868 "libinterp/parse-tree/oct-parse.cc"
3868  break;
3869 
3870  case 65: /* oper_expr: oper_expr PLUS_PLUS */
3871 #line 738 "../libinterp/parse-tree/oct-parse.yy"
3872  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3873 #line 3874 "libinterp/parse-tree/oct-parse.cc"
3874  break;
3875 
3876  case 66: /* oper_expr: oper_expr MINUS_MINUS */
3877 #line 740 "../libinterp/parse-tree/oct-parse.yy"
3878  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3879 #line 3880 "libinterp/parse-tree/oct-parse.cc"
3880  break;
3881 
3882  case 67: /* oper_expr: oper_expr '(' ')' */
3883 #line 742 "../libinterp/parse-tree/oct-parse.yy"
3884  {
3885  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
3886 
3887  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
3888  if (! (yyval.tree_expression_type))
3889  {
3890  // make_index_expression deleted $1.
3891  YYABORT;
3892  }
3893  }
3894 #line 3895 "libinterp/parse-tree/oct-parse.cc"
3895  break;
3896 
3897  case 68: /* oper_expr: oper_expr '(' arg_list ')' */
3898 #line 753 "../libinterp/parse-tree/oct-parse.yy"
3899  {
3900  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3901 
3902  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
3903  if (! (yyval.tree_expression_type))
3904  {
3905  // make_index_expression deleted $1 and $3.
3906  YYABORT;
3907  }
3908  }
3909 #line 3910 "libinterp/parse-tree/oct-parse.cc"
3910  break;
3911 
3912  case 69: /* oper_expr: oper_expr '{' '}' */
3913 #line 764 "../libinterp/parse-tree/oct-parse.yy"
3914  {
3915  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
3916 
3917  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
3918  if (! (yyval.tree_expression_type))
3919  {
3920  // make_index_expression deleted $1.
3921  YYABORT;
3922  }
3923  }
3924 #line 3925 "libinterp/parse-tree/oct-parse.cc"
3925  break;
3926 
3927  case 70: /* oper_expr: oper_expr '{' arg_list '}' */
3928 #line 775 "../libinterp/parse-tree/oct-parse.yy"
3929  {
3930  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3931 
3932  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
3933  if (! (yyval.tree_expression_type))
3934  {
3935  // make_index_expression deleted $1 and $3.
3936  YYABORT;
3937  }
3938  }
3939 #line 3940 "libinterp/parse-tree/oct-parse.cc"
3940  break;
3941 
3942  case 71: /* oper_expr: oper_expr HERMITIAN */
3943 #line 786 "../libinterp/parse-tree/oct-parse.yy"
3944  { (yyval.tree_expression_type) = parser.make_postfix_op (HERMITIAN, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3945 #line 3946 "libinterp/parse-tree/oct-parse.cc"
3946  break;
3947 
3948  case 72: /* oper_expr: oper_expr TRANSPOSE */
3949 #line 788 "../libinterp/parse-tree/oct-parse.yy"
3950  { (yyval.tree_expression_type) = parser.make_postfix_op (TRANSPOSE, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3951 #line 3952 "libinterp/parse-tree/oct-parse.cc"
3952  break;
3953 
3954  case 73: /* oper_expr: oper_expr indirect_ref_op STRUCT_ELT */
3955 #line 790 "../libinterp/parse-tree/oct-parse.yy"
3956  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
3957 #line 3958 "libinterp/parse-tree/oct-parse.cc"
3958  break;
3959 
3960  case 74: /* oper_expr: oper_expr indirect_ref_op '(' expression ')' */
3961 #line 792 "../libinterp/parse-tree/oct-parse.yy"
3962  {
3963  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
3964 
3965  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
3966  }
3967 #line 3968 "libinterp/parse-tree/oct-parse.cc"
3968  break;
3969 
3970  case 75: /* oper_expr: PLUS_PLUS oper_expr */
3971 #line 798 "../libinterp/parse-tree/oct-parse.yy"
3972  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3973 #line 3974 "libinterp/parse-tree/oct-parse.cc"
3974  break;
3975 
3976  case 76: /* oper_expr: MINUS_MINUS oper_expr */
3977 #line 800 "../libinterp/parse-tree/oct-parse.yy"
3978  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3979 #line 3980 "libinterp/parse-tree/oct-parse.cc"
3980  break;
3981 
3982  case 77: /* oper_expr: '~' oper_expr */
3983 #line 802 "../libinterp/parse-tree/oct-parse.yy"
3984  { (yyval.tree_expression_type) = parser.make_prefix_op ('~', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3985 #line 3986 "libinterp/parse-tree/oct-parse.cc"
3986  break;
3987 
3988  case 78: /* oper_expr: '!' oper_expr */
3989 #line 804 "../libinterp/parse-tree/oct-parse.yy"
3990  { (yyval.tree_expression_type) = parser.make_prefix_op ('!', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3991 #line 3992 "libinterp/parse-tree/oct-parse.cc"
3992  break;
3993 
3994  case 79: /* oper_expr: '+' oper_expr */
3995 #line 806 "../libinterp/parse-tree/oct-parse.yy"
3996  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3997 #line 3998 "libinterp/parse-tree/oct-parse.cc"
3998  break;
3999 
4000  case 80: /* oper_expr: '-' oper_expr */
4001 #line 808 "../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 81: /* oper_expr: oper_expr POW power_expr */
4007 #line 810 "../libinterp/parse-tree/oct-parse.yy"
4008  { (yyval.tree_expression_type) = parser.make_binary_op (POW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4009 #line 4010 "libinterp/parse-tree/oct-parse.cc"
4010  break;
4011 
4012  case 82: /* oper_expr: oper_expr EPOW power_expr */
4013 #line 812 "../libinterp/parse-tree/oct-parse.yy"
4014  { (yyval.tree_expression_type) = parser.make_binary_op (EPOW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4015 #line 4016 "libinterp/parse-tree/oct-parse.cc"
4016  break;
4017 
4018  case 83: /* oper_expr: oper_expr '+' oper_expr */
4019 #line 814 "../libinterp/parse-tree/oct-parse.yy"
4020  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4021 #line 4022 "libinterp/parse-tree/oct-parse.cc"
4022  break;
4023 
4024  case 84: /* oper_expr: oper_expr '-' oper_expr */
4025 #line 816 "../libinterp/parse-tree/oct-parse.yy"
4026  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (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 85: /* oper_expr: oper_expr '*' oper_expr */
4031 #line 818 "../libinterp/parse-tree/oct-parse.yy"
4032  { (yyval.tree_expression_type) = parser.make_binary_op ('*', (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 86: /* oper_expr: oper_expr '/' oper_expr */
4037 #line 820 "../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 87: /* oper_expr: oper_expr EMUL oper_expr */
4043 #line 822 "../libinterp/parse-tree/oct-parse.yy"
4044  { (yyval.tree_expression_type) = parser.make_binary_op (EMUL, (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 88: /* oper_expr: oper_expr EDIV oper_expr */
4049 #line 824 "../libinterp/parse-tree/oct-parse.yy"
4050  { (yyval.tree_expression_type) = parser.make_binary_op (EDIV, (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 89: /* oper_expr: oper_expr LEFTDIV oper_expr */
4055 #line 826 "../libinterp/parse-tree/oct-parse.yy"
4056  { (yyval.tree_expression_type) = parser.make_binary_op (LEFTDIV, (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 90: /* oper_expr: oper_expr ELEFTDIV oper_expr */
4061 #line 828 "../libinterp/parse-tree/oct-parse.yy"
4062  { (yyval.tree_expression_type) = parser.make_binary_op (ELEFTDIV, (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 91: /* power_expr: primary_expr */
4067 #line 832 "../libinterp/parse-tree/oct-parse.yy"
4068  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4069 #line 4070 "libinterp/parse-tree/oct-parse.cc"
4070  break;
4071 
4072  case 92: /* power_expr: power_expr PLUS_PLUS */
4073 #line 834 "../libinterp/parse-tree/oct-parse.yy"
4074  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4075 #line 4076 "libinterp/parse-tree/oct-parse.cc"
4076  break;
4077 
4078  case 93: /* power_expr: power_expr MINUS_MINUS */
4079 #line 836 "../libinterp/parse-tree/oct-parse.yy"
4080  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4081 #line 4082 "libinterp/parse-tree/oct-parse.cc"
4082  break;
4083 
4084  case 94: /* power_expr: power_expr '(' ')' */
4085 #line 838 "../libinterp/parse-tree/oct-parse.yy"
4086  {
4087  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4088 
4089  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
4090  if (! (yyval.tree_expression_type))
4091  {
4092  // make_index_expression deleted $1.
4093  YYABORT;
4094  }
4095  }
4096 #line 4097 "libinterp/parse-tree/oct-parse.cc"
4097  break;
4098 
4099  case 95: /* power_expr: power_expr '(' arg_list ')' */
4100 #line 849 "../libinterp/parse-tree/oct-parse.yy"
4101  {
4102  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4103 
4104  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
4105  if (! (yyval.tree_expression_type))
4106  {
4107  // make_index_expression deleted $1 and $3.
4108  YYABORT;
4109  }
4110  }
4111 #line 4112 "libinterp/parse-tree/oct-parse.cc"
4112  break;
4113 
4114  case 96: /* power_expr: power_expr '{' '}' */
4115 #line 860 "../libinterp/parse-tree/oct-parse.yy"
4116  {
4117  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4118 
4119  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
4120  if (! (yyval.tree_expression_type))
4121  {
4122  // make_index_expression deleted $1.
4123  YYABORT;
4124  }
4125  }
4126 #line 4127 "libinterp/parse-tree/oct-parse.cc"
4127  break;
4128 
4129  case 97: /* power_expr: power_expr '{' arg_list '}' */
4130 #line 871 "../libinterp/parse-tree/oct-parse.yy"
4131  {
4132  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4133 
4134  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
4135  if (! (yyval.tree_expression_type))
4136  {
4137  // make_index_expression deleted $1 and $3.
4138  YYABORT;
4139  }
4140  }
4141 #line 4142 "libinterp/parse-tree/oct-parse.cc"
4142  break;
4143 
4144  case 98: /* power_expr: power_expr indirect_ref_op STRUCT_ELT */
4145 #line 882 "../libinterp/parse-tree/oct-parse.yy"
4146  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
4147 #line 4148 "libinterp/parse-tree/oct-parse.cc"
4148  break;
4149 
4150  case 99: /* power_expr: power_expr indirect_ref_op '(' expression ')' */
4151 #line 884 "../libinterp/parse-tree/oct-parse.yy"
4152  {
4153  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
4154 
4155  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
4156  }
4157 #line 4158 "libinterp/parse-tree/oct-parse.cc"
4158  break;
4159 
4160  case 100: /* power_expr: PLUS_PLUS power_expr */
4161 #line 890 "../libinterp/parse-tree/oct-parse.yy"
4162  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4163 #line 4164 "libinterp/parse-tree/oct-parse.cc"
4164  break;
4165 
4166  case 101: /* power_expr: MINUS_MINUS power_expr */
4167 #line 892 "../libinterp/parse-tree/oct-parse.yy"
4168  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4169 #line 4170 "libinterp/parse-tree/oct-parse.cc"
4170  break;
4171 
4172  case 102: /* power_expr: '~' power_expr */
4173 #line 894 "../libinterp/parse-tree/oct-parse.yy"
4174  { (yyval.tree_expression_type) = parser.make_prefix_op ('~', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4175 #line 4176 "libinterp/parse-tree/oct-parse.cc"
4176  break;
4177 
4178  case 103: /* power_expr: '!' power_expr */
4179 #line 896 "../libinterp/parse-tree/oct-parse.yy"
4180  { (yyval.tree_expression_type) = parser.make_prefix_op ('!', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4181 #line 4182 "libinterp/parse-tree/oct-parse.cc"
4182  break;
4183 
4184  case 104: /* power_expr: '+' power_expr */
4185 #line 898 "../libinterp/parse-tree/oct-parse.yy"
4186  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4187 #line 4188 "libinterp/parse-tree/oct-parse.cc"
4188  break;
4189 
4190  case 105: /* power_expr: '-' power_expr */
4191 #line 900 "../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 106: /* colon_expr: oper_expr ':' oper_expr */
4197 #line 904 "../libinterp/parse-tree/oct-parse.yy"
4198  {
4199  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4200 
4201  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-2].tree_expression_type), (yyvsp[0].tree_expression_type));
4202 
4203  if (! (yyval.tree_expression_type))
4204  {
4205  // make_colon_expression deleted $1 and $3.
4206  YYABORT;
4207  }
4208  }
4209 #line 4210 "libinterp/parse-tree/oct-parse.cc"
4210  break;
4211 
4212  case 107: /* colon_expr: oper_expr ':' oper_expr ':' oper_expr */
4213 #line 916 "../libinterp/parse-tree/oct-parse.yy"
4214  {
4215  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-1].tok_val));
4216 
4217  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-4].tree_expression_type), (yyvsp[0].tree_expression_type), (yyvsp[-2].tree_expression_type));
4218 
4219  if (! (yyval.tree_expression_type))
4220  {
4221  // make_colon_expression deleted $1, $3, and $5.
4222  YYABORT;
4223  }
4224  }
4225 #line 4226 "libinterp/parse-tree/oct-parse.cc"
4226  break;
4227 
4228  case 108: /* simple_expr: oper_expr */
4229 #line 930 "../libinterp/parse-tree/oct-parse.yy"
4230  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4231 #line 4232 "libinterp/parse-tree/oct-parse.cc"
4232  break;
4233 
4234  case 109: /* simple_expr: colon_expr */
4235 #line 932 "../libinterp/parse-tree/oct-parse.yy"
4236  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4237 #line 4238 "libinterp/parse-tree/oct-parse.cc"
4238  break;
4239 
4240  case 110: /* simple_expr: simple_expr EXPR_LT simple_expr */
4241 #line 934 "../libinterp/parse-tree/oct-parse.yy"
4242  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4243 #line 4244 "libinterp/parse-tree/oct-parse.cc"
4244  break;
4245 
4246  case 111: /* simple_expr: simple_expr EXPR_LE simple_expr */
4247 #line 936 "../libinterp/parse-tree/oct-parse.yy"
4248  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4249 #line 4250 "libinterp/parse-tree/oct-parse.cc"
4250  break;
4251 
4252  case 112: /* simple_expr: simple_expr EXPR_EQ simple_expr */
4253 #line 938 "../libinterp/parse-tree/oct-parse.yy"
4254  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_EQ, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4255 #line 4256 "libinterp/parse-tree/oct-parse.cc"
4256  break;
4257 
4258  case 113: /* simple_expr: simple_expr EXPR_GE simple_expr */
4259 #line 940 "../libinterp/parse-tree/oct-parse.yy"
4260  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GE, (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 114: /* simple_expr: simple_expr EXPR_GT simple_expr */
4265 #line 942 "../libinterp/parse-tree/oct-parse.yy"
4266  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GT, (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 115: /* simple_expr: simple_expr EXPR_NE simple_expr */
4271 #line 944 "../libinterp/parse-tree/oct-parse.yy"
4272  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_NE, (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 116: /* simple_expr: simple_expr EXPR_AND simple_expr */
4277 #line 946 "../libinterp/parse-tree/oct-parse.yy"
4278  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_AND, (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 117: /* simple_expr: simple_expr EXPR_OR simple_expr */
4283 #line 948 "../libinterp/parse-tree/oct-parse.yy"
4284  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_OR, (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 118: /* simple_expr: simple_expr EXPR_AND_AND simple_expr */
4289 #line 950 "../libinterp/parse-tree/oct-parse.yy"
4290  { (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)); }
4291 #line 4292 "libinterp/parse-tree/oct-parse.cc"
4292  break;
4293 
4294  case 119: /* simple_expr: simple_expr EXPR_OR_OR simple_expr */
4295 #line 952 "../libinterp/parse-tree/oct-parse.yy"
4296  { (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)); }
4297 #line 4298 "libinterp/parse-tree/oct-parse.cc"
4298  break;
4299 
4300  case 120: /* assign_lhs: simple_expr */
4301 #line 956 "../libinterp/parse-tree/oct-parse.yy"
4302  {
4303  (yyval.tree_argument_list_type) = parser.validate_matrix_for_assignment ((yyvsp[0].tree_expression_type));
4304 
4305  if ((yyval.tree_argument_list_type))
4307  else
4308  {
4309  // validate_matrix_for_assignment deleted $1.
4310  YYABORT;
4311  }
4312  }
4313 #line 4314 "libinterp/parse-tree/oct-parse.cc"
4314  break;
4315 
4316  case 121: /* assign_expr: assign_lhs '=' expression */
4317 #line 970 "../libinterp/parse-tree/oct-parse.yy"
4318  { (yyval.tree_expression_type) = parser.make_assign_op ('=', (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4319 #line 4320 "libinterp/parse-tree/oct-parse.cc"
4320  break;
4321 
4322  case 122: /* assign_expr: assign_lhs ADD_EQ expression */
4323 #line 972 "../libinterp/parse-tree/oct-parse.yy"
4324  { (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)); }
4325 #line 4326 "libinterp/parse-tree/oct-parse.cc"
4326  break;
4327 
4328  case 123: /* assign_expr: assign_lhs SUB_EQ expression */
4329 #line 974 "../libinterp/parse-tree/oct-parse.yy"
4330  { (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)); }
4331 #line 4332 "libinterp/parse-tree/oct-parse.cc"
4332  break;
4333 
4334  case 124: /* assign_expr: assign_lhs MUL_EQ expression */
4335 #line 976 "../libinterp/parse-tree/oct-parse.yy"
4336  { (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)); }
4337 #line 4338 "libinterp/parse-tree/oct-parse.cc"
4338  break;
4339 
4340  case 125: /* assign_expr: assign_lhs DIV_EQ expression */
4341 #line 978 "../libinterp/parse-tree/oct-parse.yy"
4342  { (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)); }
4343 #line 4344 "libinterp/parse-tree/oct-parse.cc"
4344  break;
4345 
4346  case 126: /* assign_expr: assign_lhs LEFTDIV_EQ expression */
4347 #line 980 "../libinterp/parse-tree/oct-parse.yy"
4348  { (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)); }
4349 #line 4350 "libinterp/parse-tree/oct-parse.cc"
4350  break;
4351 
4352  case 127: /* assign_expr: assign_lhs POW_EQ expression */
4353 #line 982 "../libinterp/parse-tree/oct-parse.yy"
4354  { (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)); }
4355 #line 4356 "libinterp/parse-tree/oct-parse.cc"
4356  break;
4357 
4358  case 128: /* assign_expr: assign_lhs EMUL_EQ expression */
4359 #line 984 "../libinterp/parse-tree/oct-parse.yy"
4360  { (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)); }
4361 #line 4362 "libinterp/parse-tree/oct-parse.cc"
4362  break;
4363 
4364  case 129: /* assign_expr: assign_lhs EDIV_EQ expression */
4365 #line 986 "../libinterp/parse-tree/oct-parse.yy"
4366  { (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)); }
4367 #line 4368 "libinterp/parse-tree/oct-parse.cc"
4368  break;
4369 
4370  case 130: /* assign_expr: assign_lhs ELEFTDIV_EQ expression */
4371 #line 988 "../libinterp/parse-tree/oct-parse.yy"
4372  { (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)); }
4373 #line 4374 "libinterp/parse-tree/oct-parse.cc"
4374  break;
4375 
4376  case 131: /* assign_expr: assign_lhs EPOW_EQ expression */
4377 #line 990 "../libinterp/parse-tree/oct-parse.yy"
4378  { (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)); }
4379 #line 4380 "libinterp/parse-tree/oct-parse.cc"
4380  break;
4381 
4382  case 132: /* assign_expr: assign_lhs AND_EQ expression */
4383 #line 992 "../libinterp/parse-tree/oct-parse.yy"
4384  { (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)); }
4385 #line 4386 "libinterp/parse-tree/oct-parse.cc"
4386  break;
4387 
4388  case 133: /* assign_expr: assign_lhs OR_EQ expression */
4389 #line 994 "../libinterp/parse-tree/oct-parse.yy"
4390  { (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)); }
4391 #line 4392 "libinterp/parse-tree/oct-parse.cc"
4392  break;
4393 
4394  case 134: /* expression: simple_expr */
4395 #line 998 "../libinterp/parse-tree/oct-parse.yy"
4396  {
4397  if ((yyvsp[0].tree_expression_type) && ((yyvsp[0].tree_expression_type)->is_matrix () || (yyvsp[0].tree_expression_type)->iscell ()))
4398  {
4399  if (parser.validate_array_list ((yyvsp[0].tree_expression_type)))
4400  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4401  else
4402  {
4403  delete (yyvsp[0].tree_expression_type);
4404  YYABORT;
4405  }
4406  }
4407  else
4408  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4409  }
4410 #line 4411 "libinterp/parse-tree/oct-parse.cc"
4411  break;
4412 
4413  case 135: /* expression: assign_expr */
4414 #line 1013 "../libinterp/parse-tree/oct-parse.yy"
4415  {
4416  if (! (yyvsp[0].tree_expression_type))
4417  YYABORT;
4418 
4419  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4420  }
4421 #line 4422 "libinterp/parse-tree/oct-parse.cc"
4422  break;
4423 
4424  case 136: /* expression: anon_fcn_handle */
4425 #line 1020 "../libinterp/parse-tree/oct-parse.yy"
4426  { (yyval.tree_expression_type) = (yyvsp[0].tree_anon_fcn_handle_type); }
4427 #line 4428 "libinterp/parse-tree/oct-parse.cc"
4428  break;
4429 
4430  case 137: /* command: declaration */
4431 #line 1028 "../libinterp/parse-tree/oct-parse.yy"
4432  { (yyval.tree_command_type) = (yyvsp[0].tree_decl_command_type); }
4433 #line 4434 "libinterp/parse-tree/oct-parse.cc"
4434  break;
4435 
4436  case 138: /* command: select_command */
4437 #line 1030 "../libinterp/parse-tree/oct-parse.yy"
4438  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4439 #line 4440 "libinterp/parse-tree/oct-parse.cc"
4440  break;
4441 
4442  case 139: /* command: loop_command */
4443 #line 1032 "../libinterp/parse-tree/oct-parse.yy"
4444  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4445 #line 4446 "libinterp/parse-tree/oct-parse.cc"
4446  break;
4447 
4448  case 140: /* command: jump_command */
4449 #line 1034 "../libinterp/parse-tree/oct-parse.yy"
4450  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4451 #line 4452 "libinterp/parse-tree/oct-parse.cc"
4452  break;
4453 
4454  case 141: /* command: spmd_command */
4455 #line 1036 "../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 142: /* command: except_command */
4461 #line 1038 "../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 143: /* command: function */
4467 #line 1040 "../libinterp/parse-tree/oct-parse.yy"
4468  { (yyval.tree_command_type) = (yyvsp[0].tree_function_def_type); }
4469 #line 4470 "libinterp/parse-tree/oct-parse.cc"
4470  break;
4471 
4472  case 144: /* command: file */
4473 #line 1042 "../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 145: /* declaration: GLOBAL decl_init_list */
4479 #line 1050 "../libinterp/parse-tree/oct-parse.yy"
4480  {
4481  (yyval.tree_decl_command_type) = parser.make_decl_command (GLOBAL, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4482  lexer.m_looking_at_decl_list = false;
4483  }
4484 #line 4485 "libinterp/parse-tree/oct-parse.cc"
4485  break;
4486 
4487  case 146: /* declaration: PERSISTENT decl_init_list */
4488 #line 1055 "../libinterp/parse-tree/oct-parse.yy"
4489  {
4490  (yyval.tree_decl_command_type) = parser.make_decl_command (PERSISTENT, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4491  lexer.m_looking_at_decl_list = false;
4492  }
4493 #line 4494 "libinterp/parse-tree/oct-parse.cc"
4494  break;
4495 
4496  case 147: /* decl_init_list: decl_elt */
4497 #line 1062 "../libinterp/parse-tree/oct-parse.yy"
4498  { (yyval.tree_decl_init_list_type) = parser.make_decl_init_list ((yyvsp[0].tree_decl_elt_type)); }
4499 #line 4500 "libinterp/parse-tree/oct-parse.cc"
4500  break;
4501 
4502  case 148: /* decl_init_list: decl_init_list decl_elt */
4503 #line 1064 "../libinterp/parse-tree/oct-parse.yy"
4504  { (yyval.tree_decl_init_list_type) = parser.append_decl_init_list ((yyvsp[-1].tree_decl_init_list_type), (yyvsp[0].tree_decl_elt_type)); }
4505 #line 4506 "libinterp/parse-tree/oct-parse.cc"
4506  break;
4507 
4508  case 149: /* decl_elt: identifier */
4509 #line 1068 "../libinterp/parse-tree/oct-parse.yy"
4510  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[0].tree_identifier_type)); }
4511 #line 4512 "libinterp/parse-tree/oct-parse.cc"
4512  break;
4513 
4514  case 150: /* decl_elt: identifier '=' expression */
4515 #line 1070 "../libinterp/parse-tree/oct-parse.yy"
4516  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[-2].tree_identifier_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4517 #line 4518 "libinterp/parse-tree/oct-parse.cc"
4518  break;
4519 
4520  case 151: /* select_command: if_command */
4521 #line 1078 "../libinterp/parse-tree/oct-parse.yy"
4522  { (yyval.tree_command_type) = (yyvsp[0].tree_if_command_type); }
4523 #line 4524 "libinterp/parse-tree/oct-parse.cc"
4524  break;
4525 
4526  case 152: /* select_command: switch_command */
4527 #line 1080 "../libinterp/parse-tree/oct-parse.yy"
4528  { (yyval.tree_command_type) = (yyvsp[0].tree_switch_command_type); }
4529 #line 4530 "libinterp/parse-tree/oct-parse.cc"
4530  break;
4531 
4532  case 153: /* if_command: IF stash_comment if_cmd_list END */
4533 #line 1088 "../libinterp/parse-tree/oct-parse.yy"
4534  {
4535  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))))
4536  {
4537  // finish_if_command deleted $3.
4538  YYABORT;
4539  }
4540  }
4541 #line 4542 "libinterp/parse-tree/oct-parse.cc"
4542  break;
4543 
4544  case 154: /* if_cmd_list: if_cmd_list1 */
4545 #line 1098 "../libinterp/parse-tree/oct-parse.yy"
4546  { (yyval.tree_if_command_list_type) = (yyvsp[0].tree_if_command_list_type); }
4547 #line 4548 "libinterp/parse-tree/oct-parse.cc"
4548  break;
4549 
4550  case 155: /* if_cmd_list: if_cmd_list1 else_clause */
4551 #line 1100 "../libinterp/parse-tree/oct-parse.yy"
4552  { (yyval.tree_if_command_list_type) = parser.append_if_clause ((yyvsp[-1].tree_if_command_list_type), (yyvsp[0].tree_if_clause_type)); }
4553 #line 4554 "libinterp/parse-tree/oct-parse.cc"
4554  break;
4555 
4556  case 156: /* if_cmd_list1: expression stmt_begin opt_sep opt_list */
4557 #line 1104 "../libinterp/parse-tree/oct-parse.yy"
4558  {
4559  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4560 
4561  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-3].tree_expression_type));
4562 
4563  (yyval.tree_if_command_list_type) = parser.start_if_command ((yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type));
4564  }
4565 #line 4566 "libinterp/parse-tree/oct-parse.cc"
4566  break;
4567 
4568  case 157: /* if_cmd_list1: if_cmd_list1 elseif_clause */
4569 #line 1112 "../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 158: /* elseif_clause: ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4575 #line 1116 "../libinterp/parse-tree/oct-parse.yy"
4576  {
4577  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
4578 
4579  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-3].tree_expression_type));
4580 
4581  (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));
4582  }
4583 #line 4584 "libinterp/parse-tree/oct-parse.cc"
4584  break;
4585 
4586  case 159: /* else_clause: ELSE stash_comment opt_sep opt_list */
4587 #line 1126 "../libinterp/parse-tree/oct-parse.yy"
4588  {
4589  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4590 
4591  (yyval.tree_if_clause_type) = parser.make_else_clause ((yyvsp[-3].tok_val), (yyvsp[-2].comment_type), (yyvsp[0].tree_statement_list_type));
4592  }
4593 #line 4594 "libinterp/parse-tree/oct-parse.cc"
4594  break;
4595 
4596  case 160: /* switch_command: SWITCH stash_comment expression opt_sep case_list END */
4597 #line 1138 "../libinterp/parse-tree/oct-parse.yy"
4598  {
4599  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4600 
4601  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))))
4602  {
4603  // finish_switch_command deleted $3 adn $5.
4604  YYABORT;
4605  }
4606  }
4607 #line 4608 "libinterp/parse-tree/oct-parse.cc"
4608  break;
4609 
4610  case 161: /* case_list: %empty */
4611 #line 1150 "../libinterp/parse-tree/oct-parse.yy"
4612  { (yyval.tree_switch_case_list_type) = nullptr; }
4613 #line 4614 "libinterp/parse-tree/oct-parse.cc"
4614  break;
4615 
4616  case 162: /* case_list: default_case */
4617 #line 1152 "../libinterp/parse-tree/oct-parse.yy"
4618  { (yyval.tree_switch_case_list_type) = parser.make_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4619 #line 4620 "libinterp/parse-tree/oct-parse.cc"
4620  break;
4621 
4622  case 163: /* case_list: case_list1 */
4623 #line 1154 "../libinterp/parse-tree/oct-parse.yy"
4624  { (yyval.tree_switch_case_list_type) = (yyvsp[0].tree_switch_case_list_type); }
4625 #line 4626 "libinterp/parse-tree/oct-parse.cc"
4626  break;
4627 
4628  case 164: /* case_list: case_list1 default_case */
4629 #line 1156 "../libinterp/parse-tree/oct-parse.yy"
4630  { (yyval.tree_switch_case_list_type) = parser.append_switch_case ((yyvsp[-1].tree_switch_case_list_type), (yyvsp[0].tree_switch_case_type)); }
4631 #line 4632 "libinterp/parse-tree/oct-parse.cc"
4632  break;
4633 
4634  case 165: /* case_list1: switch_case */
4635 #line 1160 "../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 166: /* case_list1: case_list1 switch_case */
4641 #line 1162 "../libinterp/parse-tree/oct-parse.yy"
4642  { (yyval.tree_switch_case_list_type) = parser.append_switch_case ((yyvsp[-1].tree_switch_case_list_type), (yyvsp[0].tree_switch_case_type)); }
4643 #line 4644 "libinterp/parse-tree/oct-parse.cc"
4644  break;
4645 
4646  case 167: /* switch_case: CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4647 #line 1166 "../libinterp/parse-tree/oct-parse.yy"
4648  {
4649  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
4650 
4651  (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));
4652  }
4653 #line 4654 "libinterp/parse-tree/oct-parse.cc"
4654  break;
4655 
4656  case 168: /* default_case: OTHERWISE stash_comment opt_sep opt_list */
4657 #line 1174 "../libinterp/parse-tree/oct-parse.yy"
4658  {
4659  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4660 
4661  (yyval.tree_switch_case_type) = parser.make_default_switch_case ((yyvsp[-3].tok_val), (yyvsp[-2].comment_type), (yyvsp[0].tree_statement_list_type));
4662  }
4663 #line 4664 "libinterp/parse-tree/oct-parse.cc"
4664  break;
4665 
4666  case 169: /* loop_command: WHILE stash_comment expression stmt_begin opt_sep opt_list END */
4667 #line 1186 "../libinterp/parse-tree/oct-parse.yy"
4668  {
4669  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4670 
4671  parser.maybe_convert_to_braindead_shortcircuit ((yyvsp[-4].tree_expression_type));
4672 
4673  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))))
4674  {
4675  // make_while_command deleted $3 and $6.
4676  YYABORT;
4677  }
4678  }
4679 #line 4680 "libinterp/parse-tree/oct-parse.cc"
4680  break;
4681 
4682  case 170: /* loop_command: DO stash_comment opt_sep opt_list UNTIL expression */
4683 #line 1198 "../libinterp/parse-tree/oct-parse.yy"
4684  {
4685  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-3].punct_type));
4686 
4687  (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));
4688  }
4689 #line 4690 "libinterp/parse-tree/oct-parse.cc"
4690  break;
4691 
4692  case 171: /* loop_command: FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4693 #line 1204 "../libinterp/parse-tree/oct-parse.yy"
4694  {
4695  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-2].punct_type));
4696 
4697  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),
4698  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4699  {
4700  // make_for_command deleted $3, $5, and $8.
4701  YYABORT;
4702  }
4703  }
4704 #line 4705 "libinterp/parse-tree/oct-parse.cc"
4705  break;
4706 
4707  case 172: /* loop_command: FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END */
4708 #line 1215 "../libinterp/parse-tree/oct-parse.yy"
4709  {
4710  OCTAVE_YYUSE ((yyvsp[-7].tok_val), (yyvsp[-5].tok_val), (yyvsp[-3].tok_val), (yyvsp[-2].punct_type));
4711 
4712  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),
4713  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-8].comment_type))))
4714  {
4715  // make_for_command deleted $4, $6, and $9.
4716  YYABORT;
4717  }
4718  }
4719 #line 4720 "libinterp/parse-tree/oct-parse.cc"
4720  break;
4721 
4722  case 173: /* loop_command: PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4723 #line 1226 "../libinterp/parse-tree/oct-parse.yy"
4724  {
4725  OCTAVE_YYUSE ((yyvsp[-5].tok_val), (yyvsp[-2].punct_type));
4726 
4727  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),
4728  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4729  {
4730  // make_for_command deleted $3, $5, and $8.
4731  YYABORT;
4732  }
4733  }
4734 #line 4735 "libinterp/parse-tree/oct-parse.cc"
4735  break;
4736 
4737  case 174: /* loop_command: PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END */
4738 #line 1237 "../libinterp/parse-tree/oct-parse.yy"
4739  {
4740  OCTAVE_YYUSE ((yyvsp[-9].tok_val), (yyvsp[-7].tok_val), (yyvsp[-5].tok_val), (yyvsp[-3].tok_val), (yyvsp[-2].punct_type));
4741 
4742  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),
4743  (yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-10].comment_type))))
4744  {
4745  // make_for_command deleted $4, $6, $8, and $11.
4746  YYABORT;
4747  }
4748  }
4749 #line 4750 "libinterp/parse-tree/oct-parse.cc"
4750  break;
4751 
4752  case 175: /* jump_command: BREAK */
4753 #line 1254 "../libinterp/parse-tree/oct-parse.yy"
4754  {
4755  if (! ((yyval.tree_command_type) = parser.make_break_command ((yyvsp[0].tok_val))))
4756  YYABORT;
4757  }
4758 #line 4759 "libinterp/parse-tree/oct-parse.cc"
4759  break;
4760 
4761  case 176: /* jump_command: CONTINUE */
4762 #line 1259 "../libinterp/parse-tree/oct-parse.yy"
4763  {
4764  if (! ((yyval.tree_command_type) = parser.make_continue_command ((yyvsp[0].tok_val))))
4765  YYABORT;
4766  }
4767 #line 4768 "libinterp/parse-tree/oct-parse.cc"
4768  break;
4769 
4770  case 177: /* jump_command: FUNC_RET */
4771 #line 1264 "../libinterp/parse-tree/oct-parse.yy"
4772  { (yyval.tree_command_type) = parser.make_return_command ((yyvsp[0].tok_val)); }
4773 #line 4774 "libinterp/parse-tree/oct-parse.cc"
4774  break;
4775 
4776  case 178: /* spmd_command: SPMD stash_comment opt_sep opt_list END */
4777 #line 1272 "../libinterp/parse-tree/oct-parse.yy"
4778  {
4779  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4780 
4781  octave::comment_list *lc = (yyvsp[-3].comment_type);
4782  octave::comment_list *tc = lexer.get_comment ();
4783 
4784  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)))
4785  {
4786  // make_spmd_command deleted $4, LC, and TC.
4787  YYABORT;
4788  }
4789  }
4790 #line 4791 "libinterp/parse-tree/oct-parse.cc"
4791  break;
4792 
4793  case 179: /* except_command: UNWIND stash_comment opt_sep opt_list CLEANUP stash_comment opt_sep opt_list END */
4794 #line 1292 "../libinterp/parse-tree/oct-parse.yy"
4795  {
4796  OCTAVE_YYUSE ((yyvsp[-6].punct_type), (yyvsp[-4].tok_val), (yyvsp[-2].punct_type));
4797 
4798  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))))
4799  {
4800  // make_unwind_command deleted $4 and $8.
4801  YYABORT;
4802  }
4803  }
4804 #line 4805 "libinterp/parse-tree/oct-parse.cc"
4805  break;
4806 
4807  case 180: /* except_command: TRY stash_comment opt_sep opt_list CATCH stash_comment opt_sep opt_list END */
4808 #line 1303 "../libinterp/parse-tree/oct-parse.yy"
4809  {
4810  OCTAVE_YYUSE ((yyvsp[-6].punct_type), (yyvsp[-4].tok_val), (yyvsp[-2].punct_type));
4811 
4812  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))))
4813  {
4814  // make_try_command deleted $4 and $8.
4815  YYABORT;
4816  }
4817  }
4818 #line 4819 "libinterp/parse-tree/oct-parse.cc"
4819  break;
4820 
4821  case 181: /* except_command: TRY stash_comment opt_sep opt_list END */
4822 #line 1313 "../libinterp/parse-tree/oct-parse.yy"
4823  {
4824  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4825 
4826  if (! ((yyval.tree_command_type) = parser.make_try_command ((yyvsp[-4].tok_val), (yyvsp[-1].tree_statement_list_type), 0, nullptr,
4827  (yyvsp[0].tok_val), (yyvsp[-3].comment_type), nullptr)))
4828  {
4829  // make_try_command deleted $4.
4830  YYABORT;
4831  }
4832  }
4833 #line 4834 "libinterp/parse-tree/oct-parse.cc"
4834  break;
4835 
4836  case 182: /* push_fcn_symtab: %empty */
4837 #line 1330 "../libinterp/parse-tree/oct-parse.yy"
4838  {
4839  if (! parser.push_fcn_symtab ())
4840  YYABORT;
4841 
4842  (yyval.dummy_type) = 0;
4843  }
4844 #line 4845 "libinterp/parse-tree/oct-parse.cc"
4845  break;
4846 
4847  case 183: /* param_list_beg: '(' */
4848 #line 1343 "../libinterp/parse-tree/oct-parse.yy"
4849  {
4850  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4851 
4852  (yyval.dummy_type) = 0;
4854  lexer.m_arguments_is_keyword = false;
4855 
4857  {
4858  // Will get a real name later.
4859  lexer.m_symtab_context.push (octave::symbol_scope ("parser:param_list_beg"));
4862  }
4863  }
4864 #line 4865 "libinterp/parse-tree/oct-parse.cc"
4865  break;
4866 
4867  case 184: /* param_list_end: ')' */
4868 #line 1361 "../libinterp/parse-tree/oct-parse.yy"
4869  {
4870  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4871 
4872  (yyval.dummy_type) = 0;
4876  }
4877 #line 4878 "libinterp/parse-tree/oct-parse.cc"
4878  break;
4879 
4880  case 185: /* opt_param_list: %empty */
4881 #line 1372 "../libinterp/parse-tree/oct-parse.yy"
4882  { (yyval.tree_parameter_list_type) = nullptr; }
4883 #line 4884 "libinterp/parse-tree/oct-parse.cc"
4884  break;
4885 
4886  case 186: /* opt_param_list: param_list */
4887 #line 1374 "../libinterp/parse-tree/oct-parse.yy"
4888  { (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type); }
4889 #line 4890 "libinterp/parse-tree/oct-parse.cc"
4890  break;
4891 
4892  case 187: /* param_list: param_list_beg param_list1 param_list_end */
4893 #line 1378 "../libinterp/parse-tree/oct-parse.yy"
4894  {
4895  if ((yyvsp[-1].tree_parameter_list_type))
4896  lexer.mark_as_variables ((yyvsp[-1].tree_parameter_list_type)->variable_names ());
4897 
4898  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
4899  }
4900 #line 4901 "libinterp/parse-tree/oct-parse.cc"
4901  break;
4902 
4903  case 188: /* param_list: param_list_beg error */
4904 #line 1385 "../libinterp/parse-tree/oct-parse.yy"
4905  {
4906  (yyval.tree_parameter_list_type) = nullptr;
4907  parser.bison_error ("invalid parameter list");
4908  YYABORT;
4909  }
4910 #line 4911 "libinterp/parse-tree/oct-parse.cc"
4911  break;
4912 
4913  case 189: /* param_list1: %empty */
4914 #line 1393 "../libinterp/parse-tree/oct-parse.yy"
4915  { (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::in); }
4916 #line 4917 "libinterp/parse-tree/oct-parse.cc"
4917  break;
4918 
4919  case 190: /* param_list1: param_list2 */
4920 #line 1395 "../libinterp/parse-tree/oct-parse.yy"
4921  {
4922  (yyvsp[0].tree_parameter_list_type)->mark_as_formal_parameters ();
4923 
4924  if (parser.validate_param_list ((yyvsp[0].tree_parameter_list_type), octave::tree_parameter_list::in))
4925  {
4926  lexer.mark_as_variables ((yyvsp[0].tree_parameter_list_type)->variable_names ());
4927  (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type);
4928  }
4929  else
4930  {
4931  delete (yyvsp[0].tree_parameter_list_type);
4932  YYABORT;
4933  }
4934  }
4935 #line 4936 "libinterp/parse-tree/oct-parse.cc"
4936  break;
4937 
4938  case 191: /* param_list2: param_list_elt */
4939 #line 1412 "../libinterp/parse-tree/oct-parse.yy"
4940  { (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::in, (yyvsp[0].tree_decl_elt_type)); }
4941 #line 4942 "libinterp/parse-tree/oct-parse.cc"
4942  break;
4943 
4944  case 192: /* param_list2: param_list2 ',' param_list_elt */
4945 #line 1414 "../libinterp/parse-tree/oct-parse.yy"
4946  {
4947  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4948 
4949  (yyval.tree_parameter_list_type) = parser.append_parameter_list ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_decl_elt_type));
4950  }
4951 #line 4952 "libinterp/parse-tree/oct-parse.cc"
4952  break;
4953 
4954  case 193: /* param_list_elt: decl_elt */
4955 #line 1422 "../libinterp/parse-tree/oct-parse.yy"
4956  { (yyval.tree_decl_elt_type) = (yyvsp[0].tree_decl_elt_type); }
4957 #line 4958 "libinterp/parse-tree/oct-parse.cc"
4958  break;
4959 
4960  case 194: /* param_list_elt: magic_tilde */
4961 #line 1424 "../libinterp/parse-tree/oct-parse.yy"
4962  { (yyval.tree_decl_elt_type) = parser.make_decl_elt ((yyvsp[0].tree_identifier_type)); }
4963 #line 4964 "libinterp/parse-tree/oct-parse.cc"
4964  break;
4965 
4966  case 195: /* return_list: '[' ']' */
4967 #line 1432 "../libinterp/parse-tree/oct-parse.yy"
4968  {
4969  OCTAVE_YYUSE ((yyvsp[-1].tok_val), (yyvsp[0].tok_val));
4970 
4972 
4973  (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::out);
4974  }
4975 #line 4976 "libinterp/parse-tree/oct-parse.cc"
4976  break;
4977 
4978  case 196: /* return_list: identifier */
4979 #line 1440 "../libinterp/parse-tree/oct-parse.yy"
4980  {
4982 
4983  octave::tree_parameter_list *tmp
4984  = parser.make_parameter_list (octave::tree_parameter_list::out, (yyvsp[0].tree_identifier_type));
4985 
4986  // Even though this parameter list can contain only
4987  // a single identifier, we still need to validate it
4988  // to check for varargin or varargout.
4989 
4990  if (parser.validate_param_list (tmp, octave::tree_parameter_list::out))
4991  (yyval.tree_parameter_list_type) = tmp;
4992  else
4993  {
4994  delete tmp;
4995  YYABORT;
4996  }
4997  }
4998 #line 4999 "libinterp/parse-tree/oct-parse.cc"
4999  break;
5000 
5001  case 197: /* return_list: '[' return_list1 ']' */
5002 #line 1459 "../libinterp/parse-tree/oct-parse.yy"
5003  {
5004  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5005 
5007 
5008  // Check for duplicate parameter names, varargin,
5009  // or varargout.
5010 
5011  if (parser.validate_param_list ((yyvsp[-1].tree_parameter_list_type), octave::tree_parameter_list::out))
5012  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
5013  else
5014  {
5015  delete (yyvsp[-1].tree_parameter_list_type);
5016  YYABORT;
5017  }
5018  }
5019 #line 5020 "libinterp/parse-tree/oct-parse.cc"
5020  break;
5021 
5022  case 198: /* return_list1: identifier */
5023 #line 1478 "../libinterp/parse-tree/oct-parse.yy"
5024  {
5025  (yyval.tree_parameter_list_type) = parser.make_parameter_list (octave::tree_parameter_list::out, (yyvsp[0].tree_identifier_type));
5026  }
5027 #line 5028 "libinterp/parse-tree/oct-parse.cc"
5028  break;
5029 
5030  case 199: /* return_list1: return_list1 ',' identifier */
5031 #line 1482 "../libinterp/parse-tree/oct-parse.yy"
5032  {
5033  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5034 
5035  (yyval.tree_parameter_list_type) = parser.append_parameter_list ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_identifier_type));
5036  }
5037 #line 5038 "libinterp/parse-tree/oct-parse.cc"
5038  break;
5039 
5040  case 200: /* parsing_local_fcns: %empty */
5041 #line 1495 "../libinterp/parse-tree/oct-parse.yy"
5042  { parser.parsing_local_functions (true); }
5043 #line 5044 "libinterp/parse-tree/oct-parse.cc"
5044  break;
5045 
5046  case 201: /* push_script_symtab: %empty */
5047 #line 1499 "../libinterp/parse-tree/oct-parse.yy"
5048  {
5049  (yyval.dummy_type) = 0;
5050 
5051  // This scope may serve as the parent scope for local
5052  // functions in classdef files..
5053  lexer.m_symtab_context.push (octave::symbol_scope ("parser:push_script_symtab"));
5054  }
5055 #line 5056 "libinterp/parse-tree/oct-parse.cc"
5056  break;
5057 
5058  case 202: /* begin_file: push_script_symtab INPUT_FILE */
5059 #line 1509 "../libinterp/parse-tree/oct-parse.yy"
5060  { (yyval.dummy_type) = 0; }
5061 #line 5062 "libinterp/parse-tree/oct-parse.cc"
5062  break;
5063 
5064  case 203: /* file: begin_file opt_nl opt_list END_OF_INPUT */
5065 #line 1513 "../libinterp/parse-tree/oct-parse.yy"
5066  {
5067  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5068 
5070  {
5071  // Delete the dummy statement_list we created
5072  // after parsing the function. Any function
5073  // definitions found in the file have already
5074  // been stored in the symbol table or in
5075  // base_parser::m_primary_fcn.
5076 
5077  // Unused symbol table context.
5079 
5080  delete (yyvsp[-1].tree_statement_list_type);
5081 
5082  if (! parser.validate_primary_fcn ())
5083  YYABORT;
5084  }
5085  else
5086  {
5087  octave::tree_statement *end_of_script
5088  = parser.make_end ("endscript", true,
5089  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5090 
5091  parser.make_script ((yyvsp[-1].tree_statement_list_type), end_of_script);
5092 
5093  if (! parser.validate_primary_fcn ())
5094  YYABORT;
5095  }
5096 
5097  (yyval.tree_command_type) = nullptr;
5098  }
5099 #line 5100 "libinterp/parse-tree/oct-parse.cc"
5100  break;
5101 
5102  case 204: /* file: begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT */
5103 #line 1547 "../libinterp/parse-tree/oct-parse.yy"
5104  {
5105  OCTAVE_YYUSE ((yyvsp[-5].punct_type), (yyvsp[-2].punct_type), (yyvsp[0].tok_val));
5106 
5107  // Unused symbol table context.
5109 
5110  if (! parser.finish_classdef_file ((yyvsp[-4].tree_classdef_type), (yyvsp[-1].tree_statement_list_type)))
5111  YYABORT;
5112 
5113  (yyval.tree_command_type) = nullptr;
5114  }
5115 #line 5116 "libinterp/parse-tree/oct-parse.cc"
5116  break;
5117 
5118  case 205: /* function_beg: push_fcn_symtab FCN */
5119 #line 1565 "../libinterp/parse-tree/oct-parse.yy"
5120  {
5121  (yyval.tok_val) = (yyvsp[0].tok_val);
5125  }
5126 #line 5127 "libinterp/parse-tree/oct-parse.cc"
5127  break;
5128 
5129  case 206: /* fcn_name: identifier */
5130 #line 1574 "../libinterp/parse-tree/oct-parse.yy"
5131  {
5132  if (! ((yyval.tree_identifier_type) = parser.make_fcn_name ((yyvsp[0].tree_identifier_type))))
5133  {
5134  // make_fcn_name deleted $1.
5135  YYABORT;
5136  }
5137 
5139  }
5140 #line 5141 "libinterp/parse-tree/oct-parse.cc"
5141  break;
5142 
5143  case 207: /* fcn_name: GET '.' identifier */
5144 #line 1584 "../libinterp/parse-tree/oct-parse.yy"
5145  {
5146  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[-1].tok_val));
5147 
5148  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5149 
5150  lexer.m_parsed_function_name.top () = true;
5154  }
5155 #line 5156 "libinterp/parse-tree/oct-parse.cc"
5156  break;
5157 
5158  case 208: /* fcn_name: SET '.' identifier */
5159 #line 1595 "../libinterp/parse-tree/oct-parse.yy"
5160  {
5161  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[-1].tok_val));
5162 
5163  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5164 
5165  lexer.m_parsed_function_name.top () = true;
5169  }
5170 #line 5171 "libinterp/parse-tree/oct-parse.cc"
5171  break;
5172 
5173  case 209: /* function_end: END */
5174 #line 1608 "../libinterp/parse-tree/oct-parse.yy"
5175  {
5176  parser.endfunction_found (true);
5177 
5178  if (parser.end_token_ok ((yyvsp[0].tok_val), octave::token::function_end))
5179  (yyval.tree_statement_type) = parser.make_end ("endfunction", false,
5180  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5181  else
5182  {
5183  parser.end_token_error ((yyvsp[0].tok_val), octave::token::function_end);
5184  YYABORT;
5185  }
5186  }
5187 #line 5188 "libinterp/parse-tree/oct-parse.cc"
5188  break;
5189 
5190  case 210: /* function_end: END_OF_INPUT */
5191 #line 1621 "../libinterp/parse-tree/oct-parse.yy"
5192  {
5193 // A lot of tests are based on the assumption that this is OK
5194 // if (lexer.m_reading_script_file)
5195 // {
5196 // parser.bison_error ("function body open at end of script");
5197 // YYABORT;
5198 // }
5199 
5200  if (parser.endfunction_found ())
5201  {
5202  parser.bison_error ("inconsistent function endings -- "
5203  "if one function is explicitly ended, "
5204  "so must all the others");
5205  YYABORT;
5206  }
5207 
5210  {
5211  parser.bison_error ("function body open at end of input");
5212  YYABORT;
5213  }
5214 
5216  {
5217  parser.bison_error ("classdef body open at end of input");
5218  YYABORT;
5219  }
5220 
5221  (yyval.tree_statement_type) = parser.make_end ("endfunction", true,
5222  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5223  }
5224 #line 5225 "libinterp/parse-tree/oct-parse.cc"
5225  break;
5226 
5227  case 211: /* function: function_beg stash_comment fcn_name opt_param_list opt_sep stash_comment function_body function_end */
5228 #line 1656 "../libinterp/parse-tree/oct-parse.yy"
5229  {
5230  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5231 
5232  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-7].tok_val), nullptr, (yyvsp[-5].tree_identifier_type), (yyvsp[-4].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-6].comment_type), (yyvsp[-2].comment_type));
5233  }
5234 #line 5235 "libinterp/parse-tree/oct-parse.cc"
5235  break;
5236 
5237  case 212: /* function: function_beg stash_comment return_list '=' fcn_name opt_param_list opt_sep stash_comment function_body function_end */
5238 #line 1662 "../libinterp/parse-tree/oct-parse.yy"
5239  {
5240  OCTAVE_YYUSE ((yyvsp[-6].tok_val), (yyvsp[-3].punct_type));
5241 
5242  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-9].tok_val), (yyvsp[-7].tree_parameter_list_type), (yyvsp[-5].tree_identifier_type), (yyvsp[-4].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-8].comment_type), (yyvsp[-2].comment_type));
5243  }
5244 #line 5245 "libinterp/parse-tree/oct-parse.cc"
5245  break;
5246 
5247  case 213: /* function_body: at_first_executable_stmt opt_list */
5248 #line 1670 "../libinterp/parse-tree/oct-parse.yy"
5249  {
5250  OCTAVE_YYUSE ((yyvsp[-1].dummy_type));
5251 
5252  (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type);
5253  }
5254 #line 5255 "libinterp/parse-tree/oct-parse.cc"
5255  break;
5256 
5257  case 214: /* function_body: function_body1 opt_sep at_first_executable_stmt opt_list */
5258 #line 1676 "../libinterp/parse-tree/oct-parse.yy"
5259  {
5260  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5261 
5262  (yyval.tree_statement_list_type) = parser.append_function_body ((yyvsp[-3].tree_statement_list_type), (yyvsp[0].tree_statement_list_type));
5263  }
5264 #line 5265 "libinterp/parse-tree/oct-parse.cc"
5265  break;
5266 
5267  case 215: /* at_first_executable_stmt: %empty */
5268 #line 1685 "../libinterp/parse-tree/oct-parse.yy"
5269  {
5270  (yyval.dummy_type) = 0;
5271  lexer.m_arguments_is_keyword = false;
5272  }
5273 #line 5274 "libinterp/parse-tree/oct-parse.cc"
5274  break;
5275 
5276  case 216: /* function_body1: arguments_block */
5277 #line 1692 "../libinterp/parse-tree/oct-parse.yy"
5278  {
5279  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_arguments_block_type));
5280 
5281  (yyval.tree_statement_list_type) = parser.make_statement_list (stmt);
5282  }
5283 #line 5284 "libinterp/parse-tree/oct-parse.cc"
5284  break;
5285 
5286  case 217: /* function_body1: function_body1 opt_sep arguments_block */
5287 #line 1698 "../libinterp/parse-tree/oct-parse.yy"
5288  {
5289  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_arguments_block_type));
5290 
5291  (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), stmt, false);
5292  }
5293 #line 5294 "libinterp/parse-tree/oct-parse.cc"
5294  break;
5295 
5296  case 218: /* arguments_block: arguments_beg stash_comment opt_sep args_attr_list args_validation_list opt_sep END */
5297 #line 1707 "../libinterp/parse-tree/oct-parse.yy"
5298  {
5299  OCTAVE_YYUSE ((yyvsp[-4].punct_type), (yyvsp[-1].punct_type));
5300 
5301  octave::comment_list *lc = (yyvsp[-5].comment_type);
5302  octave::comment_list *tc = lexer.get_comment ();
5303 
5304  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)))
5305  {
5306  // make_arguments_block deleted $4, $5, LC, and TC.
5307  YYABORT;
5308  }
5309 
5311  }
5312 #line 5313 "libinterp/parse-tree/oct-parse.cc"
5313  break;
5314 
5315  case 219: /* arguments_beg: ARGUMENTS */
5316 #line 1724 "../libinterp/parse-tree/oct-parse.yy"
5317  {
5318  (yyval.tok_val) = (yyvsp[0].tok_val);
5319  lexer.m_arguments_is_keyword = false;
5320  }
5321 #line 5322 "libinterp/parse-tree/oct-parse.cc"
5322  break;
5323 
5324  case 220: /* args_attr_list: %empty */
5325 #line 1731 "../libinterp/parse-tree/oct-parse.yy"
5326  { (yyval.tree_args_block_attribute_list_type) = nullptr; }
5327 #line 5328 "libinterp/parse-tree/oct-parse.cc"
5328  break;
5329 
5330  case 221: /* args_attr_list: '(' identifier ')' */
5331 #line 1733 "../libinterp/parse-tree/oct-parse.yy"
5332  {
5333  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5334 
5335  // Error if $$ is nullptr.
5336  if (! ((yyval.tree_args_block_attribute_list_type) = parser.make_args_attribute_list ((yyvsp[-1].tree_identifier_type))))
5337  {
5338  // make_args_attribute_list deleted $2.
5339  YYABORT;
5340  }
5341  }
5342 #line 5343 "libinterp/parse-tree/oct-parse.cc"
5343  break;
5344 
5345  case 222: /* args_validation_list: arg_name arg_validation */
5346 #line 1747 "../libinterp/parse-tree/oct-parse.yy"
5347  {
5348  (yyvsp[0].tree_arg_validation_type)->arg_name ((yyvsp[-1].tree_expression_type));
5349  (yyval.tree_args_block_validation_list_type) = parser.make_args_validation_list ((yyvsp[0].tree_arg_validation_type));
5350  }
5351 #line 5352 "libinterp/parse-tree/oct-parse.cc"
5352  break;
5353 
5354  case 223: /* args_validation_list: args_validation_list sep arg_name arg_validation */
5355 #line 1752 "../libinterp/parse-tree/oct-parse.yy"
5356  {
5357  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5358 
5359  (yyvsp[0].tree_arg_validation_type)->arg_name ((yyvsp[-1].tree_expression_type));
5360  (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));
5361  }
5362 #line 5363 "libinterp/parse-tree/oct-parse.cc"
5363  break;
5364 
5365  case 224: /* arg_name: identifier */
5366 #line 1765 "../libinterp/parse-tree/oct-parse.yy"
5367  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
5368 #line 5369 "libinterp/parse-tree/oct-parse.cc"
5369  break;
5370 
5371  case 225: /* arg_validation: size_spec class_name validation_fcns default_value */
5372 #line 1769 "../libinterp/parse-tree/oct-parse.yy"
5373  {
5374  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))))
5375  {
5376  // make_arg_validation deleted ...
5377  YYABORT;
5378  }
5379  }
5380 #line 5381 "libinterp/parse-tree/oct-parse.cc"
5381  break;
5382 
5383  case 226: /* size_spec: %empty */
5384 #line 1779 "../libinterp/parse-tree/oct-parse.yy"
5385  { (yyval.tree_arg_size_spec_type) = nullptr; }
5386 #line 5387 "libinterp/parse-tree/oct-parse.cc"
5387  break;
5388 
5389  case 227: /* size_spec: '(' arg_list ')' */
5390 #line 1781 "../libinterp/parse-tree/oct-parse.yy"
5391  {
5392  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5393 
5394  if (! ((yyval.tree_arg_size_spec_type) = parser.make_arg_size_spec ((yyvsp[-1].tree_argument_list_type))))
5395  {
5396  // make_arg_size_spec deleted $2.
5397  YYABORT;
5398  }
5399  }
5400 #line 5401 "libinterp/parse-tree/oct-parse.cc"
5401  break;
5402 
5403  case 228: /* class_name: %empty */
5404 #line 1793 "../libinterp/parse-tree/oct-parse.yy"
5405  { (yyval.tree_identifier_type) = nullptr; }
5406 #line 5407 "libinterp/parse-tree/oct-parse.cc"
5407  break;
5408 
5409  case 229: /* class_name: identifier */
5410 #line 1795 "../libinterp/parse-tree/oct-parse.yy"
5411  { (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type); }
5412 #line 5413 "libinterp/parse-tree/oct-parse.cc"
5413  break;
5414 
5415  case 230: /* validation_fcns: %empty */
5416 #line 1800 "../libinterp/parse-tree/oct-parse.yy"
5417  { (yyval.tree_arg_validation_fcns_type) = nullptr; }
5418 #line 5419 "libinterp/parse-tree/oct-parse.cc"
5419  break;
5420 
5421  case 231: /* validation_fcns: '{' arg_list '}' */
5422 #line 1802 "../libinterp/parse-tree/oct-parse.yy"
5423  {
5424  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
5425 
5426  if (! ((yyval.tree_arg_validation_fcns_type) = parser.make_arg_validation_fcns ((yyvsp[-1].tree_argument_list_type))))
5427  {
5428  // make_arg_validation_fcns deleted $2.
5429  YYABORT;
5430  }
5431  }
5432 #line 5433 "libinterp/parse-tree/oct-parse.cc"
5433  break;
5434 
5435  case 232: /* default_value: %empty */
5436 #line 1814 "../libinterp/parse-tree/oct-parse.yy"
5437  { (yyval.tree_expression_type) = nullptr; }
5438 #line 5439 "libinterp/parse-tree/oct-parse.cc"
5439  break;
5440 
5441  case 233: /* default_value: '=' expression */
5442 #line 1816 "../libinterp/parse-tree/oct-parse.yy"
5443  {
5444  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5445 
5446  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
5447  }
5448 #line 5449 "libinterp/parse-tree/oct-parse.cc"
5449  break;
5450 
5451  case 234: /* classdef_beg: CLASSDEF */
5452 #line 1828 "../libinterp/parse-tree/oct-parse.yy"
5453  {
5455  {
5456  parser.bison_error ("classdef must appear inside a file containing only a class definition");
5457  YYABORT;
5458  }
5459 
5460  // Create invalid parent scope.
5461  lexer.m_symtab_context.push (octave::symbol_scope::anonymous ());
5462  lexer.m_parsing_classdef = true;
5465 
5466  (yyval.tok_val) = (yyvsp[0].tok_val);
5467  }
5468 #line 5469 "libinterp/parse-tree/oct-parse.cc"
5469  break;
5470 
5471  case 235: /* classdef: classdef_beg stash_comment attr_list identifier opt_sep superclass_list stash_comment class_body stash_comment END */
5472 #line 1846 "../libinterp/parse-tree/oct-parse.yy"
5473  {
5474  OCTAVE_YYUSE ((yyvsp[-5].punct_type));
5475 
5476  lexer.m_parsing_classdef = false;
5477 
5478  if (! ((yyval.tree_classdef_type) = parser.make_classdef ((yyvsp[-9].tok_val), (yyvsp[-7].tree_classdef_attribute_list_type), (yyvsp[-6].tree_identifier_type), (yyvsp[-4].tree_classdef_superclass_list_type), (yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tok_val), (yyvsp[-8].comment_type), (yyvsp[-3].comment_type), (yyvsp[-1].comment_type))))
5479  {
5480  // make_classdef deleted $2, $3, $4, $6, $7, $8, $9
5481  YYABORT;
5482  }
5483  }
5484 #line 5485 "libinterp/parse-tree/oct-parse.cc"
5485  break;
5486 
5487  case 236: /* attr_list: %empty */
5488 #line 1860 "../libinterp/parse-tree/oct-parse.yy"
5489  { (yyval.tree_classdef_attribute_list_type) = nullptr; }
5490 #line 5491 "libinterp/parse-tree/oct-parse.cc"
5491  break;
5492 
5493  case 237: /* attr_list: '(' attr_list1 ')' opt_sep */
5494 #line 1862 "../libinterp/parse-tree/oct-parse.yy"
5495  {
5496  OCTAVE_YYUSE ((yyvsp[-3].tok_val), (yyvsp[-1].tok_val), (yyvsp[0].punct_type));
5497 
5498  (yyval.tree_classdef_attribute_list_type) = (yyvsp[-2].tree_classdef_attribute_list_type);
5499  }
5500 #line 5501 "libinterp/parse-tree/oct-parse.cc"
5501  break;
5502 
5503  case 238: /* attr_list1: attr */
5504 #line 1870 "../libinterp/parse-tree/oct-parse.yy"
5505  { (yyval.tree_classdef_attribute_list_type) = parser.make_classdef_attribute_list ((yyvsp[0].tree_classdef_attribute_type)); }
5506 #line 5507 "libinterp/parse-tree/oct-parse.cc"
5507  break;
5508 
5509  case 239: /* attr_list1: attr_list1 ',' attr */
5510 #line 1872 "../libinterp/parse-tree/oct-parse.yy"
5511  {
5512  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5513 
5514  (yyval.tree_classdef_attribute_list_type) = parser.append_classdef_attribute ((yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[0].tree_classdef_attribute_type));
5515  }
5516 #line 5517 "libinterp/parse-tree/oct-parse.cc"
5517  break;
5518 
5519  case 240: /* attr: identifier */
5520 #line 1880 "../libinterp/parse-tree/oct-parse.yy"
5521  { (yyval.tree_classdef_attribute_type) = parser.make_classdef_attribute ((yyvsp[0].tree_identifier_type)); }
5522 #line 5523 "libinterp/parse-tree/oct-parse.cc"
5523  break;
5524 
5525  case 241: /* attr: identifier '=' expression */
5526 #line 1882 "../libinterp/parse-tree/oct-parse.yy"
5527  {
5528  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5529 
5530  (yyval.tree_classdef_attribute_type) = parser.make_classdef_attribute ((yyvsp[-2].tree_identifier_type), (yyvsp[0].tree_expression_type));
5531  }
5532 #line 5533 "libinterp/parse-tree/oct-parse.cc"
5533  break;
5534 
5535  case 242: /* attr: '~' identifier */
5536 #line 1888 "../libinterp/parse-tree/oct-parse.yy"
5537  {
5538  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5539 
5540  (yyval.tree_classdef_attribute_type) = parser.make_not_classdef_attribute ((yyvsp[0].tree_identifier_type));
5541  }
5542 #line 5543 "libinterp/parse-tree/oct-parse.cc"
5543  break;
5544 
5545  case 243: /* attr: '!' identifier */
5546 #line 1894 "../libinterp/parse-tree/oct-parse.yy"
5547  {
5548  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5549 
5550  (yyval.tree_classdef_attribute_type) = parser.make_not_classdef_attribute ((yyvsp[0].tree_identifier_type));
5551  }
5552 #line 5553 "libinterp/parse-tree/oct-parse.cc"
5553  break;
5554 
5555  case 244: /* superclass_list: %empty */
5556 #line 1902 "../libinterp/parse-tree/oct-parse.yy"
5557  {
5560 
5561  (yyval.tree_classdef_superclass_list_type) = nullptr;
5562  }
5563 #line 5564 "libinterp/parse-tree/oct-parse.cc"
5564  break;
5565 
5566  case 245: /* superclass_list: superclass_list1 opt_sep */
5567 #line 1909 "../libinterp/parse-tree/oct-parse.yy"
5568  {
5569  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5570 
5573 
5574  (yyval.tree_classdef_superclass_list_type) = (yyvsp[-1].tree_classdef_superclass_list_type);
5575  }
5576 #line 5577 "libinterp/parse-tree/oct-parse.cc"
5577  break;
5578 
5579  case 246: /* superclass_list1: EXPR_LT superclass */
5580 #line 1921 "../libinterp/parse-tree/oct-parse.yy"
5581  {
5582  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5583 
5584  (yyval.tree_classdef_superclass_list_type) = parser.make_classdef_superclass_list ((yyvsp[0].tree_classdef_superclass_type));
5585  }
5586 #line 5587 "libinterp/parse-tree/oct-parse.cc"
5587  break;
5588 
5589  case 247: /* superclass_list1: superclass_list1 EXPR_AND superclass */
5590 #line 1927 "../libinterp/parse-tree/oct-parse.yy"
5591  {
5592  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5593 
5594  (yyval.tree_classdef_superclass_list_type) = parser.append_classdef_superclass ((yyvsp[-2].tree_classdef_superclass_list_type), (yyvsp[0].tree_classdef_superclass_type));
5595  }
5596 #line 5597 "libinterp/parse-tree/oct-parse.cc"
5597  break;
5598 
5599  case 248: /* superclass: FQ_IDENT */
5600 #line 1935 "../libinterp/parse-tree/oct-parse.yy"
5601  { (yyval.tree_classdef_superclass_type) = parser.make_classdef_superclass ((yyvsp[0].tok_val)); }
5602 #line 5603 "libinterp/parse-tree/oct-parse.cc"
5603  break;
5604 
5605  case 249: /* class_body: %empty */
5606 #line 1939 "../libinterp/parse-tree/oct-parse.yy"
5607  {
5609  (yyval.tree_classdef_body_type) = nullptr;
5610  }
5611 #line 5612 "libinterp/parse-tree/oct-parse.cc"
5612  break;
5613 
5614  case 250: /* class_body: class_body1 opt_sep */
5615 #line 1944 "../libinterp/parse-tree/oct-parse.yy"
5616  {
5617  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5618 
5620  (yyval.tree_classdef_body_type) = (yyvsp[-1].tree_classdef_body_type);
5621  }
5622 #line 5623 "libinterp/parse-tree/oct-parse.cc"
5623  break;
5624 
5625  case 251: /* class_body1: properties_block */
5626 #line 1953 "../libinterp/parse-tree/oct-parse.yy"
5627  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_properties_block_type)); }
5628 #line 5629 "libinterp/parse-tree/oct-parse.cc"
5629  break;
5630 
5631  case 252: /* class_body1: methods_block */
5632 #line 1955 "../libinterp/parse-tree/oct-parse.yy"
5633  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_methods_block_type)); }
5634 #line 5635 "libinterp/parse-tree/oct-parse.cc"
5635  break;
5636 
5637  case 253: /* class_body1: events_block */
5638 #line 1957 "../libinterp/parse-tree/oct-parse.yy"
5639  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_events_block_type)); }
5640 #line 5641 "libinterp/parse-tree/oct-parse.cc"
5641  break;
5642 
5643  case 254: /* class_body1: enum_block */
5644 #line 1959 "../libinterp/parse-tree/oct-parse.yy"
5645  { (yyval.tree_classdef_body_type) = parser.make_classdef_body ((yyvsp[0].tree_classdef_enum_block_type)); }
5646 #line 5647 "libinterp/parse-tree/oct-parse.cc"
5647  break;
5648 
5649  case 255: /* class_body1: class_body1 opt_sep properties_block */
5650 #line 1961 "../libinterp/parse-tree/oct-parse.yy"
5651  {
5652  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5653 
5654  (yyval.tree_classdef_body_type) = parser.append_classdef_properties_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_properties_block_type));
5655  }
5656 #line 5657 "libinterp/parse-tree/oct-parse.cc"
5657  break;
5658 
5659  case 256: /* class_body1: class_body1 opt_sep methods_block */
5660 #line 1967 "../libinterp/parse-tree/oct-parse.yy"
5661  {
5662  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5663 
5664  (yyval.tree_classdef_body_type) = parser.append_classdef_methods_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_methods_block_type));
5665  }
5666 #line 5667 "libinterp/parse-tree/oct-parse.cc"
5667  break;
5668 
5669  case 257: /* class_body1: class_body1 opt_sep events_block */
5670 #line 1973 "../libinterp/parse-tree/oct-parse.yy"
5671  {
5672  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5673 
5674  (yyval.tree_classdef_body_type) = parser.append_classdef_events_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_events_block_type));
5675  }
5676 #line 5677 "libinterp/parse-tree/oct-parse.cc"
5677  break;
5678 
5679  case 258: /* class_body1: class_body1 opt_sep enum_block */
5680 #line 1979 "../libinterp/parse-tree/oct-parse.yy"
5681  {
5682  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5683 
5684  (yyval.tree_classdef_body_type) = parser.append_classdef_enum_block ((yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tree_classdef_enum_block_type));
5685  }
5686 #line 5687 "libinterp/parse-tree/oct-parse.cc"
5687  break;
5688 
5689  case 259: /* properties_block: properties_beg stash_comment opt_sep attr_list property_list END */
5690 #line 1988 "../libinterp/parse-tree/oct-parse.yy"
5691  {
5692  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5693 
5694  octave::comment_list *lc = (yyvsp[-4].comment_type);
5695  octave::comment_list *tc = lexer.get_comment ();
5696 
5697  if (! ((yyval.tree_classdef_properties_block_type) = parser.make_classdef_properties_block
5698  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_property_list_type), (yyvsp[0].tok_val), lc, tc)))
5699  {
5700  // make_classdef_properties_block deleted $4,
5701  // $5, LC, and TC.
5702  YYABORT;
5703  }
5704  }
5705 #line 5706 "libinterp/parse-tree/oct-parse.cc"
5706  break;
5707 
5708  case 260: /* properties_beg: PROPERTIES */
5709 #line 2005 "../libinterp/parse-tree/oct-parse.yy"
5710  {
5712  (yyval.tok_val) = (yyvsp[0].tok_val);
5713  }
5714 #line 5715 "libinterp/parse-tree/oct-parse.cc"
5715  break;
5716 
5717  case 261: /* property_list: %empty */
5718 #line 2012 "../libinterp/parse-tree/oct-parse.yy"
5719  {
5721  (yyval.tree_classdef_property_list_type) = nullptr;
5722  }
5723 #line 5724 "libinterp/parse-tree/oct-parse.cc"
5724  break;
5725 
5726  case 262: /* property_list: property_list1 opt_sep */
5727 #line 2017 "../libinterp/parse-tree/oct-parse.yy"
5728  {
5729  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5730 
5732  (yyval.tree_classdef_property_list_type) = (yyvsp[-1].tree_classdef_property_list_type);
5733  }
5734 #line 5735 "libinterp/parse-tree/oct-parse.cc"
5735  break;
5736 
5737  case 263: /* property_list1: class_property */
5738 #line 2027 "../libinterp/parse-tree/oct-parse.yy"
5739  { (yyval.tree_classdef_property_list_type) = parser.make_classdef_property_list ((yyvsp[0].tree_classdef_property_type)); }
5740 #line 5741 "libinterp/parse-tree/oct-parse.cc"
5741  break;
5742 
5743  case 264: /* property_list1: property_list1 sep class_property */
5744 #line 2029 "../libinterp/parse-tree/oct-parse.yy"
5745  {
5746  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5747 
5748  // We don't look ahead to grab end-of-line comments.
5749  // Instead, they are grabbed when we see the
5750  // identifier that becomes the next element in the
5751  // list. If the element at the end of the list
5752  // doesn't have a doc string, see whether the
5753  // element we are adding is stroing an end-of-line
5754  // comment for us to use.
5755 
5756  octave::tree_classdef_property *last_elt = (yyvsp[-2].tree_classdef_property_list_type)->back ();
5757 
5758  if (! last_elt->have_doc_string ())
5759  {
5760  octave::comment_list *cl = (yyvsp[0].tree_classdef_property_type)->comments ();
5761 
5762  if (cl)
5763  {
5764  octave::comment_elt elt = cl->front ();
5765 
5766  if (elt.is_end_of_line ())
5767  last_elt->doc_string (elt.text ());
5768  }
5769  }
5770 
5771  (yyval.tree_classdef_property_list_type) = parser.append_classdef_property ((yyvsp[-2].tree_classdef_property_list_type), (yyvsp[0].tree_classdef_property_type));
5772  }
5773 #line 5774 "libinterp/parse-tree/oct-parse.cc"
5774  break;
5775 
5776  case 265: /* class_property: stash_comment identifier arg_validation */
5777 #line 2060 "../libinterp/parse-tree/oct-parse.yy"
5778  { (yyval.tree_classdef_property_type) = parser.make_classdef_property ((yyvsp[-2].comment_type), (yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_arg_validation_type)); }
5779 #line 5780 "libinterp/parse-tree/oct-parse.cc"
5780  break;
5781 
5782  case 266: /* methods_block: methods_beg stash_comment opt_sep attr_list methods_list END */
5783 #line 2064 "../libinterp/parse-tree/oct-parse.yy"
5784  {
5785  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5786 
5787  octave::comment_list *lc = (yyvsp[-4].comment_type);
5788  octave::comment_list *tc = lexer.get_comment ();
5789 
5790  if (! ((yyval.tree_classdef_methods_block_type) = parser.make_classdef_methods_block
5791  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_methods_list_type), (yyvsp[0].tok_val), lc, tc)))
5792  {
5793  // make_classdef_methods_block deleted $4, $5,
5794  // LC, and TC.
5795  YYABORT;
5796  }
5797  }
5798 #line 5799 "libinterp/parse-tree/oct-parse.cc"
5799  break;
5800 
5801  case 267: /* methods_beg: METHODS */
5802 #line 2081 "../libinterp/parse-tree/oct-parse.yy"
5803  {
5805  (yyval.tok_val) = (yyvsp[0].tok_val);
5806  }
5807 #line 5808 "libinterp/parse-tree/oct-parse.cc"
5808  break;
5809 
5810  case 268: /* method_decl1: identifier */
5811 #line 2088 "../libinterp/parse-tree/oct-parse.yy"
5812  {
5813  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[0].tree_identifier_type), nullptr)))
5814  YYABORT;
5815  }
5816 #line 5817 "libinterp/parse-tree/oct-parse.cc"
5817  break;
5818 
5819  case 269: /* method_decl1: identifier param_list */
5820 #line 2093 "../libinterp/parse-tree/oct-parse.yy"
5821  {
5822  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_parameter_list_type))))
5823  YYABORT;
5824  }
5825 #line 5826 "libinterp/parse-tree/oct-parse.cc"
5826  break;
5827 
5828  case 270: /* method_decl: stash_comment method_decl1 */
5829 #line 2100 "../libinterp/parse-tree/oct-parse.yy"
5830  { (yyval.tree_function_def_type) = parser.finish_classdef_external_method ((yyvsp[0].octave_user_function_type), nullptr, (yyvsp[-1].comment_type)); }
5831 #line 5832 "libinterp/parse-tree/oct-parse.cc"
5832  break;
5833 
5834  case 271: /* $@1: %empty */
5835 #line 2102 "../libinterp/parse-tree/oct-parse.yy"
5836  {
5837  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5838 
5840  lexer.m_parsed_function_name.push (false);
5841  }
5842 #line 5843 "libinterp/parse-tree/oct-parse.cc"
5843  break;
5844 
5845  case 272: /* method_decl: stash_comment return_list '=' $@1 method_decl1 */
5846 #line 2109 "../libinterp/parse-tree/oct-parse.yy"
5847  {
5850 
5851  (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));
5852  }
5853 #line 5854 "libinterp/parse-tree/oct-parse.cc"
5854  break;
5855 
5856  case 273: /* method: method_decl */
5857 #line 2118 "../libinterp/parse-tree/oct-parse.yy"
5858  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5859 #line 5860 "libinterp/parse-tree/oct-parse.cc"
5860  break;
5861 
5862  case 274: /* method: function */
5863 #line 2120 "../libinterp/parse-tree/oct-parse.yy"
5864  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5865 #line 5866 "libinterp/parse-tree/oct-parse.cc"
5866  break;
5867 
5868  case 275: /* methods_list: %empty */
5869 #line 2124 "../libinterp/parse-tree/oct-parse.yy"
5870  {
5872  (yyval.tree_classdef_methods_list_type) = nullptr;
5873  }
5874 #line 5875 "libinterp/parse-tree/oct-parse.cc"
5875  break;
5876 
5877  case 276: /* methods_list: methods_list1 opt_sep */
5878 #line 2129 "../libinterp/parse-tree/oct-parse.yy"
5879  {
5880  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5881 
5883  (yyval.tree_classdef_methods_list_type) = (yyvsp[-1].tree_classdef_methods_list_type);
5884  }
5885 #line 5886 "libinterp/parse-tree/oct-parse.cc"
5886  break;
5887 
5888  case 277: /* methods_list1: method */
5889 #line 2138 "../libinterp/parse-tree/oct-parse.yy"
5890  { (yyval.tree_classdef_methods_list_type) = parser.make_classdef_methods_list ((yyvsp[0].tree_function_def_type)); }
5891 #line 5892 "libinterp/parse-tree/oct-parse.cc"
5892  break;
5893 
5894  case 278: /* methods_list1: methods_list1 opt_sep method */
5895 #line 2140 "../libinterp/parse-tree/oct-parse.yy"
5896  {
5897  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5898 
5899  (yyval.tree_classdef_methods_list_type) = parser.append_classdef_method ((yyvsp[-2].tree_classdef_methods_list_type), (yyvsp[0].tree_function_def_type));
5900  }
5901 #line 5902 "libinterp/parse-tree/oct-parse.cc"
5902  break;
5903 
5904  case 279: /* events_block: events_beg stash_comment opt_sep attr_list events_list END */
5905 #line 2148 "../libinterp/parse-tree/oct-parse.yy"
5906  {
5907  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5908 
5909  octave::comment_list *lc = (yyvsp[-4].comment_type);
5910  octave::comment_list *tc = lexer.get_comment ();
5911 
5912  if (! ((yyval.tree_classdef_events_block_type) = parser.make_classdef_events_block
5913  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_events_list_type), (yyvsp[0].tok_val), lc, tc)))
5914  {
5915  // make_classdef_events_block deleted $4, $5,
5916  // LC, and TC.
5917  YYABORT;
5918  }
5919  }
5920 #line 5921 "libinterp/parse-tree/oct-parse.cc"
5921  break;
5922 
5923  case 280: /* events_beg: EVENTS */
5924 #line 2165 "../libinterp/parse-tree/oct-parse.yy"
5925  {
5927  (yyval.tok_val) = (yyvsp[0].tok_val);
5928  }
5929 #line 5930 "libinterp/parse-tree/oct-parse.cc"
5930  break;
5931 
5932  case 281: /* events_list: %empty */
5933 #line 2172 "../libinterp/parse-tree/oct-parse.yy"
5934  {
5936  (yyval.tree_classdef_events_list_type) = nullptr;
5937  }
5938 #line 5939 "libinterp/parse-tree/oct-parse.cc"
5939  break;
5940 
5941  case 282: /* events_list: events_list1 opt_sep */
5942 #line 2177 "../libinterp/parse-tree/oct-parse.yy"
5943  {
5944  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5945 
5947  (yyval.tree_classdef_events_list_type) = (yyvsp[-1].tree_classdef_events_list_type);
5948  }
5949 #line 5950 "libinterp/parse-tree/oct-parse.cc"
5950  break;
5951 
5952  case 283: /* events_list1: class_event */
5953 #line 2186 "../libinterp/parse-tree/oct-parse.yy"
5954  { (yyval.tree_classdef_events_list_type) = parser.make_classdef_events_list ((yyvsp[0].tree_classdef_event_type)); }
5955 #line 5956 "libinterp/parse-tree/oct-parse.cc"
5956  break;
5957 
5958  case 284: /* events_list1: events_list1 opt_sep class_event */
5959 #line 2188 "../libinterp/parse-tree/oct-parse.yy"
5960  {
5961  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5962 
5963  (yyval.tree_classdef_events_list_type) = parser.append_classdef_event ((yyvsp[-2].tree_classdef_events_list_type), (yyvsp[0].tree_classdef_event_type));
5964  }
5965 #line 5966 "libinterp/parse-tree/oct-parse.cc"
5966  break;
5967 
5968  case 285: /* class_event: stash_comment identifier */
5969 #line 2196 "../libinterp/parse-tree/oct-parse.yy"
5970  { (yyval.tree_classdef_event_type) = parser.make_classdef_event ((yyvsp[-1].comment_type), (yyvsp[0].tree_identifier_type)); }
5971 #line 5972 "libinterp/parse-tree/oct-parse.cc"
5972  break;
5973 
5974  case 286: /* enum_block: enumeration_beg stash_comment opt_sep attr_list enum_list END */
5975 #line 2200 "../libinterp/parse-tree/oct-parse.yy"
5976  {
5977  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5978 
5979  octave::comment_list *lc = (yyvsp[-4].comment_type);
5980  octave::comment_list *tc = lexer.get_comment ();
5981 
5982  if (! ((yyval.tree_classdef_enum_block_type) = parser.make_classdef_enum_block
5983  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_enum_list_type), (yyvsp[0].tok_val), lc, tc)))
5984  {
5985  // make_classdef_enum_block deleted $4, $5, LC,
5986  // and TC.
5987  YYABORT;
5988  }
5989  }
5990 #line 5991 "libinterp/parse-tree/oct-parse.cc"
5991  break;
5992 
5993  case 287: /* enumeration_beg: ENUMERATION */
5994 #line 2217 "../libinterp/parse-tree/oct-parse.yy"
5995  {
5997  (yyval.tok_val) = (yyvsp[0].tok_val);
5998  }
5999 #line 6000 "libinterp/parse-tree/oct-parse.cc"
6000  break;
6001 
6002  case 288: /* enum_list: %empty */
6003 #line 2224 "../libinterp/parse-tree/oct-parse.yy"
6004  {
6006  (yyval.tree_classdef_enum_list_type) = nullptr;
6007  }
6008 #line 6009 "libinterp/parse-tree/oct-parse.cc"
6009  break;
6010 
6011  case 289: /* enum_list: enum_list1 opt_sep */
6012 #line 2229 "../libinterp/parse-tree/oct-parse.yy"
6013  {
6014  OCTAVE_YYUSE ((yyvsp[0].punct_type));
6015 
6017  (yyval.tree_classdef_enum_list_type) = (yyvsp[-1].tree_classdef_enum_list_type);
6018  }
6019 #line 6020 "libinterp/parse-tree/oct-parse.cc"
6020  break;
6021 
6022  case 290: /* enum_list1: class_enum */
6023 #line 2238 "../libinterp/parse-tree/oct-parse.yy"
6024  { (yyval.tree_classdef_enum_list_type) = parser.make_classdef_enum_list ((yyvsp[0].tree_classdef_enum_type)); }
6025 #line 6026 "libinterp/parse-tree/oct-parse.cc"
6026  break;
6027 
6028  case 291: /* enum_list1: enum_list1 opt_sep class_enum */
6029 #line 2240 "../libinterp/parse-tree/oct-parse.yy"
6030  {
6031  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
6032 
6033  (yyval.tree_classdef_enum_list_type) = parser.append_classdef_enum ((yyvsp[-2].tree_classdef_enum_list_type), (yyvsp[0].tree_classdef_enum_type));
6034  }
6035 #line 6036 "libinterp/parse-tree/oct-parse.cc"
6036  break;
6037 
6038  case 292: /* class_enum: stash_comment identifier '(' expression ')' */
6039 #line 2248 "../libinterp/parse-tree/oct-parse.yy"
6040  {
6041  OCTAVE_YYUSE ((yyvsp[-2].tok_val), (yyvsp[0].tok_val));
6042 
6043  (yyval.tree_classdef_enum_type) = parser.make_classdef_enum ((yyvsp[-3].tree_identifier_type), (yyvsp[-1].tree_expression_type), (yyvsp[-4].comment_type));
6044  }
6045 #line 6046 "libinterp/parse-tree/oct-parse.cc"
6046  break;
6047 
6048  case 293: /* stmt_begin: %empty */
6049 #line 2260 "../libinterp/parse-tree/oct-parse.yy"
6050  {
6051  (yyval.dummy_type) = 0;
6053  }
6054 #line 6055 "libinterp/parse-tree/oct-parse.cc"
6055  break;
6056 
6057  case 294: /* anon_fcn_begin: %empty */
6058 #line 2267 "../libinterp/parse-tree/oct-parse.yy"
6059  {
6060  (yyval.dummy_type) = 0;
6063  }
6064 #line 6065 "libinterp/parse-tree/oct-parse.cc"
6065  break;
6066 
6067  case 295: /* stash_comment: %empty */
6068 #line 2275 "../libinterp/parse-tree/oct-parse.yy"
6069  {
6070  (yyval.comment_type) = lexer.get_comment ();
6071  }
6072 #line 6073 "libinterp/parse-tree/oct-parse.cc"
6073  break;
6074 
6075  case 296: /* parse_error: LEXICAL_ERROR */
6076 #line 2281 "../libinterp/parse-tree/oct-parse.yy"
6077  {
6078  (yyval.dummy_type) = 0;
6079  std::string msg = (yyvsp[0].tok_val)->text ();
6080  parser.bison_error (msg.c_str ());
6081  }
6082 #line 6083 "libinterp/parse-tree/oct-parse.cc"
6083  break;
6084 
6085  case 297: /* parse_error: error */
6086 #line 2287 "../libinterp/parse-tree/oct-parse.yy"
6087  { (yyval.dummy_type) = 0; }
6088 #line 6089 "libinterp/parse-tree/oct-parse.cc"
6089  break;
6090 
6091  case 298: /* sep_no_nl: ',' */
6092 #line 2291 "../libinterp/parse-tree/oct-parse.yy"
6093  {
6094  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6095 
6096  (yyval.punct_type) = ',';
6097  }
6098 #line 6099 "libinterp/parse-tree/oct-parse.cc"
6099  break;
6100 
6101  case 299: /* sep_no_nl: ';' */
6102 #line 2297 "../libinterp/parse-tree/oct-parse.yy"
6103  {
6104  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6105 
6106  (yyval.punct_type) = ';';
6107  }
6108 #line 6109 "libinterp/parse-tree/oct-parse.cc"
6109  break;
6110 
6111  case 300: /* sep_no_nl: sep_no_nl ',' */
6112 #line 2303 "../libinterp/parse-tree/oct-parse.yy"
6113  {
6114  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6115 
6116  (yyval.punct_type) = (yyvsp[-1].punct_type);
6117  }
6118 #line 6119 "libinterp/parse-tree/oct-parse.cc"
6119  break;
6120 
6121  case 301: /* sep_no_nl: sep_no_nl ';' */
6122 #line 2309 "../libinterp/parse-tree/oct-parse.yy"
6123  {
6124  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6125 
6126  (yyval.punct_type) = (yyvsp[-1].punct_type);
6127  }
6128 #line 6129 "libinterp/parse-tree/oct-parse.cc"
6129  break;
6130 
6131  case 302: /* opt_sep_no_nl: %empty */
6132 #line 2317 "../libinterp/parse-tree/oct-parse.yy"
6133  { (yyval.punct_type) = 0; }
6134 #line 6135 "libinterp/parse-tree/oct-parse.cc"
6135  break;
6136 
6137  case 303: /* opt_sep_no_nl: sep_no_nl */
6138 #line 2319 "../libinterp/parse-tree/oct-parse.yy"
6139  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6140 #line 6141 "libinterp/parse-tree/oct-parse.cc"
6141  break;
6142 
6143  case 304: /* opt_nl: %empty */
6144 #line 2323 "../libinterp/parse-tree/oct-parse.yy"
6145  { (yyval.punct_type) = 0; }
6146 #line 6147 "libinterp/parse-tree/oct-parse.cc"
6147  break;
6148 
6149  case 305: /* opt_nl: nl */
6150 #line 2325 "../libinterp/parse-tree/oct-parse.yy"
6151  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6152 #line 6153 "libinterp/parse-tree/oct-parse.cc"
6153  break;
6154 
6155  case 306: /* nl: '\n' */
6156 #line 2329 "../libinterp/parse-tree/oct-parse.yy"
6157  {
6158  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6159 
6160  (yyval.punct_type) = '\n';
6161  }
6162 #line 6163 "libinterp/parse-tree/oct-parse.cc"
6163  break;
6164 
6165  case 307: /* nl: nl '\n' */
6166 #line 2335 "../libinterp/parse-tree/oct-parse.yy"
6167  {
6168  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6169 
6170  (yyval.punct_type) = (yyvsp[-1].punct_type);
6171  }
6172 #line 6173 "libinterp/parse-tree/oct-parse.cc"
6173  break;
6174 
6175  case 308: /* sep: ',' */
6176 #line 2343 "../libinterp/parse-tree/oct-parse.yy"
6177  {
6178  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6179 
6180  (yyval.punct_type) = ',';
6181  }
6182 #line 6183 "libinterp/parse-tree/oct-parse.cc"
6183  break;
6184 
6185  case 309: /* sep: ';' */
6186 #line 2349 "../libinterp/parse-tree/oct-parse.yy"
6187  {
6188  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6189 
6190  (yyval.punct_type) = ';';
6191  }
6192 #line 6193 "libinterp/parse-tree/oct-parse.cc"
6193  break;
6194 
6195  case 310: /* sep: '\n' */
6196 #line 2355 "../libinterp/parse-tree/oct-parse.yy"
6197  {
6198  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6199 
6200  (yyval.punct_type) = '\n';
6201  }
6202 #line 6203 "libinterp/parse-tree/oct-parse.cc"
6203  break;
6204 
6205  case 311: /* sep: sep ',' */
6206 #line 2361 "../libinterp/parse-tree/oct-parse.yy"
6207  {
6208  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6209 
6210  (yyval.punct_type) = (yyvsp[-1].punct_type);
6211  }
6212 #line 6213 "libinterp/parse-tree/oct-parse.cc"
6213  break;
6214 
6215  case 312: /* sep: sep ';' */
6216 #line 2367 "../libinterp/parse-tree/oct-parse.yy"
6217  {
6218  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6219 
6220  (yyval.punct_type) = (yyvsp[-1].punct_type);
6221  }
6222 #line 6223 "libinterp/parse-tree/oct-parse.cc"
6223  break;
6224 
6225  case 313: /* sep: sep '\n' */
6226 #line 2373 "../libinterp/parse-tree/oct-parse.yy"
6227  {
6228  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6229 
6230  (yyval.punct_type) = (yyvsp[-1].punct_type);
6231  }
6232 #line 6233 "libinterp/parse-tree/oct-parse.cc"
6233  break;
6234 
6235  case 314: /* opt_sep: %empty */
6236 #line 2381 "../libinterp/parse-tree/oct-parse.yy"
6237  { (yyval.punct_type) = 0; }
6238 #line 6239 "libinterp/parse-tree/oct-parse.cc"
6239  break;
6240 
6241  case 315: /* opt_sep: sep */
6242 #line 2383 "../libinterp/parse-tree/oct-parse.yy"
6243  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6244 #line 6245 "libinterp/parse-tree/oct-parse.cc"
6245  break;
6246 
6247 
6248 #line 6249 "libinterp/parse-tree/oct-parse.cc"
6249 
6250  default: break;
6251  }
6252  /* User semantic actions sometimes alter yychar, and that requires
6253  that yytoken be updated with the new translation. We take the
6254  approach of translating immediately before every use of yytoken.
6255  One alternative is translating here after every semantic action,
6256  but that translation would be missed if the semantic action invokes
6257  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
6258  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
6259  incorrect destructor might then be invoked immediately. In the
6260  case of YYERROR or YYBACKUP, subsequent parser actions might lead
6261  to an incorrect destructor call or verbose syntax error message
6262  before the lookahead is translated. */
6263  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
6264 
6265  YYPOPSTACK (yylen);
6266  yylen = 0;
6267 
6268  *++yyvsp = yyval;
6269 
6270  /* Now 'shift' the result of the reduction. Determine what state
6271  that goes to, based on the state we popped back to and the rule
6272  number reduced by. */
6273  {
6274  const int yylhs = yyr1[yyn] - YYNTOKENS;
6275  const int yyi = yypgoto[yylhs] + *yyssp;
6276  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
6277  ? yytable[yyi]
6278  : yydefgoto[yylhs]);
6279  }
6280 
6281  goto yynewstate;
6282 
6283 
6284 /*--------------------------------------.
6285 | yyerrlab -- here on detecting error. |
6286 `--------------------------------------*/
6287 yyerrlab:
6288  /* Make sure we have latest lookahead translation. See comments at
6289  user semantic actions for why this is necessary. */
6290  yytoken = yychar == OCTAVE_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
6291  /* If not already recovering from an error, report this error. */
6292  if (!yyerrstatus)
6293  {
6294  ++yynerrs;
6295  yyerror (parser, YY_("syntax error"));
6296  }
6297 
6298  if (yyerrstatus == 3)
6299  {
6300  /* If just tried and failed to reuse lookahead token after an
6301  error, discard it. */
6302 
6303  if (yychar <= OCTAVE_EOF)
6304  {
6305  /* Return failure if at end of input. */
6306  if (yychar == OCTAVE_EOF)
6307  YYABORT;
6308  }
6309  else
6310  {
6311  yydestruct ("Error: discarding",
6312  yytoken, &yylval, parser);
6313  yychar = OCTAVE_EMPTY;
6314  }
6315  }
6316 
6317  /* Else will try to reuse lookahead token after shifting the error
6318  token. */
6319  goto yyerrlab1;
6320 
6321 
6322 /*---------------------------------------------------.
6323 | yyerrorlab -- error raised explicitly by YYERROR. |
6324 `---------------------------------------------------*/
6325 yyerrorlab:
6326  /* Pacify compilers when the user code never invokes YYERROR and the
6327  label yyerrorlab therefore never appears in user code. */
6328  if (0)
6329  YYERROR;
6330  ++yynerrs;
6331 
6332  /* Do not reclaim the symbols of the rule whose action triggered
6333  this YYERROR. */
6334  YYPOPSTACK (yylen);
6335  yylen = 0;
6337  yystate = *yyssp;
6338  goto yyerrlab1;
6339 
6340 
6341 /*-------------------------------------------------------------.
6342 | yyerrlab1 -- common code for both syntax error and YYERROR. |
6343 `-------------------------------------------------------------*/
6344 yyerrlab1:
6345  yyerrstatus = 3; /* Each real token shifted decrements this. */
6346 
6347  /* Pop stack until we find a state that shifts the error token. */
6348  for (;;)
6349  {
6350  yyn = yypact[yystate];
6351  if (!yypact_value_is_default (yyn))
6352  {
6353  yyn += YYSYMBOL_YYerror;
6354  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
6355  {
6356  yyn = yytable[yyn];
6357  if (0 < yyn)
6358  break;
6359  }
6360  }
6361 
6362  /* Pop the current state because it cannot handle the error token. */
6363  if (yyssp == yyss)
6364  YYABORT;
6365 
6366 
6367  yydestruct ("Error: popping",
6369  YYPOPSTACK (1);
6370  yystate = *yyssp;
6372  }
6373 
6375  *++yyvsp = yylval;
6377 
6378 
6379  /* Shift the error token. */
6380  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
6381 
6382  yystate = yyn;
6383  goto yynewstate;
6384 
6385 
6386 /*-------------------------------------.
6387 | yyacceptlab -- YYACCEPT comes here. |
6388 `-------------------------------------*/
6389 yyacceptlab:
6390  yyresult = 0;
6391  goto yyreturnlab;
6392 
6393 
6394 /*-----------------------------------.
6395 | yyabortlab -- YYABORT comes here. |
6396 `-----------------------------------*/
6397 yyabortlab:
6398  yyresult = 1;
6399  goto yyreturnlab;
6400 
6401 
6402 /*-----------------------------------------------------------.
6403 | yyexhaustedlab -- YYNOMEM (memory exhaustion) comes here. |
6404 `-----------------------------------------------------------*/
6405 yyexhaustedlab:
6406  yyerror (parser, YY_("memory exhausted"));
6407  yyresult = 2;
6408  goto yyreturnlab;
6409 
6410 
6411 /*----------------------------------------------------------.
6412 | yyreturnlab -- parsing is finished, clean up and return. |
6413 `----------------------------------------------------------*/
6414 yyreturnlab:
6415  if (yychar != OCTAVE_EMPTY)
6416  {
6417  /* Make sure we have latest lookahead translation. See comments at
6418  user semantic actions for why this is necessary. */
6419  yytoken = YYTRANSLATE (yychar);
6420  yydestruct ("Cleanup: discarding lookahead",
6421  yytoken, &yylval, parser);
6422  }
6423  /* Do not reclaim the symbols of the rule whose action triggered
6424  this YYABORT or YYACCEPT. */
6425  YYPOPSTACK (yylen);
6427  while (yyssp != yyss)
6428  {
6429  yydestruct ("Cleanup: popping",
6431  YYPOPSTACK (1);
6432  }
6433  yyps->yynew = 2;
6434  goto yypushreturn;
6435 
6436 
6437 /*-------------------------.
6438 | yypushreturn -- return. |
6439 `-------------------------*/
6440 yypushreturn:
6441 
6442  return yyresult;
6443 }
6444 #undef octave_nerrs
6445 #undef yystate
6446 #undef yyerrstatus
6447 #undef yyssa
6448 #undef yyss
6449 #undef yyssp
6450 #undef yyvsa
6451 #undef yyvs
6452 #undef yyvsp
6453 #undef yystacksize
6454 #line 2386 "../libinterp/parse-tree/oct-parse.yy"
6455 
6456 
6457 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
6458  // Restore prevailing warning state for remainder of the file.
6459 # pragma GCC diagnostic pop
6460 #endif
6461 
6462 // Generic error messages.
6463 
6464 #undef lexer
6465 #undef scanner
6466 
6467 static void
6468 yyerror (octave::base_parser& parser, const char *s)
6469 {
6470  parser.bison_error (s);
6471 }
6472 
6474 
6475  class parse_exception : public std::runtime_error
6476  {
6477  public:
6478 
6479  parse_exception () = delete;
6480 
6481  parse_exception (const std::string& message,
6482  const std::string& fcn_name = "",
6483  const std::string& file_name = "",
6484  int line = -1, int column = -1)
6485  : runtime_error (message), m_message (message),
6486  m_fcn_name (fcn_name), m_file_name (file_name),
6487  m_line (line), m_column (column)
6488  { }
6489 
6490  OCTAVE_DEFAULT_COPY_MOVE_DELETE (parse_exception)
6491 
6492  std::string message () const { return m_message; }
6493 
6494  // Provided for std::exception interface.
6495  const char * what () const noexcept { return m_message.c_str (); }
6496 
6497  std::string fcn_name () const { return m_fcn_name; }
6498  std::string file_name () const { return m_file_name; }
6499 
6500  int line () const { return m_line; }
6501  int column () const { return m_column; }
6502 
6503  // virtual void display (std::ostream& os) const;
6504 
6505  private:
6506 
6507  std::string m_message;
6508 
6509  std::string m_fcn_name;
6510  std::string m_file_name;
6511  int m_line;
6512  int m_column;
6513  };
6514 
6515  class parse_tree_validator : public tree_walker
6516  {
6517  public:
6518 
6519  parse_tree_validator ()
6520  : m_scope (symbol_scope::anonymous ()), m_error_list ()
6521  { }
6522 
6523  OCTAVE_DISABLE_COPY_MOVE (parse_tree_validator)
6524 
6525  ~parse_tree_validator () = default;
6526 
6527  symbol_scope get_scope () const { return m_scope; }
6528 
6529  bool ok () const { return m_error_list.empty (); }
6530 
6531  std::list<parse_exception> error_list () const
6532  {
6533  return m_error_list;
6534  }
6535 
6537  {
6538  unwind_protect_var<symbol_scope> restore_var (m_scope, script.scope ());
6539 
6540  tree_statement_list *stmt_list = script.body ();
6541 
6542  if (stmt_list)
6543  stmt_list->accept (*this);
6544  }
6545 
6547  {
6548  unwind_protect_var<symbol_scope> restore_var (m_scope, fcn.scope ());
6549 
6550  tree_statement_list *stmt_list = fcn.body ();
6551 
6552  if (stmt_list)
6553  stmt_list->accept (*this);
6554 
6555  std::map<std::string, octave_value> subfcns = fcn.subfunctions ();
6556 
6557  if (! subfcns.empty ())
6558  {
6559  for (auto& nm_val : subfcns)
6560  {
6561  octave_user_function *subfcn
6562  = nm_val.second.user_function_value ();
6563 
6564  if (subfcn)
6565  subfcn->accept (*this);
6566  }
6567  }
6568  }
6569 
6571  {
6572  if (idx_expr.is_word_list_cmd ())
6573  {
6574  std::string sym_nm = idx_expr.name ();
6575 
6576  if (m_scope.is_variable (sym_nm))
6577  {
6578  std::string message
6579  = sym_nm + ": invalid use of symbol as both variable and command";
6580  parse_exception pe (message, m_scope.fcn_name (),
6581  m_scope.fcn_file_name (),
6582  idx_expr.line (), idx_expr.column ());
6583 
6584  m_error_list.push_back (pe);
6585  }
6586  }
6587  }
6588 
6589  private:
6590 
6591  symbol_scope m_scope;
6592 
6593  std::list<parse_exception> m_error_list;
6594  };
6595 
6596  template <typename LIST_T, typename ELT_T>
6597  static LIST_T *
6598  list_append (LIST_T *list, ELT_T elt)
6599  {
6600  list->append (elt);
6601  return list;
6602  }
6603 
6604  std::size_t
6605  base_parser::parent_scope_info::size () const
6606  {
6607  return m_info.size ();
6608  }
6609 
6610  void
6611  base_parser::parent_scope_info::push (const value_type& elt)
6612  {
6613  m_info.push_back (elt);
6614  }
6615 
6616  void
6617  base_parser::parent_scope_info::push (const symbol_scope& scope)
6618  {
6619  push (value_type (scope, ""));
6620  }
6621 
6622  void
6623  base_parser::parent_scope_info::pop ()
6624  {
6625  m_info.pop_back ();
6626  }
6627 
6628  bool
6629  base_parser::parent_scope_info::name_ok (const std::string& name)
6630  {
6631  // Name can't be the same as any parent function or any other
6632  // function we've already seen. We could maintain a complex
6633  // tree structure of names, or we can just store the set of
6634  // full names of all the functions, which must be unique.
6635 
6636  std::string full_name;
6637 
6638  for (std::size_t i = 0; i < size()-1; i++)
6639  {
6640  const value_type& elt = m_info[i];
6641 
6642  if (name == elt.second)
6643  return false;
6644 
6645  full_name += elt.second + ">";
6646  }
6647 
6648  full_name += name;
6649 
6650  if (m_all_names.find (full_name) != m_all_names.end ())
6651  {
6652  // Return false (failure) if we are parsing a subfunction, local
6653  // function, or nested function. Otherwise, it is OK to have a
6654  // duplicate name.
6655 
6656  return ! (m_parser.parsing_subfunctions ()
6657  || m_parser.parsing_local_functions ()
6658  || m_parser.curr_fcn_depth () > 0);
6659  }
6660 
6661  m_all_names.insert (full_name);
6662 
6663  return true;
6664  }
6665 
6666  bool
6667  base_parser::parent_scope_info::name_current_scope (const std::string& name)
6668  {
6669  if (! name_ok (name))
6670  return false;
6671 
6672  if (size () > 0)
6673  m_info.back().second = name;
6674 
6675  return true;
6676  }
6677 
6678  symbol_scope
6679  base_parser::parent_scope_info::parent_scope () const
6680  {
6681  return size () > 1 ? m_info[size()-2].first : symbol_scope::invalid ();
6682  }
6683 
6684  std::string
6685  base_parser::parent_scope_info::parent_name () const
6686  {
6687  return m_info[size()-2].second;
6688  }
6689 
6690  void base_parser::parent_scope_info::clear ()
6691  {
6692  m_info.clear ();
6693  m_all_names.clear ();
6694  }
6695 
6697  : m_endfunction_found (false), m_autoloading (false),
6698  m_fcn_file_from_relative_lookup (false),
6699  m_parsing_subfunctions (false), m_parsing_local_functions (false),
6700  m_max_fcn_depth (-1), m_curr_fcn_depth (-1),
6701  m_primary_fcn_scope (symbol_scope::invalid ()),
6702  m_curr_class_name (), m_curr_package_name (), m_function_scopes (*this),
6703  m_primary_fcn (), m_subfunction_names (), m_classdef_object (),
6704  m_stmt_list (), m_lexer (lxr), m_parser_state (yypstate_new ())
6705  { }
6706 
6708  {
6709  delete &m_lexer;
6710 
6711  // FIXME: Deleting the internal Bison parser state structure does
6712  // not clean up any partial parse trees in the event of an interrupt or
6713  // error. It's not clear how to safely do that with the C language
6714  // parser that Bison generates. The C++ language parser that Bison
6715  // generates would do it for us automatically whenever an exception
6716  // is thrown while parsing input, but there is currently no C++
6717  // interface for a push parser.
6718 
6719  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6720  }
6721 
6722  void
6724  {
6725  m_endfunction_found = false;
6726  m_autoloading = false;
6728  m_parsing_subfunctions = false;
6729  m_parsing_local_functions = false;
6730  m_max_fcn_depth = -1;
6731  m_curr_fcn_depth = -1;
6733  m_curr_class_name = "";
6734  m_curr_package_name = "";
6735  m_function_scopes.clear ();
6737  m_subfunction_names.clear ();
6738  m_classdef_object.reset ();
6739  m_stmt_list.reset ();
6740 
6741  m_lexer.reset ();
6742 
6743  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6745  }
6746 
6747  // Error messages for mismatched end tokens.
6748 
6749  static std::string
6750  end_token_as_string (token::end_tok_type ettype)
6751  {
6752  std::string retval = "<unknown>";
6753 
6754  switch (ettype)
6755  {
6756  case token::simple_end:
6757  retval = "end";
6758  break;
6759 
6760  case token::classdef_end:
6761  retval = "endclassdef";
6762  break;
6763 
6765  retval = "endenumeration";
6766  break;
6767 
6768  case token::events_end:
6769  retval = "endevents";
6770  break;
6771 
6772  case token::for_end:
6773  retval = "endfor";
6774  break;
6775 
6776  case token::function_end:
6777  retval = "endfunction";
6778  break;
6779 
6780  case token::if_end:
6781  retval = "endif";
6782  break;
6783 
6784  case token::methods_end:
6785  retval = "endmethods";
6786  break;
6787 
6788  case token::parfor_end:
6789  retval = "endparfor";
6790  break;
6791 
6792  case token::properties_end:
6793  retval = "endproperties";
6794  break;
6795 
6796  case token::spmd_end:
6797  retval = "endspmd";
6798  break;
6799 
6800  case token::switch_end:
6801  retval = "endswitch";
6802  break;
6803 
6804  case token::try_catch_end:
6805  retval = "end_try_catch";
6806  break;
6807 
6809  retval = "end_unwind_protect";
6810  break;
6811 
6812  case token::while_end:
6813  retval = "endwhile";
6814  break;
6815 
6816  default:
6817  panic_impossible ();
6818  break;
6819  }
6820 
6821  return retval;
6822  }
6823 
6824  void
6825  base_parser::statement_list (std::shared_ptr<tree_statement_list>& lst)
6826  {
6827  if (! lst)
6828  return;
6829 
6830  if (m_stmt_list)
6831  {
6832  // Append additional code to existing statement list.
6833 
6834  while (! lst->empty ())
6835  {
6836  m_stmt_list->push_back (lst->front ());
6837  lst->pop_front ();
6838  }
6839  }
6840  else
6841  m_stmt_list = lst;
6842  }
6843 
6844  void
6846  {
6847  std::string msg = ("'" + end_token_as_string (expected)
6848  + "' command matched by '"
6849  + end_token_as_string (tok->ettype ()) + "'");
6850 
6851  bison_error (msg, tok->beg_pos ());
6852  }
6853 
6854  // Check to see that end tokens are properly matched.
6855 
6856  bool
6858  {
6859  token::end_tok_type ettype = tok->ettype ();
6860 
6861  return ettype == expected || ettype == token::simple_end;
6862  }
6863 
6864  bool
6866  {
6867  m_curr_fcn_depth++;
6868 
6871 
6872  // Will get a real name later.
6873  m_lexer.m_symtab_context.push (symbol_scope ("parser:push_fcn_symtab"));
6875 
6878  {
6881  }
6882 
6884  {
6885  bison_error ("nested functions not implemented in this context");
6886 
6887  return false;
6888  }
6889 
6890  return true;
6891  }
6892 
6893  // Make a constant.
6894 
6895  tree_constant *
6897  {
6898  int l = tok_val->line ();
6899  int c = tok_val->column ();
6900 
6901  int op = tok_val->token_value ();
6902 
6903  tree_constant *retval = nullptr;
6904 
6905  switch (op)
6906  {
6907  case ':':
6908  {
6910  retval = new tree_constant (tmp);
6911  }
6912  break;
6913 
6914  case NUMBER:
6915  {
6916  retval = new tree_constant (tok_val->number (), l, c);
6917  retval->stash_original_text (tok_val->text_rep ());
6918  }
6919  break;
6920 
6921  case DQ_STRING:
6922  case SQ_STRING:
6923  {
6924  std::string txt = tok_val->text ();
6925 
6926  char delim = op == DQ_STRING ? '"' : '\'';
6927  octave_value tmp (txt, delim);
6928 
6929  if (txt.empty ())
6930  {
6931  if (op == DQ_STRING)
6933  else
6935  }
6936 
6937  retval = new tree_constant (tmp, l, c);
6938 
6939  if (op == DQ_STRING)
6940  txt = undo_string_escapes (txt);
6941 
6942  // FIXME: maybe this should also be handled by
6943  // tok_val->text_rep () for character strings?
6944  retval->stash_original_text (delim + txt + delim);
6945  }
6946  break;
6947 
6948  default:
6949  panic_impossible ();
6950  break;
6951  }
6952 
6953  return retval;
6954  }
6955 
6956  tree_black_hole *
6958  {
6959  return new tree_black_hole ();
6960  }
6961 
6962  // Make a function handle.
6963 
6964  tree_fcn_handle *
6966  {
6967  int l = tok_val->line ();
6968  int c = tok_val->column ();
6969 
6970  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
6971 
6972  return retval;
6973  }
6974 
6975  // Make an anonymous function handle.
6976 
6979  tree_expression *expr,
6980  const filepos& at_pos)
6981  {
6982  // FIXME: We need to examine EXPR and issue an error if any
6983  // sub-expression contains an assignment, compound assignment,
6984  // increment, or decrement operator.
6985 
6986  anon_fcn_validator validator (param_list, expr);
6987 
6988  if (! validator.ok ())
6989  {
6990  delete param_list;
6991  delete expr;
6992 
6993  bison_error (validator.message (), validator.line (),
6994  validator.column ());
6995 
6996  return nullptr;
6997  }
6998 
7001 
7003 
7004  expr->set_print_flag (false);
7005 
7006  fcn_scope.mark_static ();
7007 
7008  int at_line = at_pos.line ();
7009  int at_column = at_pos.column ();
7010 
7011  tree_anon_fcn_handle *retval
7012  = new tree_anon_fcn_handle (param_list, expr, fcn_scope,
7013  parent_scope, at_line, at_column);
7014 
7015  std::ostringstream buf;
7016 
7017  tree_print_code tpc (buf);
7018 
7019  retval->accept (tpc);
7020 
7021  std::string file = m_lexer.m_fcn_file_full_name;
7022  if (! file.empty ())
7023  buf << ": file: " << file;
7024  else if (m_lexer.input_from_terminal ())
7025  buf << ": *terminal input*";
7026  else if (m_lexer.input_from_eval_string ())
7027  buf << ": *eval string*";
7028  buf << ": line: " << at_line << " column: " << at_column;
7029 
7030  std::string scope_name = buf.str ();
7031 
7032  fcn_scope.cache_name (scope_name);
7033 
7034  // FIXME: Stash the filename. This does not work and produces
7035  // errors when executed.
7036  //retval->stash_file_name (m_lexer.m_fcn_file_name);
7037 
7038  return retval;
7039  }
7040 
7041  // Build a colon expression.
7042 
7043  tree_expression *
7045  tree_expression *limit,
7046  tree_expression *incr)
7047  {
7048  tree_expression *retval = nullptr;
7049 
7050  if (! base || ! limit)
7051  {
7052  delete base;
7053  delete limit;
7054  delete incr;
7055 
7056  return retval;
7057  }
7058 
7059  int l = base->line ();
7060  int c = base->column ();
7061 
7062  tree_colon_expression *expr
7063  = new tree_colon_expression (base, limit, incr, l, c);
7064 
7065  retval = expr;
7066 
7067  if (base->is_constant () && limit->is_constant ()
7068  && (! incr || incr->is_constant ()))
7069  {
7070  interpreter& interp = m_lexer.m_interpreter;
7071 
7072  try
7073  {
7074  // If the evaluation generates a warning message, restore
7075  // the previous value of last_warning_message and skip the
7076  // conversion to a constant value.
7077 
7078  error_system& es = interp.get_error_system ();
7079 
7080  unwind_action restore_last_warning_message
7082  es.last_warning_message (""));
7083 
7084  unwind_action restore_discard_warning_messages
7086  es.discard_warning_messages (true));
7087 
7088  tree_evaluator& tw = interp.get_evaluator ();
7089 
7090  octave_value tmp = expr->evaluate (tw);
7091 
7092  std::string msg = es.last_warning_message ();
7093 
7094  if (msg.empty ())
7095  {
7096  tree_constant *tc_retval
7097  = new tree_constant (tmp, expr->line (), expr->column ());
7098 
7099  std::ostringstream buf;
7100 
7101  tree_print_code tpc (buf);
7102 
7103  expr->accept (tpc);
7104 
7105  tc_retval->stash_original_text (buf.str ());
7106 
7107  delete expr;
7108 
7109  retval = tc_retval;
7110  }
7111  }
7112  catch (const execution_exception&)
7113  {
7114  interp.recover_from_exception ();
7115  }
7116  }
7117 
7118  return retval;
7119  }
7120 
7121  // Build a binary expression.
7122 
7123  tree_expression *
7125  token *tok_val, tree_expression *op2)
7126  {
7128 
7129  switch (op)
7130  {
7131  case POW:
7133  break;
7134 
7135  case EPOW:
7137  break;
7138 
7139  case '+':
7141  break;
7142 
7143  case '-':
7145  break;
7146 
7147  case '*':
7149  break;
7150 
7151  case '/':
7153  break;
7154 
7155  case EMUL:
7157  break;
7158 
7159  case EDIV:
7161  break;
7162 
7163  case LEFTDIV:
7165  break;
7166 
7167  case ELEFTDIV:
7169  break;
7170 
7171  case EXPR_LT:
7172  t = octave_value::op_lt;
7173  break;
7174 
7175  case EXPR_LE:
7176  t = octave_value::op_le;
7177  break;
7178 
7179  case EXPR_EQ:
7180  t = octave_value::op_eq;
7181  break;
7182 
7183  case EXPR_GE:
7184  t = octave_value::op_ge;
7185  break;
7186 
7187  case EXPR_GT:
7188  t = octave_value::op_gt;
7189  break;
7190 
7191  case EXPR_NE:
7192  t = octave_value::op_ne;
7193  break;
7194 
7195  case EXPR_AND:
7197  break;
7198 
7199  case EXPR_OR:
7201  break;
7202 
7203  default:
7204  panic_impossible ();
7205  break;
7206  }
7207 
7208  int l = tok_val->line ();
7209  int c = tok_val->column ();
7210 
7211  return maybe_compound_binary_expression (op1, op2, l, c, t);
7212  }
7213 
7214  void
7216  {
7217  if (expr->is_binary_expression ())
7218  {
7219  tree_binary_expression *binexp
7220  = dynamic_cast<tree_binary_expression *> (expr);
7221 
7222  tree_expression *lhs = binexp->lhs ();
7223  tree_expression *rhs = binexp->rhs ();
7224 
7227 
7228  // Operands may have changed.
7229  binexp->lhs (lhs);
7230  binexp->rhs (rhs);
7231 
7232  octave_value::binary_op op_type = binexp->op_type ();
7233  if (op_type == octave_value::op_el_and
7234  || op_type == octave_value::op_el_or)
7235  {
7236  binexp->preserve_operands ();
7237 
7238  int line = expr->line ();
7239  int column = expr->column ();
7240 
7241  delete expr;
7242 
7244  (lhs, rhs, line, column, op_type);
7245  }
7246  }
7247  }
7248 
7249  // Build a boolean expression.
7250 
7251  tree_expression *
7253  token *tok_val, tree_expression *op2)
7254  {
7256 
7257  switch (op)
7258  {
7259  case EXPR_AND_AND:
7261  break;
7262 
7263  case EXPR_OR_OR:
7265  break;
7266 
7267  default:
7268  panic_impossible ();
7269  break;
7270  }
7271 
7272  int l = tok_val->line ();
7273  int c = tok_val->column ();
7274 
7275  return new tree_boolean_expression (op1, op2, l, c, t);
7276  }
7277 
7278  // Build a prefix expression.
7279 
7280  tree_expression *
7282  {
7284 
7285  switch (op)
7286  {
7287  case '~':
7288  case '!':
7290  break;
7291 
7292  case '+':
7294  break;
7295 
7296  case '-':
7298  break;
7299 
7300  case PLUS_PLUS:
7302  break;
7303 
7304  case MINUS_MINUS:
7306  break;
7307 
7308  default:
7309  panic_impossible ();
7310  break;
7311  }
7312 
7313  int l = tok_val->line ();
7314  int c = tok_val->column ();
7315 
7316  return new tree_prefix_expression (op1, l, c, t);
7317  }
7318 
7319  // Build a postfix expression.
7320 
7321  tree_expression *
7323  {
7325 
7326  switch (op)
7327  {
7328  case HERMITIAN:
7330  break;
7331 
7332  case TRANSPOSE:
7334  break;
7335 
7336  case PLUS_PLUS:
7338  break;
7339 
7340  case MINUS_MINUS:
7342  break;
7343 
7344  default:
7345  panic_impossible ();
7346  break;
7347  }
7348 
7349  int l = tok_val->line ();
7350  int c = tok_val->column ();
7351 
7352  return new tree_postfix_expression (op1, l, c, t);
7353  }
7354 
7355  // Build an unwind-protect command.
7356 
7357  tree_command *
7359  tree_statement_list *body,
7360  tree_statement_list *cleanup_stmts,
7361  token *end_tok,
7362  comment_list *lc,
7363  comment_list *mc)
7364  {
7365  tree_command *retval = nullptr;
7366 
7367  if (end_token_ok (end_tok, token::unwind_protect_end))
7368  {
7370 
7371  int l = unwind_tok->line ();
7372  int c = unwind_tok->column ();
7373 
7374  retval = new tree_unwind_protect_command (body, cleanup_stmts,
7375  lc, mc, tc, l, c);
7376  }
7377  else
7378  {
7379  delete body;
7380  delete cleanup_stmts;
7381 
7383  }
7384 
7385  return retval;
7386  }
7387 
7388  // Build a try-catch command.
7389 
7390  tree_command *
7392  tree_statement_list *body,
7393  char catch_sep,
7394  tree_statement_list *cleanup_stmts,
7395  token *end_tok,
7396  comment_list *lc,
7397  comment_list *mc)
7398  {
7399  tree_command *retval = nullptr;
7400 
7401  if (end_token_ok (end_tok, token::try_catch_end))
7402  {
7404 
7405  int l = try_tok->line ();
7406  int c = try_tok->column ();
7407 
7408  tree_identifier *id = nullptr;
7409 
7410  if (! catch_sep && cleanup_stmts && ! cleanup_stmts->empty ())
7411  {
7412  tree_statement *stmt = cleanup_stmts->front ();
7413 
7414  if (stmt)
7415  {
7416  tree_expression *expr = stmt->expression ();
7417 
7418  if (expr && expr->is_identifier ())
7419  {
7420  id = dynamic_cast<tree_identifier *> (expr);
7421 
7422  cleanup_stmts->pop_front ();
7423 
7424  stmt->set_expression (nullptr);
7425  delete stmt;
7426  }
7427  }
7428  }
7429 
7430  retval = new tree_try_catch_command (body, cleanup_stmts, id,
7431  lc, mc, tc, l, c);
7432  }
7433  else
7434  {
7435  delete body;
7436  delete cleanup_stmts;
7437 
7439  }
7440 
7441  return retval;
7442  }
7443 
7444  // Build a while command.
7445 
7446  tree_command *
7448  tree_expression *expr,
7449  tree_statement_list *body,
7450  token *end_tok,
7451  comment_list *lc)
7452  {
7453  tree_command *retval = nullptr;
7454 
7455  maybe_warn_assign_as_truth_value (expr);
7456 
7457  if (end_token_ok (end_tok, token::while_end))
7458  {
7460 
7461  m_lexer.m_looping--;
7462 
7463  int l = while_tok->line ();
7464  int c = while_tok->column ();
7465 
7466  retval = new tree_while_command (expr, body, lc, tc, l, c);
7467  }
7468  else
7469  {
7470  delete expr;
7471  delete body;
7472 
7473  end_token_error (end_tok, token::while_end);
7474  }
7475 
7476  return retval;
7477  }
7478 
7479  // Build a do-until command.
7480 
7481  tree_command *
7483  tree_statement_list *body,
7484  tree_expression *expr,
7485  comment_list *lc)
7486  {
7487  maybe_warn_assign_as_truth_value (expr);
7488 
7490 
7491  m_lexer.m_looping--;
7492 
7493  int l = until_tok->line ();
7494  int c = until_tok->column ();
7495 
7496  return new tree_do_until_command (expr, body, lc, tc, l, c);
7497  }
7498 
7499  // Build a for command.
7500 
7501  tree_command *
7502  base_parser::make_for_command (int tok_id, token *for_tok,
7503  tree_argument_list *lhs,
7504  tree_expression *expr,
7505  tree_expression *maxproc,
7506  tree_statement_list *body,
7507  token *end_tok,
7508  comment_list *lc)
7509  {
7510  tree_command *retval = nullptr;
7511 
7512  bool parfor = tok_id == PARFOR;
7513 
7514  if (end_token_ok (end_tok, parfor ? token::parfor_end : token::for_end))
7515  {
7516  expr->mark_as_for_cmd_expr ();
7517 
7519 
7520  m_lexer.m_looping--;
7521 
7522  int l = for_tok->line ();
7523  int c = for_tok->column ();
7524 
7525  if (lhs->length () == 1)
7526  {
7527  tree_expression *tmp = lhs->remove_front ();
7528 
7529  m_lexer.mark_as_variable (tmp->name ());
7530 
7531  retval = new tree_simple_for_command (parfor, tmp, expr, maxproc,
7532  body, lc, tc, l, c);
7533 
7534  delete lhs;
7535  }
7536  else if (parfor)
7537  {
7538  delete lhs;
7539  delete expr;
7540  delete maxproc;
7541  delete body;
7542 
7543  bison_error ("invalid syntax for parfor statement");
7544  }
7545  else
7546  {
7548 
7549  retval = new tree_complex_for_command (lhs, expr, body,
7550  lc, tc, l, c);
7551  }
7552  }
7553  else
7554  {
7555  delete lhs;
7556  delete expr;
7557  delete maxproc;
7558  delete body;
7559 
7560  end_token_error (end_tok, parfor ? token::parfor_end : token::for_end);
7561  }
7562 
7563  return retval;
7564  }
7565 
7566  // Build a break command.
7567 
7568  tree_command *
7570  {
7571  int l = break_tok->line ();
7572  int c = break_tok->column ();
7573 
7574  if (! m_lexer.m_looping)
7575  {
7576  bison_error ("break must appear within a loop");
7577  return nullptr;
7578  }
7579  else
7580  return new tree_break_command (l, c);
7581  }
7582 
7583  // Build a continue command.
7584 
7585  tree_command *
7587  {
7588  int l = continue_tok->line ();
7589  int c = continue_tok->column ();
7590 
7591  if (! m_lexer.m_looping)
7592  {
7593  bison_error ("continue must appear within a loop");
7594  return nullptr;
7595  }
7596  else
7597  return new tree_continue_command (l, c);
7598  }
7599 
7600  // Build a return command.
7601 
7602  tree_command *
7604  {
7605  int l = return_tok->line ();
7606  int c = return_tok->column ();
7607 
7608  return new tree_return_command (l, c);
7609  }
7610 
7611  // Build an spmd command.
7612 
7615  token *end_tok, comment_list *lc,
7616  comment_list *tc)
7617  {
7618  tree_spmd_command *retval = nullptr;
7619 
7620  if (end_token_ok (end_tok, token::spmd_end))
7621  {
7622  int l = spmd_tok->line ();
7623  int c = spmd_tok->column ();
7624 
7625  retval = new tree_spmd_command (body, lc, tc, l, c);
7626  }
7627  else
7628  {
7629  delete body;
7630  delete lc;
7631  delete tc;
7632 
7633  end_token_error (end_tok, token::spmd_end);
7634  }
7635 
7636  return retval;
7637  }
7638 
7639  // Start an if command.
7640 
7643  tree_statement_list *list)
7644  {
7645  maybe_warn_assign_as_truth_value (expr);
7646 
7647  // Line and column will be set in finish_if_command.
7648 
7649  tree_if_clause *t = new tree_if_clause (expr, list);
7650 
7651  return new tree_if_command_list (t);
7652  }
7653 
7654  // Finish an if command.
7655 
7656  tree_if_command *
7658  tree_if_command_list *list,
7659  token *end_tok,
7660  comment_list *lc)
7661  {
7662  tree_if_command *retval = nullptr;
7663 
7664  if (end_token_ok (end_tok, token::if_end))
7665  {
7667 
7668  int l = if_tok->line ();
7669  int c = if_tok->column ();
7670 
7671  if (list && ! list->empty ())
7672  {
7673  tree_if_clause *elt = list->front ();
7674 
7675  if (elt)
7676  {
7677  elt->line (l);
7678  elt->column (c);
7679  }
7680  }
7681 
7682  retval = new tree_if_command (list, lc, tc, l, c);
7683  }
7684  else
7685  {
7686  delete list;
7687 
7688  end_token_error (end_tok, token::if_end);
7689  }
7690 
7691  return retval;
7692  }
7693 
7694  // Build an elseif clause.
7695 
7696  tree_if_clause *
7698  tree_expression *expr,
7699  tree_statement_list *list,
7700  comment_list *lc)
7701  {
7702  maybe_warn_assign_as_truth_value (expr);
7703 
7704  int l = elseif_tok->line ();
7705  int c = elseif_tok->column ();
7706 
7707  return new tree_if_clause (expr, list, lc, l, c);
7708  }
7709 
7710  tree_if_clause *
7712  tree_statement_list *list)
7713  {
7714  int l = else_tok->line ();
7715  int c = else_tok->column ();
7716 
7717  return new tree_if_clause (list, lc, l, c);
7718  }
7719 
7722  tree_if_clause *clause)
7723  {
7724  return list_append (list, clause);
7725  }
7726 
7727  // Finish a switch command.
7728 
7731  tree_expression *expr,
7732  tree_switch_case_list *list,
7733  token *end_tok,
7734  comment_list *lc)
7735  {
7736  tree_switch_command *retval = nullptr;
7737 
7738  if (end_token_ok (end_tok, token::switch_end))
7739  {
7741 
7742  int l = switch_tok->line ();
7743  int c = switch_tok->column ();
7744 
7745  if (list && ! list->empty ())
7746  {
7747  tree_switch_case *elt = list->front ();
7748 
7749  if (elt)
7750  {
7751  elt->line (l);
7752  elt->column (c);
7753  }
7754  }
7755 
7756  retval = new tree_switch_command (expr, list, lc, tc, l, c);
7757  }
7758  else
7759  {
7760  delete expr;
7761  delete list;
7762 
7764  }
7765 
7766  return retval;
7767  }
7768 
7771  {
7772  return new tree_switch_case_list (switch_case);
7773  }
7774 
7775  // Build a switch case.
7776 
7779  tree_expression *expr,
7780  tree_statement_list *list,
7781  comment_list *lc)
7782  {
7783  maybe_warn_variable_switch_label (expr);
7784 
7785  int l = case_tok->line ();
7786  int c = case_tok->column ();
7787 
7788  return new tree_switch_case (expr, list, lc, l, c);
7789  }
7790 
7793  tree_statement_list *list)
7794  {
7795  int l = default_tok->line ();
7796  int c = default_tok->column ();
7797 
7798  return new tree_switch_case (list, lc, l, c);
7799  }
7800 
7803  tree_switch_case *elt)
7804  {
7805  return list_append (list, elt);
7806  }
7807 
7808  // Build an assignment to a variable.
7809 
7810  tree_expression *
7812  token *eq_tok, tree_expression *rhs)
7813  {
7815 
7816  switch (op)
7817  {
7818  case '=':
7820  break;
7821 
7822  case ADD_EQ:
7824  break;
7825 
7826  case SUB_EQ:
7828  break;
7829 
7830  case MUL_EQ:
7832  break;
7833 
7834  case DIV_EQ:
7836  break;
7837 
7838  case LEFTDIV_EQ:
7840  break;
7841 
7842  case POW_EQ:
7844  break;
7845 
7846  case EMUL_EQ:
7848  break;
7849 
7850  case EDIV_EQ:
7852  break;
7853 
7854  case ELEFTDIV_EQ:
7856  break;
7857 
7858  case EPOW_EQ:
7860  break;
7861 
7862  case AND_EQ:
7864  break;
7865 
7866  case OR_EQ:
7868  break;
7869 
7870  default:
7871  panic_impossible ();
7872  break;
7873  }
7874 
7875  int l = eq_tok->line ();
7876  int c = eq_tok->column ();
7877 
7878  if (! lhs->is_simple_assign_lhs () && t != octave_value::op_asn_eq)
7879  {
7880  // Multiple assignments like [x,y] OP= rhs are only valid for
7881  // '=', not '+=', etc.
7882 
7883  delete lhs;
7884  delete rhs;
7885 
7886  bison_error ("computed multiple assignment not allowed",
7887  eq_tok->beg_pos ());
7888 
7889  return nullptr;
7890  }
7891 
7892  if (lhs->is_simple_assign_lhs ())
7893  {
7894  // We are looking at a simple assignment statement like x = rhs;
7895 
7896  tree_expression *tmp = lhs->remove_front ();
7897 
7898  if ((tmp->is_identifier () || tmp->is_index_expression ())
7899  && iskeyword (tmp->name ()))
7900  {
7901  std::string kw = tmp->name ();
7902 
7903  delete tmp;
7904  delete lhs;
7905  delete rhs;
7906 
7907  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7908  eq_tok->beg_pos ());
7909 
7910  return nullptr;
7911  }
7912 
7913  delete lhs;
7914 
7915  m_lexer.mark_as_variable (tmp->name ());
7916 
7917  return new tree_simple_assignment (tmp, rhs, false, l, c, t);
7918  }
7919  else
7920  {
7921  std::list<std::string> names = lhs->variable_names ();
7922 
7923  for (const auto& kw : names)
7924  {
7925  if (iskeyword (kw))
7926  {
7927  delete lhs;
7928  delete rhs;
7929 
7930  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7931  eq_tok->beg_pos ());
7932 
7933  return nullptr;
7934  }
7935  }
7936 
7937  m_lexer.mark_as_variables (names);
7938 
7939  return new tree_multi_assignment (lhs, rhs, false, l, c);
7940  }
7941  }
7942 
7943  void
7945  tree_statement *end_script)
7946  {
7947  // Any comments at the beginning of a script file should be
7948  // attached to the first statement in the file or the END_SCRIPT
7949  // statement created by the parser.
7950 
7951  if (! cmds)
7952  cmds = new tree_statement_list ();
7953 
7954  cmds->append (end_script);
7955 
7956  symbol_scope script_scope = m_lexer.m_symtab_context.curr_scope ();
7957 
7958  script_scope.cache_name (m_lexer.m_fcn_file_full_name);
7960  script_scope.cache_dir_name (m_lexer.m_dir_name);
7961 
7962  // First non-copyright comment in classdef body, before first
7963  // properties, methods, etc. block.
7964 
7965  tree_statement *first_stmt = cmds->front ();
7966  comment_list *leading_comments = first_stmt->comment_text ();
7967 
7968  std::string doc_string;
7969  if (leading_comments)
7970  doc_string = leading_comments->find_doc_string ();
7971 
7972  octave_user_script *script
7974  m_lexer.m_fcn_file_name, script_scope,
7975  cmds, doc_string);
7976 
7978 
7979  sys::time now;
7980 
7981  script->stash_fcn_file_time (now);
7982  script->stash_dir_name (m_lexer.m_dir_name);
7983 
7984  m_primary_fcn = octave_value (script);
7985  }
7986 
7987  tree_identifier *
7989  {
7990  std::string id_name = id->name ();
7991 
7992  // Make classdef local functions unique from classdef methods.
7993 
7995  id_name = m_lexer.m_fcn_file_name + ">" + id_name;
7996 
7997  if (! m_function_scopes.name_current_scope (id_name))
7998  {
7999  bison_error ("duplicate subfunction or nested function name",
8000  id->line (), id->column ());
8001 
8002  delete id;
8003  return nullptr;
8004  }
8005 
8007  curr_scope.cache_name (id_name);
8008 
8009  m_lexer.m_parsed_function_name.top () = true;
8011 
8012  return id;
8013  }
8014 
8015  // Define a function.
8016 
8017  // FIXME: combining start_function, finish_function, and
8018  // recover_from_parsing_function should be possible, but it makes
8019  // for a large mess. Maybe this could be a bit better organized?
8020 
8023  tree_parameter_list *ret_list,
8024  tree_identifier *id,
8025  tree_parameter_list *param_list,
8026  tree_statement_list *body,
8027  tree_statement *end_fcn_stmt,
8028  comment_list *lc, comment_list *bc)
8029  {
8030  // First non-copyright comments found above and below function keyword.
8031  comment_elt leading_doc_comment;
8032  comment_elt body_doc_comment;
8033 
8034  if (lc)
8035  leading_doc_comment = lc->find_doc_comment ();
8036 
8037  if (bc)
8038  body_doc_comment = bc->find_doc_comment ();
8039 
8040  // Choose which comment to use for doc string.
8041 
8042  // For ordinary functions, use the first comment that isn't empty.
8043 
8044  // If we are looking at a classdef method and there is a comment
8045  // prior to the function keyword and another after, then
8046  //
8047  // * Choose the one outside the function definition if either of
8048  // the comments use hash '#' characters. This is the preferred
8049  // Octave style.
8050  //
8051  // * Choose the one inside the function definition if both
8052  // comments use percent '%' characters. This is
8053  // Matlab-compatible behavior.
8054 
8055  // FIXME: maybe choose which comment to used by checking whether
8056  // any language extensions are noticed in the entire source file,
8057  // not just in the comments that are candidates to become the
8058  // function doc string.
8059 
8060  std::string doc_string;
8061 
8062  if (leading_doc_comment.empty ()
8063  || (m_lexer.m_parsing_classdef && ! body_doc_comment.empty ()
8064  && (! (leading_doc_comment.uses_hash_char () || body_doc_comment.uses_hash_char ()))))
8065  doc_string = body_doc_comment.text ();
8066  else
8067  doc_string = leading_doc_comment.text ();
8068 
8069  int l = fcn_tok->line ();
8070  int c = fcn_tok->column ();
8071 
8072  octave_user_function *tmp_fcn
8073  = start_function (id, param_list, body, end_fcn_stmt, doc_string);
8074 
8075  tree_function_def *retval = finish_function (ret_list, tmp_fcn, lc, l, c);
8076 
8078 
8079  return retval;
8080  }
8081 
8082  // Begin defining a function.
8083 
8086  tree_parameter_list *param_list,
8087  tree_statement_list *body,
8088  tree_statement *end_fcn_stmt,
8089  const std::string& doc_string)
8090  {
8091  // We'll fill in the return list later.
8092 
8093  std::string id_name = id->name ();
8094 
8095  delete id;
8096 
8098  id_name.insert (0, "get.");
8100  id_name.insert (0, "set.");
8101 
8104 
8105  if (! body)
8106  body = new tree_statement_list ();
8107 
8108  body->append (end_fcn_stmt);
8109 
8112  param_list, nullptr, body);
8113 
8115 
8116  fcn->stash_trailing_comment (tc);
8117  fcn->stash_fcn_end_location (end_fcn_stmt->line (),
8118  end_fcn_stmt->column ());
8119 
8120  // If input is coming from a file, issue a warning if the name of
8121  // the file does not match the name of the function stated in the
8122  // file. Matlab doesn't provide a diagnostic (it ignores the stated
8123  // name).
8126  {
8127  // FIXME: should m_lexer.m_fcn_file_name already be
8128  // preprocessed when we get here? It seems to only be a
8129  // problem with relative filenames.
8130 
8131  std::string nm = m_lexer.m_fcn_file_name;
8132 
8133  std::size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
8134 
8135  if (pos != std::string::npos)
8136  nm = m_lexer.m_fcn_file_name.substr (pos+1);
8137 
8138  if (nm != id_name)
8139  {
8141  ("Octave:function-name-clash",
8142  "function name '%s' does not agree with function filename '%s'",
8143  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
8144 
8145  id_name = nm;
8146  }
8147  }
8148 
8149  sys::time now;
8150 
8152  fcn->stash_fcn_file_time (now);
8155  fcn->mark_as_system_fcn_file ();
8156  fcn->stash_function_name (id_name);
8157 
8159  {
8161  fcn->mark_relative ();
8162 
8164  {
8166  {
8167  if (m_curr_class_name == id_name)
8169  else
8170  fcn->mark_as_classdef_method ();
8171  }
8172  else
8173  {
8174  if (m_curr_class_name == id_name)
8176  else
8177  fcn->mark_as_legacy_method ();
8178  }
8179 
8181  }
8182 
8183  std::string nm = fcn->fcn_file_name ();
8184 
8185  sys::file_stat fs (nm);
8186 
8187  if (fs && fs.is_newer (now))
8188  warning_with_id ("Octave:future-time-stamp",
8189  "time stamp for '%s' is in the future", nm.c_str ());
8190  }
8191  else if (! m_lexer.input_from_tmp_history_file ()
8192  && ! m_lexer.m_force_script
8194  && m_lexer.m_fcn_file_name == id_name)
8195  {
8196  warning ("function '%s' defined within script file '%s'",
8197  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
8198  }
8199 
8200  // Record doc string for functions other than nested functions.
8201  // We cannot currently record help for nested functions (bug #46008)
8202  // because the doc_string of the outermost function is read first,
8203  // whereas this function is called for the innermost function first.
8204  // We could have a stack of doc_string objects in lexer.
8205  if (! doc_string.empty () && m_curr_fcn_depth == 0)
8206  fcn->document (doc_string);
8207 
8208 
8211  m_primary_fcn = octave_value (fcn);
8212 
8213  return fcn;
8214  }
8215 
8216  tree_statement *
8217  base_parser::make_end (const std::string& type, bool eof,
8218  const filepos& beg_pos, const filepos& /*end_pos*/)
8219  {
8220  int l = beg_pos.line ();
8221  int c = beg_pos.column ();
8222 
8223  return make_statement (new tree_no_op_command (type, eof, l, c));
8224  }
8225 
8228  octave_user_function *fcn,
8229  comment_list *lc,
8230  int l, int c)
8231  {
8232  tree_function_def *retval = nullptr;
8233 
8234  if (! ret_list)
8236 
8237  ret_list->mark_as_formal_parameters ();
8238 
8239  if (fcn)
8240  {
8241  std::string fcn_nm = fcn->name ();
8242  std::string file = fcn->fcn_file_name ();
8243 
8244  std::string tmp = fcn_nm;
8245  if (! file.empty ())
8246  tmp += ": " + file;
8247 
8248  symbol_scope fcn_scope = fcn->scope ();
8249  fcn_scope.cache_name (tmp);
8250  fcn_scope.cache_fcn_name (fcn_nm);
8251  fcn_scope.cache_fcn_file_name (file);
8252  fcn_scope.cache_dir_name (m_lexer.m_dir_name);
8253 
8254  if (lc)
8255  fcn->stash_leading_comment (lc);
8256 
8257  fcn->define_ret_list (ret_list);
8258 
8260  {
8261  fcn->stash_fcn_location (l, c);
8262 
8263  octave_value ov_fcn (fcn);
8264 
8265  if (m_endfunction_found && m_function_scopes.size () > 1)
8266  {
8267  fcn->mark_as_nested_function ();
8268  fcn_scope.set_nesting_depth (m_curr_fcn_depth);
8269 
8270  symbol_scope pscope = m_function_scopes.parent_scope ();
8271  fcn_scope.set_parent (pscope);
8273 
8274  pscope.install_nestfunction (fcn_nm, ov_fcn, fcn_scope);
8275 
8276  // For nested functions, the list of parent functions is
8277  // set in symbol_scope::update_nest.
8278  }
8279  else
8280  {
8281  fcn->mark_as_subfunction ();
8282  m_subfunction_names.push_back (fcn_nm);
8283 
8284  fcn_scope.set_parent (m_primary_fcn_scope);
8287 
8288  m_primary_fcn_scope.install_subfunction (fcn_nm, ov_fcn);
8289  }
8290  }
8291 
8292  if (m_curr_fcn_depth == 0)
8293  fcn_scope.update_nest ();
8294 
8296  {
8297  // We are either reading a script file or defining a function
8298  // at the command line, so this definition creates a
8299  // tree_function object that is placed in the parse tree.
8300  // Otherwise, it is just inserted in the symbol table,
8301  // either as a subfunction or nested function (see above),
8302  // or as the primary function for the file, via
8303  // m_primary_fcn (see also load_fcn_from_file,,
8304  // parse_fcn_file, and
8305  // fcn_info::fcn_info_rep::find_user_function).
8306 
8308  {
8310  fcn->time_parsed ());
8312  }
8313 
8314  retval = new tree_function_def (fcn, l, c);
8315  }
8316  }
8317 
8318  return retval;
8319  }
8320 
8323  tree_statement_list *list)
8324  {
8325  if (list)
8326  {
8327  for (const auto& elt : *list)
8328  list_append (body, elt);
8329 
8330  list->clear ();
8331  delete (list);
8332  }
8333 
8334  return body;
8335  }
8336 
8339  tree_args_block_attribute_list *attr_list,
8340  tree_args_block_validation_list *validation_list,
8341  token *end_tok,
8342  comment_list *lc, comment_list *tc)
8343  {
8344  tree_arguments_block *retval = nullptr;
8345 
8346  if (end_token_ok (end_tok, token::arguments_end))
8347  {
8348  filepos beg_pos = arguments_tok->beg_pos ();
8349 
8350  int l = beg_pos.line ();
8351  int c = beg_pos.column ();
8352 
8353  retval = new tree_arguments_block (attr_list, validation_list, l, c);
8354  }
8355  else
8356  {
8357  delete attr_list;
8358  delete validation_list;
8359 
8360  delete lc;
8361  delete tc;
8362  }
8363 
8364  return retval;
8365  }
8366 
8369  tree_identifier *class_name,
8370  tree_arg_validation_fcns *validation_fcns,
8371  tree_expression *default_value)
8372  {
8373  // FIXME: Validate arguments and convert to more specific types
8374  // (std::string for arg_name and class_name, etc).
8375 
8376  return new tree_arg_validation (size_spec, class_name,
8377  validation_fcns, default_value);
8378  }
8379 
8382  {
8383  // FIXME: Validate argument and convert to more specific type
8384  // (std::string for attribute_name).
8385 
8386  return new tree_args_block_attribute_list (attribute_name);
8387  }
8388 
8391  {
8392  return new tree_args_block_validation_list (arg_validation);
8393  }
8394 
8397  tree_arg_validation *arg_validation)
8398  {
8399  return list_append (list, arg_validation);
8400  }
8401 
8404  {
8405  // FIXME: Validate argument.
8406 
8407  return new tree_arg_size_spec (size_args);
8408  }
8409 
8412  {
8413  // FIXME: Validate argument.
8414 
8415  return new tree_arg_validation_fcns (fcn_args);
8416  }
8417 
8418  void
8420  {
8422 
8425  m_parsing_subfunctions = true;
8426 
8427  m_curr_fcn_depth--;
8428  m_function_scopes.pop ();
8429 
8434  }
8435 
8436  // A CLASSDEF block defines a class that has a constructor and other
8437  // methods, but it is not an executable command. Parsing the block
8438  // makes some changes in the symbol table (inserting the constructor
8439  // and methods, and adding to the list of known objects) and creates
8440  // a parse tree containing meta information about the class.
8441 
8442  // LC contains comments appearing before the classdef keyword.
8443  // TC contains comments appearing between the classdef elements
8444  // and the final end token for the classdef block.
8445 
8446  tree_classdef *
8449  tree_identifier *id,
8451  tree_classdef_body *body, token *end_tok,
8452  comment_list *lc, comment_list *bc, comment_list *tc)
8453  {
8454  tree_classdef *retval = nullptr;
8455 
8457 
8458  std::string cls_name = id->name ();
8459 
8460  std::string full_name = m_lexer.m_fcn_file_full_name;
8461  std::string short_name = m_lexer.m_fcn_file_name;
8462 
8463  std::size_t pos
8464  = short_name.find_last_of (sys::file_ops::dir_sep_chars ());
8465 
8466  if (pos != std::string::npos)
8467  short_name = short_name.substr (pos+1);
8468 
8469  if (short_name != cls_name)
8470  {
8471  int l = id->line ();
8472  int c = id->column ();
8473 
8474  delete a;
8475  delete id;
8476  delete sc;
8477  delete body;
8478  delete lc;
8479  delete bc;
8480  delete tc;
8481 
8482  bison_error ("invalid classdef definition, the class name must match the filename", l, c);
8483 
8484  }
8485  else
8486  {
8487  if (end_token_ok (end_tok, token::classdef_end))
8488  {
8489  int l = tok_val->line ();
8490  int c = tok_val->column ();
8491 
8492  // First non-copyright comments found above and below
8493  // function keyword are candidates for the documentation
8494  // string. Use the first one that is not empty.
8495 
8496  std::string doc_string;
8497 
8498  if (lc)
8499  doc_string = lc->find_doc_string ();
8500 
8501  if (doc_string.empty () && bc)
8502  doc_string = bc->find_doc_string ();
8503 
8504  if (! body)
8505  body = new tree_classdef_body ();
8506 
8507  // FIXME - pass body comment to tree_classdef constructor.
8508 
8510  doc_string, a, id, sc, body, lc, tc,
8511  m_curr_package_name, full_name, l, c);
8512  }
8513  else
8514  {
8515  delete a;
8516  delete id;
8517  delete sc;
8518  delete body;
8519  delete lc;
8520  delete bc;
8521  delete tc;
8522 
8524  }
8525  }
8526 
8527  return retval;
8528  }
8529 
8530  // LC contains comments appearing before the properties keyword.
8531  // If this properties block appears first in the list of classdef
8532  // elements, this comment list will be used for the help text for the
8533  // classdef block.
8534 
8535  // TC contains comments appearing between the list of properties
8536  // and the final end token for the properties block and may be used to
8537  // find the doc string for the final property in the list.
8538 
8543  token *end_tok,
8544  comment_list *lc,
8545  comment_list *tc)
8546  {
8547  tree_classdef_properties_block *retval = nullptr;
8548 
8549  if (end_token_ok (end_tok, token::properties_end))
8550  {
8551  int l = tok_val->line ();
8552  int c = tok_val->column ();
8553 
8554  if (plist)
8555  {
8556  // If the element at the end of the list doesn't have a doc
8557  // string, see whether the first element of TC is an
8558  // end-of-line comment for us to use.
8559 
8560  if (tc)
8561  {
8562  tree_classdef_property *last_elt = plist->back ();
8563 
8564  if (! last_elt->have_doc_string ())
8565  {
8566  comment_elt first_comment_elt = tc->front ();
8567 
8568  if (first_comment_elt.is_end_of_line ())
8569  {
8570  std::string eol_comment = first_comment_elt.text ();
8571 
8572  last_elt->doc_string (eol_comment);
8573  }
8574  }
8575  }
8576  }
8577  else
8578  plist = new tree_classdef_property_list ();
8579 
8580  retval = new tree_classdef_properties_block (a, plist, lc, tc, l, c);
8581  }
8582  else
8583  {
8584  delete a;
8585  delete plist;
8586  delete lc;
8587  delete tc;
8588 
8590  }
8591 
8592  return retval;
8593  }
8594 
8597  {
8598  return new tree_classdef_property_list (prop);
8599  }
8600 
8603  tree_arg_validation *av)
8604  {
8605  av->arg_name (id);
8606 
8607  if (av->size_spec () || av->class_name () || av->validation_fcns ())
8608  warning ("size, class, and validation function specifications are not yet supported for classdef properties; INCORRECT RESULTS ARE POSSIBLE!");
8609 
8610  return new tree_classdef_property (av, lc);
8611  }
8612 
8613  // LC contains comments appearing before the methods keyword.
8614  // If this methods block appears first in the list of classdef
8615  // elements, this comment list will be used for the help text for the
8616  // classdef block.
8617 
8622  token *end_tok, comment_list *lc,
8623  comment_list *tc)
8624  {
8625  tree_classdef_methods_block *retval = nullptr;
8626 
8627  if (end_token_ok (end_tok, token::methods_end))
8628  {
8629  int l = tok_val->line ();
8630  int c = tok_val->column ();
8631 
8632  if (! mlist)
8633  mlist = new tree_classdef_methods_list ();
8634 
8635  retval = new tree_classdef_methods_block (a, mlist, lc, tc, l, c);
8636  }
8637  else
8638  {
8639  delete a;
8640  delete mlist;
8641  delete lc;
8642  delete tc;
8643 
8645  }
8646 
8647  return retval;
8648  }
8649 
8650  // LC contains comments appearing before the events keyword.
8651  // If this events block appears first in the list of classdef
8652  // elements, this comment list will be used for the help text for the
8653  // classdef block.
8654 
8655  // TC contains comments appearing between the list of events and
8656  // the final end token for the events block and may be used to find
8657  // the doc string for the final event in the list.
8658 
8663  token *end_tok,
8664  comment_list *lc,
8665  comment_list *tc)
8666  {
8667  tree_classdef_events_block *retval = nullptr;
8668 
8669  if (end_token_ok (end_tok, token::events_end))
8670  {
8671  int l = tok_val->line ();
8672  int c = tok_val->column ();
8673 
8674  if (! elist)
8675  elist = new tree_classdef_events_list ();
8676 
8677  retval = new tree_classdef_events_block (a, elist, lc, tc, l, c);
8678  }
8679  else
8680  {
8681  delete a;
8682  delete elist;
8683  delete lc;
8684  delete tc;
8685 
8687  }
8688 
8689  return retval;
8690  }
8691 
8694  {
8695  return new tree_classdef_events_list (e);
8696  }
8697 
8700  {
8701  return new tree_classdef_event (id, lc);
8702  }
8703 
8704  // LC contains comments appearing before the enumeration keyword.
8705  // If this enumeration block appears first in the list of classdef
8706  // elements, this comment list will be used for the help text for the
8707  // classdef block.
8708 
8709  // TC contains comments appearing between the list of
8710  // enumerations and the final end token for the enumeration block and
8711  // may be used to find the doc string for the final enumeration in the
8712  // list.
8713 
8717  tree_classdef_enum_list *elist,
8718  token *end_tok,
8719  comment_list *lc,
8720  comment_list *tc)
8721  {
8722  tree_classdef_enum_block *retval = nullptr;
8723 
8724  if (end_token_ok (end_tok, token::enumeration_end))
8725  {
8726  int l = tok_val->line ();
8727  int c = tok_val->column ();
8728 
8729  if (! elist)
8730  elist = new tree_classdef_enum_list ();
8731 
8732  retval = new tree_classdef_enum_block (a, elist, lc, tc, l, c);
8733  }
8734  else
8735  {
8736  delete a;
8737  delete elist;
8738  delete lc;
8739  delete tc;
8740 
8742  }
8743 
8744  return retval;
8745  }
8746 
8749  {
8750  return new tree_classdef_enum_list (e);
8751  }
8752 
8755  comment_list *lc)
8756  {
8757  return new tree_classdef_enum (id, expr, lc);
8758  }
8759 
8763  {
8764  return list_append (list, elt);
8765  }
8766 
8769  tree_classdef_event *elt)
8770  {
8771  return list_append (list, elt);
8772  }
8773 
8776  tree_classdef_enum *elt)
8777  {
8778  return list_append (list, elt);
8779  }
8780 
8783  {
8784  return new tree_classdef_superclass_list (sc);
8785  }
8786 
8789  {
8790  return new tree_classdef_superclass (fqident->text ());
8791  }
8792 
8796  {
8797  return list_append (list, elt);
8798  }
8799 
8802  {
8803  return new tree_classdef_attribute_list (attr);
8804  }
8805 
8808  tree_expression *expr)
8809  {
8810  return (expr
8811  ? new tree_classdef_attribute (id, expr)
8812  : new tree_classdef_attribute (id));
8813  }
8814 
8817  {
8818  return new tree_classdef_attribute (id, false);
8819  }
8820 
8824  {
8825  return list_append (list, elt);
8826  }
8827 
8830  {
8831  return new tree_classdef_body (pb);
8832  }
8833 
8836  {
8837  return new tree_classdef_body (mb);
8838  }
8839 
8842  {
8843  return new tree_classdef_body (evb);
8844  }
8845 
8848  {
8849  return new tree_classdef_body (enb);
8850  }
8851 
8855  {
8856  return list_append (body, block);
8857  }
8858 
8862  {
8863  return list_append (body, block);
8864  }
8865 
8869  {
8870  return list_append (body, block);
8871  }
8872 
8875  tree_classdef_enum_block *block)
8876  {
8877  return list_append (body, block);
8878  }
8879 
8882  tree_parameter_list *pl)
8883  {
8884  octave_user_function* retval = nullptr;
8885 
8886  // External methods are only allowed within @-folders. In this case,
8887  // m_curr_class_name will be non-empty.
8888 
8889  if (! m_curr_class_name.empty ())
8890  {
8891 
8892  std::string mname = id->name ();
8893 
8894  // Methods that cannot be declared outside the classdef file:
8895  // - methods with '.' character (e.g. property accessors)
8896  // - class constructor
8897  // - 'delete'
8898 
8899  if (mname.find_first_of (".") == std::string::npos
8900  && mname != "delete"
8901  && mname != m_curr_class_name)
8902  {
8903  // Create a dummy function that is used until the real method
8904  // is loaded.
8905 
8906  retval = new octave_user_function (symbol_scope::anonymous (), pl);
8907 
8908  retval->stash_function_name (mname);
8909 
8910  int l = id->line ();
8911  int c = id->column ();
8912 
8913  retval->stash_fcn_location (l, c);
8914  }
8915  else
8916  bison_error ("invalid external method declaration, an external "
8917  "method cannot be the class constructor, 'delete' "
8918  "or have a dot (.) character in its name");
8919  }
8920  else
8921  bison_error ("external methods are only allowed in @-folders");
8922 
8923  if (! retval)
8924  delete id;
8925 
8926  return retval;
8927  }
8928 
8931  tree_parameter_list *ret_list,
8932  comment_list *cl)
8933  {
8934  if (! ret_list)
8936 
8937  fcn->define_ret_list (ret_list);
8938 
8939  if (cl)
8940  fcn->stash_leading_comment (cl);
8941 
8942  int l = fcn->beginning_line ();
8943  int c = fcn->beginning_column ();
8944 
8945  return new tree_function_def (fcn, l, c);
8946  }
8947 
8950  {
8951  octave_value fcn;
8952 
8953  if (fcn_def)
8954  fcn = fcn_def->function ();
8955 
8956  delete fcn_def;
8957 
8958  return new tree_classdef_methods_list (fcn);
8959  }
8960 
8963  tree_function_def *fcn_def)
8964  {
8965  octave_value fcn;
8966 
8967  if (fcn_def)
8968  {
8969  fcn = fcn_def->function ();
8970 
8971  delete fcn_def;
8972  }
8973 
8974  return list_append (list, fcn);
8975  }
8976 
8977  bool
8979  tree_statement_list *local_fcns)
8980  {
8981  parse_tree_validator validator;
8982 
8983  cls->accept (validator);
8984 
8985  if (local_fcns)
8986  {
8987  for (tree_statement *elt : *local_fcns)
8988  {
8989  tree_command *cmd = elt->command ();
8990 
8991  tree_function_def *fcn_def
8992  = dynamic_cast<tree_function_def *> (cmd);
8993 
8994  fcn_def->accept (validator);
8995  }
8996  }
8997 
8998  if (! validator.ok ())
8999  {
9000  delete cls;
9001  delete local_fcns;
9002 
9003  bison_error (validator.error_list ());
9004 
9005  return false;
9006  }
9007 
9008  // Require all validations to succeed before installing any local
9009  // functions or defining the classdef object for later use.
9010 
9011  if (local_fcns)
9012  {
9013  interpreter& interp = m_lexer.m_interpreter;
9014 
9015  symbol_table& symtab = interp.get_symbol_table ();
9016 
9017  for (tree_statement *elt : *local_fcns)
9018  {
9019  tree_command *cmd = elt->command ();
9020 
9021  tree_function_def *fcn_def
9022  = dynamic_cast<tree_function_def *> (cmd);
9023 
9024  octave_value ov_fcn = fcn_def->function ();
9025  octave_user_function *fcn = ov_fcn.user_function_value ();
9026 
9027  std::string nm = fcn->name ();
9028  std::string file = fcn->fcn_file_name ();
9029 
9030  symtab.install_local_function (nm, ov_fcn, file);
9031  }
9032 
9033  delete local_fcns;
9034  }
9035 
9036  // FIXME: Is it possible for the following condition to be false?
9038  m_classdef_object = std::shared_ptr<tree_classdef> (cls);
9039 
9040  return true;
9041  }
9042 
9043  // Make an index expression.
9044 
9047  tree_argument_list *args,
9048  char type)
9049  {
9050  tree_index_expression *retval = nullptr;
9051 
9052  if (args && args->has_magic_tilde ())
9053  {
9054  delete expr;
9055  delete args;
9056 
9057  bison_error ("invalid use of empty argument (~) in index expression");
9058  }
9059  else
9060  {
9061  int l = expr->line ();
9062  int c = expr->column ();
9063 
9064  if (! expr->is_postfix_indexed ())
9065  expr->set_postfix_index (type);
9066 
9067  if (expr->is_index_expression ())
9068  {
9070  = dynamic_cast<tree_index_expression *> (expr);
9071 
9072  retval = tmp->append (args, type);
9073  }
9074  else
9075  retval = new tree_index_expression (expr, args, l, c, type);
9076  }
9077 
9078  return retval;
9079  }
9080 
9081  // Make an indirect reference expression.
9082 
9085  const std::string& elt)
9086  {
9087  tree_index_expression *retval = nullptr;
9088 
9089  int l = expr->line ();
9090  int c = expr->column ();
9091 
9092  if (! expr->is_postfix_indexed ())
9093  expr->set_postfix_index ('.');
9094 
9095  if (expr->is_index_expression ())
9096  {
9098  = dynamic_cast<tree_index_expression *> (expr);
9099 
9100  retval = tmp->append (elt);
9101  }
9102  else
9103  retval = new tree_index_expression (expr, elt, l, c);
9104 
9106 
9107  return retval;
9108  }
9109 
9110  // Make an indirect reference expression with dynamic field name.
9111 
9114  tree_expression *elt)
9115  {
9116  tree_index_expression *retval = nullptr;
9117 
9118  int l = expr->line ();
9119  int c = expr->column ();
9120 
9121  if (! expr->is_postfix_indexed ())
9122  expr->set_postfix_index ('.');
9123 
9124  if (expr->is_index_expression ())
9125  {
9127  = dynamic_cast<tree_index_expression *> (expr);
9128 
9129  retval = list_append (tmp, elt);
9130  }
9131  else
9132  retval = new tree_index_expression (expr, elt, l, c);
9133 
9135 
9136  return retval;
9137  }
9138 
9139  // Make a declaration command.
9140 
9143  tree_decl_init_list *lst)
9144  {
9145  tree_decl_command *retval = nullptr;
9146 
9147  int l = tok_val->line ();
9148  int c = tok_val->column ();
9149 
9150  if (lst)
9152 
9153  switch (tok)
9154  {
9155  case GLOBAL:
9156  {
9157  retval = new tree_decl_command ("global", lst, l, c);
9158  retval->mark_global ();
9159  }
9160  break;
9161 
9162  case PERSISTENT:
9163  if (m_curr_fcn_depth >= 0)
9164  {
9165  retval = new tree_decl_command ("persistent", lst, l, c);
9166  retval->mark_persistent ();
9167  }
9168  else
9169  {
9171  warning ("ignoring persistent declaration near line %d of file '%s'",
9172  l, m_lexer.m_fcn_file_full_name.c_str ());
9173  else
9174  warning ("ignoring persistent declaration near line %d", l);
9175  }
9176  break;
9177 
9178  default:
9179  panic_impossible ();
9180  break;
9181  }
9182 
9183  return retval;
9184  }
9185 
9188  {
9189  return new tree_decl_init_list (elt);
9190  }
9191 
9194  tree_decl_elt *elt)
9195  {
9196  return list_append (list, elt);
9197  }
9198 
9199  tree_decl_elt *
9201  tree_expression *expr)
9202  {
9203  return expr ? new tree_decl_elt (id, expr) : new tree_decl_elt (id);
9204  }
9205 
9206  bool
9209  {
9210  std::set<std::string> dict;
9211 
9212  for (tree_decl_elt *elt : *lst)
9213  {
9214  tree_identifier *id = elt->ident ();
9215 
9216  if (id)
9217  {
9218  std::string name = id->name ();
9219 
9220  if (id->is_black_hole ())
9221  {
9222  if (type != tree_parameter_list::in)
9223  {
9224  bison_error ("invalid use of ~ in output list");
9225  return false;
9226  }
9227  }
9228  else if (iskeyword (name))
9229  {
9230  bison_error ("invalid use of keyword '" + name
9231  + "' in parameter list");
9232  return false;
9233  }
9234  else if (dict.find (name) != dict.end ())
9235  {
9236  bison_error ("'" + name
9237  + "' appears more than once in parameter list");
9238  return false;
9239  }
9240  else
9241  dict.insert (name);
9242  }
9243  }
9244 
9245  std::string va_type = (type == tree_parameter_list::in
9246  ? "varargin" : "varargout");
9247 
9248  std::size_t len = lst->length ();
9249 
9250  if (len > 0)
9251  {
9252  tree_decl_elt *elt = lst->back ();
9253 
9254  tree_identifier *id = elt->ident ();
9255 
9256  if (id && id->name () == va_type)
9257  {
9258  if (len == 1)
9259  lst->mark_varargs_only ();
9260  else
9261  lst->mark_varargs ();
9262 
9263  tree_parameter_list::iterator p = lst->end ();
9264  --p;
9265  delete *p;
9266  lst->erase (p);
9267  }
9268  }
9269 
9270  return true;
9271  }
9272 
9273  bool
9275  {
9276  bool retval = true;
9277 
9278  tree_array_list *al = dynamic_cast<tree_array_list *> (e);
9279 
9280  for (tree_argument_list* row : *al)
9281  {
9282  if (row && row->has_magic_tilde ())
9283  {
9284  retval = false;
9285 
9286  if (e->is_matrix ())
9287  bison_error ("invalid use of tilde (~) in matrix expression");
9288  else
9289  bison_error ("invalid use of tilde (~) in cell expression");
9290 
9291  break;
9292  }
9293  }
9294 
9295  return retval;
9296  }
9297 
9300  {
9301  tree_argument_list *retval = nullptr;
9302 
9303  if (e->is_constant ())
9304  {
9305  interpreter& interp = m_lexer.m_interpreter;
9306 
9307  tree_evaluator& tw = interp.get_evaluator ();
9308 
9309  octave_value ov = e->evaluate (tw);
9310 
9311  delete e;
9312 
9313  if (ov.isempty ())
9314  bison_error ("invalid empty left hand side of assignment");
9315  else
9316  bison_error ("invalid constant left hand side of assignment");
9317  }
9318  else
9319  {
9320  bool is_simple_assign = true;
9321 
9322  tree_argument_list *tmp = nullptr;
9323 
9324  if (e->is_matrix ())
9325  {
9326  tree_matrix *mat = dynamic_cast<tree_matrix *> (e);
9327 
9328  if (mat && mat->size () == 1)
9329  {
9330  tmp = mat->front ();
9331  mat->pop_front ();
9332  delete e;
9333  is_simple_assign = false;
9334  }
9335  }
9336  else
9337  tmp = new tree_argument_list (e);
9338 
9339  if (tmp && tmp->is_valid_lvalue_list ())
9340  {
9342  retval = tmp;
9343  }
9344  else
9345  {
9346  delete tmp;
9347 
9348  bison_error ("invalid left hand side of assignment");
9349  }
9350 
9351  if (retval && is_simple_assign)
9352  retval->mark_as_simple_assign_lhs ();
9353  }
9354 
9355  return retval;
9356  }
9357 
9358  // Finish building an array_list.
9359 
9360  tree_expression *
9362  token */*open_delim*/, token *close_delim)
9363  {
9364  tree_expression *retval = array_list;
9365 
9366  array_list->set_location (close_delim->line (), close_delim->column ());
9367 
9368  if (array_list->all_elements_are_constant ())
9369  {
9370  interpreter& interp = m_lexer.m_interpreter;
9371 
9372  try
9373  {
9374  // If the evaluation generates a warning message, restore
9375  // the previous value of last_warning_message and skip the
9376  // conversion to a constant value.
9377 
9378  error_system& es = interp.get_error_system ();
9379 
9380  unwind_action restore_last_warning_message
9382  es.last_warning_message (""));
9383 
9384  unwind_action restore_discard_warning_messages
9386  es.discard_warning_messages (true));
9387 
9388  tree_evaluator& tw = interp.get_evaluator ();
9389 
9390  octave_value tmp = array_list->evaluate (tw);
9391 
9392  std::string msg = es.last_warning_message ();
9393 
9394  if (msg.empty ())
9395  {
9396  tree_constant *tc_retval
9397  = new tree_constant (tmp, close_delim->line (),
9398  close_delim->column ());
9399 
9400  std::ostringstream buf;
9401 
9402  tree_print_code tpc (buf);
9403 
9404  array_list->accept (tpc);
9405 
9406  tc_retval->stash_original_text (buf.str ());
9407 
9408  delete array_list;
9409 
9410  retval = tc_retval;
9411  }
9412  }
9413  catch (const execution_exception&)
9414  {
9415  interp.recover_from_exception ();
9416  }
9417  }
9418 
9419  return retval;
9420  }
9421 
9422  // Finish building a matrix list.
9423 
9424  tree_expression *
9426  token *close_delim)
9427  {
9428  return (m
9429  ? finish_array_list (m, open_delim, close_delim)
9431  close_delim->line (), close_delim->column ()));
9432  }
9433 
9434  tree_matrix *
9436  {
9437  return row ? new tree_matrix (row) : nullptr;
9438  }
9439 
9440  tree_matrix *
9442  {
9443  if (! matrix)
9444  return make_matrix (row);
9445 
9446  return row ? list_append (matrix, row) : matrix;
9447  }
9448 
9449  // Finish building a cell list.
9450 
9451  tree_expression *
9453  token *close_delim)
9454  {
9455  return (c
9456  ? finish_array_list (c, open_delim, close_delim)
9457  : new tree_constant (octave_value (Cell ()),
9458  close_delim->line (), close_delim->column ()));
9459  }
9460 
9461  tree_cell *
9463  {
9464  return row ? new tree_cell (row) : nullptr;
9465  }
9466 
9467  tree_cell *
9469  {
9470  if (! cell)
9471  return make_cell (row);
9472 
9473  return row ? list_append (cell, row) : cell;
9474  }
9475 
9476  tree_identifier *
9478  {
9479  // Find the token in the symbol table.
9481 
9482  std::string nm = ident->text ();
9483 
9484  symbol_record sr = (scope ? scope.insert (nm) : symbol_record (nm));
9485 
9486 
9487  int l = ident->line ();
9488  int c = ident->column ();
9489 
9490  return new tree_identifier (sr, l, c);
9491  }
9492 
9495  {
9496  std::string meth = superclassref->superclass_method_name ();
9497  std::string cls = superclassref->superclass_class_name ();
9498 
9499  int l = superclassref->line ();
9500  int c = superclassref->column ();
9501 
9502  return new tree_superclass_ref (meth, cls, l, c);
9503  }
9504 
9507  {
9508  std::string cls = metaquery->text ();
9509 
9510  int l = metaquery->line ();
9511  int c = metaquery->column ();
9512 
9513  return new tree_metaclass_query (cls, l, c);
9514  }
9515 
9518  char sep, bool warn_missing_semi)
9519  {
9520  tree_statement *tmp = list->back ();
9521 
9522  switch (sep)
9523  {
9524  case ';':
9525  tmp->set_print_flag (false);
9526  break;
9527 
9528  case 0:
9529  case ',':
9530  case '\n':
9531  tmp->set_print_flag (true);
9532  if (warn_missing_semi)
9533  maybe_warn_missing_semi (list);
9534  break;
9535 
9536  default:
9537  warning ("unrecognized separator type!");
9538  break;
9539  }
9540 
9541  // Even if a statement is null, we add it to the list then remove it
9542  // here so that the print flag is applied to the correct statement.
9543 
9544  if (tmp->is_null_statement ())
9545  {
9546  list->pop_back ();
9547  delete tmp;
9548  }
9549 
9550  return list;
9551  }
9552 
9553  // Finish building a statement.
9554  template <typename T>
9555  tree_statement *
9557  {
9558  comment_list *comment = m_lexer.get_comment ();
9559 
9560  return new tree_statement (arg, comment);
9561  }
9562 
9565  {
9566  return new tree_statement_list (stmt);
9567  }
9568 
9571  char sep, tree_statement *stmt,
9572  bool warn_missing_semi)
9573  {
9574  set_stmt_print_flag (list, sep, warn_missing_semi);
9575 
9576  return list_append (list, stmt);
9577  }
9578 
9581  {
9582  return new tree_argument_list (expr);
9583  }
9584 
9587  tree_expression *expr)
9588  {
9589  return list_append (list, expr);
9590  }
9591 
9594  {
9595  return new tree_parameter_list (io);
9596  }
9597 
9600  tree_decl_elt *t)
9601  {
9602  return new tree_parameter_list (io, t);
9603  }
9604 
9607  tree_identifier *id)
9608  {
9609  return new tree_parameter_list (io, id);
9610  }
9611 
9614  tree_decl_elt *t)
9615  {
9616  return list_append (list, t);
9617  }
9618 
9621  tree_identifier *id)
9622  {
9623  return list_append (list, new tree_decl_elt (id));
9624  }
9625 
9626  void
9628  {
9630  }
9631 
9632  // FIXME: this function partially duplicates do_dbtype in debug.cc.
9633  static std::string
9634  get_file_line (const std::string& name, int line)
9635  {
9636  // NAME should be an absolute file name and the file should exist.
9637 
9638  std::ifstream fs = sys::ifstream (name.c_str (), std::ios::in);
9639 
9640  std::string text;
9641 
9642  if (fs)
9643  {
9644  int i = 1;
9645 
9646  do
9647  {
9648  if (! std::getline (fs, text))
9649  {
9650  text = "";
9651  break;
9652  }
9653  }
9654  while (i++ < line);
9655  }
9656 
9657  return text;
9658  }
9659 
9660  void
9661  base_parser::bison_error (const std::string& str)
9662  {
9663  bison_error (str, m_lexer.m_filepos);
9664  }
9665 
9666  void
9667  base_parser::bison_error (const std::string& str, const filepos& pos)
9668  {
9669  bison_error (str, pos.line (), pos.column ());
9670  }
9671 
9672  void
9673  base_parser::bison_error (const std::string& str, int err_line, int err_col)
9674  {
9675  std::ostringstream output_buf;
9676 
9679  output_buf << "parse error near line " << err_line
9680  << " of file " << m_lexer.m_fcn_file_full_name;
9681  else
9682  output_buf << "parse error:";
9683 
9684  if (str != "parse error")
9685  output_buf << "\n\n " << str;
9686 
9687  output_buf << "\n\n";
9688 
9689  std::string curr_line;
9690 
9693  curr_line = get_file_line (m_lexer.m_fcn_file_full_name, err_line);
9694  else
9695  curr_line = m_lexer.m_current_input_line;
9696 
9697  // Adjust the error column for display because it is 1-based in the
9698  // lexer for easier reporting.
9699  err_col--;
9700 
9701  if (! curr_line.empty ())
9702  {
9703  // FIXME: we could do better if we just cached lines from the
9704  // input file in a list. See also functions for managing input
9705  // buffers in lex.ll.
9706 
9707  std::size_t len = curr_line.length ();
9708 
9709  if (curr_line[len-1] == '\n')
9710  curr_line.resize (len-1);
9711 
9712  // Print the line, maybe with a pointer near the error token.
9713 
9714  output_buf << ">>> " << curr_line << "\n";
9715 
9716  if (err_col == 0)
9717  err_col = len;
9718 
9719  for (int i = 0; i < err_col + 3; i++)
9720  output_buf << " ";
9721 
9722  output_buf << "^";
9723  }
9724 
9725  output_buf << "\n";
9726 
9727  m_parse_error_msg = output_buf.str ();
9728  }
9729 
9730  void
9731  base_parser::bison_error (const parse_exception& pe)
9732  {
9733  bison_error (pe.message (), pe.line (), pe.column ());
9734  }
9735 
9736  void
9737  base_parser::bison_error (const std::list<parse_exception>& pe_list)
9738  {
9739  // For now, we just report the first error found. Reporting all
9740  // errors will require a bit more refactoring.
9741 
9742  parse_exception pe = pe_list.front ();
9743 
9744  bison_error (pe.message (), pe.line (), pe.column ());
9745  }
9746 
9747  int
9749  {
9750  int status = -1;
9751 
9752  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
9753 
9754  try
9755  {
9756  status = octave_pull_parse (pstate, *this);
9757  }
9758  catch (const execution_exception&)
9759  {
9760  // FIXME: In previous versions, we emitted a parse error here
9761  // but that is not always correct because the error could have
9762  // happened inside a GUI callback functions executing in the
9763  // readline event_hook loop. Maybe we need a separate exception
9764  // class for parse errors?
9765 
9766  throw;
9767  }
9768  catch (const exit_exception&)
9769  {
9770  throw;
9771  }
9772  catch (const interrupt_exception&)
9773  {
9774  throw;
9775  }
9776  catch (...)
9777  {
9778  std::string file = m_lexer.m_fcn_file_full_name;
9779 
9780  if (file.empty ())
9781  error ("unexpected exception while parsing input");
9782  else
9783  error ("unexpected exception while parsing %s", file.c_str ());
9784  }
9785 
9786  if (status != 0)
9787  parse_error ("%s", m_parse_error_msg.c_str ());
9788 
9789  return status;
9790  }
9791 
9792  // Parse input from INPUT. Pass TRUE for EOF if the end of INPUT should
9793  // finish the parse.
9794 
9795  int
9796  push_parser::run (const std::string& input, bool eof)
9797  {
9798  int status = -1;
9799 
9800  dynamic_cast<push_lexer&> (m_lexer).append_input (input, eof);
9801 
9802  do
9803  {
9804  YYSTYPE lval;
9805 
9806  int token = octave_lex (&lval, m_lexer.m_scanner);
9807 
9808  if (token < 0)
9809  {
9810  // TOKEN == -2 means that the lexer recognized a comment
9811  // and we should be at the end of the buffer but not the
9812  // end of the file so we should return 0 to indicate
9813  // "complete input" instead of -1 to request more input.
9814 
9815  status = (token == -2 ? 0 : -1);
9816 
9817  if (! eof && m_lexer.at_end_of_buffer ())
9818  return status;
9819 
9820  break;
9821  }
9822 
9823  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
9824 
9825  try
9826  {
9827  status = octave_push_parse (pstate, token, &lval, *this);
9828  }
9829  catch (execution_exception& e)
9830  {
9831  std::string file = m_lexer.m_fcn_file_full_name;
9832 
9833  if (file.empty ())
9834  error (e, "parse error");
9835  else
9836  error (e, "parse error in %s", file.c_str ());
9837  }
9838  catch (const exit_exception&)
9839  {
9840  throw;
9841  }
9842  catch (interrupt_exception &)
9843  {
9844  throw;
9845  }
9846  catch (...)
9847  {
9848  std::string file = m_lexer.m_fcn_file_full_name;
9849 
9850  if (file.empty ())
9851  error ("unexpected exception while parsing input");
9852  else
9853  error ("unexpected exception while parsing %s", file.c_str ());
9854  }
9855  }
9856  while (status == YYPUSH_MORE || ! m_lexer.at_end_of_buffer ());
9857 
9858  if (status != 0)
9859  parse_error ("%s", m_parse_error_msg.c_str ());
9860 
9861  return status;
9862  }
9863 
9864  int
9866  {
9867  if (! m_reader)
9868  error ("push_parser::run requires valid input_reader");
9869 
9870  int exit_status = 0;
9871 
9872  std::string prompt
9873  = command_editor::decode_prompt_string (m_interpreter.PS1 ());
9874 
9875  do
9876  {
9877  // Reset status each time through the read loop so that
9878  // it won't be set to -1 and cause us to exit the outer
9879  // loop early if there is an exception while reading
9880  // input or parsing.
9881 
9882  exit_status = 0;
9883 
9884  bool eof = false;
9885  std::string input_line = m_reader->get_input (prompt, eof);
9886 
9887  if (eof)
9888  {
9889  exit_status = EOF;
9890  break;
9891  }
9892 
9893  exit_status = run (input_line, false);
9894 
9895  prompt = command_editor::decode_prompt_string (m_interpreter.PS2 ());
9896  }
9897  while (exit_status < 0);
9898 
9899  return exit_status;
9900  }
9901 
9902  octave_value
9903  parse_fcn_file (interpreter& interp, const std::string& full_file,
9904  const std::string& file, const std::string& dir_name,
9905  const std::string& dispatch_type,
9906  const std::string& package_name, bool require_file,
9907  bool force_script, bool autoload, bool relative_lookup)
9908  {
9909  octave_value retval;
9910 
9911  FILE *ffile = nullptr;
9912 
9913  if (! full_file.empty ())
9914  {
9915  // Check that m-file is not overly large which can segfault interpreter.
9916  const int max_file_size = 512 * 1024 * 1024; // 512 MB
9917  sys::file_stat fs (full_file);
9918 
9919  if (fs && fs.size () > max_file_size)
9920  {
9921  error ("file '%s' is too large, > 512 MB", full_file.c_str ());
9922 
9923  return octave_value ();
9924  }
9925 
9926  ffile = sys::fopen (full_file, "rb");
9927  }
9928 
9929  if (! ffile)
9930  {
9931  if (require_file)
9932  error ("no such file, '%s'", full_file.c_str ());
9933 
9934  return octave_value ();
9935  }
9936 
9937  unwind_action act ([=] () { ::fclose (ffile); });
9938 
9939  // get the encoding for this folder
9940  input_system& input_sys = interp.get_input_system ();
9941  parser parser (ffile, interp, input_sys.dir_encoding (dir_name));
9942 
9943  parser.m_curr_class_name = dispatch_type;
9944  parser.m_curr_package_name = package_name;
9945  parser.m_autoloading = autoload;
9946  parser.m_fcn_file_from_relative_lookup = relative_lookup;
9947 
9948  parser.m_lexer.m_force_script = force_script;
9950  parser.m_lexer.m_parsing_class_method = ! dispatch_type.empty ();
9951 
9953  parser.m_lexer.m_fcn_file_full_name = full_file;
9954  parser.m_lexer.m_dir_name = dir_name;
9955  parser.m_lexer.m_package_name = package_name;
9956 
9957  int err = parser.run ();
9958 
9959  if (err)
9960  error ("parse error while reading file %s", full_file.c_str ());
9961 
9963 
9965  && parser.classdef_object ())
9966  {
9967  // Convert parse tree for classdef object to
9968  // meta.class info (and stash it in the symbol
9969  // table?). Return pointer to constructor?
9970 
9971  if (ov_fcn.is_defined ())
9972  panic_impossible ();
9973 
9974  bool is_at_folder = ! dispatch_type.empty ();
9975 
9976  std::shared_ptr<tree_classdef> cdef_obj
9977  = parser.classdef_object();
9978 
9979  return cdef_obj->make_meta_class (interp, is_at_folder);
9980  }
9981  else if (ov_fcn.is_defined ())
9982  {
9983  octave_function *fcn = ov_fcn.function_value ();
9984 
9985  fcn->maybe_relocate_end ();
9986 
9988  {
9990  parser.m_subfunction_names.reverse ();
9991 
9993  }
9994 
9995  return ov_fcn;
9996  }
9997 
9998  return octave_value ();
9999  }
10000 
10001  bool
10003  {
10004  m_lexer.m_end_of_input = at_eof;
10005 
10006  if (lst)
10007  {
10008  parse_tree_validator validator;
10009 
10010  lst->accept (validator);
10011 
10012  if (! validator.ok ())
10013  {
10014  delete lst;
10015 
10016  bison_error (validator.error_list ());
10017 
10018  return false;
10019  }
10020  }
10021 
10022  std::shared_ptr<tree_statement_list> tmp_lst (lst);
10023 
10024  statement_list (tmp_lst);
10025 
10026  return true;
10027  }
10028 
10029  // Check script or function for semantic errors.
10030  bool
10032  {
10034 
10035  if (code)
10036  {
10037  parse_tree_validator validator;
10038 
10039  code->accept (validator);
10040 
10041  if (! validator.ok ())
10042  {
10043  bison_error (validator.error_list ());
10044 
10045  return false;
10046  }
10047  }
10048 
10049  return true;
10050  }
10051 
10052  // Maybe print a warning if an assignment expression is used as the
10053  // test in a logical expression.
10054 
10055  void
10056  base_parser::maybe_warn_assign_as_truth_value (tree_expression *expr)
10057  {
10058  if (expr->is_assignment_expression ()
10059  && expr->paren_count () < 2)
10060  {
10061  if (m_lexer.m_fcn_file_full_name.empty ())
10063  ("Octave:assign-as-truth-value",
10064  "suggest parenthesis around assignment used as truth value");
10065  else
10067  ("Octave:assign-as-truth-value",
10068  "suggest parenthesis around assignment used as truth value near line %d, column %d in file '%s'",
10069  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
10070  }
10071  }
10072 
10073  // Maybe print a warning about switch labels that aren't constants.
10074 
10075  void
10076  base_parser::maybe_warn_variable_switch_label (tree_expression *expr)
10077  {
10078  if (! expr->is_constant ())
10079  {
10080  if (m_lexer.m_fcn_file_full_name.empty ())
10081  warning_with_id ("Octave:variable-switch-label",
10082  "variable switch label");
10083  else
10085  ("Octave:variable-switch-label",
10086  "variable switch label near line %d, column %d in file '%s'",
10087  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
10088  }
10089  }
10090 
10091  void
10092  base_parser::maybe_warn_missing_semi (tree_statement_list *t)
10093  {
10094  if (m_curr_fcn_depth >= 0)
10095  {
10096  tree_statement *tmp = t->back ();
10097 
10098  if (tmp->is_expression ())
10100  ("Octave:missing-semicolon",
10101  "missing semicolon near line %d, column %d in file '%s'",
10102  tmp->line (), tmp->column (), m_lexer.m_fcn_file_full_name.c_str ());
10103  }
10104  }
10105 
10106  std::string
10107  get_help_from_file (const std::string& nm, bool& symbol_found,
10108  std::string& full_file)
10109  {
10110  std::string retval;
10111 
10112  full_file = fcn_file_in_path (nm);
10113 
10114  std::string file = full_file;
10115 
10116  std::size_t file_len = file.length ();
10117 
10118  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
10119  || (file_len > 4 && file.substr (file_len-4) == ".mex")
10120  || (file_len > 2 && file.substr (file_len-2) == ".m"))
10121  {
10122  file = sys::env::base_pathname (file);
10123  file = file.substr (0, file.find_last_of ('.'));
10124 
10125  std::size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
10126  if (pos != std::string::npos)
10127  file = file.substr (pos+1);
10128  }
10129 
10130  if (! file.empty ())
10131  {
10132  interpreter& interp = __get_interpreter__ ();
10133 
10134  symbol_found = true;
10135 
10136  octave_value ov_fcn
10137  = parse_fcn_file (interp, full_file, file, "", "", "", true,
10138  false, false, false);
10139 
10140  if (ov_fcn.is_defined ())
10141  {
10142  octave_function *fcn = ov_fcn.function_value ();
10143 
10144  if (fcn)
10145  retval = fcn->doc_string ();
10146  }
10147  }
10148 
10149  return retval;
10150  }
10151 
10152  std::string
10153  get_help_from_file (const std::string& nm, bool& symbol_found)
10154  {
10155  std::string file;
10156  return get_help_from_file (nm, symbol_found, file);
10157  }
10158 
10159  octave_value
10160  load_fcn_from_file (const std::string& file_name,
10161  const std::string& dir_name,
10162  const std::string& dispatch_type,
10163  const std::string& package_name,
10164  const std::string& fcn_name, bool autoload)
10165  {
10166  octave_value retval;
10167 
10168  unwind_protect frame;
10169 
10170  std::string nm = file_name;
10171 
10172  std::size_t nm_len = nm.length ();
10173 
10174  std::string file;
10175 
10176  bool relative_lookup = false;
10177 
10178  file = nm;
10179 
10180  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
10181  || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
10182  || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
10183  {
10184  nm = sys::env::base_pathname (file);
10185  nm = nm.substr (0, nm.find_last_of ('.'));
10186 
10187  std::size_t pos = nm.find_last_of (sys::file_ops::dir_sep_str ());
10188  if (pos != std::string::npos)
10189  nm = nm.substr (pos+1);
10190  }
10191 
10192  relative_lookup = ! sys::env::absolute_pathname (file);
10193 
10194  file = sys::env::make_absolute (file);
10195 
10196  int len = file.length ();
10197 
10198  interpreter& interp = __get_interpreter__ ();
10199 
10200  dynamic_loader& dyn_loader = interp.get_dynamic_loader ();
10201 
10202  if (len > 4 && file.substr (len-4, len-1) == ".oct")
10203  {
10204  if (autoload && ! fcn_name.empty ())
10205  nm = fcn_name;
10206 
10207  octave_function *tmpfcn
10208  = dyn_loader.load_oct (nm, file, relative_lookup);
10209 
10210  if (tmpfcn)
10211  {
10212  tmpfcn->stash_package_name (package_name);
10213  retval = octave_value (tmpfcn);
10214  }
10215  }
10216  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
10217  {
10218  // Temporarily load m-file version of mex-file, if it exists,
10219  // to get the help-string to use.
10220 
10221  std::string doc_string;
10222 
10223  octave_value ov_fcn
10224  = parse_fcn_file (interp, file.substr (0, len - 2), nm, dir_name,
10225  dispatch_type, package_name, false,
10226  autoload, autoload, relative_lookup);
10227 
10228  if (ov_fcn.is_defined ())
10229  {
10230  octave_function *tmpfcn = ov_fcn.function_value ();
10231 
10232  if (tmpfcn)
10233  doc_string = tmpfcn->doc_string ();
10234  }
10235 
10236  octave_function *tmpfcn
10237  = dyn_loader.load_mex (nm, file, relative_lookup);
10238 
10239  if (tmpfcn)
10240  {
10241  tmpfcn->document (doc_string);
10242  tmpfcn->stash_package_name (package_name);
10243 
10244  retval = octave_value (tmpfcn);
10245  }
10246  }
10247  else if (len > 2)
10248  {
10249  retval = parse_fcn_file (interp, file, nm, dir_name,
10250  dispatch_type, package_name, true,
10251  autoload, autoload, relative_lookup);
10252  }
10253 
10254  return retval;
10255  }
10256 
10257 DEFMETHOD (autoload, interp, args, ,
10258  doc: /* -*- texinfo -*-
10259 @deftypefn {} {@var{autoload_map} =} autoload ()
10260 @deftypefnx {} {} autoload (@var{function}, @var{file})
10261 @deftypefnx {} {} autoload (@dots{}, "remove")
10262 Define @var{function} to autoload from @var{file}.
10263 
10264 The second argument, @var{file}, should be an absolute filename or a file
10265 name in the same directory as the function or script from which the autoload
10266 command was run. @var{file} @emph{should not} depend on the Octave load
10267 path.
10268 
10269 Normally, calls to @code{autoload} appear in PKG_ADD script files that are
10270 evaluated when a directory is added to Octave's load path. To avoid having
10271 to hardcode directory names in @var{file}, if @var{file} is in the same
10272 directory as the PKG_ADD script then
10273 
10274 @example
10275 autoload ("foo", "bar.oct");
10276 @end example
10277 
10278 @noindent
10279 will load the function @code{foo} from the file @code{bar.oct}. The above
10280 usage when @code{bar.oct} is not in the same directory, or usages such as
10281 
10282 @example
10283 autoload ("foo", file_in_loadpath ("bar.oct"))
10284 @end example
10285 
10286 @noindent
10287 are strongly discouraged, as their behavior may be unpredictable.
10288 
10289 With no arguments, return a structure containing the current autoload map.
10290 
10291 If a third argument @qcode{"remove"} is given, the function is cleared and
10292 not loaded anymore during the current Octave session.
10293 
10294 @seealso{PKG_ADD}
10295 @end deftypefn */)
10296 {
10297  int nargin = args.length ();
10298 
10299  if (nargin == 1 || nargin > 3)
10300  print_usage ();
10301 
10302  tree_evaluator& tw = interp.get_evaluator ();
10303 
10304  if (nargin == 0)
10305  return octave_value (tw.get_autoload_map ());
10306  else
10307  {
10308  string_vector argv = args.make_argv ("autoload");
10309 
10310  if (nargin == 2)
10311  tw.add_autoload (argv[1], argv[2]);
10312  else if (nargin == 3)
10313  {
10314  if (argv[3] != "remove")
10315  error_with_id ("Octave:invalid-input-arg",
10316  "autoload: third argument can only be 'remove'");
10317 
10318  tw.remove_autoload (argv[1], argv[2]);
10319  }
10320  }
10321 
10322  return octave_value_list ();
10323 }
10324 
10325 DEFMETHOD (mfilename, interp, args, ,
10326  doc: /* -*- texinfo -*-
10327 @deftypefn {} {} mfilename ()
10328 @deftypefnx {} {} mfilename ("fullpath")
10329 @deftypefnx {} {} mfilename ("fullpathext")
10330 Return the name of the currently executing file.
10331 
10332 The base name of the currently executing script or function is returned without
10333 any extension. If called from outside an m-file, such as the command line,
10334 return the empty string.
10335 
10336 Given the argument @qcode{"fullpath"}, include the directory part of the
10337 filename, but not the extension.
10338 
10339 Given the argument @qcode{"fullpathext"}, include the directory part of
10340 the filename and the extension.
10341 @seealso{inputname, dbstack}
10342 @end deftypefn */)
10343 {
10344  int nargin = args.length ();
10345 
10346  if (nargin > 1)
10347  print_usage ();
10348 
10349  std::string opt;
10350 
10351  if (nargin == 1)
10352  opt = args(0).xstring_value ("mfilename: option argument must be a string");
10353 
10354  return octave_value (interp.mfilename (opt));
10355 }
10356 
10357  // Execute the contents of a script file. For compatibility with
10358  // Matlab, also execute a function file by calling the function it
10359  // defines with no arguments and nargout = 0.
10360 
10361  void
10362  source_file (const std::string& file_name, const std::string& context,
10363  bool verbose, bool require_file)
10364  {
10365  interpreter& interp = __get_interpreter__ ();
10366 
10367  interp.source_file (file_name, context, verbose, require_file);
10368  }
10369 
10370 DEFMETHOD (source, interp, args, ,
10371  doc: /* -*- texinfo -*-
10372 @deftypefn {} {} source (@var{file})
10373 @deftypefnx {} {} source (@var{file}, @var{context})
10374 Parse and execute the contents of @var{file}.
10375 
10376 Without specifying @var{context}, this is equivalent to executing commands
10377 from a script file, but without requiring the file to be named
10378 @file{@var{file}.m} or to be on the execution path.
10379 
10380 Instead of the current context, the script may be executed in either the
10381 context of the function that called the present function
10382 (@qcode{"caller"}), or the top-level context (@qcode{"base"}).
10383 @seealso{run}
10384 @end deftypefn */)
10385 {
10386  int nargin = args.length ();
10387 
10388  if (nargin < 1 || nargin > 2)
10389  print_usage ();
10390 
10391  std::string file_name
10392  = args(0).xstring_value ("source: FILE must be a string");
10393 
10394  std::string context;
10395  if (nargin == 2)
10396  context = args(1).xstring_value ("source: CONTEXT must be a string");
10397 
10398  interp.source_file (file_name, context);
10399 
10400  return octave_value_list ();
10401 }
10402 
10403  //! Evaluate an Octave function (built-in or interpreted) and return
10404  //! the list of result values.
10405  //!
10406  //! @param name The name of the function to call.
10407  //! @param args The arguments to the function.
10408  //! @param nargout The number of output arguments expected.
10409  //! @return A list of output values. The length of the list is not
10410  //! necessarily the same as @c nargout.
10411 
10413  feval (const char *name, const octave_value_list& args, int nargout)
10414  {
10415  interpreter& interp = __get_interpreter__ ();
10416 
10417  return interp.feval (name, args, nargout);
10418  }
10419 
10421  feval (const std::string& name, const octave_value_list& args, int nargout)
10422  {
10423  interpreter& interp = __get_interpreter__ ();
10424 
10425  return interp.feval (name, args, nargout);
10426  }
10427 
10429  feval (octave_function *fcn, const octave_value_list& args, int nargout)
10430  {
10431  interpreter& interp = __get_interpreter__ ();
10432 
10433  return interp.feval (fcn, args, nargout);
10434  }
10435 
10437  feval (const octave_value& val, const octave_value_list& args, int nargout)
10438  {
10439  interpreter& interp = __get_interpreter__ ();
10440 
10441  return interp.feval (val, args, nargout);
10442  }
10443 
10445  feval (const octave_value_list& args, int nargout)
10446  {
10447  interpreter& interp = __get_interpreter__ ();
10448 
10449  return interp.feval (args, nargout);
10450  }
10451 
10452 DEFMETHOD (feval, interp, args, nargout,
10453  doc: /* -*- texinfo -*-
10454 @deftypefn {} {@var{retval} =} feval (@var{name}, @dots{})
10455 Evaluate the function named @var{name}.
10456 
10457 Any arguments after the first are passed as inputs to the named function.
10458 For example,
10459 
10460 @example
10461 @group
10462 feval ("acos", -1)
10463  @result{} 3.1416
10464 @end group
10465 @end example
10466 
10467 @noindent
10468 calls the function @code{acos} with the argument @samp{-1}.
10469 
10470 The function @code{feval} can also be used with function handles of any sort
10471 (@pxref{Function Handles}). Historically, @code{feval} was the only way to
10472 call user-supplied functions in strings, but function handles are now
10473 preferred due to the cleaner syntax they offer. For example,
10474 
10475 @example
10476 @group
10477 @var{f} = @@exp;
10478 feval (@var{f}, 1)
10479  @result{} 2.7183
10480 @var{f} (1)
10481  @result{} 2.7183
10482 @end group
10483 @end example
10484 
10485 @noindent
10486 are equivalent ways to call the function referred to by @var{f}. If it
10487 cannot be predicted beforehand whether @var{f} is a function handle,
10488 function name in a string, or inline function then @code{feval} can be used
10489 instead.
10490 @end deftypefn */)
10491 {
10492  if (args.length () == 0)
10493  print_usage ();
10494 
10495  return interp.feval (args, nargout);
10496 }
10497 
10498 DEFMETHOD (builtin, interp, args, nargout,
10499  doc: /* -*- texinfo -*-
10500 @deftypefn {} {[@dots{}] =} builtin (@var{f}, @dots{})
10501 Call the base function @var{f} even if @var{f} is overloaded to another
10502 function for the given type signature.
10503 
10504 This is normally useful when doing object-oriented programming and there is
10505 a requirement to call one of Octave's base functions rather than the
10506 overloaded one of a new class.
10507 
10508 A trivial example which redefines the @code{sin} function to be the
10509 @code{cos} function shows how @code{builtin} works.
10510 
10511 @example
10512 @group
10513 sin (0)
10514  @result{} 0
10515 function y = sin (x), y = cos (x); endfunction
10516 sin (0)
10517  @result{} 1
10518 builtin ("sin", 0)
10519  @result{} 0
10520 @end group
10521 @end example
10522 @end deftypefn */)
10523 {
10524  octave_value_list retval;
10525 
10526  if (args.length () == 0)
10527  print_usage ();
10528 
10529  const std::string name (args(0).xstring_value ("builtin: function name (F) must be a string"));
10530 
10531  symbol_table& symtab = interp.get_symbol_table ();
10532 
10533  octave_value fcn = symtab.builtin_find (name);
10534 
10535  if (fcn.is_defined ())
10536  retval = interp.feval (fcn.function_value (), args.splice (0, 1), nargout);
10537  else
10538  error ("builtin: lookup for symbol '%s' failed", name.c_str ());
10539 
10540  return retval;
10541 }
10542 
10543 DEFMETHOD (eval, interp, args, nargout,
10544  doc: /* -*- texinfo -*-
10545 @deftypefn {} {} eval (@var{try})
10546 @deftypefnx {} {} eval (@var{try}, @var{catch})
10547 Parse the string @var{try} and evaluate it as if it were an Octave
10548 program.
10549 
10550 If execution fails, evaluate the optional string @var{catch}.
10551 
10552 The string @var{try} is evaluated in the current context, so any results
10553 remain available after @code{eval} returns.
10554 
10555 The following example creates the variable @var{A} with the approximate
10556 value of 3.1416 in the current workspace.
10557 
10558 @example
10559 eval ("A = acos(-1);");
10560 @end example
10561 
10562 If an error occurs during the evaluation of @var{try} then the @var{catch}
10563 string is evaluated, as the following example shows:
10564 
10565 @example
10566 @group
10567 eval ('error ("This is a bad example");',
10568  'printf ("This error occurred:\n%s\n", lasterr ());');
10569  @print{} This error occurred:
10570  This is a bad example
10571 @end group
10572 @end example
10573 
10574 Programming Note: if you are only using @code{eval} as an error-capturing
10575 mechanism, rather than for the execution of arbitrary code strings,
10576 Consider using try/catch blocks or unwind_protect/unwind_protect_cleanup
10577 blocks instead. These techniques have higher performance and don't
10578 introduce the security considerations that the evaluation of arbitrary code
10579 does.
10580 @seealso{evalin, evalc, assignin, feval}
10581 @end deftypefn */)
10582 {
10583  int nargin = args.length ();
10584 
10585  if (nargin < 1 || nargin > 2)
10586  print_usage ();
10587 
10588  if (! args(0).is_string () || args(0).rows () > 1 || args(0).ndims () != 2)
10589  error ("eval: TRY must be a string");
10590 
10591  std::string try_code = args(0).string_value ();
10592 
10593  if (nargin == 1)
10594  return interp.eval (try_code, nargout);
10595  else
10596  {
10597  if (! args(1).is_string () || args(1).rows () > 1
10598  || args(1).ndims () != 2)
10599  error ("eval: CATCH must be a string");
10600 
10601  std::string catch_code = args(1).string_value ();
10602 
10603  return interp.eval (try_code, catch_code, nargout);
10604  }
10605 }
10606 
10607 /*
10608 
10609 %!shared x
10610 %! x = 1;
10611 
10612 %!assert (eval ("x"), 1)
10613 %!assert (eval ("x;"))
10614 %!assert (eval ("x;"), 1)
10615 
10616 %!test
10617 %! y = eval ("x");
10618 %! assert (y, 1);
10619 
10620 %!test
10621 %! y = eval ("x;");
10622 %! assert (y, 1);
10623 
10624 %!test
10625 %! eval ("x = 1;");
10626 %! assert (x,1);
10627 
10628 %!test
10629 %! eval ("flipud = 2;");
10630 %! assert (flipud, 2);
10631 
10632 %!function y = __f ()
10633 %! eval ("flipud = 2;");
10634 %! y = flipud;
10635 %!endfunction
10636 %!assert (__f(), 2)
10637 
10638 %!test <*35645>
10639 %! [a,] = gcd (1,2);
10640 %! [a,b,] = gcd (1, 2);
10641 
10642 ## Can't assign to a keyword
10643 %!error eval ("switch = 13;")
10644 
10645 %!shared str
10646 %! str = "disp ('hello');";
10647 %! str(:,:,2) = str(:,:,1);
10648 
10649 %!error <TRY must be a string> eval (1)
10650 %!error <TRY must be a string> eval (['a';'b'])
10651 %!error <TRY must be a string> eval (str)
10652 
10653 %!error <CATCH must be a string> eval (str(:,:,1), 1)
10654 %!error <CATCH must be a string> eval (str(:,:,1), ['a';'b'])
10655 %!error <CATCH must be a string> eval (str(:,:,1), str)
10656 
10657 */
10658 
10659 DEFMETHOD (assignin, interp, args, ,
10660  doc: /* -*- texinfo -*-
10661 @deftypefn {} {} assignin (@var{context}, @var{varname}, @var{value})
10662 Assign @var{value} to @var{varname} in context @var{context}, which
10663 may be either @qcode{"base"} or @qcode{"caller"}.
10664 @seealso{evalin}
10665 @end deftypefn */)
10666 {
10667  if (args.length () != 3)
10668  print_usage ();
10669 
10670  std::string context
10671  = args(0).xstring_value ("assignin: CONTEXT must be a string");
10672 
10673  std::string varname
10674  = args(1).xstring_value ("assignin: VARNAME must be a string");
10675 
10676  interp.assignin (context, varname, args(2));
10677 
10678  return octave_value_list ();
10679 }
10680 
10681 /*
10682 
10683 %!error assignin ("base", "switch", "13")
10684 
10685 */
10686 
10687 DEFMETHOD (evalin, interp, args, nargout,
10688  doc: /* -*- texinfo -*-
10689 @deftypefn {} {} evalin (@var{context}, @var{try})
10690 @deftypefnx {} {} evalin (@var{context}, @var{try}, @var{catch})
10691 Like @code{eval}, except that the expressions are evaluated in the context
10692 @var{context}, which may be either @qcode{"caller"} or @qcode{"base"}.
10693 @seealso{eval, assignin}
10694 @end deftypefn */)
10695 {
10696  int nargin = args.length ();
10697 
10698  if (nargin < 2 || nargin > 3)
10699  print_usage ();
10700 
10701  std::string context
10702  = args(0).xstring_value ("evalin: CONTEXT must be a string");
10703 
10704  std::string try_code
10705  = args(1).xstring_value ("evalin: TRY must be a string");
10706 
10707  if (nargin == 3)
10708  {
10709  std::string catch_code
10710  = args(2).xstring_value ("evalin: CATCH must be a string");
10711 
10712  return interp.evalin (context, try_code, catch_code, nargout);
10713  }
10714 
10715  return interp.evalin (context, try_code, nargout);
10716 }
10717 
10718 DEFMETHOD (evalc, interp, args, nargout,
10719  doc: /* -*- texinfo -*-
10720 @deftypefn {} {@var{s} =} evalc (@var{try})
10721 @deftypefnx {} {@var{s} =} evalc (@var{try}, @var{catch})
10722 Parse and evaluate the string @var{try} as if it were an Octave program,
10723 while capturing the output into the return variable @var{s}.
10724 
10725 If execution fails, evaluate the optional string @var{catch}.
10726 
10727 This function behaves like @code{eval}, but any output or warning messages
10728 which would normally be written to the console are captured and returned in
10729 the string @var{s}.
10730 
10731 The @code{diary} is disabled during the execution of this function. When
10732 @code{system} is used, any output produced by external programs is
10733 @emph{not} captured, unless their output is captured by the @code{system}
10734 function itself.
10735 
10736 @example
10737 @group
10738 s = evalc ("t = 42"), t
10739  @result{} s = t = 42
10740 
10741  @result{} t = 42
10742 @end group
10743 @end example
10744 @seealso{eval, diary}
10745 @end deftypefn */)
10746 {
10747  int nargin = args.length ();
10748 
10749  if (nargin == 0 || nargin > 2)
10750  print_usage ();
10751 
10752  // Flush pending output and redirect stdout/stderr to capturing
10753  // buffer.
10754 
10755  octave_stdout.flush ();
10756  std::cerr.flush ();
10757 
10758  std::stringbuf buffer;
10759 
10760  std::streambuf *old_out_buf = octave_stdout.rdbuf (&buffer);
10761  std::streambuf *old_err_buf = std::cerr.rdbuf (&buffer);
10762 
10763  // Restore previous output buffers no matter how control exits this
10764  // function. There's no need to flush here. That has already
10765  // happened for the normal execution path. If an error happens during
10766  // the eval, then the message is stored in the exception object and we
10767  // will display it later, after the buffers have been restored.
10768 
10769  unwind_action act ([=] ()
10770  {
10771  octave_stdout.rdbuf (old_out_buf);
10772  std::cerr.rdbuf (old_err_buf);
10773  });
10774 
10775  // Call standard eval function.
10776 
10777  int eval_nargout = std::max (0, nargout - 1);
10778 
10779  octave_value_list retval = Feval (interp, args, eval_nargout);
10780 
10781  // Make sure we capture all pending output.
10782 
10783  octave_stdout.flush ();
10784  std::cerr.flush ();
10785 
10786  retval.prepend (buffer.str ());
10787 
10788  return retval;
10789 }
10790 
10791 /*
10792 
10793 %!test
10794 %! [old_fmt, old_spacing] = format ();
10795 %! unwind_protect
10796 %! format short;
10797 %! str = evalc ("1");
10798 %! assert (str, "ans = 1\n");
10799 %! unwind_protect_cleanup
10800 %! format (old_fmt);
10801 %! format (old_spacing);
10802 %! end_unwind_protect
10803 
10804 %!assert (evalc ("1;"), "")
10805 
10806 %!test
10807 %! [s, y] = evalc ("1");
10808 %! assert (s, "");
10809 %! assert (y, 1);
10810 
10811 %!test
10812 %! [s, y] = evalc ("1;");
10813 %! assert (s, "");
10814 %! assert (y, 1);
10815 
10816 %!test
10817 %! [old_fmt, old_spacing] = format ();
10818 %! unwind_protect
10819 %! format short;
10820 %! str = evalc ("y = 2");
10821 %! assert (str, "y = 2\n");
10822 %! assert (y, 2);
10823 %! unwind_protect_cleanup
10824 %! format (old_fmt);
10825 %! format (old_spacing);
10826 %! end_unwind_protect
10827 
10828 %!test
10829 %! assert (evalc ("y = 3;"), "");
10830 %! assert (y, 3);
10831 
10832 %!test
10833 %! [s, a, b] = evalc ("deal (1, 2)");
10834 %! assert (s, "");
10835 %! assert (a, 1);
10836 %! assert (b, 2);
10837 
10838 %!function [a, b] = __f_evalc ()
10839 %! printf ("foo");
10840 %! fprintf (stdout, "bar ");
10841 %! disp (pi);
10842 %! a = 1;
10843 %! b = 2;
10844 %!endfunction
10845 %!test
10846 %! [old_fmt, old_spacing] = format ();
10847 %! unwind_protect
10848 %! format short;
10849 %! [s, a, b] = evalc ("__f_evalc ()");
10850 %! assert (s, "foobar 3.1416\n");
10851 %! assert (a, 1);
10852 %! assert (b, 2);
10853 %! unwind_protect_cleanup
10854 %! format (old_fmt);
10855 %! format (old_spacing);
10856 %! end_unwind_protect
10857 
10858 %!error <foo> (evalc ("error ('foo')"))
10859 %!error <bar> (evalc ("error ('foo')", "error ('bar')"))
10860 
10861 %!test
10862 %! warning ("off", "quiet", "local");
10863 %! str = evalc ("warning ('foo')");
10864 %! assert (str(1:13), "warning: foo\n");
10865 
10866 %!test
10867 %! warning ("off", "quiet", "local");
10868 %! str = evalc ("error ('foo')", "warning ('bar')");
10869 %! assert (str(1:13), "warning: bar\n");
10870 
10871 %!error evalc ("switch = 13;")
10872 
10873 */
10874 
10875 DEFUN (__parser_debug_flag__, args, nargout,
10876  doc: /* -*- texinfo -*-
10877 @deftypefn {} {@var{val} =} __parser_debug_flag__ ()
10878 @deftypefnx {} {@var{old_val} =} __parser_debug_flag__ (@var{new_val})
10879 Query or set the internal flag that determines whether Octave's parser
10880 prints debug information as it processes an expression.
10881 @seealso{__lexer_debug_flag__}
10882 @end deftypefn */)
10883 {
10884  octave_value retval;
10885 
10886  bool debug_flag = octave_debug;
10887 
10888  retval = set_internal_variable (debug_flag, args, nargout,
10889  "__parser_debug_flag__");
10890 
10891  octave_debug = debug_flag;
10892 
10893  return retval;
10894 }
10895 
10896 DEFMETHOD (__parse_file__, interp, args, ,
10897  doc: /* -*- texinfo -*-
10898 @deftypefn {} {} __parse_file__ (@var{file}, @var{verbose})
10899 Undocumented internal function.
10900 @end deftypefn */)
10901 {
10902  octave_value retval;
10903 
10904  int nargin = args.length ();
10905 
10906  if (nargin < 1 || nargin > 2)
10907  print_usage ();
10908 
10909  std::string file
10910  = args(0).xstring_value ("__parse_file__: expecting filename as argument");
10911 
10912  std::string full_file = sys::file_ops::tilde_expand (file);
10913 
10914  full_file = sys::env::make_absolute (full_file);
10915 
10916  std::string dir_name;
10917 
10918  std::size_t file_len = file.length ();
10919 
10920  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
10921  || (file_len > 4 && file.substr (file_len-4) == ".mex")
10922  || (file_len > 2 && file.substr (file_len-2) == ".m"))
10923  {
10924  file = sys::env::base_pathname (file);
10925  file = file.substr (0, file.find_last_of ('.'));
10926 
10927  std::size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
10928  if (pos != std::string::npos)
10929  {
10930  dir_name = file.substr (0, pos);
10931  file = file.substr (pos+1);
10932  }
10933  }
10934 
10935  if (nargin == 2)
10936  octave_stdout << "parsing " << full_file << std::endl;
10937 
10938  octave_value ov_fcn
10939  = parse_fcn_file (interp, full_file, file, dir_name, "", "", true,
10940  false, false, false);
10941 
10942  return retval;
10943 }
10944 
10945 OCTAVE_END_NAMESPACE(octave)
octave_value_list Feval(octave::interpreter &, const octave_value_list &=octave_value_list(), int=0)
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:230
Definition: Cell.h:43
std::string message() const
comment_list * get_comment()
Definition: lex.h:584
bool at_end_of_buffer() const
Definition: lex.h:628
comment_buffer m_comment_buf
Definition: lex.h:717
bool input_from_tmp_history_file()
Definition: lex.cc:6684
virtual bool input_from_terminal() const
Definition: lex.h:721
void * m_scanner
Definition: lex.h:711
void prep_for_file()
Definition: lex.cc:5315
comment_list * get_comment()
Definition: lex.h:664
virtual bool input_from_eval_string() const
Definition: lex.h:725
virtual void reset()
Definition: lex.cc:5292
std::size_t length() const
Definition: base-list.h:53
iterator end()
Definition: base-list.h:68
void append(const elt_type &s)
Definition: base-list.h:92
void pop_front()
Definition: base-list.h:88
elt_type & front()
Definition: base-list.h:79
std::size_t size() const
Definition: base-list.h:52
elt_type & back()
Definition: base-list.h:80
void pop_back()
Definition: base-list.h:89
bool empty() 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
tree_argument_list * append_argument_list(tree_argument_list *list, tree_expression *expr)
Definition: oct-parse.cc:9586
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:8368
tree_decl_command * make_decl_command(int tok, token *tok_val, tree_decl_init_list *lst)
Definition: oct-parse.cc:9142
std::shared_ptr< tree_statement_list > statement_list() const
Definition: parse.h:186
std::shared_ptr< tree_statement_list > m_stmt_list
Definition: parse.h:791
tree_classdef_attribute_list * append_classdef_attribute(tree_classdef_attribute_list *list, tree_classdef_attribute *elt)
Definition: oct-parse.cc:8822
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:7358
tree_cell * make_cell(tree_argument_list *row)
Definition: oct-parse.cc:9462
tree_fcn_handle * make_fcn_handle(token *tok_val)
Definition: oct-parse.cc:6965
int m_max_fcn_depth
Definition: parse.h:755
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:7730
tree_switch_case_list * make_switch_case_list(tree_switch_case *switch_case)
Definition: oct-parse.cc:7770
void recover_from_parsing_function()
Definition: oct-parse.cc:8419
tree_argument_list * validate_matrix_for_assignment(tree_expression *e)
Definition: oct-parse.cc:9299
octave_value m_primary_fcn
Definition: parse.h:780
tree_classdef_attribute_list * make_classdef_attribute_list(tree_classdef_attribute *attr)
Definition: oct-parse.cc:8801
tree_classdef_body * make_classdef_body(tree_classdef_properties_block *pb)
Definition: oct-parse.cc:8829
tree_expression * make_assign_op(int op, tree_argument_list *lhs, token *eq_tok, tree_expression *rhs)
Definition: oct-parse.cc:7811
tree_if_command * finish_if_command(token *if_tok, tree_if_command_list *list, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7657
parent_scope_info m_function_scopes
Definition: parse.h:777
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:8540
bool validate_array_list(tree_expression *e)
Definition: oct-parse.cc:9274
tree_function_def * finish_classdef_external_method(octave_user_function *fcn, tree_parameter_list *ret_list, comment_list *cl)
Definition: oct-parse.cc:8930
base_parser(base_lexer &lxr)
Definition: oct-parse.cc:6696
tree_identifier * make_identifier(token *ident)
Definition: oct-parse.cc:9477
tree_classdef_events_list * make_classdef_events_list(tree_classdef_event *e)
Definition: oct-parse.cc:8693
tree_index_expression * make_indirect_ref(tree_expression *expr, const std::string &)
Definition: oct-parse.cc:9084
tree_matrix * append_matrix_row(tree_matrix *matrix, tree_argument_list *row)
Definition: oct-parse.cc:9441
bool finish_input(tree_statement_list *lst, bool at_eof=false)
Definition: oct-parse.cc:10002
tree_parameter_list * make_parameter_list(tree_parameter_list::in_or_out io)
Definition: oct-parse.cc:9593
tree_parameter_list * append_parameter_list(tree_parameter_list *list, tree_decl_elt *t)
Definition: oct-parse.cc:9613
tree_classdef_property * make_classdef_property(comment_list *lc, tree_identifier *id, tree_arg_validation *av)
Definition: oct-parse.cc:8602
tree_classdef_superclass_list * make_classdef_superclass_list(tree_classdef_superclass *sc)
Definition: oct-parse.cc:8782
tree_if_command_list * append_if_clause(tree_if_command_list *list, tree_if_clause *clause)
Definition: oct-parse.cc:7721
tree_command * make_return_command(token *return_tok)
Definition: oct-parse.cc:7603
octave_user_function * start_function(tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_function, const std::string &doc_string)
Definition: oct-parse.cc:8085
bool m_endfunction_found
Definition: parse.h:735
tree_identifier * make_fcn_name(tree_identifier *id)
Definition: oct-parse.cc:7988
tree_cell * append_cell_row(tree_cell *cell, tree_argument_list *row)
Definition: oct-parse.cc:9468
void disallow_command_syntax()
Definition: oct-parse.cc:9627
tree_matrix * make_matrix(tree_argument_list *row)
Definition: oct-parse.cc:9435
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:7502
tree_expression * make_binary_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:7124
base_lexer & m_lexer
Definition: parse.h:794
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 *bc, comment_list *tc)
Definition: oct-parse.cc:8447
tree_decl_elt * make_decl_elt(tree_identifier *id, token *eq_op=nullptr, tree_expression *expr=nullptr)
Definition: oct-parse.cc:9200
tree_command * make_do_until_command(token *until_tok, tree_statement_list *body, tree_expression *expr, comment_list *lc)
Definition: oct-parse.cc:7482
tree_command * make_continue_command(token *continue_tok)
Definition: oct-parse.cc:7586
tree_if_clause * make_else_clause(token *else_tok, comment_list *lc, tree_statement_list *list)
Definition: oct-parse.cc:7711
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:7447
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:7391
std::string m_curr_class_name
Definition: parse.h:770
tree_switch_case_list * append_switch_case(tree_switch_case_list *list, tree_switch_case *elt)
Definition: oct-parse.cc:7802
tree_classdef_property_list * append_classdef_property(tree_classdef_property_list *list, tree_classdef_property *elt)
Definition: oct-parse.cc:8761
tree_classdef_attribute * make_not_classdef_attribute(tree_identifier *id)
Definition: oct-parse.cc:8816
tree_statement * make_end(const std::string &type, bool eof, const filepos &beg_pos, const filepos &end_pos)
Definition: oct-parse.cc:8217
bool m_parsing_local_functions
Definition: parse.h:751
tree_classdef_body * append_classdef_enum_block(tree_classdef_body *body, tree_classdef_enum_block *block)
Definition: oct-parse.cc:8874
std::string m_curr_package_name
Definition: parse.h:774
bool m_fcn_file_from_relative_lookup
Definition: parse.h:742
tree_args_block_attribute_list * make_args_attribute_list(tree_identifier *attribute_name)
Definition: oct-parse.cc:8381
symbol_scope m_primary_fcn_scope
Definition: parse.h:766
tree_statement_list * make_statement_list(tree_statement *stmt)
Definition: oct-parse.cc:9564
tree_classdef_enum_list * append_classdef_enum(tree_classdef_enum_list *list, tree_classdef_enum *elt)
Definition: oct-parse.cc:8775
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:8619
tree_constant * make_constant(token *tok_val)
Definition: oct-parse.cc:6896
void end_token_error(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6845
bool finish_classdef_file(tree_classdef *cls, tree_statement_list *local_fcns)
Definition: oct-parse.cc:8978
void maybe_convert_to_braindead_shortcircuit(tree_expression *&expr)
Definition: oct-parse.cc:7215
tree_metaclass_query * make_metaclass_query(token *metaquery)
Definition: oct-parse.cc:9506
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:8660
tree_classdef_body * append_classdef_properties_block(tree_classdef_body *body, tree_classdef_properties_block *block)
Definition: oct-parse.cc:8853
std::list< std::string > m_subfunction_names
Definition: parse.h:785
tree_switch_case * make_switch_case(token *case_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7778
tree_switch_case * make_default_switch_case(token *default_tok, comment_list *lc, tree_statement_list *list)
Definition: oct-parse.cc:7792
tree_expression * finish_matrix(tree_matrix *m, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9425
tree_classdef_superclass * make_classdef_superclass(token *fqident)
Definition: oct-parse.cc:8788
bool m_autoloading
Definition: parse.h:738
void parsing_local_functions(bool flag)
Definition: parse.h:201
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, comment_list *bc)
Definition: oct-parse.cc:8022
tree_anon_fcn_handle * make_anon_fcn_handle(tree_parameter_list *param_list, tree_expression *expr, const filepos &at_pos)
Definition: oct-parse.cc:6978
tree_command * make_break_command(token *break_tok)
Definition: oct-parse.cc:7569
tree_statement_list * append_statement_list(tree_statement_list *list, char sep, tree_statement *stmt, bool warn_missing_semi)
Definition: oct-parse.cc:9570
tree_classdef_methods_list * make_classdef_methods_list(tree_function_def *fcn_def)
Definition: oct-parse.cc:8949
tree_expression * make_prefix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7281
tree_statement_list * append_function_body(tree_statement_list *body, tree_statement_list *list)
Definition: oct-parse.cc:8322
virtual ~base_parser()
Definition: oct-parse.cc:6707
tree_classdef_enum * make_classdef_enum(tree_identifier *id, tree_expression *expr, comment_list *lc)
Definition: oct-parse.cc:8754
bool m_parsing_subfunctions
Definition: parse.h:746
bool validate_param_list(tree_parameter_list *lst, tree_parameter_list::in_or_out type)
Definition: oct-parse.cc:9207
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:7614
tree_decl_init_list * make_decl_init_list(tree_decl_elt *elt)
Definition: oct-parse.cc:9187
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:8715
bool validate_primary_fcn()
Definition: oct-parse.cc:10031
octave_user_function * start_classdef_external_method(tree_identifier *id, tree_parameter_list *pl)
Definition: oct-parse.cc:8881
void endfunction_found(bool flag)
Definition: parse.h:216
tree_decl_init_list * append_decl_init_list(tree_decl_init_list *list, tree_decl_elt *elt)
Definition: oct-parse.cc:9193
void bison_error(const std::string &s)
Definition: oct-parse.cc:9661
tree_classdef_body * append_classdef_events_block(tree_classdef_body *body, tree_classdef_events_block *block)
Definition: oct-parse.cc:8867
tree_index_expression * make_index_expression(tree_expression *expr, tree_argument_list *args, char type)
Definition: oct-parse.cc:9046
tree_args_block_validation_list * append_args_validation_list(tree_args_block_validation_list *list, tree_arg_validation *arg_validation)
Definition: oct-parse.cc:8396
tree_classdef_superclass_list * append_classdef_superclass(tree_classdef_superclass_list *list, tree_classdef_superclass *elt)
Definition: oct-parse.cc:8794
tree_if_command_list * start_if_command(tree_expression *expr, tree_statement_list *list)
Definition: oct-parse.cc:7642
tree_arg_size_spec * make_arg_size_spec(tree_argument_list *size_args)
Definition: oct-parse.cc:8403
tree_expression * make_postfix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7322
tree_expression * finish_array_list(tree_array_list *a, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9361
void * m_parser_state
Definition: parse.h:797
tree_classdef_events_list * append_classdef_event(tree_classdef_events_list *list, tree_classdef_event *elt)
Definition: oct-parse.cc:8768
tree_if_clause * make_elseif_clause(token *elseif_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7697
tree_statement_list * set_stmt_print_flag(tree_statement_list *, char, bool)
Definition: oct-parse.cc:9517
std::shared_ptr< tree_classdef > m_classdef_object
Definition: parse.h:788
tree_expression * finish_cell(tree_cell *c, token *open_delim, token *close_delim)
Definition: oct-parse.cc:9452
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:8338
int m_curr_fcn_depth
Definition: parse.h:762
tree_classdef_methods_list * append_classdef_method(tree_classdef_methods_list *list, tree_function_def *fcn_def)
Definition: oct-parse.cc:8962
tree_classdef_body * append_classdef_methods_block(tree_classdef_body *body, tree_classdef_methods_block *block)
Definition: oct-parse.cc:8860
tree_expression * make_boolean_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:7252
tree_expression * make_colon_expression(tree_expression *base, tree_expression *limit, tree_expression *incr=nullptr)
Definition: oct-parse.cc:7044
tree_superclass_ref * make_superclass_ref(token *superclassref)
Definition: oct-parse.cc:9494
tree_classdef_enum_list * make_classdef_enum_list(tree_classdef_enum *e)
Definition: oct-parse.cc:8748
void make_script(tree_statement_list *cmds, tree_statement *end_script)
Definition: oct-parse.cc:7944
tree_argument_list * make_argument_list(tree_expression *expr)
Definition: oct-parse.cc:9580
void classdef_object(const std::shared_ptr< tree_classdef > &obj)
Definition: parse.h:174
tree_args_block_validation_list * make_args_validation_list(tree_arg_validation *arg_validation)
Definition: oct-parse.cc:8390
bool push_fcn_symtab()
Definition: oct-parse.cc:6865
tree_classdef_property_list * make_classdef_property_list(tree_classdef_property *prop)
Definition: oct-parse.cc:8596
tree_classdef_attribute * make_classdef_attribute(tree_identifier *id, tree_expression *expr=nullptr)
Definition: oct-parse.cc:8807
void reset()
Definition: oct-parse.cc:6723
tree_classdef_event * make_classdef_event(comment_list *lc, tree_identifier *id)
Definition: oct-parse.cc:8699
tree_arg_validation_fcns * make_arg_validation_fcns(tree_argument_list *fcn_args)
Definition: oct-parse.cc:8411
std::string m_parse_error_msg
Definition: parse.h:732
bool end_token_ok(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6857
tree_statement * make_statement(T *arg)
Definition: oct-parse.cc:9556
tree_black_hole * make_black_hole()
Definition: oct-parse.cc:6957
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:8227
static std::string decode_prompt_string(const std::string &s)
Definition: cmd-edit.cc:1275
bool is_end_of_line() const
Definition: comment-list.h:84
std::string text() const
Definition: comment-list.h:78
bool empty() const
Definition: comment-list.h:76
bool uses_hash_char() const
Definition: comment-list.h:86
comment_elt find_doc_comment() const
Definition: comment-list.h:129
std::string find_doc_string() const
Definition: comment-list.h:141
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:100
void set_last_warning_message(const std::string &val)
Definition: error.h:203
octave_value discard_warning_messages(const octave_value_list &args, int nargout)
Definition: error.cc:299
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
void source_file(const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true)
dynamic_loader & get_dynamic_loader()
Definition: interpreter.h:278
symbol_table & get_symbol_table()
Definition: interpreter.h:298
input_system & get_input_system()
Definition: interpreter.h:263
octave_value PS1(const octave_value_list &args, int nargout)
tree_evaluator & get_evaluator()
error_system & get_error_system()
Definition: interpreter.h:251
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()
octave_value PS2(const octave_value_list &args, int nargout)
Definition: lex.h:760
bool input_from_eval_string() const
Definition: lex.h:807
symbol_scope curr_scope() const
Definition: lex.cc:5003
symbol_scope parent_scope() const
Definition: lex.cc:5012
void push(const symbol_scope &scope)
Definition: lex.h:77
bool m_looking_at_parameter_list
Definition: lex.h:365
bool m_reading_classdef_file
Definition: lex.h:432
bool m_looking_at_anon_fcn_args
Definition: lex.h:359
std::string m_package_name
Definition: lex.h:500
void mark_as_variables(const std::list< std::string > &lst)
Definition: lex.cc:5160
filepos m_filepos
Definition: lex.h:468
bool m_arguments_is_keyword
Definition: lex.h:383
std::string m_current_input_line
Definition: lex.h:481
bool m_end_of_input
Definition: lex.h:349
bool m_allow_command_syntax
Definition: lex.h:352
int m_looping
Definition: lex.h:449
bool m_parsing_classdef_set_method
Definition: lex.h:416
bool m_parsing_anon_fcn_body
Definition: lex.h:390
std::stack< bool > m_parsed_function_name
Definition: lex.h:509
bool m_at_beginning_of_statement
Definition: lex.h:356
std::string m_fcn_file_full_name
Definition: lex.h:494
bool m_looking_at_return_list
Definition: lex.h:362
bool m_parsing_classdef_get_method
Definition: lex.h:413
bool m_parsing_classdef_decl
Definition: lex.h:401
bool m_looking_at_matrix_or_assign_lhs
Definition: lex.h:373
bool m_parsing_classdef_superclass
Definition: lex.h:405
bool m_looking_for_object_index
Definition: lex.h:376
interpreter & m_interpreter
Definition: lex.h:346
bbp_nesting_level m_nesting_level
Definition: lex.h:516
bool m_parsing_classdef
Definition: lex.h:396
bool m_reading_script_file
Definition: lex.h:429
bool m_classdef_element_names_are_keywords
Definition: lex.h:387
bool m_reading_fcn_file
Definition: lex.h:426
std::string m_function_text
Definition: lex.h:488
std::string m_fcn_file_name
Definition: lex.h:491
bool m_looking_at_decl_list
Definition: lex.h:369
symbol_table_context m_symtab_context
Definition: lex.h:512
bool m_parsing_class_method
Definition: lex.h:393
bool m_buffer_function_text
Definition: lex.h:436
bool m_force_script
Definition: lex.h:423
void mark_as_variable(const std::string &nm)
Definition: lex.cc:5151
std::string m_dir_name
Definition: lex.h:497
bool m_maybe_classdef_get_set_method
Definition: lex.h:410
bool m_looking_at_indirect_ref
Definition: lex.h:380
int m_looking_at_function_handle
Definition: lex.h:455
int m_defining_fcn
Definition: lex.h:452
virtual std::string doc_string(const std::string &="") const
Definition: ov-fcn.h:219
virtual void maybe_relocate_end()
Definition: ov-fcn.h:192
void document(const std::string &ds)
Definition: ov-fcn.h:216
void stash_dir_name(const std::string &dir)
Definition: ov-fcn.h:172
void stash_dispatch_class(const std::string &nm)
Definition: ov-fcn.h:146
std::string name() const
Definition: ov-fcn.h:206
void stash_package_name(const std::string &pack)
Definition: ov-fcn.h:150
virtual void accept(octave::tree_walker &)
Definition: ov-fcn.h:223
void mark_relative()
Definition: ov-fcn.h:202
virtual void stash_subfunction_names(const std::list< std::string > &)
Definition: ov-fcn.h:197
static const octave_value instance
Definition: ov-null-mat.h:52
static const octave_value instance
Definition: ov-null-mat.h:98
static const octave_value instance
Definition: ov-null-mat.h:74
void stash_fcn_file_name(const std::string &nm)
Definition: ov-usr-fcn.h:94
octave::symbol_scope scope()
Definition: ov-usr-fcn.h:90
std::string fcn_file_name() const
Definition: ov-usr-fcn.h:105
void cache_function_text(const std::string &text, const octave::sys::time &timestamp)
Definition: ov-usr-fcn.cc:118
octave::tree_statement_list * body()
Definition: ov-usr-fcn.h:118
void stash_fcn_file_time(const octave::sys::time &t)
Definition: ov-usr-fcn.h:99
octave::sys::time time_parsed() const
Definition: ov-usr-fcn.h:107
void stash_trailing_comment(octave::comment_list *tc)
Definition: ov-usr-fcn.h:250
void stash_function_name(const std::string &s)
Definition: ov-usr-fcn.h:301
void mark_as_system_fcn_file()
Definition: ov-usr-fcn.cc:339
octave_user_function * define_ret_list(octave::tree_parameter_list *t)
Definition: ov-usr-fcn.cc:239
void mark_as_classdef_method()
Definition: ov-usr-fcn.h:363
octave_user_function * user_function_value(bool=false)
Definition: ov-usr-fcn.h:218
int beginning_column() const
Definition: ov-usr-fcn.h:233
void accept(octave::tree_walker &tw)
Definition: ov-usr-fcn.cc:498
void mark_as_legacy_constructor()
Definition: ov-usr-fcn.h:339
void mark_as_legacy_method()
Definition: ov-usr-fcn.h:355
int beginning_line() const
Definition: ov-usr-fcn.h:232
void stash_leading_comment(octave::comment_list *lc)
Definition: ov-usr-fcn.h:248
std::map< std::string, octave_value > subfunctions() const
Definition: ov-usr-fcn.cc:407
void stash_fcn_location(int line, int col)
Definition: ov-usr-fcn.h:226
void mark_as_subfunction()
Definition: ov-usr-fcn.h:303
void stash_fcn_end_location(int line, int col)
Definition: ov-usr-fcn.h:235
void mark_as_classdef_constructor()
Definition: ov-usr-fcn.h:347
void mark_as_nested_function()
Definition: ov-usr-fcn.h:333
octave_value_list & prepend(const octave_value &val)
Definition: ovl.cc:80
octave_user_function * user_function_value(bool silent=false) const
unary_op
Definition: ov.h:79
@ op_hermitian
Definition: ov.h:84
@ op_uminus
Definition: ov.h:82
@ op_not
Definition: ov.h:80
@ op_transpose
Definition: ov.h:83
@ unknown_unary_op
Definition: ov.h:88
@ op_uplus
Definition: ov.h:81
@ op_incr
Definition: ov.h:85
@ op_decr
Definition: ov.h:86
octave_user_code * user_code_value(bool silent=false) const
bool is_defined() const
Definition: ov.h:592
bool isempty() const
Definition: ov.h:601
assign_op
Definition: ov.h:134
@ op_pow_eq
Definition: ov.h:141
@ op_asn_eq
Definition: ov.h:135
@ op_add_eq
Definition: ov.h:136
@ op_el_pow_eq
Definition: ov.h:145
@ op_mul_eq
Definition: ov.h:138
@ op_div_eq
Definition: ov.h:139
@ op_el_and_eq
Definition: ov.h:146
@ op_el_ldiv_eq
Definition: ov.h:144
@ op_sub_eq
Definition: ov.h:137
@ op_el_mul_eq
Definition: ov.h:142
@ op_el_or_eq
Definition: ov.h:147
@ unknown_assign_op
Definition: ov.h:149
@ op_el_div_eq
Definition: ov.h:143
@ op_ldiv_eq
Definition: ov.h:140
octave_function * function_value(bool silent=false) const
@ magic_colon_t
Definition: ov.h:170
binary_op
Definition: ov.h:92
@ op_ldiv
Definition: ov.h:98
@ op_ne
Definition: ov.h:104
@ unknown_binary_op
Definition: ov.h:113
@ op_el_or
Definition: ov.h:110
@ op_el_ldiv
Definition: ov.h:108
@ op_pow
Definition: ov.h:97
@ op_ge
Definition: ov.h:102
@ op_div
Definition: ov.h:96
@ op_el_pow
Definition: ov.h:107
@ op_mul
Definition: ov.h:95
@ op_add
Definition: ov.h:93
@ op_sub
Definition: ov.h:94
@ op_el_mul
Definition: ov.h:105
@ op_le
Definition: ov.h:100
@ op_lt
Definition: ov.h:99
@ op_gt
Definition: ov.h:103
@ op_eq
Definition: ov.h:101
@ op_el_and
Definition: ov.h:109
@ op_el_div
Definition: ov.h:106
octave_idx_type length() const
Definition: parse.h:822
int run()
Definition: oct-parse.cc:9748
void cache_fcn_name(const std::string &name)
Definition: symscope.h:602
static symbol_scope anonymous()
Definition: symscope.h:405
void update_nest()
Definition: symscope.h:691
void mark_primary_fcn_scope()
Definition: symscope.h:658
static symbol_scope invalid()
Definition: symscope.h:400
void set_parent(const symbol_scope &p)
Definition: symscope.h:624
void install_subfunction(const std::string &name, const octave_value &fval)
Definition: symscope.h:511
void mark_static()
Definition: symscope.h:456
symbol_record insert(const std::string &name)
Definition: symscope.h:500
void cache_fcn_file_name(const std::string &name)
Definition: symscope.h:636
void set_nesting_depth(std::size_t depth)
Definition: symscope.h:440
void set_primary_parent(const symbol_scope &p)
Definition: symscope.h:630
void cache_name(const std::string &name)
Definition: symscope.h:591
void install_nestfunction(const std::string &name, const octave_value &fval, const symbol_scope &fcn_scope)
Definition: symscope.h:518
void cache_dir_name(const std::string &name)
Definition: symscope.h:642
octave_value builtin_find(const std::string &name, const symbol_scope &search_scope=symbol_scope::invalid())
Definition: symtab.cc:195
void install_local_function(const std::string &name, const octave_value &fcn, const std::string &file_name)
Definition: symtab.cc:364
Definition: token.h:39
std::string text_rep() const
Definition: token.cc:138
std::string superclass_class_name() const
Definition: token.cc:131
int token_value() const
Definition: token.h:102
end_tok_type ettype() const
Definition: token.cc:117
std::string superclass_method_name() const
Definition: token.cc:124
filepos beg_pos() const
Definition: token.h:105
int column() const
Definition: token.h:113
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 text() const
Definition: token.cc:97
octave_value number() const
Definition: token.cc:104
int line() const
Definition: token.h:112
void accept(tree_walker &tw)
tree_identifier * class_name()
void arg_name(tree_expression *name)
tree_arg_validation_fcns * validation_fcns()
tree_arg_size_spec * size_spec()
tree_expression * remove_front()
Definition: pt-arg-list.h:78
std::list< std::string > variable_names() const
Definition: pt-arg-list.cc:116
bool is_valid_lvalue_list() const
Definition: pt-arg-list.cc:81
void mark_as_simple_assign_lhs()
Definition: pt-arg-list.h:88
bool has_magic_tilde() const
Definition: pt-arg-list.h:68
bool is_simple_assign_lhs()
Definition: pt-arg-list.h:90
void accept(tree_walker &tw)
bool all_elements_are_constant() const
tree_expression * lhs()
Definition: pt-binop.h:86
octave_value::binary_op op_type() const
Definition: pt-binop.h:84
tree_expression * rhs()
Definition: pt-binop.h:87
void preserve_operands()
Definition: pt-binop.h:76
void doc_string(const std::string &txt)
Definition: pt-classdef.h:304
bool have_doc_string() const
Definition: pt-classdef.h:308
void accept(tree_walker &tw)
Definition: pt-classdef.h:733
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition: pt-colon.cc:55
void accept(tree_walker &tw)
Definition: pt-colon.h:97
void stash_original_text(const std::string &s)
Definition: pt-const.h:94
void mark_persistent()
Definition: pt-decl.h:183
void mark_global()
Definition: pt-decl.h:177
tree_identifier * ident()
Definition: pt-decl.h:84
std::list< std::string > variable_names() const
Definition: pt-decl.h:140
void add_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:4693
void remove_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:4700
octave_map get_autoload_map() const
Definition: pt-eval.cc:4630
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
virtual bool is_binary_expression() const
Definition: pt-exp.h:76
virtual bool is_identifier() const
Definition: pt-exp.h:66
tree_expression * set_postfix_index(char type)
Definition: pt-exp.h:116
bool is_postfix_indexed() const
Definition: pt-exp.h:90
virtual bool is_constant() const
Definition: pt-exp.h:60
void mark_as_for_cmd_expr()
Definition: pt-exp.h:106
virtual bool is_index_expression() const
Definition: pt-exp.h:68
tree_expression * set_print_flag(bool print)
Definition: pt-exp.h:122
virtual std::string name() const
Definition: pt-exp.h:102
virtual bool is_matrix() const
Definition: pt-exp.h:62
virtual bool is_assignment_expression() const
Definition: pt-exp.h:70
int paren_count() const
Definition: pt-exp.h:88
void accept(tree_walker &tw)
Definition: pt-cmd.h:102
octave_value function()
Definition: pt-cmd.h:107
virtual bool is_black_hole() const
Definition: pt-id.h:71
std::string name() const
Definition: pt-id.h:69
std::string name() const
Definition: pt-idx.cc:139
bool is_word_list_cmd() const
Definition: pt-idx.h:92
tree_index_expression * append(tree_argument_list *lst=nullptr, char t='(')
Definition: pt-idx.cc:81
void mark_varargs_only()
Definition: pt-misc.h:79
void mark_varargs()
Definition: pt-misc.h:77
void mark_as_formal_parameters()
Definition: pt-misc.cc:48
void accept(tree_walker &tw)
Definition: pt-stmt.h:191
int column() const
Definition: pt-stmt.cc:127
void set_print_flag(bool print_flag)
Definition: pt-stmt.cc:64
comment_list * comment_text()
Definition: pt-stmt.h:99
bool is_expression() const
Definition: pt-stmt.h:76
void set_expression(tree_expression *e)
Definition: pt-stmt.h:116
bool is_null_statement() const
Definition: pt-stmt.h:101
tree_expression * expression()
Definition: pt-stmt.h:97
int line() const
Definition: pt-stmt.cc:119
virtual void visit_index_expression(tree_index_expression &)
Definition: pt-walk.cc:401
virtual void visit_octave_user_script(octave_user_script &)
Definition: pt-walk.cc:287
virtual void visit_octave_user_function(octave_user_function &)
Definition: pt-walk.cc:296
virtual int line() const
Definition: pt.h:56
virtual int column() const
Definition: pt.h:58
void set_location(int l, int c)
Definition: pt.h:64
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
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:1033
void warning(const char *fmt,...)
Definition: error.cc:1063
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1078
void parse_error(const char *fmt,...)
Definition: error.cc:1093
void() error(const char *fmt,...)
Definition: error.cc:988
void message(const char *name, const char *fmt,...)
Definition: error.cc:956
#define panic_impossible()
Definition: error.h:503
std::string dir_sep_str()
std::string dir_sep_chars()
interpreter & __get_interpreter__()
bool iskeyword(const std::string &s)
Definition: lex.cc:1335
std::FILE * fopen(const std::string &filename, const std::string &mode)
Definition: lo-sysdep.cc:511
std::ifstream ifstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:621
T octave_idx_type m
Definition: mx-inlines.cc:781
std::string tilde_expand(const std::string &name)
Definition: file-ops.cc:289
std::string get_help_from_file(const std::string &nm, bool &symbol_found)
Definition: oct-parse.cc:10153
octave_value_list feval(const octave_value_list &args, int nargout)
Definition: oct-parse.cc:10445
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
Definition: variables.cc:583
void * malloc(unsigned)
#define yyss
Definition: oct-parse.cc:3062
#define OCTAVE_YYUSE(...)
Definition: oct-parse.cc:155
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: oct-parse.cc:598
#define YYMAXDEPTH
Definition: oct-parse.cc:1701
#define YYSTACK_FREE
Definition: oct-parse.cc:636
@ YYENOMEM
Definition: oct-parse.cc:1525
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
#define YY_ASSERT(E)
Definition: oct-parse.cc:618
#define yyerrstatus
Definition: oct-parse.cc:3060
#define YY_(Msgid)
Definition: oct-parse.cc:552
#define YYNOMEM
Definition: oct-parse.cc:1533
#define yypstate
Definition: oct-parse.cc:75
#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
#define YYABORT
Definition: oct-parse.cc:1531
#define YYSTACK_BYTES(N)
Definition: oct-parse.cc:679
int octave_pull_parse(octave_pstate *yyps, octave::base_parser &parser)
Definition: oct-parse.cc:3046
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:3123
#define YY_REDUCE_PRINT(Rule)
Definition: oct-parse.cc:1684
#define YY_CAST(Type, Val)
Definition: oct-parse.cc:174
#define yylex
Definition: oct-parse.cc:76
#define YYMALLOC
Definition: oct-parse.cc:649
#define YY_NULLPTR
Definition: oct-parse.cc:186
#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:1682
#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:1683
#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:3061
#define YYPTRDIFF_T
Definition: oct-parse.cc:511
#define yynerrs
Definition: oct-parse.cc:79
#define yyvsp
Definition: oct-parse.cc:3066
#define scanner
Definition: oct-parse.cc:147
#define YYACCEPT
Definition: oct-parse.cc:1530
#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:3063
#define yystacksize
Definition: oct-parse.cc:3067
#define YY_ATTRIBUTE_UNUSED
Definition: oct-parse.cc:569
#define yyvs
Definition: oct-parse.cc:3065
#define yystate
Definition: oct-parse.cc:3059
#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
int octave_lex(OCTAVE_STYPE *, void *)
The main scanner function which does all the work.
Definition: lex.cc:1621
#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:1690
#define yypush_parse
Definition: oct-parse.cc:70
signed char yytype_int8
Definition: oct-parse.cc:455
void free(void *)
#define YYERROR
Definition: oct-parse.cc:1532
#define YYSIZEOF(X)
Definition: oct-parse.cc:535
#define YYSTACK_ALLOC
Definition: oct-parse.cc:635
#define yyvsa
Definition: oct-parse.cc:3064
#define YYDPRINTF(Args)
Definition: oct-parse.cc:1681
#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
#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:309
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:9903
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=false)
void source_file(const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true)
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:143
std::string undo_string_escapes(const std::string &s)
std::string fcn_file_in_path(const std::string &)
F77_RET_T len
Definition: xerbla.cc:61