GNU Octave  6.2.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.7.5. */
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 <http://www.gnu.org/licenses/>. */
20 
21 /* As a special exception, you may create a larger work that contains
22  part or all of the Bison parser skeleton and distribute that work
23  under terms of your choice, so long as that work isn't itself a
24  parser generator using the skeleton or a modified version thereof
25  as a parser skeleton. Alternatively, if you modify or redistribute
26  the parser skeleton itself, you may (at your option) remove this
27  special exception, which will cause the skeleton and the resulting
28  Bison output files to be licensed under the GNU General Public
29  License without this special exception.
30 
31  This special exception was added by the Free Software Foundation in
32  version 2.2 of Bison. */
33 
34 /* 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 30705
50 
51 /* Bison version string. */
52 #define YYBISON_VERSION "3.7.5"
53 
54 /* Skeleton name. */
55 #define YYSKELETON_NAME "yacc.c"
56 
57 /* Pure parsers. */
58 #define YYPURE 1
59 
60 /* Push parsers. */
61 #define YYPUSH 1
62 
63 /* Pull parsers. */
64 #define YYPULL 1
65 
66 /* Substitute the type names. */
67 #define YYSTYPE OCTAVE_STYPE
68 /* Substitute the variable and function names. */
69 #define yyparse octave_parse
70 #define yypush_parse octave_push_parse
71 #define yypull_parse octave_pull_parse
72 #define yypstate_new octave_pstate_new
73 #define yypstate_clear octave_pstate_clear
74 #define yypstate_delete octave_pstate_delete
75 #define yypstate octave_pstate
76 #define yylex octave_lex
77 #define yyerror octave_error
78 #define yydebug octave_debug
79 #define yynerrs octave_nerrs
80 
81 /* First part of user prologue. */
82 #line 30 "../libinterp/parse-tree/oct-parse.yy"
83 
84 
85 #define YYDEBUG 1
86 
87 #if defined (HAVE_CONFIG_H)
88 # include "config.h"
89 #endif
90 
91 #include <cassert>
92 #include <cstdio>
93 #include <cstdlib>
94 
95 #include <iostream>
96 #include <map>
97 #include <sstream>
98 
99 #include "Matrix.h"
100 #include "cmd-edit.h"
101 #include "cmd-hist.h"
102 #include "file-ops.h"
103 #include "file-stat.h"
104 #include "oct-env.h"
105 #include "oct-time.h"
106 #include "quit.h"
107 
108 #include "Cell.h"
109 #include "anon-fcn-validator.h"
110 #include "builtin-defun-decls.h"
111 #include "defun.h"
112 #include "dynamic-ld.h"
113 #include "error.h"
114 #include "input.h"
115 #include "interpreter-private.h"
116 #include "interpreter.h"
117 #include "lex.h"
118 #include "load-path.h"
119 #include "lo-sysdep.h"
120 #include "oct-hist.h"
121 #include "oct-map.h"
122 #include "ov-classdef.h"
123 #include "ov-fcn-handle.h"
124 #include "ov-usr-fcn.h"
125 #include "ov-null-mat.h"
126 #include "pager.h"
127 #include "parse.h"
128 #include "pt-all.h"
129 #include "pt-eval.h"
130 #include "symtab.h"
131 #include "token.h"
132 #include "unwind-prot.h"
133 #include "utils.h"
134 #include "variables.h"
135 
136 // oct-parse.h must be included after pt-all.h
137 #include "oct-parse.h"
138 
139 extern int octave_lex (YYSTYPE *, void *);
140 
141 // Forward declarations for some functions defined at the bottom of
142 // the file.
143 
144 static void yyerror (octave::base_parser& parser, const char *s);
145 
146 #define lexer (parser.get_lexer ())
147 #define scanner lexer.m_scanner
148 
149 // Previous versions of Octave used Bison's YYUSE macro to avoid
150 // warnings about unused values in rules. But that Bison macro was
151 // apparently never intended to be public. So define our own. All we
152 // need to do is mention the symantic value somewhere in the rule. It
153 // doesn't actually need to be used to avoid the Bison warning, so just
154 // define this macro to discard its parameter.
155 #define OCTAVE_YYUSE(X)
156 
157 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
158  // Disable this warning for code that is generated by Bison,
159  // including grammar rules. Push the current state so we can
160  // restore the warning state prior to functions we define at
161  // the bottom of the file.
162 # pragma GCC diagnostic push
163 # pragma GCC diagnostic ignored "-Wold-style-cast"
164 #endif
165 
166 
167 #line 168 "libinterp/parse-tree/oct-parse.cc"
168 
169 # ifndef YY_CAST
170 # ifdef __cplusplus
171 # define YY_CAST(Type, Val) static_cast<Type> (Val)
172 # define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
173 # else
174 # define YY_CAST(Type, Val) ((Type) (Val))
175 # define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
176 # endif
177 # endif
178 # ifndef YY_NULLPTR
179 # if defined __cplusplus
180 # if 201103L <= __cplusplus
181 # define YY_NULLPTR nullptr
182 # else
183 # define YY_NULLPTR 0
184 # endif
185 # else
186 # define YY_NULLPTR ((void*)0)
187 # endif
188 # endif
189 
190 /* Use api.header.include to #include this header
191  instead of duplicating it here. */
192 #ifndef YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
193 # define YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED
194 /* Debug traces. */
195 #ifndef OCTAVE_DEBUG
196 # if defined YYDEBUG
197 #if YYDEBUG
198 # define OCTAVE_DEBUG 1
199 # else
200 # define OCTAVE_DEBUG 0
201 # endif
202 # else /* ! defined YYDEBUG */
203 # define OCTAVE_DEBUG 0
204 # endif /* ! defined YYDEBUG */
205 #endif /* ! defined OCTAVE_DEBUG */
206 #if OCTAVE_DEBUG
207 extern int octave_debug;
208 #endif
209 
210 /* Token kinds. */
211 #ifndef OCTAVE_TOKENTYPE
212 # define OCTAVE_TOKENTYPE
213  enum octave_tokentype
214  {
215  OCTAVE_EMPTY = -2,
216  OCTAVE_EOF = 0, /* "end of file" */
217  OCTAVE_error = 256, /* error */
218  OCTAVE_UNDEF = 257, /* "invalid token" */
219  ADD_EQ = 258, /* ADD_EQ */
220  SUB_EQ = 259, /* SUB_EQ */
221  MUL_EQ = 260, /* MUL_EQ */
222  DIV_EQ = 261, /* DIV_EQ */
223  LEFTDIV_EQ = 262, /* LEFTDIV_EQ */
224  POW_EQ = 263, /* POW_EQ */
225  EMUL_EQ = 264, /* EMUL_EQ */
226  EDIV_EQ = 265, /* EDIV_EQ */
227  ELEFTDIV_EQ = 266, /* ELEFTDIV_EQ */
228  EPOW_EQ = 267, /* EPOW_EQ */
229  AND_EQ = 268, /* AND_EQ */
230  OR_EQ = 269, /* OR_EQ */
231  EXPR_AND_AND = 270, /* EXPR_AND_AND */
232  EXPR_OR_OR = 271, /* EXPR_OR_OR */
233  EXPR_AND = 272, /* EXPR_AND */
234  EXPR_OR = 273, /* EXPR_OR */
235  EXPR_NOT = 274, /* EXPR_NOT */
236  EXPR_LT = 275, /* EXPR_LT */
237  EXPR_LE = 276, /* EXPR_LE */
238  EXPR_EQ = 277, /* EXPR_EQ */
239  EXPR_NE = 278, /* EXPR_NE */
240  EXPR_GE = 279, /* EXPR_GE */
241  EXPR_GT = 280, /* EXPR_GT */
242  LEFTDIV = 281, /* LEFTDIV */
243  EMUL = 282, /* EMUL */
244  EDIV = 283, /* EDIV */
245  ELEFTDIV = 284, /* ELEFTDIV */
246  EPLUS = 285, /* EPLUS */
247  EMINUS = 286, /* EMINUS */
248  HERMITIAN = 287, /* HERMITIAN */
249  TRANSPOSE = 288, /* TRANSPOSE */
250  PLUS_PLUS = 289, /* PLUS_PLUS */
251  MINUS_MINUS = 290, /* MINUS_MINUS */
252  POW = 291, /* POW */
253  EPOW = 292, /* EPOW */
254  NUM = 293, /* NUM */
255  IMAG_NUM = 294, /* IMAG_NUM */
256  STRUCT_ELT = 295, /* STRUCT_ELT */
257  NAME = 296, /* NAME */
258  END = 297, /* END */
259  DQ_STRING = 298, /* DQ_STRING */
260  SQ_STRING = 299, /* SQ_STRING */
261  FOR = 300, /* FOR */
262  PARFOR = 301, /* PARFOR */
263  WHILE = 302, /* WHILE */
264  DO = 303, /* DO */
265  UNTIL = 304, /* UNTIL */
266  IF = 305, /* IF */
267  ELSEIF = 306, /* ELSEIF */
268  ELSE = 307, /* ELSE */
269  SWITCH = 308, /* SWITCH */
270  CASE = 309, /* CASE */
271  OTHERWISE = 310, /* OTHERWISE */
272  BREAK = 311, /* BREAK */
273  CONTINUE = 312, /* CONTINUE */
274  FUNC_RET = 313, /* FUNC_RET */
275  UNWIND = 314, /* UNWIND */
276  CLEANUP = 315, /* CLEANUP */
277  TRY = 316, /* TRY */
278  CATCH = 317, /* CATCH */
279  GLOBAL = 318, /* GLOBAL */
280  PERSISTENT = 319, /* PERSISTENT */
281  FCN_HANDLE = 320, /* FCN_HANDLE */
282  CLASSDEF = 321, /* CLASSDEF */
283  PROPERTIES = 322, /* PROPERTIES */
284  METHODS = 323, /* METHODS */
285  EVENTS = 324, /* EVENTS */
286  ENUMERATION = 325, /* ENUMERATION */
287  METAQUERY = 326, /* METAQUERY */
288  SUPERCLASSREF = 327, /* SUPERCLASSREF */
289  FQ_IDENT = 328, /* FQ_IDENT */
290  GET = 329, /* GET */
291  SET = 330, /* SET */
292  FCN = 331, /* FCN */
293  LEXICAL_ERROR = 332, /* LEXICAL_ERROR */
294  END_OF_INPUT = 333, /* END_OF_INPUT */
295  INPUT_FILE = 334, /* INPUT_FILE */
296  UNARY = 335 /* UNARY */
297  };
299 #endif
300 /* Token kinds. */
301 #define OCTAVE_EMPTY -2
302 #define OCTAVE_EOF 0
303 #define OCTAVE_error 256
304 #define OCTAVE_UNDEF 257
305 #define ADD_EQ 258
306 #define SUB_EQ 259
307 #define MUL_EQ 260
308 #define DIV_EQ 261
309 #define LEFTDIV_EQ 262
310 #define POW_EQ 263
311 #define EMUL_EQ 264
312 #define EDIV_EQ 265
313 #define ELEFTDIV_EQ 266
314 #define EPOW_EQ 267
315 #define AND_EQ 268
316 #define OR_EQ 269
317 #define EXPR_AND_AND 270
318 #define EXPR_OR_OR 271
319 #define EXPR_AND 272
320 #define EXPR_OR 273
321 #define EXPR_NOT 274
322 #define EXPR_LT 275
323 #define EXPR_LE 276
324 #define EXPR_EQ 277
325 #define EXPR_NE 278
326 #define EXPR_GE 279
327 #define EXPR_GT 280
328 #define LEFTDIV 281
329 #define EMUL 282
330 #define EDIV 283
331 #define ELEFTDIV 284
332 #define EPLUS 285
333 #define EMINUS 286
334 #define HERMITIAN 287
335 #define TRANSPOSE 288
336 #define PLUS_PLUS 289
337 #define MINUS_MINUS 290
338 #define POW 291
339 #define EPOW 292
340 #define NUM 293
341 #define IMAG_NUM 294
342 #define STRUCT_ELT 295
343 #define NAME 296
344 #define END 297
345 #define DQ_STRING 298
346 #define SQ_STRING 299
347 #define FOR 300
348 #define PARFOR 301
349 #define WHILE 302
350 #define DO 303
351 #define UNTIL 304
352 #define IF 305
353 #define ELSEIF 306
354 #define ELSE 307
355 #define SWITCH 308
356 #define CASE 309
357 #define OTHERWISE 310
358 #define BREAK 311
359 #define CONTINUE 312
360 #define FUNC_RET 313
361 #define UNWIND 314
362 #define CLEANUP 315
363 #define TRY 316
364 #define CATCH 317
365 #define GLOBAL 318
366 #define PERSISTENT 319
367 #define FCN_HANDLE 320
368 #define CLASSDEF 321
369 #define PROPERTIES 322
370 #define METHODS 323
371 #define EVENTS 324
372 #define ENUMERATION 325
373 #define METAQUERY 326
374 #define SUPERCLASSREF 327
375 #define FQ_IDENT 328
376 #define GET 329
377 #define SET 330
378 #define FCN 331
379 #define LEXICAL_ERROR 332
380 #define END_OF_INPUT 333
381 #define INPUT_FILE 334
382 #define UNARY 335
383 
384 /* Value type. */
385 #if ! defined OCTAVE_STYPE && ! defined OCTAVE_STYPE_IS_DECLARED
386 union OCTAVE_STYPE
387 {
388 #line 139 "../libinterp/parse-tree/oct-parse.yy"
389 
390  int dummy_type;
391 
392  // The type of the basic tokens returned by the lexer.
394 
395  // Comment strings that we need to deal with mid-rule.
397 
398  // Types for the nonterminals we generate.
399  char punct_type;
428 
446 
447 #line 448 "libinterp/parse-tree/oct-parse.cc"
448 
449 };
450 typedef union OCTAVE_STYPE OCTAVE_STYPE;
451 # define OCTAVE_STYPE_IS_TRIVIAL 1
452 # define OCTAVE_STYPE_IS_DECLARED 1
453 #endif
454 
455 
456 
457 #ifndef YYPUSH_MORE_DEFINED
458 # define YYPUSH_MORE_DEFINED
459 enum { YYPUSH_MORE = 4 };
460 #endif
461 
462 typedef struct octave_pstate octave_pstate;
463 
464 
465 int octave_parse (octave::base_parser& parser);
467  int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser& parser);
471 
472 
473 #endif /* !YY_OCTAVE_LIBINTERP_PARSE_TREE_OCT_PARSE_H_INCLUDED */
474 /* Symbol kind. */
476 {
478  YYSYMBOL_YYEOF = 0, /* "end of file" */
479  YYSYMBOL_YYerror = 1, /* error */
480  YYSYMBOL_YYUNDEF = 2, /* "invalid token" */
481  YYSYMBOL_3_ = 3, /* '=' */
482  YYSYMBOL_4_ = 4, /* ':' */
483  YYSYMBOL_5_ = 5, /* '-' */
484  YYSYMBOL_6_ = 6, /* '+' */
485  YYSYMBOL_7_ = 7, /* '*' */
486  YYSYMBOL_8_ = 8, /* '/' */
487  YYSYMBOL_9_ = 9, /* '(' */
488  YYSYMBOL_10_ = 10, /* ')' */
489  YYSYMBOL_11_ = 11, /* '[' */
490  YYSYMBOL_12_ = 12, /* ']' */
491  YYSYMBOL_13_ = 13, /* '{' */
492  YYSYMBOL_14_ = 14, /* '}' */
493  YYSYMBOL_15_ = 15, /* '.' */
494  YYSYMBOL_16_ = 16, /* '@' */
495  YYSYMBOL_17_ = 17, /* ',' */
496  YYSYMBOL_18_ = 18, /* ';' */
497  YYSYMBOL_19_n_ = 19, /* '\n' */
498  YYSYMBOL_ADD_EQ = 20, /* ADD_EQ */
499  YYSYMBOL_SUB_EQ = 21, /* SUB_EQ */
500  YYSYMBOL_MUL_EQ = 22, /* MUL_EQ */
501  YYSYMBOL_DIV_EQ = 23, /* DIV_EQ */
502  YYSYMBOL_LEFTDIV_EQ = 24, /* LEFTDIV_EQ */
503  YYSYMBOL_POW_EQ = 25, /* POW_EQ */
504  YYSYMBOL_EMUL_EQ = 26, /* EMUL_EQ */
505  YYSYMBOL_EDIV_EQ = 27, /* EDIV_EQ */
506  YYSYMBOL_ELEFTDIV_EQ = 28, /* ELEFTDIV_EQ */
507  YYSYMBOL_EPOW_EQ = 29, /* EPOW_EQ */
508  YYSYMBOL_AND_EQ = 30, /* AND_EQ */
509  YYSYMBOL_OR_EQ = 31, /* OR_EQ */
510  YYSYMBOL_EXPR_AND_AND = 32, /* EXPR_AND_AND */
511  YYSYMBOL_EXPR_OR_OR = 33, /* EXPR_OR_OR */
512  YYSYMBOL_EXPR_AND = 34, /* EXPR_AND */
513  YYSYMBOL_EXPR_OR = 35, /* EXPR_OR */
514  YYSYMBOL_EXPR_NOT = 36, /* EXPR_NOT */
515  YYSYMBOL_EXPR_LT = 37, /* EXPR_LT */
516  YYSYMBOL_EXPR_LE = 38, /* EXPR_LE */
517  YYSYMBOL_EXPR_EQ = 39, /* EXPR_EQ */
518  YYSYMBOL_EXPR_NE = 40, /* EXPR_NE */
519  YYSYMBOL_EXPR_GE = 41, /* EXPR_GE */
520  YYSYMBOL_EXPR_GT = 42, /* EXPR_GT */
521  YYSYMBOL_LEFTDIV = 43, /* LEFTDIV */
522  YYSYMBOL_EMUL = 44, /* EMUL */
523  YYSYMBOL_EDIV = 45, /* EDIV */
524  YYSYMBOL_ELEFTDIV = 46, /* ELEFTDIV */
525  YYSYMBOL_EPLUS = 47, /* EPLUS */
526  YYSYMBOL_EMINUS = 48, /* EMINUS */
527  YYSYMBOL_HERMITIAN = 49, /* HERMITIAN */
528  YYSYMBOL_TRANSPOSE = 50, /* TRANSPOSE */
529  YYSYMBOL_PLUS_PLUS = 51, /* PLUS_PLUS */
530  YYSYMBOL_MINUS_MINUS = 52, /* MINUS_MINUS */
531  YYSYMBOL_POW = 53, /* POW */
532  YYSYMBOL_EPOW = 54, /* EPOW */
533  YYSYMBOL_NUM = 55, /* NUM */
534  YYSYMBOL_IMAG_NUM = 56, /* IMAG_NUM */
535  YYSYMBOL_STRUCT_ELT = 57, /* STRUCT_ELT */
536  YYSYMBOL_NAME = 58, /* NAME */
537  YYSYMBOL_END = 59, /* END */
538  YYSYMBOL_DQ_STRING = 60, /* DQ_STRING */
539  YYSYMBOL_SQ_STRING = 61, /* SQ_STRING */
540  YYSYMBOL_FOR = 62, /* FOR */
541  YYSYMBOL_PARFOR = 63, /* PARFOR */
542  YYSYMBOL_WHILE = 64, /* WHILE */
543  YYSYMBOL_DO = 65, /* DO */
544  YYSYMBOL_UNTIL = 66, /* UNTIL */
545  YYSYMBOL_IF = 67, /* IF */
546  YYSYMBOL_ELSEIF = 68, /* ELSEIF */
547  YYSYMBOL_ELSE = 69, /* ELSE */
548  YYSYMBOL_SWITCH = 70, /* SWITCH */
549  YYSYMBOL_CASE = 71, /* CASE */
550  YYSYMBOL_OTHERWISE = 72, /* OTHERWISE */
551  YYSYMBOL_BREAK = 73, /* BREAK */
552  YYSYMBOL_CONTINUE = 74, /* CONTINUE */
553  YYSYMBOL_FUNC_RET = 75, /* FUNC_RET */
554  YYSYMBOL_UNWIND = 76, /* UNWIND */
555  YYSYMBOL_CLEANUP = 77, /* CLEANUP */
556  YYSYMBOL_TRY = 78, /* TRY */
557  YYSYMBOL_CATCH = 79, /* CATCH */
558  YYSYMBOL_GLOBAL = 80, /* GLOBAL */
559  YYSYMBOL_PERSISTENT = 81, /* PERSISTENT */
560  YYSYMBOL_FCN_HANDLE = 82, /* FCN_HANDLE */
561  YYSYMBOL_CLASSDEF = 83, /* CLASSDEF */
562  YYSYMBOL_PROPERTIES = 84, /* PROPERTIES */
563  YYSYMBOL_METHODS = 85, /* METHODS */
564  YYSYMBOL_EVENTS = 86, /* EVENTS */
565  YYSYMBOL_ENUMERATION = 87, /* ENUMERATION */
566  YYSYMBOL_METAQUERY = 88, /* METAQUERY */
567  YYSYMBOL_SUPERCLASSREF = 89, /* SUPERCLASSREF */
568  YYSYMBOL_FQ_IDENT = 90, /* FQ_IDENT */
569  YYSYMBOL_GET = 91, /* GET */
570  YYSYMBOL_SET = 92, /* SET */
571  YYSYMBOL_FCN = 93, /* FCN */
572  YYSYMBOL_LEXICAL_ERROR = 94, /* LEXICAL_ERROR */
573  YYSYMBOL_END_OF_INPUT = 95, /* END_OF_INPUT */
574  YYSYMBOL_INPUT_FILE = 96, /* INPUT_FILE */
575  YYSYMBOL_UNARY = 97, /* UNARY */
576  YYSYMBOL_YYACCEPT = 98, /* $accept */
577  YYSYMBOL_input = 99, /* input */
578  YYSYMBOL_simple_list = 100, /* simple_list */
579  YYSYMBOL_simple_list1 = 101, /* simple_list1 */
580  YYSYMBOL_opt_list = 102, /* opt_list */
581  YYSYMBOL_list = 103, /* list */
582  YYSYMBOL_list1 = 104, /* list1 */
583  YYSYMBOL_opt_fcn_list = 105, /* opt_fcn_list */
584  YYSYMBOL_fcn_list = 106, /* fcn_list */
585  YYSYMBOL_fcn_list1 = 107, /* fcn_list1 */
586  YYSYMBOL_statement = 108, /* statement */
587  YYSYMBOL_word_list_cmd = 109, /* word_list_cmd */
588  YYSYMBOL_word_list = 110, /* word_list */
589  YYSYMBOL_identifier = 111, /* identifier */
590  YYSYMBOL_superclass_identifier = 112, /* superclass_identifier */
591  YYSYMBOL_meta_identifier = 113, /* meta_identifier */
592  YYSYMBOL_string = 114, /* string */
593  YYSYMBOL_constant = 115, /* constant */
594  YYSYMBOL_matrix = 116, /* matrix */
595  YYSYMBOL_matrix_rows = 117, /* matrix_rows */
596  YYSYMBOL_cell = 118, /* cell */
597  YYSYMBOL_cell_rows = 119, /* cell_rows */
598  YYSYMBOL_cell_or_matrix_row = 120, /* cell_or_matrix_row */
599  YYSYMBOL_fcn_handle = 121, /* fcn_handle */
600  YYSYMBOL_anon_fcn_handle = 122, /* anon_fcn_handle */
601  YYSYMBOL_primary_expr = 123, /* primary_expr */
602  YYSYMBOL_magic_colon = 124, /* magic_colon */
603  YYSYMBOL_magic_tilde = 125, /* magic_tilde */
604  YYSYMBOL_arg_list = 126, /* arg_list */
605  YYSYMBOL_indirect_ref_op = 127, /* indirect_ref_op */
606  YYSYMBOL_oper_expr = 128, /* oper_expr */
607  YYSYMBOL_power_expr = 129, /* power_expr */
608  YYSYMBOL_colon_expr = 130, /* colon_expr */
609  YYSYMBOL_simple_expr = 131, /* simple_expr */
610  YYSYMBOL_assign_lhs = 132, /* assign_lhs */
611  YYSYMBOL_assign_expr = 133, /* assign_expr */
612  YYSYMBOL_expression = 134, /* expression */
613  YYSYMBOL_command = 135, /* command */
614  YYSYMBOL_declaration = 136, /* declaration */
615  YYSYMBOL_decl1 = 137, /* decl1 */
616  YYSYMBOL_decl_param_init = 138, /* decl_param_init */
617  YYSYMBOL_decl2 = 139, /* decl2 */
618  YYSYMBOL_select_command = 140, /* select_command */
619  YYSYMBOL_if_command = 141, /* if_command */
620  YYSYMBOL_if_cmd_list = 142, /* if_cmd_list */
621  YYSYMBOL_if_cmd_list1 = 143, /* if_cmd_list1 */
622  YYSYMBOL_elseif_clause = 144, /* elseif_clause */
623  YYSYMBOL_else_clause = 145, /* else_clause */
624  YYSYMBOL_switch_command = 146, /* switch_command */
625  YYSYMBOL_case_list = 147, /* case_list */
626  YYSYMBOL_case_list1 = 148, /* case_list1 */
627  YYSYMBOL_switch_case = 149, /* switch_case */
628  YYSYMBOL_default_case = 150, /* default_case */
629  YYSYMBOL_loop_command = 151, /* loop_command */
630  YYSYMBOL_jump_command = 152, /* jump_command */
631  YYSYMBOL_except_command = 153, /* except_command */
632  YYSYMBOL_push_fcn_symtab = 154, /* push_fcn_symtab */
633  YYSYMBOL_param_list_beg = 155, /* param_list_beg */
634  YYSYMBOL_param_list_end = 156, /* param_list_end */
635  YYSYMBOL_opt_param_list = 157, /* opt_param_list */
636  YYSYMBOL_param_list = 158, /* param_list */
637  YYSYMBOL_param_list1 = 159, /* param_list1 */
638  YYSYMBOL_param_list2 = 160, /* param_list2 */
639  YYSYMBOL_param_list_elt = 161, /* param_list_elt */
640  YYSYMBOL_return_list = 162, /* return_list */
641  YYSYMBOL_return_list1 = 163, /* return_list1 */
642  YYSYMBOL_parsing_local_fcns = 164, /* parsing_local_fcns */
643  YYSYMBOL_push_script_symtab = 165, /* push_script_symtab */
644  YYSYMBOL_begin_file = 166, /* begin_file */
645  YYSYMBOL_file = 167, /* file */
646  YYSYMBOL_function_beg = 168, /* function_beg */
647  YYSYMBOL_fcn_name = 169, /* fcn_name */
648  YYSYMBOL_function_end = 170, /* function_end */
649  YYSYMBOL_function = 171, /* function */
650  YYSYMBOL_classdef_beg = 172, /* classdef_beg */
651  YYSYMBOL_classdef = 173, /* classdef */
652  YYSYMBOL_attr_list = 174, /* attr_list */
653  YYSYMBOL_attr_list1 = 175, /* attr_list1 */
654  YYSYMBOL_attr = 176, /* attr */
655  YYSYMBOL_superclass_list = 177, /* superclass_list */
656  YYSYMBOL_superclass_list1 = 178, /* superclass_list1 */
657  YYSYMBOL_superclass = 179, /* superclass */
658  YYSYMBOL_class_body = 180, /* class_body */
659  YYSYMBOL_class_body1 = 181, /* class_body1 */
660  YYSYMBOL_properties_block = 182, /* properties_block */
661  YYSYMBOL_property_list = 183, /* property_list */
662  YYSYMBOL_property_list1 = 184, /* property_list1 */
663  YYSYMBOL_class_property = 185, /* class_property */
664  YYSYMBOL_methods_block = 186, /* methods_block */
665  YYSYMBOL_method_decl1 = 187, /* method_decl1 */
666  YYSYMBOL_method_decl = 188, /* method_decl */
667  YYSYMBOL_189_1 = 189, /* $@1 */
668  YYSYMBOL_method = 190, /* method */
669  YYSYMBOL_methods_list = 191, /* methods_list */
670  YYSYMBOL_methods_list1 = 192, /* methods_list1 */
671  YYSYMBOL_events_block = 193, /* events_block */
672  YYSYMBOL_events_list = 194, /* events_list */
673  YYSYMBOL_events_list1 = 195, /* events_list1 */
674  YYSYMBOL_class_event = 196, /* class_event */
675  YYSYMBOL_enum_block = 197, /* enum_block */
676  YYSYMBOL_enum_list = 198, /* enum_list */
677  YYSYMBOL_enum_list1 = 199, /* enum_list1 */
678  YYSYMBOL_class_enum = 200, /* class_enum */
679  YYSYMBOL_stmt_begin = 201, /* stmt_begin */
680  YYSYMBOL_anon_fcn_begin = 202, /* anon_fcn_begin */
681  YYSYMBOL_stash_comment = 203, /* stash_comment */
682  YYSYMBOL_parse_error = 204, /* parse_error */
683  YYSYMBOL_sep_no_nl = 205, /* sep_no_nl */
684  YYSYMBOL_opt_sep_no_nl = 206, /* opt_sep_no_nl */
685  YYSYMBOL_opt_nl = 207, /* opt_nl */
686  YYSYMBOL_nl = 208, /* nl */
687  YYSYMBOL_sep = 209, /* sep */
688  YYSYMBOL_opt_sep = 210 /* opt_sep */
689 };
690 typedef enum yysymbol_kind_t yysymbol_kind_t;
691 
692 
693 
694 
695 #ifdef short
696 # undef short
697 #endif
698 
699 /* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
700  <limits.h> and (if available) <stdint.h> are included
701  so that the code can choose integer types of a good width. */
702 
703 #ifndef __PTRDIFF_MAX__
704 # include <limits.h> /* INFRINGES ON USER NAME SPACE */
705 # if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
706 # include <stdint.h> /* INFRINGES ON USER NAME SPACE */
707 # define YY_STDINT_H
708 # endif
709 #endif
710 
711 /* Narrow types that promote to a signed type and that can represent a
712  signed or unsigned integer of at least N bits. In tables they can
713  save space and decrease cache pressure. Promoting to a signed type
714  helps avoid bugs in integer arithmetic. */
715 
716 #ifdef __INT_LEAST8_MAX__
717 typedef __INT_LEAST8_TYPE__ yytype_int8;
718 #elif defined YY_STDINT_H
719 typedef int_least8_t yytype_int8;
720 #else
721 typedef signed char yytype_int8;
722 #endif
723 
724 #ifdef __INT_LEAST16_MAX__
725 typedef __INT_LEAST16_TYPE__ yytype_int16;
726 #elif defined YY_STDINT_H
727 typedef int_least16_t yytype_int16;
728 #else
729 typedef short yytype_int16;
730 #endif
731 
732 /* Work around bug in HP-UX 11.23, which defines these macros
733  incorrectly for preprocessor constants. This workaround can likely
734  be removed in 2023, as HPE has promised support for HP-UX 11.23
735  (aka HP-UX 11i v2) only through the end of 2022; see Table 2 of
736  <https://h20195.www2.hpe.com/V2/getpdf.aspx/4AA4-7673ENW.pdf>. */
737 #ifdef __hpux
738 # undef UINT_LEAST8_MAX
739 # undef UINT_LEAST16_MAX
740 # define UINT_LEAST8_MAX 255
741 # define UINT_LEAST16_MAX 65535
742 #endif
743 
744 #if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
745 typedef __UINT_LEAST8_TYPE__ yytype_uint8;
746 #elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
747  && UINT_LEAST8_MAX <= INT_MAX)
748 typedef uint_least8_t yytype_uint8;
749 #elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
750 typedef unsigned char yytype_uint8;
751 #else
752 typedef short yytype_uint8;
753 #endif
754 
755 #if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
756 typedef __UINT_LEAST16_TYPE__ yytype_uint16;
757 #elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
758  && UINT_LEAST16_MAX <= INT_MAX)
759 typedef uint_least16_t yytype_uint16;
760 #elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
761 typedef unsigned short yytype_uint16;
762 #else
763 typedef int yytype_uint16;
764 #endif
765 
766 #ifndef YYPTRDIFF_T
767 # if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
768 # define YYPTRDIFF_T __PTRDIFF_TYPE__
769 # define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
770 # elif defined PTRDIFF_MAX
771 # ifndef ptrdiff_t
772 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
773 # endif
774 # define YYPTRDIFF_T ptrdiff_t
775 # define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
776 # else
777 # define YYPTRDIFF_T long
778 # define YYPTRDIFF_MAXIMUM LONG_MAX
779 # endif
780 #endif
781 
782 #ifndef YYSIZE_T
783 # ifdef __SIZE_TYPE__
784 # define YYSIZE_T __SIZE_TYPE__
785 # elif defined size_t
786 # define YYSIZE_T size_t
787 # elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
788 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
789 # define YYSIZE_T size_t
790 # else
791 # define YYSIZE_T unsigned
792 # endif
793 #endif
794 
795 #define YYSIZE_MAXIMUM \
796  YY_CAST (YYPTRDIFF_T, \
797  (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
798  ? YYPTRDIFF_MAXIMUM \
799  : YY_CAST (YYSIZE_T, -1)))
800 
801 #define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
802 
803 
804 /* Stored state numbers (used for stacks). */
806 
807 /* State numbers in computations. */
808 typedef int yy_state_fast_t;
809 
810 #ifndef YY_
811 # if defined YYENABLE_NLS && YYENABLE_NLS
812 # if ENABLE_NLS
813 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
814 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
815 # endif
816 # endif
817 # ifndef YY_
818 # define YY_(Msgid) Msgid
819 # endif
820 #endif
821 
822 
823 #ifndef YY_ATTRIBUTE_PURE
824 # if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
825 # define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
826 # else
827 # define YY_ATTRIBUTE_PURE
828 # endif
829 #endif
830 
831 #ifndef YY_ATTRIBUTE_UNUSED
832 # if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
833 # define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
834 # else
835 # define YY_ATTRIBUTE_UNUSED
836 # endif
837 #endif
838 
839 /* Suppress unused-variable warnings by "using" E. */
840 #if ! defined lint || defined __GNUC__
841 # define YY_USE(E) ((void) (E))
842 #else
843 # define YY_USE(E) /* empty */
844 #endif
845 
846 #if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
847 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
848 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
849  _Pragma ("GCC diagnostic push") \
850  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
851  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
852 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
853  _Pragma ("GCC diagnostic pop")
854 #else
855 # define YY_INITIAL_VALUE(Value) Value
856 #endif
857 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
858 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
859 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
860 #endif
861 #ifndef YY_INITIAL_VALUE
862 # define YY_INITIAL_VALUE(Value) /* Nothing. */
863 #endif
864 
865 #if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
866 # define YY_IGNORE_USELESS_CAST_BEGIN \
867  _Pragma ("GCC diagnostic push") \
868  _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
869 # define YY_IGNORE_USELESS_CAST_END \
870  _Pragma ("GCC diagnostic pop")
871 #endif
872 #ifndef YY_IGNORE_USELESS_CAST_BEGIN
873 # define YY_IGNORE_USELESS_CAST_BEGIN
874 # define YY_IGNORE_USELESS_CAST_END
875 #endif
876 
877 
878 #define YY_ASSERT(E) ((void) (0 && (E)))
879 
880 #if !defined yyoverflow
881 
882 /* The parser invokes alloca or malloc; define the necessary symbols. */
883 
884 # ifdef YYSTACK_ALLOC
885  /* Pacify GCC's 'empty if-body' warning. */
886 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
887 # ifndef YYSTACK_ALLOC_MAXIMUM
888  /* The OS might guarantee only one guard page at the bottom of the stack,
889  and a page size can be as small as 4096 bytes. So we cannot safely
890  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
891  to allow for a few compiler-allocated temporary stack slots. */
892 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
893 # endif
894 # else
895 # define YYSTACK_ALLOC YYMALLOC
896 # define YYSTACK_FREE YYFREE
897 # ifndef YYSTACK_ALLOC_MAXIMUM
898 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
899 # endif
900 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
901  && ! ((defined YYMALLOC || defined malloc) \
902  && (defined YYFREE || defined free)))
903 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
904 # ifndef EXIT_SUCCESS
905 # define EXIT_SUCCESS 0
906 # endif
907 # endif
908 # ifndef YYMALLOC
909 # define YYMALLOC malloc
910 # if ! defined malloc && ! defined EXIT_SUCCESS
911 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
912 # endif
913 # endif
914 # ifndef YYFREE
915 # define YYFREE free
916 # if ! defined free && ! defined EXIT_SUCCESS
917 void free (void *); /* INFRINGES ON USER NAME SPACE */
918 # endif
919 # endif
920 # endif
921 #endif /* !defined yyoverflow */
922 
923 #if (! defined yyoverflow \
924  && (! defined __cplusplus \
925  || (defined OCTAVE_STYPE_IS_TRIVIAL && OCTAVE_STYPE_IS_TRIVIAL)))
926 
927 /* A type that is properly aligned for any stack member. */
928 union yyalloc
929 {
932 };
933 
934 /* The size of the maximum gap between one aligned stack and the next. */
935 # define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
936 
937 /* The size of an array large to enough to hold all stacks, each with
938  N elements. */
939 # define YYSTACK_BYTES(N) \
940  ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
941  + YYSTACK_GAP_MAXIMUM)
942 
943 # define YYCOPY_NEEDED 1
944 
945 /* Relocate STACK from its old location to the new one. The
946  local variables YYSIZE and YYSTACKSIZE give the old and new number of
947  elements in the stack, and YYPTR gives the new location of the
948  stack. Advance YYPTR to a properly aligned location for the next
949  stack. */
950 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
951  do \
952  { \
953  YYPTRDIFF_T yynewbytes; \
954  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
955  Stack = &yyptr->Stack_alloc; \
956  yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
957  yyptr += yynewbytes / YYSIZEOF (*yyptr); \
958  } \
959  while (0)
960 
961 #endif
962 
963 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
964 /* Copy COUNT objects from SRC to DST. The source and destination do
965  not overlap. */
966 # ifndef YYCOPY
967 # if defined __GNUC__ && 1 < __GNUC__
968 # define YYCOPY(Dst, Src, Count) \
969  __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
970 # else
971 # define YYCOPY(Dst, Src, Count) \
972  do \
973  { \
974  YYPTRDIFF_T yyi; \
975  for (yyi = 0; yyi < (Count); yyi++) \
976  (Dst)[yyi] = (Src)[yyi]; \
977  } \
978  while (0)
979 # endif
980 # endif
981 #endif /* !YYCOPY_NEEDED */
982 
983 /* YYFINAL -- State number of the termination state. */
984 #define YYFINAL 106
985 /* YYLAST -- Last index in YYTABLE. */
986 #define YYLAST 1588
987 
988 /* YYNTOKENS -- Number of terminals. */
989 #define YYNTOKENS 98
990 /* YYNNTS -- Number of nonterminals. */
991 #define YYNNTS 113
992 /* YYNRULES -- Number of rules. */
993 #define YYNRULES 290
994 /* YYNSTATES -- Number of states. */
995 #define YYNSTATES 529
996 
997 /* YYMAXUTOK -- Last valid token kind. */
998 #define YYMAXUTOK 335
999 
1000 
1001 /* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
1002  as returned by yylex, with out-of-bounds checking. */
1003 #define YYTRANSLATE(YYX) \
1004  (0 <= (YYX) && (YYX) <= YYMAXUTOK \
1005  ? YY_CAST (yysymbol_kind_t, yytranslate[YYX]) \
1006  : YYSYMBOL_YYUNDEF)
1007 
1008 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
1009  as returned by yylex. */
1010 static const yytype_int8 yytranslate[] =
1011 {
1012  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1013  19, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1014  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1015  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1016  9, 10, 7, 6, 17, 5, 15, 8, 2, 2,
1017  2, 2, 2, 2, 2, 2, 2, 2, 4, 18,
1018  2, 3, 2, 2, 16, 2, 2, 2, 2, 2,
1019  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1020  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1021  2, 11, 2, 12, 2, 2, 2, 2, 2, 2,
1022  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1023  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1024  2, 2, 2, 13, 2, 14, 2, 2, 2, 2,
1025  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1026  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1027  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1028  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1029  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1030  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1031  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1032  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1033  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1034  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1035  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1036  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
1037  2, 2, 2, 2, 2, 2, 1, 2, 20, 21,
1038  22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
1039  32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
1040  42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1041  52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
1042  62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
1043  72, 73, 74, 75, 76, 77, 78, 79, 80, 81,
1044  82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
1045  92, 93, 94, 95, 96, 97
1046 };
1047 
1048 #if OCTAVE_DEBUG
1049  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
1050 static const yytype_int16 yyrline[] =
1051 {
1052  0, 391, 391, 400, 410, 417, 423, 427, 429, 434,
1053  435, 439, 443, 445, 450, 451, 455, 463, 468, 475,
1054  477, 479, 491, 503, 505, 516, 525, 536, 545, 547,
1055  551, 553, 555, 559, 563, 565, 581, 585, 587, 612,
1056  613, 619, 621, 627, 633, 642, 650, 662, 675, 677,
1057  679, 681, 686, 688, 690, 692, 701, 710, 718, 720,
1058  722, 724, 731, 738, 747, 756, 758, 760, 762, 774,
1059  786, 798, 810, 812, 814, 816, 823, 825, 827, 829,
1060  831, 833, 835, 837, 839, 841, 843, 845, 847, 849,
1061  851, 853, 855, 859, 861, 863, 865, 877, 889, 901,
1062  913, 915, 922, 924, 926, 928, 930, 934, 946, 961,
1063  963, 965, 967, 969, 971, 973, 975, 977, 979, 981,
1064  983, 987, 1001, 1003, 1005, 1007, 1009, 1011, 1013, 1015,
1065  1017, 1019, 1021, 1023, 1025, 1029, 1044, 1051, 1059, 1061,
1066  1063, 1065, 1067, 1069, 1071, 1079, 1084, 1091, 1093, 1101,
1067  1106, 1108, 1121, 1123, 1131, 1141, 1143, 1150, 1158, 1165,
1068  1176, 1189, 1202, 1203, 1205, 1207, 1214, 1216, 1223, 1232,
1069  1245, 1257, 1264, 1276, 1290, 1302, 1323, 1328, 1333, 1341,
1070  1354, 1367, 1385, 1397, 1414, 1425, 1426, 1430, 1437, 1446,
1071  1447, 1464, 1466, 1475, 1477, 1485, 1494, 1513, 1533, 1537,
1072  1552, 1556, 1565, 1569, 1597, 1616, 1625, 1634, 1644, 1656,
1073  1669, 1704, 1711, 1725, 1742, 1762, 1763, 1773, 1775, 1784,
1074  1786, 1793, 1802, 1808, 1820, 1826, 1835, 1840, 1841, 1849,
1075  1851, 1853, 1855, 1857, 1864, 1871, 1878, 1888, 1906, 1907,
1076  1916, 1918, 1950, 1954, 1964, 1981, 1986, 1993, 1996, 1995,
1077  2011, 2013, 2018, 2019, 2027, 2035, 2049, 2067, 2068, 2076,
1078  2078, 2087, 2091, 2109, 2110, 2118, 2120, 2129, 2143, 2150,
1079  2158, 2161, 2167, 2171, 2177, 2183, 2189, 2198, 2199, 2204,
1080  2205, 2209, 2215, 2223, 2229, 2235, 2241, 2247, 2253, 2262,
1081  2263
1082 };
1083 #endif
1084 
1085 /** Accessing symbol of state STATE. */
1086 #define YY_ACCESSING_SYMBOL(State) YY_CAST (yysymbol_kind_t, yystos[State])
1087 
1088 #if OCTAVE_DEBUG || 0
1089 /* The user-facing name of the symbol whose (internal) number is
1090  YYSYMBOL. No bounds checking. */
1091 static const char *yysymbol_name (yysymbol_kind_t yysymbol) YY_ATTRIBUTE_UNUSED;
1092 
1093 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
1094  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
1095 static const char *const yytname[] =
1096 {
1097  "\"end of file\"", "error", "\"invalid token\"", "'='", "':'", "'-'",
1098  "'+'", "'*'", "'/'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'.'",
1099  "'@'", "','", "';'", "'\\n'", "ADD_EQ", "SUB_EQ", "MUL_EQ", "DIV_EQ",
1100  "LEFTDIV_EQ", "POW_EQ", "EMUL_EQ", "EDIV_EQ", "ELEFTDIV_EQ", "EPOW_EQ",
1101  "AND_EQ", "OR_EQ", "EXPR_AND_AND", "EXPR_OR_OR", "EXPR_AND", "EXPR_OR",
1102  "EXPR_NOT", "EXPR_LT", "EXPR_LE", "EXPR_EQ", "EXPR_NE", "EXPR_GE",
1103  "EXPR_GT", "LEFTDIV", "EMUL", "EDIV", "ELEFTDIV", "EPLUS", "EMINUS",
1104  "HERMITIAN", "TRANSPOSE", "PLUS_PLUS", "MINUS_MINUS", "POW", "EPOW",
1105  "NUM", "IMAG_NUM", "STRUCT_ELT", "NAME", "END", "DQ_STRING", "SQ_STRING",
1106  "FOR", "PARFOR", "WHILE", "DO", "UNTIL", "IF", "ELSEIF", "ELSE",
1107  "SWITCH", "CASE", "OTHERWISE", "BREAK", "CONTINUE", "FUNC_RET", "UNWIND",
1108  "CLEANUP", "TRY", "CATCH", "GLOBAL", "PERSISTENT", "FCN_HANDLE",
1109  "CLASSDEF", "PROPERTIES", "METHODS", "EVENTS", "ENUMERATION",
1110  "METAQUERY", "SUPERCLASSREF", "FQ_IDENT", "GET", "SET", "FCN",
1111  "LEXICAL_ERROR", "END_OF_INPUT", "INPUT_FILE", "UNARY", "$accept",
1112  "input", "simple_list", "simple_list1", "opt_list", "list", "list1",
1113  "opt_fcn_list", "fcn_list", "fcn_list1", "statement", "word_list_cmd",
1114  "word_list", "identifier", "superclass_identifier", "meta_identifier",
1115  "string", "constant", "matrix", "matrix_rows", "cell", "cell_rows",
1116  "cell_or_matrix_row", "fcn_handle", "anon_fcn_handle", "primary_expr",
1117  "magic_colon", "magic_tilde", "arg_list", "indirect_ref_op", "oper_expr",
1118  "power_expr", "colon_expr", "simple_expr", "assign_lhs", "assign_expr",
1119  "expression", "command", "declaration", "decl1", "decl_param_init",
1120  "decl2", "select_command", "if_command", "if_cmd_list", "if_cmd_list1",
1121  "elseif_clause", "else_clause", "switch_command", "case_list",
1122  "case_list1", "switch_case", "default_case", "loop_command",
1123  "jump_command", "except_command", "push_fcn_symtab", "param_list_beg",
1124  "param_list_end", "opt_param_list", "param_list", "param_list1",
1125  "param_list2", "param_list_elt", "return_list", "return_list1",
1126  "parsing_local_fcns", "push_script_symtab", "begin_file", "file",
1127  "function_beg", "fcn_name", "function_end", "function", "classdef_beg",
1128  "classdef", "attr_list", "attr_list1", "attr", "superclass_list",
1129  "superclass_list1", "superclass", "class_body", "class_body1",
1130  "properties_block", "property_list", "property_list1", "class_property",
1131  "methods_block", "method_decl1", "method_decl", "$@1", "method",
1132  "methods_list", "methods_list1", "events_block", "events_list",
1133  "events_list1", "class_event", "enum_block", "enum_list", "enum_list1",
1134  "class_enum", "stmt_begin", "anon_fcn_begin", "stash_comment",
1135  "parse_error", "sep_no_nl", "opt_sep_no_nl", "opt_nl", "nl", "sep",
1136  "opt_sep", YY_NULLPTR
1137 };
1138 
1139 static const char *
1140 yysymbol_name (yysymbol_kind_t yysymbol)
1141 {
1142  return yytname[yysymbol];
1143 }
1144 #endif
1145 
1146 #ifdef YYPRINT
1147 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
1148  (internal) symbol number NUM (which must be that of a token). */
1149 static const yytype_int16 yytoknum[] =
1150 {
1151  0, 256, 257, 61, 58, 45, 43, 42, 47, 40,
1152  41, 91, 93, 123, 125, 46, 64, 44, 59, 10,
1153  258, 259, 260, 261, 262, 263, 264, 265, 266, 267,
1154  268, 269, 270, 271, 272, 273, 274, 275, 276, 277,
1155  278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
1156  288, 289, 290, 291, 292, 293, 294, 295, 296, 297,
1157  298, 299, 300, 301, 302, 303, 304, 305, 306, 307,
1158  308, 309, 310, 311, 312, 313, 314, 315, 316, 317,
1159  318, 319, 320, 321, 322, 323, 324, 325, 326, 327,
1160  328, 329, 330, 331, 332, 333, 334, 335
1161 };
1162 #endif
1163 
1164 #define YYPACT_NINF (-385)
1165 
1166 #define yypact_value_is_default(Yyn) \
1167  ((Yyn) == YYPACT_NINF)
1168 
1169 #define YYTABLE_NINF (-291)
1170 
1171 #define yytable_value_is_error(Yyn) \
1172  0
1173 
1174  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1175  STATE-NUM. */
1176 static const yytype_int16 yypact[] =
1177 {
1178  615, -385, 1291, 1291, 1233, 285, 285, 52, -385, -385,
1179  1291, 1291, 1291, -385, -385, -385, -385, -385, -385, -385,
1180  -385, -385, -385, -385, -385, -385, -385, -385, -385, 33,
1181  33, -385, -385, -385, -385, 69, 9, 203, -385, -385,
1182  178, -385, -385, -385, -385, -385, -385, -385, -385, -385,
1183  1420, -385, 1546, 619, -385, -385, -385, -385, -385, -385,
1184  -385, -385, -385, -385, 7, -1, 103, -385, -385, -385,
1185  -385, 261, -385, -385, 197, 197, 135, -385, 1221, 1291,
1186  190, -385, -385, -385, 144, -385, 60, -385, -385, 48,
1187  -385, 197, 197, 197, 1326, 1361, 1233, 218, 1233, 1233,
1188  218, 218, 160, 33, -385, 33, -385, -385, -385, 788,
1189  -385, 178, -385, 1291, 1291, 1291, 1291, 1291, 1031, 1044,
1190  -385, 1291, 1291, 1291, 1291, 1291, 1291, -385, -385, -385,
1191  -385, 1396, 1396, 29, 1291, 1291, 1291, 1291, 1291, 1291,
1192  1291, 1291, 1291, 1291, 1233, 1233, 1233, 1233, 1233, 1233,
1193  1233, 1233, 1233, 1233, 1233, 1233, 1233, -385, -385, -385,
1194  869, 163, 23, -385, -385, -385, 167, -385, 285, 1221,
1195  -385, 285, -385, -385, -385, -385, 182, 177, -385, 41,
1196  1233, 323, 206, 1233, 224, -385, -385, -385, -385, 251,
1197  950, -385, 173, 212, 218, 950, 950, -385, -385, -385,
1198  -385, 1482, 1468, 1468, 197, 197, -385, 55, -385, 96,
1199  197, 197, 197, 197, 1468, 1468, 1396, 1396, 1396, 1396,
1200  1396, -385, 28, 28, 1233, -385, 382, 343, 292, 400,
1201  -385, -385, -385, -385, -385, -385, -385, -385, -385, -385,
1202  -385, -385, -385, -385, -385, -385, -385, -385, -385, -385,
1203  146, -385, 218, -385, -385, -385, -385, 36, 228, 230,
1204  269, 272, 52, 1221, -385, -385, -385, -385, -385, -385,
1205  -385, 17, -385, -385, 711, 1233, 724, 1233, 218, -385,
1206  -385, -385, 216, 218, -385, -385, -385, -385, -385, 214,
1207  207, -8, 1233, 1291, -385, 1221, -385, 28, 28, 28,
1208  28, 28, 1105, 1163, -385, -385, 30, 277, -385, 707,
1209  -385, 279, 218, -385, -385, 47, 33, 33, 94, 218,
1210  -385, -385, 1233, -385, 1233, -385, 950, 1233, 950, 218,
1211  218, -385, -385, 233, 214, -385, -385, -385, -385, -385,
1212  -385, 1494, -385, 187, -385, 217, 1233, -385, -385, -385,
1213  24, 33, 200, -385, 33, -385, -385, -385, 52, 950,
1214  289, 218, 283, 218, 244, -385, -385, 1233, 950, 218,
1215  218, -385, -385, -385, 218, 218, -385, -385, 295, 33,
1216  303, 188, -385, 218, 215, -385, 218, -385, -385, 218,
1217  -19, 218, 950, 1233, 950, -385, -385, -385, 1233, 950,
1218  950, 950, -385, -385, -385, 218, 24, 270, -385, 200,
1219  950, -385, -385, -385, 950, 265, 325, 280, 218, -385,
1220  -385, 290, 293, 1233, -385, -385, 248, 56, 196, -385,
1221  -19, 294, -385, 218, -385, 950, 218, -385, -385, -385,
1222  -385, -385, -385, -385, -385, -385, 310, 218, -385, -385,
1223  -385, -385, 248, -385, -385, -385, 950, -385, 950, 218,
1224  218, 218, 218, -385, 56, -385, 312, -385, 279, 279,
1225  279, 279, -385, -385, -385, -385, -385, 314, 14, 314,
1226  314, 317, 218, -385, 33, -385, -385, -385, 327, 218,
1227  25, 329, 218, -385, 33, 330, 218, -385, 33, -385,
1228  49, -385, 345, -385, 100, 213, 387, -385, -385, 314,
1229  -385, -385, 314, 384, -385, -385, -385, -385, -385, -385,
1230  -385, 1233, 1233, 33, 381, -385, 52, -385, -385
1231 };
1232 
1233  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1234  Performed when YYTABLE does not specify something else to do. Zero
1235  means the default is an error. */
1236 static const yytype_int16 yydefact[] =
1237 {
1238  0, 272, 0, 0, 0, 39, 39, 0, 273, 274,
1239  0, 0, 0, 30, 31, 25, 28, 29, 270, 270,
1240  270, 270, 270, 270, 176, 177, 178, 270, 270, 0,
1241  0, 45, 27, 26, 271, 0, 0, 277, 7, 21,
1242  48, 54, 53, 32, 49, 51, 52, 50, 137, 65,
1243  109, 110, 135, 0, 136, 19, 20, 138, 139, 152,
1244  153, 140, 141, 142, 0, 0, 279, 144, 270, 143,
1245  4, 278, 5, 48, 80, 79, 0, 56, 40, 57,
1246  0, 34, 59, 60, 41, 58, 0, 37, 183, 0,
1247  269, 78, 76, 77, 0, 0, 0, 289, 0, 0,
1248  289, 289, 150, 145, 147, 146, 1, 2, 3, 278,
1249  6, 22, 23, 0, 0, 0, 0, 0, 0, 0,
1250  64, 0, 0, 0, 0, 0, 0, 72, 73, 66,
1251  67, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1252  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1253  0, 0, 0, 0, 0, 0, 0, 205, 202, 281,
1254  9, 280, 0, 275, 276, 55, 43, 33, 39, 42,
1255  36, 39, 188, 57, 194, 193, 0, 190, 191, 0,
1256  0, 121, 0, 0, 0, 268, 283, 284, 285, 290,
1257  9, 268, 0, 155, 289, 9, 9, 149, 148, 8,
1258  24, 107, 84, 83, 85, 86, 68, 0, 70, 0,
1259  91, 89, 90, 92, 87, 88, 0, 0, 0, 0,
1260  0, 93, 81, 82, 0, 74, 119, 120, 117, 118,
1261  111, 112, 113, 116, 114, 115, 122, 123, 124, 125,
1262  126, 127, 128, 129, 130, 131, 132, 133, 134, 213,
1263  0, 10, 289, 12, 270, 200, 282, 0, 0, 0,
1264  206, 0, 185, 44, 35, 61, 62, 63, 38, 184,
1265  187, 0, 47, 46, 0, 0, 0, 0, 289, 286,
1266  287, 288, 0, 289, 154, 270, 270, 158, 156, 162,
1267  0, 0, 0, 0, 69, 0, 71, 106, 105, 104,
1268  102, 103, 0, 0, 94, 95, 0, 0, 203, 290,
1269  11, 215, 289, 195, 198, 0, 0, 0, 0, 289,
1270  186, 192, 0, 268, 0, 268, 9, 0, 9, 289,
1271  289, 270, 270, 0, 164, 166, 163, 270, 181, 270,
1272  151, 108, 96, 0, 98, 0, 0, 100, 75, 13,
1273  0, 0, 14, 197, 0, 207, 208, 206, 185, 9,
1274  0, 289, 122, 289, 0, 171, 157, 0, 9, 289,
1275  289, 161, 167, 165, 289, 289, 97, 99, 0, 0,
1276  219, 0, 217, 289, 0, 15, 289, 17, 199, 289,
1277  0, 289, 9, 0, 9, 170, 268, 160, 0, 9,
1278  9, 9, 101, 221, 149, 289, 0, 222, 204, 16,
1279  9, 209, 210, 211, 9, 0, 0, 0, 289, 268,
1280  169, 0, 0, 0, 216, 218, 0, 227, 289, 18,
1281  0, 0, 172, 289, 174, 9, 289, 179, 180, 220,
1282  226, 224, 270, 270, 270, 270, 0, 289, 229, 230,
1283  231, 232, 0, 223, 212, 173, 9, 159, 9, 289,
1284  289, 289, 289, 214, 228, 225, 0, 168, 215, 215,
1285  215, 215, 233, 234, 235, 236, 175, 238, 270, 257,
1286  263, 0, 289, 240, 0, 251, 250, 254, 0, 289,
1287  0, 0, 289, 259, 0, 0, 289, 265, 0, 237,
1288  270, 239, 242, 244, 270, 245, 0, 247, 256, 258,
1289  261, 262, 264, 0, 241, 149, 255, 246, 248, 260,
1290  266, 0, 0, 0, 0, 243, 245, 249, 267
1291 };
1292 
1293  /* YYPGOTO[NTERM-NUM]. */
1294 static const yytype_int16 yypgoto[] =
1295 {
1296  -385, -385, -385, -385, 118, -385, -385, -385, -385, -385,
1297  2, -385, -385, 0, -385, -385, -23, -385, -385, -385,
1298  -385, -385, 12, -385, -385, -69, -142, -84, -74, -45,
1299  11, -62, -385, 124, -63, -385, 20, -385, -385, 365,
1300  -384, -70, -385, -385, -385, -385, -385, -385, -385, -385,
1301  -385, 62, 63, -385, -385, -385, -385, -385, -385, 40,
1302  -6, -385, -385, 131, -87, -385, -385, -385, -385, -385,
1303  -385, 86, -25, -297, -385, -385, -245, -385, 1, -385,
1304  -385, -44, -385, -385, -55, -385, -385, -89, -52, -108,
1305  -385, -385, -79, -385, -385, -38, -385, -385, -82, -35,
1306  -385, -385, -76, -179, -385, -12, -385, 408, 410, -385,
1307  -385, -249, 176
1308 };
1309 
1310  /* YYDEFGOTO[NTERM-NUM]. */
1311 static const yytype_int16 yydefgoto[] =
1312 {
1313  0, 35, 36, 37, 250, 251, 252, 384, 385, 386,
1314  253, 39, 111, 73, 41, 42, 43, 44, 45, 80,
1315  46, 86, 81, 47, 48, 49, 82, 83, 84, 133,
1316  50, 222, 51, 52, 53, 54, 55, 56, 57, 103,
1317  292, 104, 58, 59, 192, 193, 287, 288, 60, 333,
1318  334, 335, 336, 61, 62, 63, 64, 89, 270, 319,
1319  320, 176, 177, 178, 261, 315, 312, 65, 66, 67,
1320  68, 262, 413, 69, 254, 255, 351, 381, 382, 427,
1321  428, 441, 446, 447, 448, 481, 482, 483, 449, 507,
1322  486, 523, 487, 488, 489, 450, 491, 492, 493, 451,
1323  495, 496, 497, 278, 179, 484, 70, 71, 72, 160,
1324  161, 189, 190
1325 };
1326 
1327  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1328  positive, shift that token. If negative, reduce the rule whose
1329  number is the opposite. If YYTABLE_NINF, syntax error. */
1330 static const yytype_int16 yytable[] =
1331 {
1332  40, 90, 38, 309, 166, 174, 94, 95, 96, 97,
1333  98, 99, 283, 74, 75, 100, 101, 112, 87, 175,
1334  423, 91, 92, 93, 76, 85, 85, 265, 107, 102,
1335  102, 182, 184, 198, 257, 198, 257, 302, 224, 346,
1336  411, 303, 272, 120, 207, 209, 2, 3, 313, 172,
1337  4, 338, 5, 173, 6, 387, 162, 7, -189, 353,
1338  379, 88, 221, 221, 354, 294, 279, 280, 281, 106,
1339  223, 339, 295, -252, 170, 15, 412, 10, 171, 304,
1340  305, 15, 15, 15, 173, 266, 225, 347, 200, 102,
1341  91, 15, 11, 12, 15, 158, 13, 14, 85, 15,
1342  157, 16, 17, 102, 108, 102, 15, -182, -290, 40,
1343  296, 199, 429, 295, 258, 259, 185, 274, 191, 194,
1344  276, 265, 159, 31, 201, 202, 203, 204, 205, 32,
1345  33, 522, 210, 211, 212, 213, 214, 215, 85, 85,
1346  442, 443, 444, 445, 361, 165, 363, 221, 221, 221,
1347  221, 221, 15, 265, 297, 298, 299, 300, 301, -253,
1348  40, 169, 260, 197, 236, 237, 238, 239, 240, 241,
1349  242, 243, 244, 245, 246, 247, 248, 306, 306, 266,
1350  264, 485, 256, 268, 263, 258, 259, 174, 85, 267,
1351  40, 85, 269, -182, 271, 40, 40, 376, 405, 273,
1352  76, 175, 167, 76, 295, 406, 118, 485, 168, 275,
1353  119, 266, 120, 186, 187, 188, -196, 418, 181, 181,
1354  8, 9, 88, 477, 478, 479, 480, 277, 343, 345,
1355  452, 377, 284, 500, 295, 186, 187, 188, 16, 17,
1356  436, 308, 311, 316, 307, 317, 127, 128, 129, 130,
1357  131, 132, 306, 306, 306, 306, 306, 314, 226, 227,
1358  228, 229, 230, 231, 232, 233, 234, 235, 279, 280,
1359  281, 102, -196, 329, 330, 318, 195, 196, 163, 164,
1360  285, 286, 327, 267, 337, 331, 332, 348, 350, 77,
1361  2, 3, 371, -182, 4, 323, 5, 325, 6, 391,
1362  393, 7, 78, 395, 341, 402, 404, 426, 282, 40,
1363  408, 349, 340, 290, 291, 267, 355, 356, 357, 369,
1364  370, 79, 85, 85, 432, 374, 40, 375, 40, 138,
1365  139, 140, 141, 142, 143, 433, 11, 12, 440, 434,
1366  13, 14, 360, 15, 362, 16, 17, 365, 515, 437,
1367  380, 383, 438, 455, 388, 134, 135, 136, 137, 40,
1368  138, 139, 140, 141, 142, 143, 378, 31, 40, 463,
1369  289, 476, -270, 32, 33, 134, 499, 136, 137, 403,
1370  138, 139, 140, 141, 142, 143, 503, 396, 508, 511,
1371  518, 528, 40, 521, 40, 105, 372, 373, 389, 40,
1372  40, 40, 321, 506, 358, 454, 380, 425, 465, 472,
1373  40, 514, 473, 416, 40, 527, 136, 137, 419, 138,
1374  139, 140, 141, 142, 143, 516, 474, 519, 310, 475,
1375  459, 460, 461, 462, 136, 40, 520, 138, 139, 140,
1376  141, 142, 143, 439, 364, 109, 366, 110, 0, 0,
1377  0, 0, 0, 0, 326, 0, 40, 0, 40, 328,
1378  0, 0, 0, 0, 0, 0, 490, 494, 498, 0,
1379  0, 0, 0, 0, 0, 0, 0, 390, 0, 0,
1380  0, 0, 0, 0, 502, 0, 397, 0, 352, 0,
1381  505, 0, 490, 0, 510, 359, 0, 494, 513, 517,
1382  498, 0, 0, 0, 0, 367, 368, 0, 0, 0,
1383  415, 0, 417, 0, 0, 0, 0, 420, 421, 422,
1384  517, 0, 0, 526, 0, 0, 0, 0, 430, 0,
1385  0, 0, 431, 0, 0, 0, 0, 392, 0, 394,
1386  0, 524, 525, 0, 0, 398, 399, 0, 0, 0,
1387  400, 401, 0, 457, 0, 0, 0, 0, 0, 407,
1388  0, 0, 409, 0, 0, 410, 0, 414, 0, 0,
1389  0, 0, 0, 0, 466, 0, 467, 0, 0, 0,
1390  0, 424, 0, 0, 0, 0, 0, 0, 0, 0,
1391  0, 0, 0, 0, 435, 0, 0, 0, 0, 0,
1392  0, 0, 0, 0, 453, 0, 0, 0, 0, 456,
1393  0, 0, 458, 0, 0, 0, 1, 0, 0, 0,
1394  2, 3, 144, 464, 4, 0, 5, 0, 6, 0,
1395  0, 7, 8, 9, -277, 468, 469, 470, 471, 145,
1396  146, 147, 148, 149, 150, 151, 152, 153, 154, 155,
1397  156, 10, 0, 0, 0, 0, 0, 0, 501, 0,
1398  0, 0, 0, 0, 0, 504, 11, 12, 509, 0,
1399  13, 14, 512, 15, 0, 16, 17, 18, 19, 20,
1400  21, 0, 22, 0, 0, 23, 0, 0, 24, 25,
1401  26, 27, 0, 28, 0, 29, 30, 31, 0, 0,
1402  0, 0, 0, 32, 33, 0, 0, 0, -182, 34,
1403  -277, -201, 2, 3, 322, 0, 4, 0, 5, 0,
1404  6, 0, 0, 7, 279, 280, 281, 324, 0, 0,
1405  0, 145, 146, 147, 148, 149, 150, 151, 152, 153,
1406  154, 155, 156, 10, 145, 146, 147, 148, 149, 150,
1407  151, 152, 153, 154, 155, 156, 0, 0, 11, 12,
1408  0, 0, 13, 14, 0, 15, 0, 16, 17, 18,
1409  19, 20, 21, 0, 22, 0, 0, 23, 0, 0,
1410  24, 25, 26, 27, 0, 28, 0, 29, 30, 31,
1411  0, 0, 0, 2, 3, 32, 33, 4, 0, 5,
1412  -182, 6, 0, -201, 7, 163, 164, 0, 0, 0,
1413  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1414  0, 0, 0, 0, 10, 0, 0, 0, 0, 0,
1415  0, 0, 0, 0, 0, 0, 0, 0, 0, 11,
1416  12, 0, 0, 13, 14, 0, 15, 0, 16, 17,
1417  18, 19, 20, 21, 0, 22, 0, 0, 23, 0,
1418  0, 24, 25, 26, 27, 0, 28, 0, 29, 30,
1419  31, 0, 0, 0, 2, 3, 32, 33, 4, 0,
1420  5, -182, 6, 0, -201, 7, 0, 0, 0, 0,
1421  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1422  0, 0, 0, 0, 0, 10, 0, 0, 0, 0,
1423  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1424  11, 12, 0, 0, 13, 14, 0, 15, 0, 16,
1425  17, 18, 19, 20, 21, 0, 22, 0, 0, 23,
1426  0, 0, 24, 25, 26, 27, 0, 28, 0, 29,
1427  30, 31, 249, 0, 0, 2, 3, 32, 33, 4,
1428  0, 5, -182, 6, 0, -201, 7, 0, 0, 0,
1429  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1430  0, 0, 0, 0, 0, 0, 10, 0, 0, 0,
1431  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1432  0, 11, 12, 0, 0, 13, 14, 0, 15, 0,
1433  16, 17, 18, 19, 20, 21, 0, 22, 0, 0,
1434  23, 0, 0, 24, 25, 26, 27, 0, 28, 0,
1435  29, 30, 31, 0, 0, 77, 2, 3, 32, 33,
1436  4, 206, 5, -182, 6, 0, -201, 7, 77, 2,
1437  3, 0, 0, 4, 0, 5, 0, 6, 208, 0,
1438  7, 0, 0, 0, 0, 0, 0, 79, 0, 0,
1439  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1440  79, 0, 11, 12, 0, 0, 13, 14, 0, 15,
1441  0, 16, 17, 0, 0, 11, 12, 0, 0, 13,
1442  14, 0, 15, 0, 16, 17, 0, 0, 0, 77,
1443  2, 3, 0, 31, 4, 342, 5, 0, 6, 32,
1444  33, 7, 0, 0, 0, 0, 31, 0, 0, 0,
1445  0, 0, 32, 33, 0, 0, 0, 0, 0, 0,
1446  0, 79, 0, 0, 0, 0, 0, 0, 0, 0,
1447  0, 0, 0, 0, 0, 0, 11, 12, 0, 0,
1448  13, 14, 0, 15, 0, 16, 17, 77, 2, 3,
1449  0, 0, 4, 0, 5, 0, 6, 344, 0, 7,
1450  0, 0, 0, 0, 0, 0, 0, 31, 0, 0,
1451  0, 0, 0, 32, 33, 0, 0, 0, 0, 79,
1452  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1453  0, 0, 0, 0, 11, 12, 0, 0, 13, 14,
1454  0, 15, 0, 16, 17, 77, 2, 3, 0, 0,
1455  4, 0, 5, 0, 6, 0, 0, 7, 2, 3,
1456  0, 0, 4, 0, 5, 31, 6, 0, 0, 7,
1457  0, 32, 33, 0, 0, 0, 0, 79, 0, 0,
1458  0, 0, 0, 0, 0, 0, 0, 0, 0, 10,
1459  0, 0, 11, 12, 0, 0, 13, 14, 0, 15,
1460  0, 16, 17, 0, 11, 12, 0, 0, 13, 14,
1461  0, 15, 0, 16, 17, 0, 2, 3, 0, 0,
1462  4, 0, 5, 31, 6, 0, 0, 0, 0, 32,
1463  33, 0, 0, 0, 0, 31, 0, 0, 0, 0,
1464  0, 32, 33, 0, 0, 0, 0, 10, 0, 0,
1465  0, 2, 3, 0, 0, 180, 0, 5, 0, 6,
1466  0, 0, 11, 12, 0, 0, 13, 14, 0, 15,
1467  0, 16, 17, 0, 0, 0, 0, 0, 0, 0,
1468  0, 0, 10, 0, 0, 0, 2, 3, 0, 0,
1469  183, 0, 5, 31, 6, 0, 0, 11, 12, 32,
1470  33, 13, 14, 0, 15, 0, 16, 17, 0, 0,
1471  0, 0, 0, 0, 0, 0, 0, 10, 0, 0,
1472  0, 216, 217, 0, 0, 4, 0, 5, 31, 6,
1473  0, 0, 11, 12, 32, 33, 13, 14, 0, 15,
1474  0, 16, 17, 0, 113, 114, 115, 116, 117, 118,
1475  0, 0, 218, 119, 0, 120, 0, 0, 0, 0,
1476  0, 0, 0, 31, 0, 0, 0, 219, 220, 32,
1477  33, 13, 14, 0, 15, 0, 16, 17, 0, 0,
1478  0, 0, 0, 121, 122, 123, 124, 125, 126, 127,
1479  128, 129, 130, 131, 132, 116, 117, 118, 31, 0,
1480  0, 119, 0, 120, 32, 33, 293, 114, 115, 116,
1481  117, 118, 0, 0, 0, 119, 0, 120, 0, 114,
1482  115, 116, 117, 118, 0, 0, 0, 119, 0, 120,
1483  0, 121, 122, 123, 124, 0, 0, 127, 128, 129,
1484  130, 131, 132, 0, 0, 121, 122, 123, 124, 125,
1485  126, 127, 128, 129, 130, 131, 132, 121, 122, 123,
1486  124, 125, 126, 127, 128, 129, 130, 131, 132, -121,
1487  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1488  0, 0, 0, 0, 0, 0, -121, -121, -121, -121,
1489  -121, -121, -121, -121, -121, -121, -121, -121, 134, 135,
1490  136, 137, 0, 138, 139, 140, 141, 142, 143
1491 };
1492 
1493 static const yytype_int16 yycheck[] =
1494 {
1495  0, 7, 0, 252, 78, 89, 18, 19, 20, 21,
1496  22, 23, 191, 2, 3, 27, 28, 40, 6, 89,
1497  404, 10, 11, 12, 4, 5, 6, 169, 19, 29,
1498  30, 94, 95, 103, 11, 105, 11, 9, 9, 9,
1499  59, 13, 1, 15, 118, 119, 5, 6, 12, 1,
1500  9, 59, 11, 36, 13, 352, 68, 16, 10, 12,
1501  36, 9, 131, 132, 17, 10, 17, 18, 19, 0,
1502  132, 79, 17, 59, 14, 58, 95, 36, 18, 51,
1503  52, 58, 58, 58, 36, 169, 57, 57, 111, 89,
1504  79, 58, 51, 52, 58, 96, 55, 56, 78, 58,
1505  93, 60, 61, 103, 95, 105, 58, 93, 59, 109,
1506  14, 109, 409, 17, 91, 92, 96, 180, 98, 99,
1507  183, 263, 19, 82, 113, 114, 115, 116, 117, 88,
1508  89, 515, 121, 122, 123, 124, 125, 126, 118, 119,
1509  84, 85, 86, 87, 323, 10, 325, 216, 217, 218,
1510  219, 220, 58, 295, 216, 217, 218, 219, 220, 59,
1511  160, 17, 162, 3, 144, 145, 146, 147, 148, 149,
1512  150, 151, 152, 153, 154, 155, 156, 222, 223, 263,
1513  168, 478, 19, 171, 17, 91, 92, 271, 168, 169,
1514  190, 171, 10, 93, 17, 195, 196, 10, 10, 179,
1515  180, 271, 12, 183, 17, 17, 9, 504, 18, 3,
1516  13, 295, 15, 17, 18, 19, 3, 396, 94, 95,
1517  17, 18, 9, 468, 469, 470, 471, 3, 302, 303,
1518  34, 14, 59, 482, 17, 17, 18, 19, 60, 61,
1519  419, 95, 254, 15, 224, 15, 49, 50, 51, 52,
1520  53, 54, 297, 298, 299, 300, 301, 257, 134, 135,
1521  136, 137, 138, 139, 140, 141, 142, 143, 17, 18,
1522  19, 271, 3, 285, 286, 3, 100, 101, 17, 18,
1523  68, 69, 66, 263, 77, 71, 72, 10, 9, 4,
1524  5, 6, 59, 93, 9, 275, 11, 277, 13, 10,
1525  17, 16, 17, 59, 293, 10, 3, 37, 190, 309,
1526  95, 309, 292, 195, 196, 295, 316, 317, 318, 331,
1527  332, 36, 302, 303, 59, 337, 326, 339, 328, 37,
1528  38, 39, 40, 41, 42, 10, 51, 52, 90, 59,
1529  55, 56, 322, 58, 324, 60, 61, 327, 3, 59,
1530  350, 351, 59, 59, 354, 32, 33, 34, 35, 359,
1531  37, 38, 39, 40, 41, 42, 346, 82, 368, 59,
1532  194, 59, 58, 88, 89, 32, 59, 34, 35, 379,
1533  37, 38, 39, 40, 41, 42, 59, 367, 59, 59,
1534  3, 10, 392, 9, 394, 30, 334, 334, 358, 399,
1535  400, 401, 271, 490, 318, 430, 406, 406, 452, 464,
1536  410, 500, 464, 393, 414, 523, 34, 35, 398, 37,
1537  38, 39, 40, 41, 42, 504, 464, 509, 252, 464,
1538  442, 443, 444, 445, 34, 435, 512, 37, 38, 39,
1539  40, 41, 42, 423, 326, 37, 328, 37, -1, -1,
1540  -1, -1, -1, -1, 278, -1, 456, -1, 458, 283,
1541  -1, -1, -1, -1, -1, -1, 478, 479, 480, -1,
1542  -1, -1, -1, -1, -1, -1, -1, 359, -1, -1,
1543  -1, -1, -1, -1, 484, -1, 368, -1, 312, -1,
1544  490, -1, 504, -1, 494, 319, -1, 509, 498, 505,
1545  512, -1, -1, -1, -1, 329, 330, -1, -1, -1,
1546  392, -1, 394, -1, -1, -1, -1, 399, 400, 401,
1547  526, -1, -1, 523, -1, -1, -1, -1, 410, -1,
1548  -1, -1, 414, -1, -1, -1, -1, 361, -1, 363,
1549  -1, 521, 522, -1, -1, 369, 370, -1, -1, -1,
1550  374, 375, -1, 435, -1, -1, -1, -1, -1, 383,
1551  -1, -1, 386, -1, -1, 389, -1, 391, -1, -1,
1552  -1, -1, -1, -1, 456, -1, 458, -1, -1, -1,
1553  -1, 405, -1, -1, -1, -1, -1, -1, -1, -1,
1554  -1, -1, -1, -1, 418, -1, -1, -1, -1, -1,
1555  -1, -1, -1, -1, 428, -1, -1, -1, -1, 433,
1556  -1, -1, 436, -1, -1, -1, 1, -1, -1, -1,
1557  5, 6, 3, 447, 9, -1, 11, -1, 13, -1,
1558  -1, 16, 17, 18, 19, 459, 460, 461, 462, 20,
1559  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
1560  31, 36, -1, -1, -1, -1, -1, -1, 482, -1,
1561  -1, -1, -1, -1, -1, 489, 51, 52, 492, -1,
1562  55, 56, 496, 58, -1, 60, 61, 62, 63, 64,
1563  65, -1, 67, -1, -1, 70, -1, -1, 73, 74,
1564  75, 76, -1, 78, -1, 80, 81, 82, -1, -1,
1565  -1, -1, -1, 88, 89, -1, -1, -1, 93, 94,
1566  95, 96, 5, 6, 3, -1, 9, -1, 11, -1,
1567  13, -1, -1, 16, 17, 18, 19, 3, -1, -1,
1568  -1, 20, 21, 22, 23, 24, 25, 26, 27, 28,
1569  29, 30, 31, 36, 20, 21, 22, 23, 24, 25,
1570  26, 27, 28, 29, 30, 31, -1, -1, 51, 52,
1571  -1, -1, 55, 56, -1, 58, -1, 60, 61, 62,
1572  63, 64, 65, -1, 67, -1, -1, 70, -1, -1,
1573  73, 74, 75, 76, -1, 78, -1, 80, 81, 82,
1574  -1, -1, -1, 5, 6, 88, 89, 9, -1, 11,
1575  93, 13, -1, 96, 16, 17, 18, -1, -1, -1,
1576  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1577  -1, -1, -1, -1, 36, -1, -1, -1, -1, -1,
1578  -1, -1, -1, -1, -1, -1, -1, -1, -1, 51,
1579  52, -1, -1, 55, 56, -1, 58, -1, 60, 61,
1580  62, 63, 64, 65, -1, 67, -1, -1, 70, -1,
1581  -1, 73, 74, 75, 76, -1, 78, -1, 80, 81,
1582  82, -1, -1, -1, 5, 6, 88, 89, 9, -1,
1583  11, 93, 13, -1, 96, 16, -1, -1, -1, -1,
1584  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1585  -1, -1, -1, -1, -1, 36, -1, -1, -1, -1,
1586  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1587  51, 52, -1, -1, 55, 56, -1, 58, -1, 60,
1588  61, 62, 63, 64, 65, -1, 67, -1, -1, 70,
1589  -1, -1, 73, 74, 75, 76, -1, 78, -1, 80,
1590  81, 82, 83, -1, -1, 5, 6, 88, 89, 9,
1591  -1, 11, 93, 13, -1, 96, 16, -1, -1, -1,
1592  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1593  -1, -1, -1, -1, -1, -1, 36, -1, -1, -1,
1594  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1595  -1, 51, 52, -1, -1, 55, 56, -1, 58, -1,
1596  60, 61, 62, 63, 64, 65, -1, 67, -1, -1,
1597  70, -1, -1, 73, 74, 75, 76, -1, 78, -1,
1598  80, 81, 82, -1, -1, 4, 5, 6, 88, 89,
1599  9, 10, 11, 93, 13, -1, 96, 16, 4, 5,
1600  6, -1, -1, 9, -1, 11, -1, 13, 14, -1,
1601  16, -1, -1, -1, -1, -1, -1, 36, -1, -1,
1602  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1603  36, -1, 51, 52, -1, -1, 55, 56, -1, 58,
1604  -1, 60, 61, -1, -1, 51, 52, -1, -1, 55,
1605  56, -1, 58, -1, 60, 61, -1, -1, -1, 4,
1606  5, 6, -1, 82, 9, 10, 11, -1, 13, 88,
1607  89, 16, -1, -1, -1, -1, 82, -1, -1, -1,
1608  -1, -1, 88, 89, -1, -1, -1, -1, -1, -1,
1609  -1, 36, -1, -1, -1, -1, -1, -1, -1, -1,
1610  -1, -1, -1, -1, -1, -1, 51, 52, -1, -1,
1611  55, 56, -1, 58, -1, 60, 61, 4, 5, 6,
1612  -1, -1, 9, -1, 11, -1, 13, 14, -1, 16,
1613  -1, -1, -1, -1, -1, -1, -1, 82, -1, -1,
1614  -1, -1, -1, 88, 89, -1, -1, -1, -1, 36,
1615  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1616  -1, -1, -1, -1, 51, 52, -1, -1, 55, 56,
1617  -1, 58, -1, 60, 61, 4, 5, 6, -1, -1,
1618  9, -1, 11, -1, 13, -1, -1, 16, 5, 6,
1619  -1, -1, 9, -1, 11, 82, 13, -1, -1, 16,
1620  -1, 88, 89, -1, -1, -1, -1, 36, -1, -1,
1621  -1, -1, -1, -1, -1, -1, -1, -1, -1, 36,
1622  -1, -1, 51, 52, -1, -1, 55, 56, -1, 58,
1623  -1, 60, 61, -1, 51, 52, -1, -1, 55, 56,
1624  -1, 58, -1, 60, 61, -1, 5, 6, -1, -1,
1625  9, -1, 11, 82, 13, -1, -1, -1, -1, 88,
1626  89, -1, -1, -1, -1, 82, -1, -1, -1, -1,
1627  -1, 88, 89, -1, -1, -1, -1, 36, -1, -1,
1628  -1, 5, 6, -1, -1, 9, -1, 11, -1, 13,
1629  -1, -1, 51, 52, -1, -1, 55, 56, -1, 58,
1630  -1, 60, 61, -1, -1, -1, -1, -1, -1, -1,
1631  -1, -1, 36, -1, -1, -1, 5, 6, -1, -1,
1632  9, -1, 11, 82, 13, -1, -1, 51, 52, 88,
1633  89, 55, 56, -1, 58, -1, 60, 61, -1, -1,
1634  -1, -1, -1, -1, -1, -1, -1, 36, -1, -1,
1635  -1, 5, 6, -1, -1, 9, -1, 11, 82, 13,
1636  -1, -1, 51, 52, 88, 89, 55, 56, -1, 58,
1637  -1, 60, 61, -1, 4, 5, 6, 7, 8, 9,
1638  -1, -1, 36, 13, -1, 15, -1, -1, -1, -1,
1639  -1, -1, -1, 82, -1, -1, -1, 51, 52, 88,
1640  89, 55, 56, -1, 58, -1, 60, 61, -1, -1,
1641  -1, -1, -1, 43, 44, 45, 46, 47, 48, 49,
1642  50, 51, 52, 53, 54, 7, 8, 9, 82, -1,
1643  -1, 13, -1, 15, 88, 89, 4, 5, 6, 7,
1644  8, 9, -1, -1, -1, 13, -1, 15, -1, 5,
1645  6, 7, 8, 9, -1, -1, -1, 13, -1, 15,
1646  -1, 43, 44, 45, 46, -1, -1, 49, 50, 51,
1647  52, 53, 54, -1, -1, 43, 44, 45, 46, 47,
1648  48, 49, 50, 51, 52, 53, 54, 43, 44, 45,
1649  46, 47, 48, 49, 50, 51, 52, 53, 54, 3,
1650  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1651  -1, -1, -1, -1, -1, -1, 20, 21, 22, 23,
1652  24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
1653  34, 35, -1, 37, 38, 39, 40, 41, 42
1654 };
1655 
1656  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1657  symbol of state STATE-NUM. */
1658 static const yytype_uint8 yystos[] =
1659 {
1660  0, 1, 5, 6, 9, 11, 13, 16, 17, 18,
1661  36, 51, 52, 55, 56, 58, 60, 61, 62, 63,
1662  64, 65, 67, 70, 73, 74, 75, 76, 78, 80,
1663  81, 82, 88, 89, 94, 99, 100, 101, 108, 109,
1664  111, 112, 113, 114, 115, 116, 118, 121, 122, 123,
1665  128, 130, 131, 132, 133, 134, 135, 136, 140, 141,
1666  146, 151, 152, 153, 154, 165, 166, 167, 168, 171,
1667  204, 205, 206, 111, 128, 128, 134, 4, 17, 36,
1668  117, 120, 124, 125, 126, 134, 119, 120, 9, 155,
1669  158, 128, 128, 128, 203, 203, 203, 203, 203, 203,
1670  203, 203, 111, 137, 139, 137, 0, 19, 95, 205,
1671  206, 110, 114, 4, 5, 6, 7, 8, 9, 13,
1672  15, 43, 44, 45, 46, 47, 48, 49, 50, 51,
1673  52, 53, 54, 127, 32, 33, 34, 35, 37, 38,
1674  39, 40, 41, 42, 3, 20, 21, 22, 23, 24,
1675  25, 26, 27, 28, 29, 30, 31, 93, 96, 19,
1676  207, 208, 203, 17, 18, 10, 126, 12, 18, 17,
1677  14, 18, 1, 36, 125, 139, 159, 160, 161, 202,
1678  9, 131, 132, 9, 132, 134, 17, 18, 19, 209,
1679  210, 134, 142, 143, 134, 210, 210, 3, 139, 108,
1680  114, 128, 128, 128, 128, 128, 10, 126, 14, 126,
1681  128, 128, 128, 128, 128, 128, 5, 6, 36, 51,
1682  52, 123, 129, 129, 9, 57, 131, 131, 131, 131,
1683  131, 131, 131, 131, 131, 131, 134, 134, 134, 134,
1684  134, 134, 134, 134, 134, 134, 134, 134, 134, 83,
1685  102, 103, 104, 108, 172, 173, 19, 11, 91, 92,
1686  111, 162, 169, 17, 120, 124, 125, 134, 120, 10,
1687  156, 17, 1, 134, 132, 3, 132, 3, 201, 17,
1688  18, 19, 102, 201, 59, 68, 69, 144, 145, 210,
1689  102, 102, 138, 4, 10, 17, 14, 129, 129, 129,
1690  129, 129, 9, 13, 51, 52, 127, 134, 95, 209,
1691  210, 203, 164, 12, 111, 163, 15, 15, 3, 157,
1692  158, 161, 3, 134, 3, 134, 210, 66, 210, 203,
1693  203, 71, 72, 147, 148, 149, 150, 77, 59, 79,
1694  134, 128, 10, 126, 14, 126, 9, 57, 10, 108,
1695  9, 174, 210, 12, 17, 111, 111, 111, 169, 210,
1696  134, 201, 134, 201, 102, 134, 102, 210, 210, 203,
1697  203, 59, 149, 150, 203, 203, 10, 14, 134, 36,
1698  111, 175, 176, 111, 105, 106, 107, 171, 111, 157,
1699  102, 10, 210, 17, 210, 59, 134, 102, 210, 210,
1700  210, 210, 10, 111, 3, 10, 17, 210, 95, 210,
1701  210, 59, 95, 170, 210, 102, 134, 102, 201, 134,
1702  102, 102, 102, 138, 210, 176, 37, 177, 178, 171,
1703  102, 102, 59, 10, 59, 210, 201, 59, 59, 134,
1704  90, 179, 84, 85, 86, 87, 180, 181, 182, 186,
1705  193, 197, 34, 210, 170, 59, 210, 102, 210, 203,
1706  203, 203, 203, 59, 210, 179, 102, 102, 210, 210,
1707  210, 210, 182, 186, 193, 197, 59, 174, 174, 174,
1708  174, 183, 184, 185, 203, 171, 188, 190, 191, 192,
1709  203, 194, 195, 196, 203, 198, 199, 200, 203, 59,
1710  209, 210, 111, 59, 210, 111, 162, 187, 59, 210,
1711  111, 59, 210, 111, 185, 3, 190, 158, 3, 196,
1712  200, 9, 138, 189, 134, 134, 111, 187, 10
1713 };
1714 
1715  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1716 static const yytype_uint8 yyr1[] =
1717 {
1718  0, 98, 99, 99, 99, 100, 100, 101, 101, 102,
1719  102, 103, 104, 104, 105, 105, 106, 107, 107, 108,
1720  108, 108, 109, 110, 110, 111, 112, 113, 114, 114,
1721  115, 115, 115, 116, 117, 117, 118, 119, 119, 120,
1722  120, 120, 120, 120, 120, 121, 122, 122, 123, 123,
1723  123, 123, 123, 123, 123, 123, 124, 125, 126, 126,
1724  126, 126, 126, 126, 127, 128, 128, 128, 128, 128,
1725  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1726  128, 128, 128, 128, 128, 128, 128, 128, 128, 128,
1727  128, 128, 128, 129, 129, 129, 129, 129, 129, 129,
1728  129, 129, 129, 129, 129, 129, 129, 130, 130, 131,
1729  131, 131, 131, 131, 131, 131, 131, 131, 131, 131,
1730  131, 132, 133, 133, 133, 133, 133, 133, 133, 133,
1731  133, 133, 133, 133, 133, 134, 134, 134, 135, 135,
1732  135, 135, 135, 135, 135, 136, 136, 137, 137, 138,
1733  139, 139, 140, 140, 141, 142, 142, 143, 143, 144,
1734  145, 146, 147, 147, 147, 147, 148, 148, 149, 150,
1735  151, 151, 151, 151, 151, 151, 152, 152, 152, 153,
1736  153, 153, 154, 155, 156, 157, 157, 158, 158, 159,
1737  159, 160, 160, 161, 161, 162, 162, 162, 163, 163,
1738  164, 165, 166, 167, 167, 168, 169, 169, 169, 170,
1739  170, 171, 171, 172, 173, 174, 174, 175, 175, 176,
1740  176, 176, 177, 177, 178, 178, 179, 180, 180, 181,
1741  181, 181, 181, 181, 181, 181, 181, 182, 183, 183,
1742  184, 184, 185, 185, 186, 187, 187, 188, 189, 188,
1743  190, 190, 191, 191, 192, 192, 193, 194, 194, 195,
1744  195, 196, 197, 198, 198, 199, 199, 200, 201, 202,
1745  203, 204, 204, 205, 205, 205, 205, 206, 206, 207,
1746  207, 208, 208, 209, 209, 209, 209, 209, 209, 210,
1747  210
1748 };
1749 
1750  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1751 static const yytype_int8 yyr2[] =
1752 {
1753  0, 2, 2, 2, 1, 1, 2, 1, 3, 0,
1754  1, 2, 1, 3, 0, 1, 2, 1, 3, 1,
1755  1, 1, 2, 1, 2, 1, 1, 1, 1, 1,
1756  1, 1, 1, 3, 1, 3, 3, 1, 3, 0,
1757  1, 1, 2, 2, 3, 1, 4, 4, 1, 1,
1758  1, 1, 1, 1, 1, 3, 1, 1, 1, 1,
1759  1, 3, 3, 3, 1, 1, 2, 2, 3, 4,
1760  3, 4, 2, 2, 3, 5, 2, 2, 2, 2,
1761  2, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1762  3, 3, 3, 1, 2, 2, 3, 4, 3, 4,
1763  3, 5, 2, 2, 2, 2, 2, 3, 5, 1,
1764  1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1765  3, 1, 3, 3, 3, 3, 3, 3, 3, 3,
1766  3, 3, 3, 3, 3, 1, 1, 1, 1, 1,
1767  1, 1, 1, 1, 1, 2, 2, 1, 2, 0,
1768  1, 4, 1, 1, 4, 1, 2, 4, 2, 7,
1769  4, 6, 0, 1, 1, 2, 1, 2, 7, 4,
1770  7, 6, 9, 10, 9, 12, 1, 1, 1, 9,
1771  9, 5, 0, 1, 1, 0, 1, 3, 2, 0,
1772  1, 1, 3, 1, 1, 2, 1, 3, 1, 3,
1773  0, 0, 2, 4, 7, 2, 1, 3, 3, 1,
1774  1, 7, 9, 1, 8, 0, 4, 1, 3, 1,
1775  4, 2, 0, 2, 2, 3, 1, 0, 2, 1,
1776  1, 1, 1, 3, 3, 3, 3, 6, 0, 2,
1777  1, 3, 2, 5, 6, 1, 2, 2, 0, 5,
1778  1, 1, 0, 2, 1, 3, 6, 0, 2, 1,
1779  3, 2, 6, 0, 2, 1, 3, 5, 0, 0,
1780  0, 1, 1, 1, 1, 2, 2, 0, 1, 0,
1781  1, 1, 2, 1, 1, 1, 2, 2, 2, 0,
1782  1
1783 };
1784 
1785 
1786 enum { YYENOMEM = -2 };
1787 
1788 #define yyerrok (yyerrstatus = 0)
1789 #define yyclearin (yychar = OCTAVE_EMPTY)
1790 
1791 #define YYACCEPT goto yyacceptlab
1792 #define YYABORT goto yyabortlab
1793 #define YYERROR goto yyerrorlab
1794 
1795 
1796 #define YYRECOVERING() (!!yyerrstatus)
1797 
1798 #define YYBACKUP(Token, Value) \
1799  do \
1800  if (yychar == OCTAVE_EMPTY) \
1801  { \
1802  yychar = (Token); \
1803  yylval = (Value); \
1804  YYPOPSTACK (yylen); \
1805  yystate = *yyssp; \
1806  goto yybackup; \
1807  } \
1808  else \
1809  { \
1810  yyerror (parser, YY_("syntax error: cannot back up")); \
1811  YYERROR; \
1812  } \
1813  while (0)
1814 
1815 /* Backward compatibility with an undocumented macro.
1816  Use OCTAVE_error or OCTAVE_UNDEF. */
1817 #define YYERRCODE OCTAVE_UNDEF
1818 
1819 
1820 /* Enable debugging if requested. */
1821 #if OCTAVE_DEBUG
1822 
1823 # ifndef YYFPRINTF
1824 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1825 # define YYFPRINTF fprintf
1826 # endif
1827 
1828 # define YYDPRINTF(Args) \
1829 do { \
1830  if (yydebug) \
1831  YYFPRINTF Args; \
1832 } while (0)
1833 
1834 /* This macro is provided for backward compatibility. */
1835 # ifndef YY_LOCATION_PRINT
1836 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1837 # endif
1838 
1839 
1840 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location) \
1841 do { \
1842  if (yydebug) \
1843  { \
1844  YYFPRINTF (stderr, "%s ", Title); \
1845  yy_symbol_print (stderr, \
1846  Kind, Value, parser); \
1847  YYFPRINTF (stderr, "\n"); \
1848  } \
1849 } while (0)
1850 
1851 
1852 /*-----------------------------------.
1853 | Print this symbol's value on YYO. |
1854 `-----------------------------------*/
1855 
1856 static void
1857 yy_symbol_value_print (FILE *yyo,
1858  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1859 {
1860  FILE *yyoutput = yyo;
1861  YY_USE (yyoutput);
1862  YY_USE (parser);
1863  if (!yyvaluep)
1864  return;
1865 # ifdef YYPRINT
1866  if (yykind < YYNTOKENS)
1867  YYPRINT (yyo, yytoknum[yykind], *yyvaluep);
1868 # endif
1870  YY_USE (yykind);
1872 }
1873 
1874 
1875 /*---------------------------.
1876 | Print this symbol on YYO. |
1877 `---------------------------*/
1878 
1879 static void
1880 yy_symbol_print (FILE *yyo,
1881  yysymbol_kind_t yykind, YYSTYPE const * const yyvaluep, octave::base_parser& parser)
1882 {
1883  YYFPRINTF (yyo, "%s %s (",
1884  yykind < YYNTOKENS ? "token" : "nterm", yysymbol_name (yykind));
1885 
1886  yy_symbol_value_print (yyo, yykind, yyvaluep, parser);
1887  YYFPRINTF (yyo, ")");
1888 }
1889 
1890 /*------------------------------------------------------------------.
1891 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1892 | TOP (included). |
1893 `------------------------------------------------------------------*/
1894 
1895 static void
1896 yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1897 {
1898  YYFPRINTF (stderr, "Stack now");
1899  for (; yybottom <= yytop; yybottom++)
1900  {
1901  int yybot = *yybottom;
1902  YYFPRINTF (stderr, " %d", yybot);
1903  }
1904  YYFPRINTF (stderr, "\n");
1905 }
1906 
1907 # define YY_STACK_PRINT(Bottom, Top) \
1908 do { \
1909  if (yydebug) \
1910  yy_stack_print ((Bottom), (Top)); \
1911 } while (0)
1912 
1913 
1914 /*------------------------------------------------.
1915 | Report that the YYRULE is going to be reduced. |
1916 `------------------------------------------------*/
1917 
1918 static void
1919 yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp,
1920  int yyrule, octave::base_parser& parser)
1921 {
1922  int yylno = yyrline[yyrule];
1923  int yynrhs = yyr2[yyrule];
1924  int yyi;
1925  YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1926  yyrule - 1, yylno);
1927  /* The symbols being reduced. */
1928  for (yyi = 0; yyi < yynrhs; yyi++)
1929  {
1930  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1931  yy_symbol_print (stderr,
1932  YY_ACCESSING_SYMBOL (+yyssp[yyi + 1 - yynrhs]),
1933  &yyvsp[(yyi + 1) - (yynrhs)], parser);
1934  YYFPRINTF (stderr, "\n");
1935  }
1936 }
1937 
1938 # define YY_REDUCE_PRINT(Rule) \
1939 do { \
1940  if (yydebug) \
1941  yy_reduce_print (yyssp, yyvsp, Rule, parser); \
1942 } while (0)
1943 
1944 /* Nonzero means print parse trace. It is left uninitialized so that
1945  multiple parsers can coexist. */
1946 int yydebug;
1947 #else /* !OCTAVE_DEBUG */
1948 # define YYDPRINTF(Args) ((void) 0)
1949 # define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
1950 # define YY_STACK_PRINT(Bottom, Top)
1951 # define YY_REDUCE_PRINT(Rule)
1952 #endif /* !OCTAVE_DEBUG */
1953 
1954 
1955 /* YYINITDEPTH -- initial size of the parser's stacks. */
1956 #ifndef YYINITDEPTH
1957 # define YYINITDEPTH 200
1958 #endif
1959 
1960 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1961  if the built-in stack extension method is used).
1962 
1963  Do not make this value too large; the results are undefined if
1964  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1965  evaluated with infinite-precision integer arithmetic. */
1966 
1967 #ifndef YYMAXDEPTH
1968 # define YYMAXDEPTH 10000
1969 #endif
1970 /* Parser data structure. */
1971 struct yypstate
1972  {
1973  /* Number of syntax errors so far. */
1974  int yynerrs;
1975 
1977  /* Number of tokens to shift before error messages enabled. */
1979 
1980  /* Refer to the stacks through separate pointers, to allow yyoverflow
1981  to reallocate them elsewhere. */
1982 
1983  /* Their size. */
1985 
1986  /* The state stack: array, bottom, top. */
1990 
1991  /* The semantic value stack: array, bottom, top. */
1995  /* Whether this instance has not started parsing yet.
1996  * If 2, it corresponds to a finished parsing. */
1997  int yynew;
1998  };
1999 
2000 
2001 
2002 
2003 
2004 
2005 /*-----------------------------------------------.
2006 | Release the memory associated to this symbol. |
2007 `-----------------------------------------------*/
2008 
2009 static void
2010 yydestruct (const char *yymsg,
2011  yysymbol_kind_t yykind, YYSTYPE *yyvaluep, octave::base_parser& parser)
2012 {
2013  YY_USE (yyvaluep);
2014  YY_USE (parser);
2015  if (!yymsg)
2016  yymsg = "Deleting";
2017  YY_SYMBOL_PRINT (yymsg, yykind, yyvaluep, yylocationp);
2018 
2020  switch (yykind)
2021  {
2022  case YYSYMBOL_3_: /* '=' */
2023 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2024  { }
2025 #line 2026 "libinterp/parse-tree/oct-parse.cc"
2026  break;
2027 
2028  case YYSYMBOL_4_: /* ':' */
2029 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2030  { }
2031 #line 2032 "libinterp/parse-tree/oct-parse.cc"
2032  break;
2033 
2034  case YYSYMBOL_5_: /* '-' */
2035 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2036  { }
2037 #line 2038 "libinterp/parse-tree/oct-parse.cc"
2038  break;
2039 
2040  case YYSYMBOL_6_: /* '+' */
2041 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2042  { }
2043 #line 2044 "libinterp/parse-tree/oct-parse.cc"
2044  break;
2045 
2046  case YYSYMBOL_7_: /* '*' */
2047 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2048  { }
2049 #line 2050 "libinterp/parse-tree/oct-parse.cc"
2050  break;
2051 
2052  case YYSYMBOL_8_: /* '/' */
2053 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2054  { }
2055 #line 2056 "libinterp/parse-tree/oct-parse.cc"
2056  break;
2057 
2058  case YYSYMBOL_9_: /* '(' */
2059 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2060  { }
2061 #line 2062 "libinterp/parse-tree/oct-parse.cc"
2062  break;
2063 
2064  case YYSYMBOL_10_: /* ')' */
2065 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2066  { }
2067 #line 2068 "libinterp/parse-tree/oct-parse.cc"
2068  break;
2069 
2070  case YYSYMBOL_11_: /* '[' */
2071 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2072  { }
2073 #line 2074 "libinterp/parse-tree/oct-parse.cc"
2074  break;
2075 
2076  case YYSYMBOL_12_: /* ']' */
2077 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2078  { }
2079 #line 2080 "libinterp/parse-tree/oct-parse.cc"
2080  break;
2081 
2082  case YYSYMBOL_13_: /* '{' */
2083 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2084  { }
2085 #line 2086 "libinterp/parse-tree/oct-parse.cc"
2086  break;
2087 
2088  case YYSYMBOL_14_: /* '}' */
2089 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2090  { }
2091 #line 2092 "libinterp/parse-tree/oct-parse.cc"
2092  break;
2093 
2094  case YYSYMBOL_15_: /* '.' */
2095 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2096  { }
2097 #line 2098 "libinterp/parse-tree/oct-parse.cc"
2098  break;
2099 
2100  case YYSYMBOL_16_: /* '@' */
2101 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2102  { }
2103 #line 2104 "libinterp/parse-tree/oct-parse.cc"
2104  break;
2105 
2106  case YYSYMBOL_17_: /* ',' */
2107 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2108  { }
2109 #line 2110 "libinterp/parse-tree/oct-parse.cc"
2110  break;
2111 
2112  case YYSYMBOL_18_: /* ';' */
2113 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2114  { }
2115 #line 2116 "libinterp/parse-tree/oct-parse.cc"
2116  break;
2117 
2118  case YYSYMBOL_19_n_: /* '\n' */
2119 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2120  { }
2121 #line 2122 "libinterp/parse-tree/oct-parse.cc"
2122  break;
2123 
2124  case YYSYMBOL_ADD_EQ: /* ADD_EQ */
2125 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2126  { }
2127 #line 2128 "libinterp/parse-tree/oct-parse.cc"
2128  break;
2129 
2130  case YYSYMBOL_SUB_EQ: /* SUB_EQ */
2131 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2132  { }
2133 #line 2134 "libinterp/parse-tree/oct-parse.cc"
2134  break;
2135 
2136  case YYSYMBOL_MUL_EQ: /* MUL_EQ */
2137 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2138  { }
2139 #line 2140 "libinterp/parse-tree/oct-parse.cc"
2140  break;
2141 
2142  case YYSYMBOL_DIV_EQ: /* DIV_EQ */
2143 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2144  { }
2145 #line 2146 "libinterp/parse-tree/oct-parse.cc"
2146  break;
2147 
2148  case YYSYMBOL_LEFTDIV_EQ: /* LEFTDIV_EQ */
2149 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2150  { }
2151 #line 2152 "libinterp/parse-tree/oct-parse.cc"
2152  break;
2153 
2154  case YYSYMBOL_POW_EQ: /* POW_EQ */
2155 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2156  { }
2157 #line 2158 "libinterp/parse-tree/oct-parse.cc"
2158  break;
2159 
2160  case YYSYMBOL_EMUL_EQ: /* EMUL_EQ */
2161 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2162  { }
2163 #line 2164 "libinterp/parse-tree/oct-parse.cc"
2164  break;
2165 
2166  case YYSYMBOL_EDIV_EQ: /* EDIV_EQ */
2167 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2168  { }
2169 #line 2170 "libinterp/parse-tree/oct-parse.cc"
2170  break;
2171 
2172  case YYSYMBOL_ELEFTDIV_EQ: /* ELEFTDIV_EQ */
2173 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2174  { }
2175 #line 2176 "libinterp/parse-tree/oct-parse.cc"
2176  break;
2177 
2178  case YYSYMBOL_EPOW_EQ: /* EPOW_EQ */
2179 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2180  { }
2181 #line 2182 "libinterp/parse-tree/oct-parse.cc"
2182  break;
2183 
2184  case YYSYMBOL_AND_EQ: /* AND_EQ */
2185 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2186  { }
2187 #line 2188 "libinterp/parse-tree/oct-parse.cc"
2188  break;
2189 
2190  case YYSYMBOL_OR_EQ: /* OR_EQ */
2191 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2192  { }
2193 #line 2194 "libinterp/parse-tree/oct-parse.cc"
2194  break;
2195 
2196  case YYSYMBOL_EXPR_AND_AND: /* EXPR_AND_AND */
2197 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2198  { }
2199 #line 2200 "libinterp/parse-tree/oct-parse.cc"
2200  break;
2201 
2202  case YYSYMBOL_EXPR_OR_OR: /* EXPR_OR_OR */
2203 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2204  { }
2205 #line 2206 "libinterp/parse-tree/oct-parse.cc"
2206  break;
2207 
2208  case YYSYMBOL_EXPR_AND: /* EXPR_AND */
2209 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2210  { }
2211 #line 2212 "libinterp/parse-tree/oct-parse.cc"
2212  break;
2213 
2214  case YYSYMBOL_EXPR_OR: /* EXPR_OR */
2215 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2216  { }
2217 #line 2218 "libinterp/parse-tree/oct-parse.cc"
2218  break;
2219 
2220  case YYSYMBOL_EXPR_NOT: /* EXPR_NOT */
2221 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2222  { }
2223 #line 2224 "libinterp/parse-tree/oct-parse.cc"
2224  break;
2225 
2226  case YYSYMBOL_EXPR_LT: /* EXPR_LT */
2227 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2228  { }
2229 #line 2230 "libinterp/parse-tree/oct-parse.cc"
2230  break;
2231 
2232  case YYSYMBOL_EXPR_LE: /* EXPR_LE */
2233 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2234  { }
2235 #line 2236 "libinterp/parse-tree/oct-parse.cc"
2236  break;
2237 
2238  case YYSYMBOL_EXPR_EQ: /* EXPR_EQ */
2239 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2240  { }
2241 #line 2242 "libinterp/parse-tree/oct-parse.cc"
2242  break;
2243 
2244  case YYSYMBOL_EXPR_NE: /* EXPR_NE */
2245 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2246  { }
2247 #line 2248 "libinterp/parse-tree/oct-parse.cc"
2248  break;
2249 
2250  case YYSYMBOL_EXPR_GE: /* EXPR_GE */
2251 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2252  { }
2253 #line 2254 "libinterp/parse-tree/oct-parse.cc"
2254  break;
2255 
2256  case YYSYMBOL_EXPR_GT: /* EXPR_GT */
2257 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2258  { }
2259 #line 2260 "libinterp/parse-tree/oct-parse.cc"
2260  break;
2261 
2262  case YYSYMBOL_LEFTDIV: /* LEFTDIV */
2263 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2264  { }
2265 #line 2266 "libinterp/parse-tree/oct-parse.cc"
2266  break;
2267 
2268  case YYSYMBOL_EMUL: /* EMUL */
2269 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2270  { }
2271 #line 2272 "libinterp/parse-tree/oct-parse.cc"
2272  break;
2273 
2274  case YYSYMBOL_EDIV: /* EDIV */
2275 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2276  { }
2277 #line 2278 "libinterp/parse-tree/oct-parse.cc"
2278  break;
2279 
2280  case YYSYMBOL_ELEFTDIV: /* ELEFTDIV */
2281 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2282  { }
2283 #line 2284 "libinterp/parse-tree/oct-parse.cc"
2284  break;
2285 
2286  case YYSYMBOL_EPLUS: /* EPLUS */
2287 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2288  { }
2289 #line 2290 "libinterp/parse-tree/oct-parse.cc"
2290  break;
2291 
2292  case YYSYMBOL_EMINUS: /* EMINUS */
2293 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2294  { }
2295 #line 2296 "libinterp/parse-tree/oct-parse.cc"
2296  break;
2297 
2298  case YYSYMBOL_HERMITIAN: /* HERMITIAN */
2299 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2300  { }
2301 #line 2302 "libinterp/parse-tree/oct-parse.cc"
2302  break;
2303 
2304  case YYSYMBOL_TRANSPOSE: /* TRANSPOSE */
2305 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2306  { }
2307 #line 2308 "libinterp/parse-tree/oct-parse.cc"
2308  break;
2309 
2310  case YYSYMBOL_PLUS_PLUS: /* PLUS_PLUS */
2311 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2312  { }
2313 #line 2314 "libinterp/parse-tree/oct-parse.cc"
2314  break;
2315 
2316  case YYSYMBOL_MINUS_MINUS: /* MINUS_MINUS */
2317 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2318  { }
2319 #line 2320 "libinterp/parse-tree/oct-parse.cc"
2320  break;
2321 
2322  case YYSYMBOL_POW: /* POW */
2323 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2324  { }
2325 #line 2326 "libinterp/parse-tree/oct-parse.cc"
2326  break;
2327 
2328  case YYSYMBOL_EPOW: /* EPOW */
2329 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2330  { }
2331 #line 2332 "libinterp/parse-tree/oct-parse.cc"
2332  break;
2333 
2334  case YYSYMBOL_NUM: /* NUM */
2335 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2336  { }
2337 #line 2338 "libinterp/parse-tree/oct-parse.cc"
2338  break;
2339 
2340  case YYSYMBOL_IMAG_NUM: /* IMAG_NUM */
2341 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2342  { }
2343 #line 2344 "libinterp/parse-tree/oct-parse.cc"
2344  break;
2345 
2346  case YYSYMBOL_STRUCT_ELT: /* STRUCT_ELT */
2347 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2348  { }
2349 #line 2350 "libinterp/parse-tree/oct-parse.cc"
2350  break;
2351 
2352  case YYSYMBOL_NAME: /* NAME */
2353 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2354  { }
2355 #line 2356 "libinterp/parse-tree/oct-parse.cc"
2356  break;
2357 
2358  case YYSYMBOL_END: /* END */
2359 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2360  { }
2361 #line 2362 "libinterp/parse-tree/oct-parse.cc"
2362  break;
2363 
2364  case YYSYMBOL_DQ_STRING: /* DQ_STRING */
2365 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2366  { }
2367 #line 2368 "libinterp/parse-tree/oct-parse.cc"
2368  break;
2369 
2370  case YYSYMBOL_SQ_STRING: /* SQ_STRING */
2371 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2372  { }
2373 #line 2374 "libinterp/parse-tree/oct-parse.cc"
2374  break;
2375 
2376  case YYSYMBOL_FOR: /* FOR */
2377 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2378  { }
2379 #line 2380 "libinterp/parse-tree/oct-parse.cc"
2380  break;
2381 
2382  case YYSYMBOL_PARFOR: /* PARFOR */
2383 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2384  { }
2385 #line 2386 "libinterp/parse-tree/oct-parse.cc"
2386  break;
2387 
2388  case YYSYMBOL_WHILE: /* WHILE */
2389 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2390  { }
2391 #line 2392 "libinterp/parse-tree/oct-parse.cc"
2392  break;
2393 
2394  case YYSYMBOL_DO: /* DO */
2395 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2396  { }
2397 #line 2398 "libinterp/parse-tree/oct-parse.cc"
2398  break;
2399 
2400  case YYSYMBOL_UNTIL: /* UNTIL */
2401 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2402  { }
2403 #line 2404 "libinterp/parse-tree/oct-parse.cc"
2404  break;
2405 
2406  case YYSYMBOL_IF: /* IF */
2407 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2408  { }
2409 #line 2410 "libinterp/parse-tree/oct-parse.cc"
2410  break;
2411 
2412  case YYSYMBOL_ELSEIF: /* ELSEIF */
2413 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2414  { }
2415 #line 2416 "libinterp/parse-tree/oct-parse.cc"
2416  break;
2417 
2418  case YYSYMBOL_ELSE: /* ELSE */
2419 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2420  { }
2421 #line 2422 "libinterp/parse-tree/oct-parse.cc"
2422  break;
2423 
2424  case YYSYMBOL_SWITCH: /* SWITCH */
2425 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2426  { }
2427 #line 2428 "libinterp/parse-tree/oct-parse.cc"
2428  break;
2429 
2430  case YYSYMBOL_CASE: /* CASE */
2431 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2432  { }
2433 #line 2434 "libinterp/parse-tree/oct-parse.cc"
2434  break;
2435 
2436  case YYSYMBOL_OTHERWISE: /* OTHERWISE */
2437 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2438  { }
2439 #line 2440 "libinterp/parse-tree/oct-parse.cc"
2440  break;
2441 
2442  case YYSYMBOL_BREAK: /* BREAK */
2443 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2444  { }
2445 #line 2446 "libinterp/parse-tree/oct-parse.cc"
2446  break;
2447 
2448  case YYSYMBOL_CONTINUE: /* CONTINUE */
2449 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2450  { }
2451 #line 2452 "libinterp/parse-tree/oct-parse.cc"
2452  break;
2453 
2454  case YYSYMBOL_FUNC_RET: /* FUNC_RET */
2455 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2456  { }
2457 #line 2458 "libinterp/parse-tree/oct-parse.cc"
2458  break;
2459 
2460  case YYSYMBOL_UNWIND: /* UNWIND */
2461 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2462  { }
2463 #line 2464 "libinterp/parse-tree/oct-parse.cc"
2464  break;
2465 
2466  case YYSYMBOL_CLEANUP: /* CLEANUP */
2467 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2468  { }
2469 #line 2470 "libinterp/parse-tree/oct-parse.cc"
2470  break;
2471 
2472  case YYSYMBOL_TRY: /* TRY */
2473 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2474  { }
2475 #line 2476 "libinterp/parse-tree/oct-parse.cc"
2476  break;
2477 
2478  case YYSYMBOL_CATCH: /* CATCH */
2479 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2480  { }
2481 #line 2482 "libinterp/parse-tree/oct-parse.cc"
2482  break;
2483 
2484  case YYSYMBOL_GLOBAL: /* GLOBAL */
2485 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2486  { }
2487 #line 2488 "libinterp/parse-tree/oct-parse.cc"
2488  break;
2489 
2490  case YYSYMBOL_PERSISTENT: /* PERSISTENT */
2491 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2492  { }
2493 #line 2494 "libinterp/parse-tree/oct-parse.cc"
2494  break;
2495 
2496  case YYSYMBOL_FCN_HANDLE: /* FCN_HANDLE */
2497 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2498  { }
2499 #line 2500 "libinterp/parse-tree/oct-parse.cc"
2500  break;
2501 
2502  case YYSYMBOL_CLASSDEF: /* CLASSDEF */
2503 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2504  { }
2505 #line 2506 "libinterp/parse-tree/oct-parse.cc"
2506  break;
2507 
2508  case YYSYMBOL_PROPERTIES: /* PROPERTIES */
2509 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2510  { }
2511 #line 2512 "libinterp/parse-tree/oct-parse.cc"
2512  break;
2513 
2514  case YYSYMBOL_METHODS: /* METHODS */
2515 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2516  { }
2517 #line 2518 "libinterp/parse-tree/oct-parse.cc"
2518  break;
2519 
2520  case YYSYMBOL_EVENTS: /* EVENTS */
2521 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2522  { }
2523 #line 2524 "libinterp/parse-tree/oct-parse.cc"
2524  break;
2525 
2526  case YYSYMBOL_ENUMERATION: /* ENUMERATION */
2527 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2528  { }
2529 #line 2530 "libinterp/parse-tree/oct-parse.cc"
2530  break;
2531 
2532  case YYSYMBOL_METAQUERY: /* METAQUERY */
2533 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2534  { }
2535 #line 2536 "libinterp/parse-tree/oct-parse.cc"
2536  break;
2537 
2538  case YYSYMBOL_SUPERCLASSREF: /* SUPERCLASSREF */
2539 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2540  { }
2541 #line 2542 "libinterp/parse-tree/oct-parse.cc"
2542  break;
2543 
2544  case YYSYMBOL_FQ_IDENT: /* FQ_IDENT */
2545 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2546  { }
2547 #line 2548 "libinterp/parse-tree/oct-parse.cc"
2548  break;
2549 
2550  case YYSYMBOL_GET: /* GET */
2551 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2552  { }
2553 #line 2554 "libinterp/parse-tree/oct-parse.cc"
2554  break;
2555 
2556  case YYSYMBOL_SET: /* SET */
2557 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2558  { }
2559 #line 2560 "libinterp/parse-tree/oct-parse.cc"
2560  break;
2561 
2562  case YYSYMBOL_FCN: /* FCN */
2563 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2564  { }
2565 #line 2566 "libinterp/parse-tree/oct-parse.cc"
2566  break;
2567 
2568  case YYSYMBOL_LEXICAL_ERROR: /* LEXICAL_ERROR */
2569 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2570  { }
2571 #line 2572 "libinterp/parse-tree/oct-parse.cc"
2572  break;
2573 
2574  case YYSYMBOL_END_OF_INPUT: /* END_OF_INPUT */
2575 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2576  { }
2577 #line 2578 "libinterp/parse-tree/oct-parse.cc"
2578  break;
2579 
2580  case YYSYMBOL_UNARY: /* UNARY */
2581 #line 325 "../libinterp/parse-tree/oct-parse.yy"
2582  { }
2583 #line 2584 "libinterp/parse-tree/oct-parse.cc"
2584  break;
2585 
2586  case YYSYMBOL_input: /* input */
2587 #line 327 "../libinterp/parse-tree/oct-parse.yy"
2588  { delete ((*yyvaluep).tree_type); }
2589 #line 2590 "libinterp/parse-tree/oct-parse.cc"
2590  break;
2591 
2592  case YYSYMBOL_simple_list: /* simple_list */
2593 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2594  { delete ((*yyvaluep).tree_statement_list_type); }
2595 #line 2596 "libinterp/parse-tree/oct-parse.cc"
2596  break;
2597 
2598  case YYSYMBOL_simple_list1: /* simple_list1 */
2599 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2600  { delete ((*yyvaluep).tree_statement_list_type); }
2601 #line 2602 "libinterp/parse-tree/oct-parse.cc"
2602  break;
2603 
2604  case YYSYMBOL_opt_list: /* opt_list */
2605 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2606  { delete ((*yyvaluep).tree_statement_list_type); }
2607 #line 2608 "libinterp/parse-tree/oct-parse.cc"
2608  break;
2609 
2610  case YYSYMBOL_list: /* list */
2611 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2612  { delete ((*yyvaluep).tree_statement_list_type); }
2613 #line 2614 "libinterp/parse-tree/oct-parse.cc"
2614  break;
2615 
2616  case YYSYMBOL_list1: /* list1 */
2617 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2618  { delete ((*yyvaluep).tree_statement_list_type); }
2619 #line 2620 "libinterp/parse-tree/oct-parse.cc"
2620  break;
2621 
2622  case YYSYMBOL_opt_fcn_list: /* opt_fcn_list */
2623 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2624  { delete ((*yyvaluep).tree_statement_list_type); }
2625 #line 2626 "libinterp/parse-tree/oct-parse.cc"
2626  break;
2627 
2628  case YYSYMBOL_fcn_list: /* fcn_list */
2629 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2630  { delete ((*yyvaluep).tree_statement_list_type); }
2631 #line 2632 "libinterp/parse-tree/oct-parse.cc"
2632  break;
2633 
2634  case YYSYMBOL_fcn_list1: /* fcn_list1 */
2635 #line 352 "../libinterp/parse-tree/oct-parse.yy"
2636  { delete ((*yyvaluep).tree_statement_list_type); }
2637 #line 2638 "libinterp/parse-tree/oct-parse.cc"
2638  break;
2639 
2640  case YYSYMBOL_statement: /* statement */
2641 #line 351 "../libinterp/parse-tree/oct-parse.yy"
2642  { delete ((*yyvaluep).tree_statement_type); }
2643 #line 2644 "libinterp/parse-tree/oct-parse.cc"
2644  break;
2645 
2646  case YYSYMBOL_word_list_cmd: /* word_list_cmd */
2647 #line 338 "../libinterp/parse-tree/oct-parse.yy"
2648  { delete ((*yyvaluep).tree_index_expression_type); }
2649 #line 2650 "libinterp/parse-tree/oct-parse.cc"
2650  break;
2651 
2652  case YYSYMBOL_word_list: /* word_list */
2653 #line 339 "../libinterp/parse-tree/oct-parse.yy"
2654  { delete ((*yyvaluep).tree_argument_list_type); }
2655 #line 2656 "libinterp/parse-tree/oct-parse.cc"
2656  break;
2657 
2658  case YYSYMBOL_identifier: /* identifier */
2659 #line 337 "../libinterp/parse-tree/oct-parse.yy"
2660  { delete ((*yyvaluep).tree_identifier_type); }
2661 #line 2662 "libinterp/parse-tree/oct-parse.cc"
2662  break;
2663 
2664  case YYSYMBOL_superclass_identifier: /* superclass_identifier */
2665 #line 333 "../libinterp/parse-tree/oct-parse.yy"
2666  { delete ((*yyvaluep).tree_superclass_ref_type); }
2667 #line 2668 "libinterp/parse-tree/oct-parse.cc"
2668  break;
2669 
2670  case YYSYMBOL_meta_identifier: /* meta_identifier */
2671 #line 334 "../libinterp/parse-tree/oct-parse.yy"
2672  { delete ((*yyvaluep).tree_metaclass_query_type); }
2673 #line 2674 "libinterp/parse-tree/oct-parse.cc"
2674  break;
2675 
2676  case YYSYMBOL_string: /* string */
2677 #line 331 "../libinterp/parse-tree/oct-parse.yy"
2678  { delete ((*yyvaluep).tree_constant_type); }
2679 #line 2680 "libinterp/parse-tree/oct-parse.cc"
2680  break;
2681 
2682  case YYSYMBOL_constant: /* constant */
2683 #line 331 "../libinterp/parse-tree/oct-parse.yy"
2684  { delete ((*yyvaluep).tree_constant_type); }
2685 #line 2686 "libinterp/parse-tree/oct-parse.cc"
2686  break;
2687 
2688  case YYSYMBOL_matrix: /* matrix */
2689 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2690  { delete ((*yyvaluep).tree_expression_type); }
2691 #line 2692 "libinterp/parse-tree/oct-parse.cc"
2692  break;
2693 
2694  case YYSYMBOL_matrix_rows: /* matrix_rows */
2695 #line 328 "../libinterp/parse-tree/oct-parse.yy"
2696  { delete ((*yyvaluep).tree_matrix_type); }
2697 #line 2698 "libinterp/parse-tree/oct-parse.cc"
2698  break;
2699 
2700  case YYSYMBOL_cell: /* cell */
2701 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2702  { delete ((*yyvaluep).tree_expression_type); }
2703 #line 2704 "libinterp/parse-tree/oct-parse.cc"
2704  break;
2705 
2706  case YYSYMBOL_cell_rows: /* cell_rows */
2707 #line 329 "../libinterp/parse-tree/oct-parse.yy"
2708  { delete ((*yyvaluep).tree_cell_type); }
2709 #line 2710 "libinterp/parse-tree/oct-parse.cc"
2710  break;
2711 
2712  case YYSYMBOL_cell_or_matrix_row: /* cell_or_matrix_row */
2713 #line 339 "../libinterp/parse-tree/oct-parse.yy"
2714  { delete ((*yyvaluep).tree_argument_list_type); }
2715 #line 2716 "libinterp/parse-tree/oct-parse.cc"
2716  break;
2717 
2718  case YYSYMBOL_fcn_handle: /* fcn_handle */
2719 #line 332 "../libinterp/parse-tree/oct-parse.yy"
2720  { delete ((*yyvaluep).tree_fcn_handle_type); }
2721 #line 2722 "libinterp/parse-tree/oct-parse.cc"
2722  break;
2723 
2724  case YYSYMBOL_anon_fcn_handle: /* anon_fcn_handle */
2725 #line 336 "../libinterp/parse-tree/oct-parse.yy"
2726  { delete ((*yyvaluep).tree_anon_fcn_handle_type); }
2727 #line 2728 "libinterp/parse-tree/oct-parse.cc"
2728  break;
2729 
2730  case YYSYMBOL_primary_expr: /* primary_expr */
2731 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2732  { delete ((*yyvaluep).tree_expression_type); }
2733 #line 2734 "libinterp/parse-tree/oct-parse.cc"
2734  break;
2735 
2736  case YYSYMBOL_magic_colon: /* magic_colon */
2737 #line 331 "../libinterp/parse-tree/oct-parse.yy"
2738  { delete ((*yyvaluep).tree_constant_type); }
2739 #line 2740 "libinterp/parse-tree/oct-parse.cc"
2740  break;
2741 
2742  case YYSYMBOL_magic_tilde: /* magic_tilde */
2743 #line 337 "../libinterp/parse-tree/oct-parse.yy"
2744  { delete ((*yyvaluep).tree_identifier_type); }
2745 #line 2746 "libinterp/parse-tree/oct-parse.cc"
2746  break;
2747 
2748  case YYSYMBOL_arg_list: /* arg_list */
2749 #line 339 "../libinterp/parse-tree/oct-parse.yy"
2750  { delete ((*yyvaluep).tree_argument_list_type); }
2751 #line 2752 "libinterp/parse-tree/oct-parse.cc"
2752  break;
2753 
2754  case YYSYMBOL_oper_expr: /* oper_expr */
2755 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2756  { delete ((*yyvaluep).tree_expression_type); }
2757 #line 2758 "libinterp/parse-tree/oct-parse.cc"
2758  break;
2759 
2760  case YYSYMBOL_power_expr: /* power_expr */
2761 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2762  { delete ((*yyvaluep).tree_expression_type); }
2763 #line 2764 "libinterp/parse-tree/oct-parse.cc"
2764  break;
2765 
2766  case YYSYMBOL_colon_expr: /* colon_expr */
2767 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2768  { delete ((*yyvaluep).tree_expression_type); }
2769 #line 2770 "libinterp/parse-tree/oct-parse.cc"
2770  break;
2771 
2772  case YYSYMBOL_simple_expr: /* simple_expr */
2773 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2774  { delete ((*yyvaluep).tree_expression_type); }
2775 #line 2776 "libinterp/parse-tree/oct-parse.cc"
2776  break;
2777 
2778  case YYSYMBOL_assign_lhs: /* assign_lhs */
2779 #line 339 "../libinterp/parse-tree/oct-parse.yy"
2780  { delete ((*yyvaluep).tree_argument_list_type); }
2781 #line 2782 "libinterp/parse-tree/oct-parse.cc"
2782  break;
2783 
2784  case YYSYMBOL_assign_expr: /* assign_expr */
2785 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2786  { delete ((*yyvaluep).tree_expression_type); }
2787 #line 2788 "libinterp/parse-tree/oct-parse.cc"
2788  break;
2789 
2790  case YYSYMBOL_expression: /* expression */
2791 #line 330 "../libinterp/parse-tree/oct-parse.yy"
2792  { delete ((*yyvaluep).tree_expression_type); }
2793 #line 2794 "libinterp/parse-tree/oct-parse.cc"
2794  break;
2795 
2796  case YYSYMBOL_command: /* command */
2797 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2798  { delete ((*yyvaluep).tree_command_type); }
2799 #line 2800 "libinterp/parse-tree/oct-parse.cc"
2800  break;
2801 
2802  case YYSYMBOL_declaration: /* declaration */
2803 #line 350 "../libinterp/parse-tree/oct-parse.yy"
2804  { delete ((*yyvaluep).tree_decl_command_type); }
2805 #line 2806 "libinterp/parse-tree/oct-parse.cc"
2806  break;
2807 
2808  case YYSYMBOL_decl1: /* decl1 */
2809 #line 349 "../libinterp/parse-tree/oct-parse.yy"
2810  { delete ((*yyvaluep).tree_decl_init_list_type); }
2811 #line 2812 "libinterp/parse-tree/oct-parse.cc"
2812  break;
2813 
2814  case YYSYMBOL_decl2: /* decl2 */
2815 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2816  { delete ((*yyvaluep).tree_decl_elt_type); }
2817 #line 2818 "libinterp/parse-tree/oct-parse.cc"
2818  break;
2819 
2820  case YYSYMBOL_select_command: /* select_command */
2821 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2822  { delete ((*yyvaluep).tree_command_type); }
2823 #line 2824 "libinterp/parse-tree/oct-parse.cc"
2824  break;
2825 
2826  case YYSYMBOL_if_command: /* if_command */
2827 #line 342 "../libinterp/parse-tree/oct-parse.yy"
2828  { delete ((*yyvaluep).tree_if_command_type); }
2829 #line 2830 "libinterp/parse-tree/oct-parse.cc"
2830  break;
2831 
2832  case YYSYMBOL_if_cmd_list: /* if_cmd_list */
2833 #line 344 "../libinterp/parse-tree/oct-parse.yy"
2834  { delete ((*yyvaluep).tree_if_command_list_type); }
2835 #line 2836 "libinterp/parse-tree/oct-parse.cc"
2836  break;
2837 
2838  case YYSYMBOL_if_cmd_list1: /* if_cmd_list1 */
2839 #line 344 "../libinterp/parse-tree/oct-parse.yy"
2840  { delete ((*yyvaluep).tree_if_command_list_type); }
2841 #line 2842 "libinterp/parse-tree/oct-parse.cc"
2842  break;
2843 
2844  case YYSYMBOL_elseif_clause: /* elseif_clause */
2845 #line 343 "../libinterp/parse-tree/oct-parse.yy"
2846  { delete ((*yyvaluep).tree_if_clause_type); }
2847 #line 2848 "libinterp/parse-tree/oct-parse.cc"
2848  break;
2849 
2850  case YYSYMBOL_else_clause: /* else_clause */
2851 #line 343 "../libinterp/parse-tree/oct-parse.yy"
2852  { delete ((*yyvaluep).tree_if_clause_type); }
2853 #line 2854 "libinterp/parse-tree/oct-parse.cc"
2854  break;
2855 
2856  case YYSYMBOL_switch_command: /* switch_command */
2857 #line 345 "../libinterp/parse-tree/oct-parse.yy"
2858  { delete ((*yyvaluep).tree_switch_command_type); }
2859 #line 2860 "libinterp/parse-tree/oct-parse.cc"
2860  break;
2861 
2862  case YYSYMBOL_case_list: /* case_list */
2863 #line 347 "../libinterp/parse-tree/oct-parse.yy"
2864  { delete ((*yyvaluep).tree_switch_case_list_type); }
2865 #line 2866 "libinterp/parse-tree/oct-parse.cc"
2866  break;
2867 
2868  case YYSYMBOL_case_list1: /* case_list1 */
2869 #line 347 "../libinterp/parse-tree/oct-parse.yy"
2870  { delete ((*yyvaluep).tree_switch_case_list_type); }
2871 #line 2872 "libinterp/parse-tree/oct-parse.cc"
2872  break;
2873 
2874  case YYSYMBOL_switch_case: /* switch_case */
2875 #line 346 "../libinterp/parse-tree/oct-parse.yy"
2876  { delete ((*yyvaluep).tree_switch_case_type); }
2877 #line 2878 "libinterp/parse-tree/oct-parse.cc"
2878  break;
2879 
2880  case YYSYMBOL_default_case: /* default_case */
2881 #line 346 "../libinterp/parse-tree/oct-parse.yy"
2882  { delete ((*yyvaluep).tree_switch_case_type); }
2883 #line 2884 "libinterp/parse-tree/oct-parse.cc"
2884  break;
2885 
2886  case YYSYMBOL_loop_command: /* loop_command */
2887 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2888  { delete ((*yyvaluep).tree_command_type); }
2889 #line 2890 "libinterp/parse-tree/oct-parse.cc"
2890  break;
2891 
2892  case YYSYMBOL_jump_command: /* jump_command */
2893 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2894  { delete ((*yyvaluep).tree_command_type); }
2895 #line 2896 "libinterp/parse-tree/oct-parse.cc"
2896  break;
2897 
2898  case YYSYMBOL_except_command: /* except_command */
2899 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2900  { delete ((*yyvaluep).tree_command_type); }
2901 #line 2902 "libinterp/parse-tree/oct-parse.cc"
2902  break;
2903 
2904  case YYSYMBOL_opt_param_list: /* opt_param_list */
2905 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2906  { delete ((*yyvaluep).tree_parameter_list_type); }
2907 #line 2908 "libinterp/parse-tree/oct-parse.cc"
2908  break;
2909 
2910  case YYSYMBOL_param_list: /* param_list */
2911 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2912  { delete ((*yyvaluep).tree_parameter_list_type); }
2913 #line 2914 "libinterp/parse-tree/oct-parse.cc"
2914  break;
2915 
2916  case YYSYMBOL_param_list1: /* param_list1 */
2917 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2918  { delete ((*yyvaluep).tree_parameter_list_type); }
2919 #line 2920 "libinterp/parse-tree/oct-parse.cc"
2920  break;
2921 
2922  case YYSYMBOL_param_list2: /* param_list2 */
2923 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2924  { delete ((*yyvaluep).tree_parameter_list_type); }
2925 #line 2926 "libinterp/parse-tree/oct-parse.cc"
2926  break;
2927 
2928  case YYSYMBOL_param_list_elt: /* param_list_elt */
2929 #line 348 "../libinterp/parse-tree/oct-parse.yy"
2930  { delete ((*yyvaluep).tree_decl_elt_type); }
2931 #line 2932 "libinterp/parse-tree/oct-parse.cc"
2932  break;
2933 
2934  case YYSYMBOL_return_list: /* return_list */
2935 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2936  { delete ((*yyvaluep).tree_parameter_list_type); }
2937 #line 2938 "libinterp/parse-tree/oct-parse.cc"
2938  break;
2939 
2940  case YYSYMBOL_return_list1: /* return_list1 */
2941 #line 340 "../libinterp/parse-tree/oct-parse.yy"
2942  { delete ((*yyvaluep).tree_parameter_list_type); }
2943 #line 2944 "libinterp/parse-tree/oct-parse.cc"
2944  break;
2945 
2946  case YYSYMBOL_file: /* file */
2947 #line 341 "../libinterp/parse-tree/oct-parse.yy"
2948  { delete ((*yyvaluep).tree_command_type); }
2949 #line 2950 "libinterp/parse-tree/oct-parse.cc"
2950  break;
2951 
2952  case YYSYMBOL_function_beg: /* function_beg */
2953 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2954  { }
2955 #line 2956 "libinterp/parse-tree/oct-parse.cc"
2956  break;
2957 
2958  case YYSYMBOL_fcn_name: /* fcn_name */
2959 #line 337 "../libinterp/parse-tree/oct-parse.yy"
2960  { delete ((*yyvaluep).tree_identifier_type); }
2961 #line 2962 "libinterp/parse-tree/oct-parse.cc"
2962  break;
2963 
2964  case YYSYMBOL_function_end: /* function_end */
2965 #line 351 "../libinterp/parse-tree/oct-parse.yy"
2966  { delete ((*yyvaluep).tree_statement_type); }
2967 #line 2968 "libinterp/parse-tree/oct-parse.cc"
2968  break;
2969 
2970  case YYSYMBOL_function: /* function */
2971 #line 335 "../libinterp/parse-tree/oct-parse.yy"
2972  { delete ((*yyvaluep).tree_function_def_type); }
2973 #line 2974 "libinterp/parse-tree/oct-parse.cc"
2974  break;
2975 
2976  case YYSYMBOL_classdef_beg: /* classdef_beg */
2977 #line 322 "../libinterp/parse-tree/oct-parse.yy"
2978  { }
2979 #line 2980 "libinterp/parse-tree/oct-parse.cc"
2980  break;
2981 
2982  case YYSYMBOL_classdef: /* classdef */
2983 #line 355 "../libinterp/parse-tree/oct-parse.yy"
2984  { delete ((*yyvaluep).tree_classdef_type); }
2985 #line 2986 "libinterp/parse-tree/oct-parse.cc"
2986  break;
2987 
2988  case YYSYMBOL_attr_list: /* attr_list */
2989 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2990  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2991 #line 2992 "libinterp/parse-tree/oct-parse.cc"
2992  break;
2993 
2994  case YYSYMBOL_attr_list1: /* attr_list1 */
2995 #line 357 "../libinterp/parse-tree/oct-parse.yy"
2996  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2997 #line 2998 "libinterp/parse-tree/oct-parse.cc"
2998  break;
2999 
3000  case YYSYMBOL_attr: /* attr */
3001 #line 356 "../libinterp/parse-tree/oct-parse.yy"
3002  { delete ((*yyvaluep).tree_classdef_attribute_type); }
3003 #line 3004 "libinterp/parse-tree/oct-parse.cc"
3004  break;
3005 
3006  case YYSYMBOL_superclass_list: /* superclass_list */
3007 #line 359 "../libinterp/parse-tree/oct-parse.yy"
3008  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
3009 #line 3010 "libinterp/parse-tree/oct-parse.cc"
3010  break;
3011 
3012  case YYSYMBOL_superclass_list1: /* superclass_list1 */
3013 #line 359 "../libinterp/parse-tree/oct-parse.yy"
3014  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
3015 #line 3016 "libinterp/parse-tree/oct-parse.cc"
3016  break;
3017 
3018  case YYSYMBOL_superclass: /* superclass */
3019 #line 358 "../libinterp/parse-tree/oct-parse.yy"
3020  { delete ((*yyvaluep).tree_classdef_superclass_type); }
3021 #line 3022 "libinterp/parse-tree/oct-parse.cc"
3022  break;
3023 
3024  case YYSYMBOL_class_body: /* class_body */
3025 #line 360 "../libinterp/parse-tree/oct-parse.yy"
3026  { delete ((*yyvaluep).tree_classdef_body_type); }
3027 #line 3028 "libinterp/parse-tree/oct-parse.cc"
3028  break;
3029 
3030  case YYSYMBOL_class_body1: /* class_body1 */
3031 #line 360 "../libinterp/parse-tree/oct-parse.yy"
3032  { delete ((*yyvaluep).tree_classdef_body_type); }
3033 #line 3034 "libinterp/parse-tree/oct-parse.cc"
3034  break;
3035 
3036  case YYSYMBOL_properties_block: /* properties_block */
3037 #line 363 "../libinterp/parse-tree/oct-parse.yy"
3038  { delete ((*yyvaluep).tree_classdef_properties_block_type); }
3039 #line 3040 "libinterp/parse-tree/oct-parse.cc"
3040  break;
3041 
3042  case YYSYMBOL_property_list: /* property_list */
3043 #line 362 "../libinterp/parse-tree/oct-parse.yy"
3044  { delete ((*yyvaluep).tree_classdef_property_list_type); }
3045 #line 3046 "libinterp/parse-tree/oct-parse.cc"
3046  break;
3047 
3048  case YYSYMBOL_property_list1: /* property_list1 */
3049 #line 362 "../libinterp/parse-tree/oct-parse.yy"
3050  { delete ((*yyvaluep).tree_classdef_property_list_type); }
3051 #line 3052 "libinterp/parse-tree/oct-parse.cc"
3052  break;
3053 
3054  case YYSYMBOL_class_property: /* class_property */
3055 #line 361 "../libinterp/parse-tree/oct-parse.yy"
3056  { delete ((*yyvaluep).tree_classdef_property_type); }
3057 #line 3058 "libinterp/parse-tree/oct-parse.cc"
3058  break;
3059 
3060  case YYSYMBOL_methods_block: /* methods_block */
3061 #line 365 "../libinterp/parse-tree/oct-parse.yy"
3062  { delete ((*yyvaluep).tree_classdef_methods_block_type); }
3063 #line 3064 "libinterp/parse-tree/oct-parse.cc"
3064  break;
3065 
3066  case YYSYMBOL_method_decl1: /* method_decl1 */
3067 #line 353 "../libinterp/parse-tree/oct-parse.yy"
3068  { delete ((*yyvaluep).octave_user_function_type); }
3069 #line 3070 "libinterp/parse-tree/oct-parse.cc"
3070  break;
3071 
3072  case YYSYMBOL_method_decl: /* method_decl */
3073 #line 335 "../libinterp/parse-tree/oct-parse.yy"
3074  { delete ((*yyvaluep).tree_function_def_type); }
3075 #line 3076 "libinterp/parse-tree/oct-parse.cc"
3076  break;
3077 
3078  case YYSYMBOL_method: /* method */
3079 #line 335 "../libinterp/parse-tree/oct-parse.yy"
3080  { delete ((*yyvaluep).tree_function_def_type); }
3081 #line 3082 "libinterp/parse-tree/oct-parse.cc"
3082  break;
3083 
3084  case YYSYMBOL_methods_list: /* methods_list */
3085 #line 364 "../libinterp/parse-tree/oct-parse.yy"
3086  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
3087 #line 3088 "libinterp/parse-tree/oct-parse.cc"
3088  break;
3089 
3090  case YYSYMBOL_methods_list1: /* methods_list1 */
3091 #line 364 "../libinterp/parse-tree/oct-parse.yy"
3092  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
3093 #line 3094 "libinterp/parse-tree/oct-parse.cc"
3094  break;
3095 
3096  case YYSYMBOL_events_block: /* events_block */
3097 #line 368 "../libinterp/parse-tree/oct-parse.yy"
3098  { delete ((*yyvaluep).tree_classdef_events_block_type); }
3099 #line 3100 "libinterp/parse-tree/oct-parse.cc"
3100  break;
3101 
3102  case YYSYMBOL_events_list: /* events_list */
3103 #line 367 "../libinterp/parse-tree/oct-parse.yy"
3104  { delete ((*yyvaluep).tree_classdef_events_list_type); }
3105 #line 3106 "libinterp/parse-tree/oct-parse.cc"
3106  break;
3107 
3108  case YYSYMBOL_events_list1: /* events_list1 */
3109 #line 367 "../libinterp/parse-tree/oct-parse.yy"
3110  { delete ((*yyvaluep).tree_classdef_events_list_type); }
3111 #line 3112 "libinterp/parse-tree/oct-parse.cc"
3112  break;
3113 
3114  case YYSYMBOL_class_event: /* class_event */
3115 #line 366 "../libinterp/parse-tree/oct-parse.yy"
3116  { delete ((*yyvaluep).tree_classdef_event_type); }
3117 #line 3118 "libinterp/parse-tree/oct-parse.cc"
3118  break;
3119 
3120  case YYSYMBOL_enum_block: /* enum_block */
3121 #line 371 "../libinterp/parse-tree/oct-parse.yy"
3122  { delete ((*yyvaluep).tree_classdef_enum_block_type); }
3123 #line 3124 "libinterp/parse-tree/oct-parse.cc"
3124  break;
3125 
3126  case YYSYMBOL_enum_list: /* enum_list */
3127 #line 370 "../libinterp/parse-tree/oct-parse.yy"
3128  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
3129 #line 3130 "libinterp/parse-tree/oct-parse.cc"
3130  break;
3131 
3132  case YYSYMBOL_enum_list1: /* enum_list1 */
3133 #line 370 "../libinterp/parse-tree/oct-parse.yy"
3134  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
3135 #line 3136 "libinterp/parse-tree/oct-parse.cc"
3136  break;
3137 
3138  case YYSYMBOL_class_enum: /* class_enum */
3139 #line 369 "../libinterp/parse-tree/oct-parse.yy"
3140  { delete ((*yyvaluep).tree_classdef_enum_type); }
3141 #line 3142 "libinterp/parse-tree/oct-parse.cc"
3142  break;
3143 
3144  case YYSYMBOL_stash_comment: /* stash_comment */
3145 #line 324 "../libinterp/parse-tree/oct-parse.yy"
3146  { }
3147 #line 3148 "libinterp/parse-tree/oct-parse.cc"
3148  break;
3149 
3150  case YYSYMBOL_sep_no_nl: /* sep_no_nl */
3151 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3152  { }
3153 #line 3154 "libinterp/parse-tree/oct-parse.cc"
3154  break;
3155 
3156  case YYSYMBOL_opt_sep_no_nl: /* opt_sep_no_nl */
3157 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3158  { }
3159 #line 3160 "libinterp/parse-tree/oct-parse.cc"
3160  break;
3161 
3162  case YYSYMBOL_opt_nl: /* opt_nl */
3163 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3164  { }
3165 #line 3166 "libinterp/parse-tree/oct-parse.cc"
3166  break;
3167 
3168  case YYSYMBOL_nl: /* nl */
3169 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3170  { }
3171 #line 3172 "libinterp/parse-tree/oct-parse.cc"
3172  break;
3173 
3174  case YYSYMBOL_sep: /* sep */
3175 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3176  { }
3177 #line 3178 "libinterp/parse-tree/oct-parse.cc"
3178  break;
3179 
3180  case YYSYMBOL_opt_sep: /* opt_sep */
3181 #line 323 "../libinterp/parse-tree/oct-parse.yy"
3182  { }
3183 #line 3184 "libinterp/parse-tree/oct-parse.cc"
3184  break;
3185 
3186  default:
3187  break;
3188  }
3190 }
3191 
3192 
3193 
3194 
3195 
3196 int
3198 {
3199  yypstate *yyps = yypstate_new ();
3200  if (!yyps)
3201  {
3202  yyerror (parser, YY_("memory exhausted"));
3203  return 2;
3204  }
3205  int yystatus = yypull_parse (yyps, parser);
3206  yypstate_delete (yyps);
3207  return yystatus;
3208 }
3209 
3210 int
3212 {
3213  YY_ASSERT (yyps);
3214  int yystatus;
3215  do {
3216  YYSTYPE yylval;
3217  int yychar = yylex (&yylval, scanner);
3218  yystatus = yypush_parse (yyps, yychar, &yylval, parser);
3219  } while (yystatus == YYPUSH_MORE);
3220  return yystatus;
3221 }
3222 
3223 #define octave_nerrs yyps->octave_nerrs
3224 #define yystate yyps->yystate
3225 #define yyerrstatus yyps->yyerrstatus
3226 #define yyssa yyps->yyssa
3227 #define yyss yyps->yyss
3228 #define yyssp yyps->yyssp
3229 #define yyvsa yyps->yyvsa
3230 #define yyvs yyps->yyvs
3231 #define yyvsp yyps->yyvsp
3232 #define yystacksize yyps->yystacksize
3233 
3234 /* Initialize the parser data structure. */
3235 static void
3237 {
3238  yynerrs = 0;
3239  yystate = 0;
3240  yyerrstatus = 0;
3241 
3242  yyssp = yyss;
3243  yyvsp = yyvs;
3244 
3245  /* Initialize the state stack, in case yypcontext_expected_tokens is
3246  called before the first call to yyparse. */
3247  *yyssp = 0;
3248  yyps->yynew = 1;
3249 }
3250 
3251 /* Initialize the parser data structure. */
3252 yypstate *
3254 {
3255  yypstate *yyps;
3256  yyps = YY_CAST (yypstate *, YYMALLOC (sizeof *yyps));
3257  if (!yyps)
3258  return YY_NULLPTR;
3260  yyss = yyssa;
3261  yyvs = yyvsa;
3262  yypstate_clear (yyps);
3263  return yyps;
3264 }
3265 
3266 void
3268 {
3269  if (yyps)
3270  {
3271 #ifndef yyoverflow
3272  /* If the stack was reallocated but the parse did not complete, then the
3273  stack still needs to be freed. */
3274  if (yyss != yyssa)
3275  YYSTACK_FREE (yyss);
3276 #endif
3277  YYFREE (yyps);
3278  }
3279 }
3280 
3281 
3282 
3283 /*---------------.
3284 | yypush_parse. |
3285 `---------------*/
3286 
3287 int
3289  int yypushed_char, YYSTYPE const *yypushed_val, octave::base_parser& parser)
3290 {
3291 /* Lookahead token kind. */
3292 int yychar;
3293 
3294 
3295 /* The semantic value of the lookahead symbol. */
3296 /* Default value used for initialization, for pacifying older GCCs
3297  or non-GCC compilers. */
3298 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
3299 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
3300 
3301  int yyn;
3302  /* The return value of yyparse. */
3303  int yyresult;
3304  /* Lookahead symbol kind. */
3306  /* The variables used to return semantic value and location from the
3307  action routines. */
3308  YYSTYPE yyval;
3309 
3310 
3311 
3312 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3313 
3314  /* The number of symbols on the RHS of the reduced rule.
3315  Keep to zero when no symbol should be popped. */
3316  int yylen = 0;
3317 
3318  switch (yyps->yynew)
3319  {
3320  case 2:
3321  yypstate_clear (yyps);
3322  goto case_0;
3323 
3324  case_0:
3325  case 0:
3326  yyn = yypact[yystate];
3327  goto yyread_pushed_token;
3328  }
3329 
3330  YYDPRINTF ((stderr, "Starting parse\n"));
3331 
3332  yychar = OCTAVE_EMPTY; /* Cause a token to be read. */
3333  goto yysetstate;
3334 
3335 
3336 /*------------------------------------------------------------.
3337 | yynewstate -- push a new state, which is found in yystate. |
3338 `------------------------------------------------------------*/
3339 yynewstate:
3340  /* In all cases, when you get here, the value and location stacks
3341  have just been pushed. So pushing a state here evens the stacks. */
3342  yyssp++;
3343 
3344 
3345 /*--------------------------------------------------------------------.
3346 | yysetstate -- set current state (the top of the stack) to yystate. |
3347 `--------------------------------------------------------------------*/
3348 yysetstate:
3349  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3350  YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
3355 
3356  if (yyss + yystacksize - 1 <= yyssp)
3357 #if !defined yyoverflow && !defined YYSTACK_RELOCATE
3358  goto yyexhaustedlab;
3359 #else
3360  {
3361  /* Get the current used size of the three stacks, in elements. */
3362  YYPTRDIFF_T yysize = yyssp - yyss + 1;
3363 
3364 # if defined yyoverflow
3365  {
3366  /* Give user a chance to reallocate the stack. Use copies of
3367  these so that the &'s don't force the real ones into
3368  memory. */
3369  yy_state_t *yyss1 = yyss;
3370  YYSTYPE *yyvs1 = yyvs;
3371 
3372  /* Each stack pointer address is followed by the size of the
3373  data in use in that stack, in bytes. This used to be a
3374  conditional around just the two extra args, but that might
3375  be undefined if yyoverflow is a macro. */
3376  yyoverflow (YY_("memory exhausted"),
3377  &yyss1, yysize * YYSIZEOF (*yyssp),
3378  &yyvs1, yysize * YYSIZEOF (*yyvsp),
3379  &yystacksize);
3380  yyss = yyss1;
3381  yyvs = yyvs1;
3382  }
3383 # else /* defined YYSTACK_RELOCATE */
3384  /* Extend the stack our own way. */
3385  if (YYMAXDEPTH <= yystacksize)
3386  goto yyexhaustedlab;
3387  yystacksize *= 2;
3388  if (YYMAXDEPTH < yystacksize)
3390 
3391  {
3392  yy_state_t *yyss1 = yyss;
3393  union yyalloc *yyptr =
3394  YY_CAST (union yyalloc *,
3396  if (! yyptr)
3397  goto yyexhaustedlab;
3398  YYSTACK_RELOCATE (yyss_alloc, yyss);
3399  YYSTACK_RELOCATE (yyvs_alloc, yyvs);
3400 # undef YYSTACK_RELOCATE
3401  if (yyss1 != yyssa)
3402  YYSTACK_FREE (yyss1);
3403  }
3404 # endif
3405 
3406  yyssp = yyss + yysize - 1;
3407  yyvsp = yyvs + yysize - 1;
3408 
3410  YYDPRINTF ((stderr, "Stack size increased to %ld\n",
3411  YY_CAST (long, yystacksize)));
3413 
3414  if (yyss + yystacksize - 1 <= yyssp)
3415  YYABORT;
3416  }
3417 #endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
3418 
3419  if (yystate == YYFINAL)
3420  YYACCEPT;
3421 
3422  goto yybackup;
3423 
3424 
3425 /*-----------.
3426 | yybackup. |
3427 `-----------*/
3428 yybackup:
3429  /* Do appropriate processing given the current state. Read a
3430  lookahead token if we need one and don't already have one. */
3431 
3432  /* First try to decide what to do without reference to lookahead token. */
3433  yyn = yypact[yystate];
3434  if (yypact_value_is_default (yyn))
3435  goto yydefault;
3436 
3437  /* Not known => get a lookahead token if don't already have one. */
3438 
3439  /* YYCHAR is either empty, or end-of-input, or a valid lookahead. */
3440  if (yychar == OCTAVE_EMPTY)
3441  {
3442  if (!yyps->yynew)
3443  {
3444  YYDPRINTF ((stderr, "Return for a new token:\n"));
3445  yyresult = YYPUSH_MORE;
3446  goto yypushreturn;
3447  }
3448  yyps->yynew = 0;
3449 yyread_pushed_token:
3450  YYDPRINTF ((stderr, "Reading a token\n"));
3451  yychar = yypushed_char;
3452  if (yypushed_val)
3453  yylval = *yypushed_val;
3454  }
3455 
3456  if (yychar <= OCTAVE_EOF)
3457  {
3458  yychar = OCTAVE_EOF;
3459  yytoken = YYSYMBOL_YYEOF;
3460  YYDPRINTF ((stderr, "Now at end of input.\n"));
3461  }
3462  else if (yychar == OCTAVE_error)
3463  {
3464  /* The scanner already issued an error message, process directly
3465  to error recovery. But do not keep the error token as
3466  lookahead, it is too special and may lead us to an endless
3467  loop in error recovery. */
3468  yychar = OCTAVE_UNDEF;
3469  yytoken = YYSYMBOL_YYerror;
3470  goto yyerrlab1;
3471  }
3472  else
3473  {
3474  yytoken = YYTRANSLATE (yychar);
3475  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3476  }
3477 
3478  /* If the proper action on seeing token YYTOKEN is to reduce or to
3479  detect an error, take that action. */
3480  yyn += yytoken;
3481  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3482  goto yydefault;
3483  yyn = yytable[yyn];
3484  if (yyn <= 0)
3485  {
3486  if (yytable_value_is_error (yyn))
3487  goto yyerrlab;
3488  yyn = -yyn;
3489  goto yyreduce;
3490  }
3491 
3492  /* Count tokens shifted since error; after three, turn off error
3493  status. */
3494  if (yyerrstatus)
3495  yyerrstatus--;
3496 
3497  /* Shift the lookahead token. */
3498  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3499  yystate = yyn;
3501  *++yyvsp = yylval;
3503 
3504  /* Discard the shifted token. */
3505  yychar = OCTAVE_EMPTY;
3506  goto yynewstate;
3507 
3508 
3509 /*-----------------------------------------------------------.
3510 | yydefault -- do the default action for the current state. |
3511 `-----------------------------------------------------------*/
3512 yydefault:
3513  yyn = yydefact[yystate];
3514  if (yyn == 0)
3515  goto yyerrlab;
3516  goto yyreduce;
3517 
3518 
3519 /*-----------------------------.
3520 | yyreduce -- do a reduction. |
3521 `-----------------------------*/
3522 yyreduce:
3523  /* yyn is the number of a rule to reduce with. */
3524  yylen = yyr2[yyn];
3525 
3526  /* If YYLEN is nonzero, implement the default value of the action:
3527  '$$ = $1'.
3528 
3529  Otherwise, the following line sets YYVAL to garbage.
3530  This behavior is undocumented and Bison
3531  users should not rely upon it. Assigning to YYVAL
3532  unconditionally makes the parser a bit smaller, and it avoids a
3533  GCC warning that YYVAL may be used uninitialized. */
3534  yyval = yyvsp[1-yylen];
3535 
3536 
3537  YY_REDUCE_PRINT (yyn);
3538  switch (yyn)
3539  {
3540  case 2: /* input: simple_list '\n' */
3541 #line 392 "../libinterp/parse-tree/oct-parse.yy"
3542  {
3543  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3544 
3545  (yyval.tree_type) = nullptr;
3546  std::shared_ptr<octave::tree_statement_list> tmp_lst ((yyvsp[-1].tree_statement_list_type));
3547  parser.statement_list (tmp_lst);
3548  YYACCEPT;
3549  }
3550 #line 3551 "libinterp/parse-tree/oct-parse.cc"
3551  break;
3552 
3553  case 3: /* input: simple_list END_OF_INPUT */
3554 #line 401 "../libinterp/parse-tree/oct-parse.yy"
3555  {
3556  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3557 
3558  (yyval.tree_type) = nullptr;
3559  lexer.m_end_of_input = true;
3560  std::shared_ptr<octave::tree_statement_list> tmp_lst ((yyvsp[-1].tree_statement_list_type));
3561  parser.statement_list (tmp_lst);
3562  YYACCEPT;
3563  }
3564 #line 3565 "libinterp/parse-tree/oct-parse.cc"
3565  break;
3566 
3567  case 4: /* input: parse_error */
3568 #line 411 "../libinterp/parse-tree/oct-parse.yy"
3569  {
3570  (yyval.tree_type) = nullptr;
3571  YYABORT;
3572  }
3573 #line 3574 "libinterp/parse-tree/oct-parse.cc"
3574  break;
3575 
3576  case 5: /* simple_list: opt_sep_no_nl */
3577 #line 418 "../libinterp/parse-tree/oct-parse.yy"
3578  {
3579  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3580 
3581  (yyval.tree_statement_list_type) = nullptr;
3582  }
3583 #line 3584 "libinterp/parse-tree/oct-parse.cc"
3584  break;
3585 
3586  case 6: /* simple_list: simple_list1 opt_sep_no_nl */
3587 #line 424 "../libinterp/parse-tree/oct-parse.yy"
3588  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), false); }
3589 #line 3590 "libinterp/parse-tree/oct-parse.cc"
3590  break;
3591 
3592  case 7: /* simple_list1: statement */
3593 #line 428 "../libinterp/parse-tree/oct-parse.yy"
3594  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3595 #line 3596 "libinterp/parse-tree/oct-parse.cc"
3596  break;
3597 
3598  case 8: /* simple_list1: simple_list1 sep_no_nl statement */
3599 #line 430 "../libinterp/parse-tree/oct-parse.yy"
3600  { (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); }
3601 #line 3602 "libinterp/parse-tree/oct-parse.cc"
3602  break;
3603 
3604  case 9: /* opt_list: %empty */
3605 #line 434 "../libinterp/parse-tree/oct-parse.yy"
3606  { (yyval.tree_statement_list_type) = new octave::tree_statement_list (); }
3607 #line 3608 "libinterp/parse-tree/oct-parse.cc"
3608  break;
3609 
3610  case 10: /* opt_list: list */
3611 #line 436 "../libinterp/parse-tree/oct-parse.yy"
3612  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3613 #line 3614 "libinterp/parse-tree/oct-parse.cc"
3614  break;
3615 
3616  case 11: /* list: list1 opt_sep */
3617 #line 440 "../libinterp/parse-tree/oct-parse.yy"
3618  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), true); }
3619 #line 3620 "libinterp/parse-tree/oct-parse.cc"
3620  break;
3621 
3622  case 12: /* list1: statement */
3623 #line 444 "../libinterp/parse-tree/oct-parse.yy"
3624  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3625 #line 3626 "libinterp/parse-tree/oct-parse.cc"
3626  break;
3627 
3628  case 13: /* list1: list1 sep statement */
3629 #line 446 "../libinterp/parse-tree/oct-parse.yy"
3630  { (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); }
3631 #line 3632 "libinterp/parse-tree/oct-parse.cc"
3632  break;
3633 
3634  case 14: /* opt_fcn_list: %empty */
3635 #line 450 "../libinterp/parse-tree/oct-parse.yy"
3636  { (yyval.tree_statement_list_type) = new octave::tree_statement_list (); }
3637 #line 3638 "libinterp/parse-tree/oct-parse.cc"
3638  break;
3639 
3640  case 15: /* opt_fcn_list: fcn_list */
3641 #line 452 "../libinterp/parse-tree/oct-parse.yy"
3642  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3643 #line 3644 "libinterp/parse-tree/oct-parse.cc"
3644  break;
3645 
3646  case 16: /* fcn_list: fcn_list1 opt_sep */
3647 #line 456 "../libinterp/parse-tree/oct-parse.yy"
3648  {
3649  OCTAVE_YYUSE ((yyvsp[0].punct_type));
3650 
3651  (yyval.tree_statement_list_type) = (yyvsp[-1].tree_statement_list_type);
3652  }
3653 #line 3654 "libinterp/parse-tree/oct-parse.cc"
3654  break;
3655 
3656  case 17: /* fcn_list1: function */
3657 #line 464 "../libinterp/parse-tree/oct-parse.yy"
3658  {
3659  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3660  (yyval.tree_statement_list_type) = new octave::tree_statement_list (stmt);
3661  }
3662 #line 3663 "libinterp/parse-tree/oct-parse.cc"
3663  break;
3664 
3665  case 18: /* fcn_list1: fcn_list1 opt_sep function */
3666 #line 469 "../libinterp/parse-tree/oct-parse.yy"
3667  {
3668  octave::tree_statement *stmt = parser.make_statement ((yyvsp[0].tree_function_def_type));
3669  (yyval.tree_statement_list_type) = parser.append_statement_list ((yyvsp[-2].tree_statement_list_type), (yyvsp[-1].punct_type), stmt, false);
3670  }
3671 #line 3672 "libinterp/parse-tree/oct-parse.cc"
3672  break;
3673 
3674  case 19: /* statement: expression */
3675 #line 476 "../libinterp/parse-tree/oct-parse.yy"
3676  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_expression_type)); }
3677 #line 3678 "libinterp/parse-tree/oct-parse.cc"
3678  break;
3679 
3680  case 20: /* statement: command */
3681 #line 478 "../libinterp/parse-tree/oct-parse.yy"
3682  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_command_type)); }
3683 #line 3684 "libinterp/parse-tree/oct-parse.cc"
3684  break;
3685 
3686  case 21: /* statement: word_list_cmd */
3687 #line 480 "../libinterp/parse-tree/oct-parse.yy"
3688  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_index_expression_type)); }
3689 #line 3690 "libinterp/parse-tree/oct-parse.cc"
3690  break;
3691 
3692  case 22: /* word_list_cmd: identifier word_list */
3693 #line 492 "../libinterp/parse-tree/oct-parse.yy"
3694  {
3695  (yyval.tree_index_expression_type) = parser.make_index_expression ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_argument_list_type), '(');
3696  if (! (yyval.tree_index_expression_type))
3697  {
3698  // make_index_expression deleted $1 and $2.
3699  YYABORT;
3700  }
3701  (yyval.tree_index_expression_type)->mark_word_list_cmd ();
3702  }
3703 #line 3704 "libinterp/parse-tree/oct-parse.cc"
3704  break;
3705 
3706  case 23: /* word_list: string */
3707 #line 504 "../libinterp/parse-tree/oct-parse.yy"
3708  { (yyval.tree_argument_list_type) = new octave::tree_argument_list ((yyvsp[0].tree_constant_type)); }
3709 #line 3710 "libinterp/parse-tree/oct-parse.cc"
3710  break;
3711 
3712  case 24: /* word_list: word_list string */
3713 #line 506 "../libinterp/parse-tree/oct-parse.yy"
3714  {
3715  (yyvsp[-1].tree_argument_list_type)->append ((yyvsp[0].tree_constant_type));
3716  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3717  }
3718 #line 3719 "libinterp/parse-tree/oct-parse.cc"
3719  break;
3720 
3721  case 25: /* identifier: NAME */
3722 #line 517 "../libinterp/parse-tree/oct-parse.yy"
3723  {
3724  (yyval.tree_identifier_type) = new octave::tree_identifier ((yyvsp[0].tok_val)->sym_rec (),
3725  (yyvsp[0].tok_val)->line (),
3726  (yyvsp[0].tok_val)->column ());
3727  }
3728 #line 3729 "libinterp/parse-tree/oct-parse.cc"
3729  break;
3730 
3731  case 26: /* superclass_identifier: SUPERCLASSREF */
3732 #line 526 "../libinterp/parse-tree/oct-parse.yy"
3733  {
3734  std::string meth = (yyvsp[0].tok_val)->superclass_method_name ();
3735  std::string cls = (yyvsp[0].tok_val)->superclass_class_name ();
3736 
3737  (yyval.tree_superclass_ref_type) = new octave::tree_superclass_ref (meth, cls,
3738  (yyvsp[0].tok_val)->line (),
3739  (yyvsp[0].tok_val)->column ());
3740  }
3741 #line 3742 "libinterp/parse-tree/oct-parse.cc"
3742  break;
3743 
3744  case 27: /* meta_identifier: METAQUERY */
3745 #line 537 "../libinterp/parse-tree/oct-parse.yy"
3746  {
3747  std::string cls = (yyvsp[0].tok_val)->text ();
3748 
3749  (yyval.tree_metaclass_query_type) = new octave::tree_metaclass_query (cls, (yyvsp[0].tok_val)->line (),
3750  (yyvsp[0].tok_val)->column ());
3751  }
3752 #line 3753 "libinterp/parse-tree/oct-parse.cc"
3753  break;
3754 
3755  case 28: /* string: DQ_STRING */
3756 #line 546 "../libinterp/parse-tree/oct-parse.yy"
3757  { (yyval.tree_constant_type) = parser.make_constant (DQ_STRING, (yyvsp[0].tok_val)); }
3758 #line 3759 "libinterp/parse-tree/oct-parse.cc"
3759  break;
3760 
3761  case 29: /* string: SQ_STRING */
3762 #line 548 "../libinterp/parse-tree/oct-parse.yy"
3763  { (yyval.tree_constant_type) = parser.make_constant (SQ_STRING, (yyvsp[0].tok_val)); }
3764 #line 3765 "libinterp/parse-tree/oct-parse.cc"
3765  break;
3766 
3767  case 30: /* constant: NUM */
3768 #line 552 "../libinterp/parse-tree/oct-parse.yy"
3769  { (yyval.tree_constant_type) = parser.make_constant (NUM, (yyvsp[0].tok_val)); }
3770 #line 3771 "libinterp/parse-tree/oct-parse.cc"
3771  break;
3772 
3773  case 31: /* constant: IMAG_NUM */
3774 #line 554 "../libinterp/parse-tree/oct-parse.yy"
3775  { (yyval.tree_constant_type) = parser.make_constant (IMAG_NUM, (yyvsp[0].tok_val)); }
3776 #line 3777 "libinterp/parse-tree/oct-parse.cc"
3777  break;
3778 
3779  case 32: /* constant: string */
3780 #line 556 "../libinterp/parse-tree/oct-parse.yy"
3781  { (yyval.tree_constant_type) = (yyvsp[0].tree_constant_type); }
3782 #line 3783 "libinterp/parse-tree/oct-parse.cc"
3783  break;
3784 
3785  case 33: /* matrix: '[' matrix_rows ']' */
3786 #line 560 "../libinterp/parse-tree/oct-parse.yy"
3787  { (yyval.tree_expression_type) = parser.finish_matrix ((yyvsp[-1].tree_matrix_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3788 #line 3789 "libinterp/parse-tree/oct-parse.cc"
3789  break;
3790 
3791  case 34: /* matrix_rows: cell_or_matrix_row */
3792 #line 564 "../libinterp/parse-tree/oct-parse.yy"
3793  { (yyval.tree_matrix_type) = (yyvsp[0].tree_argument_list_type) ? new octave::tree_matrix ((yyvsp[0].tree_argument_list_type)) : nullptr; }
3794 #line 3795 "libinterp/parse-tree/oct-parse.cc"
3795  break;
3796 
3797  case 35: /* matrix_rows: matrix_rows ';' cell_or_matrix_row */
3798 #line 566 "../libinterp/parse-tree/oct-parse.yy"
3799  {
3800  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3801 
3802  if ((yyvsp[-2].tree_matrix_type))
3803  {
3804  if ((yyvsp[0].tree_argument_list_type))
3805  (yyvsp[-2].tree_matrix_type)->append ((yyvsp[0].tree_argument_list_type));
3806 
3807  (yyval.tree_matrix_type) = (yyvsp[-2].tree_matrix_type);
3808  }
3809  else
3810  (yyval.tree_matrix_type) = (yyvsp[0].tree_argument_list_type) ? new octave::tree_matrix ((yyvsp[0].tree_argument_list_type)) : nullptr;
3811  }
3812 #line 3813 "libinterp/parse-tree/oct-parse.cc"
3813  break;
3814 
3815  case 36: /* cell: '{' cell_rows '}' */
3816 #line 582 "../libinterp/parse-tree/oct-parse.yy"
3817  { (yyval.tree_expression_type) = parser.finish_cell ((yyvsp[-1].tree_cell_type), (yyvsp[-2].tok_val), (yyvsp[0].tok_val)); }
3818 #line 3819 "libinterp/parse-tree/oct-parse.cc"
3819  break;
3820 
3821  case 37: /* cell_rows: cell_or_matrix_row */
3822 #line 586 "../libinterp/parse-tree/oct-parse.yy"
3823  { (yyval.tree_cell_type) = (yyvsp[0].tree_argument_list_type) ? new octave::tree_cell ((yyvsp[0].tree_argument_list_type)) : nullptr; }
3824 #line 3825 "libinterp/parse-tree/oct-parse.cc"
3825  break;
3826 
3827  case 38: /* cell_rows: cell_rows ';' cell_or_matrix_row */
3828 #line 588 "../libinterp/parse-tree/oct-parse.yy"
3829  {
3830  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3831 
3832  if ((yyvsp[-2].tree_cell_type))
3833  {
3834  if ((yyvsp[0].tree_argument_list_type))
3835  (yyvsp[-2].tree_cell_type)->append ((yyvsp[0].tree_argument_list_type));
3836 
3837  (yyval.tree_cell_type) = (yyvsp[-2].tree_cell_type);
3838  }
3839  else
3840  (yyval.tree_cell_type) = (yyvsp[0].tree_argument_list_type) ? new octave::tree_cell ((yyvsp[0].tree_argument_list_type)) : nullptr;
3841  }
3842 #line 3843 "libinterp/parse-tree/oct-parse.cc"
3843  break;
3844 
3845  case 39: /* cell_or_matrix_row: %empty */
3846 #line 612 "../libinterp/parse-tree/oct-parse.yy"
3847  { (yyval.tree_argument_list_type) = nullptr; }
3848 #line 3849 "libinterp/parse-tree/oct-parse.cc"
3849  break;
3850 
3851  case 40: /* cell_or_matrix_row: ',' */
3852 #line 614 "../libinterp/parse-tree/oct-parse.yy"
3853  {
3854  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3855 
3856  (yyval.tree_argument_list_type) = nullptr;
3857  }
3858 #line 3859 "libinterp/parse-tree/oct-parse.cc"
3859  break;
3860 
3861  case 41: /* cell_or_matrix_row: arg_list */
3862 #line 620 "../libinterp/parse-tree/oct-parse.yy"
3863  { (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type); }
3864 #line 3865 "libinterp/parse-tree/oct-parse.cc"
3865  break;
3866 
3867  case 42: /* cell_or_matrix_row: arg_list ',' */
3868 #line 622 "../libinterp/parse-tree/oct-parse.yy"
3869  {
3870  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3871 
3872  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3873  }
3874 #line 3875 "libinterp/parse-tree/oct-parse.cc"
3875  break;
3876 
3877  case 43: /* cell_or_matrix_row: ',' arg_list */
3878 #line 628 "../libinterp/parse-tree/oct-parse.yy"
3879  {
3880  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
3881 
3882  (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type);
3883  }
3884 #line 3885 "libinterp/parse-tree/oct-parse.cc"
3885  break;
3886 
3887  case 44: /* cell_or_matrix_row: ',' arg_list ',' */
3888 #line 634 "../libinterp/parse-tree/oct-parse.yy"
3889  {
3890  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
3891  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3892 
3893  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3894  }
3895 #line 3896 "libinterp/parse-tree/oct-parse.cc"
3896  break;
3897 
3898  case 45: /* fcn_handle: FCN_HANDLE */
3899 #line 643 "../libinterp/parse-tree/oct-parse.yy"
3900  { (yyval.tree_fcn_handle_type) = parser.make_fcn_handle ((yyvsp[0].tok_val)); }
3901 #line 3902 "libinterp/parse-tree/oct-parse.cc"
3902  break;
3903 
3904  case 46: /* anon_fcn_handle: '@' param_list anon_fcn_begin expression */
3905 #line 651 "../libinterp/parse-tree/oct-parse.yy"
3906  {
3907  (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 ());
3908  if (! (yyval.tree_anon_fcn_handle_type))
3909  {
3910  // make_anon_fcn_handle deleted $2 and $4.
3911  YYABORT;
3912  }
3913 
3914  lexer.m_parsing_anon_fcn_body = false;
3915  lexer.m_nesting_level.remove ();
3916  }
3917 #line 3918 "libinterp/parse-tree/oct-parse.cc"
3918  break;
3919 
3920  case 47: /* anon_fcn_handle: '@' param_list anon_fcn_begin error */
3921 #line 663 "../libinterp/parse-tree/oct-parse.yy"
3922  {
3923  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
3924  OCTAVE_YYUSE ((yyvsp[-2].tree_parameter_list_type));
3925 
3926  lexer.m_parsing_anon_fcn_body = false;
3927 
3928  (yyval.tree_anon_fcn_handle_type) = nullptr;
3929  parser.bison_error ("anonymous function bodies must be single expressions");
3930  YYABORT;
3931  }
3932 #line 3933 "libinterp/parse-tree/oct-parse.cc"
3933  break;
3934 
3935  case 48: /* primary_expr: identifier */
3936 #line 676 "../libinterp/parse-tree/oct-parse.yy"
3937  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
3938 #line 3939 "libinterp/parse-tree/oct-parse.cc"
3939  break;
3940 
3941  case 49: /* primary_expr: constant */
3942 #line 678 "../libinterp/parse-tree/oct-parse.yy"
3943  { (yyval.tree_expression_type) = (yyvsp[0].tree_constant_type); }
3944 #line 3945 "libinterp/parse-tree/oct-parse.cc"
3945  break;
3946 
3947  case 50: /* primary_expr: fcn_handle */
3948 #line 680 "../libinterp/parse-tree/oct-parse.yy"
3949  { (yyval.tree_expression_type) = (yyvsp[0].tree_fcn_handle_type); }
3950 #line 3951 "libinterp/parse-tree/oct-parse.cc"
3951  break;
3952 
3953  case 51: /* primary_expr: matrix */
3954 #line 682 "../libinterp/parse-tree/oct-parse.yy"
3955  {
3956  lexer.m_looking_at_matrix_or_assign_lhs = false;
3957  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
3958  }
3959 #line 3960 "libinterp/parse-tree/oct-parse.cc"
3960  break;
3961 
3962  case 52: /* primary_expr: cell */
3963 #line 687 "../libinterp/parse-tree/oct-parse.yy"
3964  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3965 #line 3966 "libinterp/parse-tree/oct-parse.cc"
3966  break;
3967 
3968  case 53: /* primary_expr: meta_identifier */
3969 #line 689 "../libinterp/parse-tree/oct-parse.yy"
3970  { (yyval.tree_expression_type) = (yyvsp[0].tree_metaclass_query_type); }
3971 #line 3972 "libinterp/parse-tree/oct-parse.cc"
3972  break;
3973 
3974  case 54: /* primary_expr: superclass_identifier */
3975 #line 691 "../libinterp/parse-tree/oct-parse.yy"
3976  { (yyval.tree_expression_type) = (yyvsp[0].tree_superclass_ref_type); }
3977 #line 3978 "libinterp/parse-tree/oct-parse.cc"
3978  break;
3979 
3980  case 55: /* primary_expr: '(' expression ')' */
3981 #line 693 "../libinterp/parse-tree/oct-parse.yy"
3982  {
3983  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
3984  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3985 
3986  (yyval.tree_expression_type) = (yyvsp[-1].tree_expression_type)->mark_in_parens ();
3987  }
3988 #line 3989 "libinterp/parse-tree/oct-parse.cc"
3989  break;
3990 
3991  case 56: /* magic_colon: ':' */
3992 #line 702 "../libinterp/parse-tree/oct-parse.yy"
3993  {
3994  OCTAVE_YYUSE ((yyvsp[0].tok_val));
3995 
3997  (yyval.tree_constant_type) = new octave::tree_constant (tmp);
3998  }
3999 #line 4000 "libinterp/parse-tree/oct-parse.cc"
4000  break;
4001 
4002  case 57: /* magic_tilde: EXPR_NOT */
4003 #line 711 "../libinterp/parse-tree/oct-parse.yy"
4004  {
4005  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4006 
4007  (yyval.tree_identifier_type) = new octave::tree_black_hole ();
4008  }
4009 #line 4010 "libinterp/parse-tree/oct-parse.cc"
4010  break;
4011 
4012  case 58: /* arg_list: expression */
4013 #line 719 "../libinterp/parse-tree/oct-parse.yy"
4014  { (yyval.tree_argument_list_type) = new octave::tree_argument_list ((yyvsp[0].tree_expression_type)); }
4015 #line 4016 "libinterp/parse-tree/oct-parse.cc"
4016  break;
4017 
4018  case 59: /* arg_list: magic_colon */
4019 #line 721 "../libinterp/parse-tree/oct-parse.yy"
4020  { (yyval.tree_argument_list_type) = new octave::tree_argument_list ((yyvsp[0].tree_constant_type)); }
4021 #line 4022 "libinterp/parse-tree/oct-parse.cc"
4022  break;
4023 
4024  case 60: /* arg_list: magic_tilde */
4025 #line 723 "../libinterp/parse-tree/oct-parse.yy"
4026  { (yyval.tree_argument_list_type) = new octave::tree_argument_list ((yyvsp[0].tree_identifier_type)); }
4027 #line 4028 "libinterp/parse-tree/oct-parse.cc"
4028  break;
4029 
4030  case 61: /* arg_list: arg_list ',' magic_colon */
4031 #line 725 "../libinterp/parse-tree/oct-parse.yy"
4032  {
4033  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4034 
4035  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_constant_type));
4036  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
4037  }
4038 #line 4039 "libinterp/parse-tree/oct-parse.cc"
4039  break;
4040 
4041  case 62: /* arg_list: arg_list ',' magic_tilde */
4042 #line 732 "../libinterp/parse-tree/oct-parse.yy"
4043  {
4044  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4045 
4046  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_identifier_type));
4047  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
4048  }
4049 #line 4050 "libinterp/parse-tree/oct-parse.cc"
4050  break;
4051 
4052  case 63: /* arg_list: arg_list ',' expression */
4053 #line 739 "../libinterp/parse-tree/oct-parse.yy"
4054  {
4055  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4056 
4057  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_expression_type));
4058  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
4059  }
4060 #line 4061 "libinterp/parse-tree/oct-parse.cc"
4061  break;
4062 
4063  case 64: /* indirect_ref_op: '.' */
4064 #line 748 "../libinterp/parse-tree/oct-parse.yy"
4065  {
4066  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4067 
4068  (yyval.dummy_type) = 0;
4069  lexer.m_looking_at_indirect_ref = true;
4070  }
4071 #line 4072 "libinterp/parse-tree/oct-parse.cc"
4072  break;
4073 
4074  case 65: /* oper_expr: primary_expr */
4075 #line 757 "../libinterp/parse-tree/oct-parse.yy"
4076  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4077 #line 4078 "libinterp/parse-tree/oct-parse.cc"
4078  break;
4079 
4080  case 66: /* oper_expr: oper_expr PLUS_PLUS */
4081 #line 759 "../libinterp/parse-tree/oct-parse.yy"
4082  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4083 #line 4084 "libinterp/parse-tree/oct-parse.cc"
4084  break;
4085 
4086  case 67: /* oper_expr: oper_expr MINUS_MINUS */
4087 #line 761 "../libinterp/parse-tree/oct-parse.yy"
4088  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4089 #line 4090 "libinterp/parse-tree/oct-parse.cc"
4090  break;
4091 
4092  case 68: /* oper_expr: oper_expr '(' ')' */
4093 #line 763 "../libinterp/parse-tree/oct-parse.yy"
4094  {
4095  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4096  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4097 
4098  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
4099  if (! (yyval.tree_expression_type))
4100  {
4101  // make_index_expression deleted $1.
4102  YYABORT;
4103  }
4104  }
4105 #line 4106 "libinterp/parse-tree/oct-parse.cc"
4106  break;
4107 
4108  case 69: /* oper_expr: oper_expr '(' arg_list ')' */
4109 #line 775 "../libinterp/parse-tree/oct-parse.yy"
4110  {
4111  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4112  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4113 
4114  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
4115  if (! (yyval.tree_expression_type))
4116  {
4117  // make_index_expression deleted $1 and $3.
4118  YYABORT;
4119  }
4120  }
4121 #line 4122 "libinterp/parse-tree/oct-parse.cc"
4122  break;
4123 
4124  case 70: /* oper_expr: oper_expr '{' '}' */
4125 #line 787 "../libinterp/parse-tree/oct-parse.yy"
4126  {
4127  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4128  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4129 
4130  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
4131  if (! (yyval.tree_expression_type))
4132  {
4133  // make_index_expression deleted $1.
4134  YYABORT;
4135  }
4136  }
4137 #line 4138 "libinterp/parse-tree/oct-parse.cc"
4138  break;
4139 
4140  case 71: /* oper_expr: oper_expr '{' arg_list '}' */
4141 #line 799 "../libinterp/parse-tree/oct-parse.yy"
4142  {
4143  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4144  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4145 
4146  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
4147  if (! (yyval.tree_expression_type))
4148  {
4149  // make_index_expression deleted $1 and $3.
4150  YYABORT;
4151  }
4152  }
4153 #line 4154 "libinterp/parse-tree/oct-parse.cc"
4154  break;
4155 
4156  case 72: /* oper_expr: oper_expr HERMITIAN */
4157 #line 811 "../libinterp/parse-tree/oct-parse.yy"
4158  { (yyval.tree_expression_type) = parser.make_postfix_op (HERMITIAN, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4159 #line 4160 "libinterp/parse-tree/oct-parse.cc"
4160  break;
4161 
4162  case 73: /* oper_expr: oper_expr TRANSPOSE */
4163 #line 813 "../libinterp/parse-tree/oct-parse.yy"
4164  { (yyval.tree_expression_type) = parser.make_postfix_op (TRANSPOSE, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4165 #line 4166 "libinterp/parse-tree/oct-parse.cc"
4166  break;
4167 
4168  case 74: /* oper_expr: oper_expr indirect_ref_op STRUCT_ELT */
4169 #line 815 "../libinterp/parse-tree/oct-parse.yy"
4170  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
4171 #line 4172 "libinterp/parse-tree/oct-parse.cc"
4172  break;
4173 
4174  case 75: /* oper_expr: oper_expr indirect_ref_op '(' expression ')' */
4175 #line 817 "../libinterp/parse-tree/oct-parse.yy"
4176  {
4177  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4178  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4179 
4180  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
4181  }
4182 #line 4183 "libinterp/parse-tree/oct-parse.cc"
4183  break;
4184 
4185  case 76: /* oper_expr: PLUS_PLUS oper_expr */
4186 #line 824 "../libinterp/parse-tree/oct-parse.yy"
4187  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4188 #line 4189 "libinterp/parse-tree/oct-parse.cc"
4189  break;
4190 
4191  case 77: /* oper_expr: MINUS_MINUS oper_expr */
4192 #line 826 "../libinterp/parse-tree/oct-parse.yy"
4193  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4194 #line 4195 "libinterp/parse-tree/oct-parse.cc"
4195  break;
4196 
4197  case 78: /* oper_expr: EXPR_NOT oper_expr */
4198 #line 828 "../libinterp/parse-tree/oct-parse.yy"
4199  { (yyval.tree_expression_type) = parser.make_prefix_op (EXPR_NOT, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4200 #line 4201 "libinterp/parse-tree/oct-parse.cc"
4201  break;
4202 
4203  case 79: /* oper_expr: '+' oper_expr */
4204 #line 830 "../libinterp/parse-tree/oct-parse.yy"
4205  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4206 #line 4207 "libinterp/parse-tree/oct-parse.cc"
4207  break;
4208 
4209  case 80: /* oper_expr: '-' oper_expr */
4210 #line 832 "../libinterp/parse-tree/oct-parse.yy"
4211  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4212 #line 4213 "libinterp/parse-tree/oct-parse.cc"
4213  break;
4214 
4215  case 81: /* oper_expr: oper_expr POW power_expr */
4216 #line 834 "../libinterp/parse-tree/oct-parse.yy"
4217  { (yyval.tree_expression_type) = parser.make_binary_op (POW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4218 #line 4219 "libinterp/parse-tree/oct-parse.cc"
4219  break;
4220 
4221  case 82: /* oper_expr: oper_expr EPOW power_expr */
4222 #line 836 "../libinterp/parse-tree/oct-parse.yy"
4223  { (yyval.tree_expression_type) = parser.make_binary_op (EPOW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4224 #line 4225 "libinterp/parse-tree/oct-parse.cc"
4225  break;
4226 
4227  case 83: /* oper_expr: oper_expr '+' oper_expr */
4228 #line 838 "../libinterp/parse-tree/oct-parse.yy"
4229  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4230 #line 4231 "libinterp/parse-tree/oct-parse.cc"
4231  break;
4232 
4233  case 84: /* oper_expr: oper_expr '-' oper_expr */
4234 #line 840 "../libinterp/parse-tree/oct-parse.yy"
4235  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4236 #line 4237 "libinterp/parse-tree/oct-parse.cc"
4237  break;
4238 
4239  case 85: /* oper_expr: oper_expr '*' oper_expr */
4240 #line 842 "../libinterp/parse-tree/oct-parse.yy"
4241  { (yyval.tree_expression_type) = parser.make_binary_op ('*', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4242 #line 4243 "libinterp/parse-tree/oct-parse.cc"
4243  break;
4244 
4245  case 86: /* oper_expr: oper_expr '/' oper_expr */
4246 #line 844 "../libinterp/parse-tree/oct-parse.yy"
4247  { (yyval.tree_expression_type) = parser.make_binary_op ('/', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4248 #line 4249 "libinterp/parse-tree/oct-parse.cc"
4249  break;
4250 
4251  case 87: /* oper_expr: oper_expr EPLUS oper_expr */
4252 #line 846 "../libinterp/parse-tree/oct-parse.yy"
4253  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4254 #line 4255 "libinterp/parse-tree/oct-parse.cc"
4255  break;
4256 
4257  case 88: /* oper_expr: oper_expr EMINUS oper_expr */
4258 #line 848 "../libinterp/parse-tree/oct-parse.yy"
4259  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4260 #line 4261 "libinterp/parse-tree/oct-parse.cc"
4261  break;
4262 
4263  case 89: /* oper_expr: oper_expr EMUL oper_expr */
4264 #line 850 "../libinterp/parse-tree/oct-parse.yy"
4265  { (yyval.tree_expression_type) = parser.make_binary_op (EMUL, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4266 #line 4267 "libinterp/parse-tree/oct-parse.cc"
4267  break;
4268 
4269  case 90: /* oper_expr: oper_expr EDIV oper_expr */
4270 #line 852 "../libinterp/parse-tree/oct-parse.yy"
4271  { (yyval.tree_expression_type) = parser.make_binary_op (EDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4272 #line 4273 "libinterp/parse-tree/oct-parse.cc"
4273  break;
4274 
4275  case 91: /* oper_expr: oper_expr LEFTDIV oper_expr */
4276 #line 854 "../libinterp/parse-tree/oct-parse.yy"
4277  { (yyval.tree_expression_type) = parser.make_binary_op (LEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4278 #line 4279 "libinterp/parse-tree/oct-parse.cc"
4279  break;
4280 
4281  case 92: /* oper_expr: oper_expr ELEFTDIV oper_expr */
4282 #line 856 "../libinterp/parse-tree/oct-parse.yy"
4283  { (yyval.tree_expression_type) = parser.make_binary_op (ELEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4284 #line 4285 "libinterp/parse-tree/oct-parse.cc"
4285  break;
4286 
4287  case 93: /* power_expr: primary_expr */
4288 #line 860 "../libinterp/parse-tree/oct-parse.yy"
4289  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4290 #line 4291 "libinterp/parse-tree/oct-parse.cc"
4291  break;
4292 
4293  case 94: /* power_expr: power_expr PLUS_PLUS */
4294 #line 862 "../libinterp/parse-tree/oct-parse.yy"
4295  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4296 #line 4297 "libinterp/parse-tree/oct-parse.cc"
4297  break;
4298 
4299  case 95: /* power_expr: power_expr MINUS_MINUS */
4300 #line 864 "../libinterp/parse-tree/oct-parse.yy"
4301  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
4302 #line 4303 "libinterp/parse-tree/oct-parse.cc"
4303  break;
4304 
4305  case 96: /* power_expr: power_expr '(' ')' */
4306 #line 866 "../libinterp/parse-tree/oct-parse.yy"
4307  {
4308  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4309  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4310 
4311  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '(');
4312  if (! (yyval.tree_expression_type))
4313  {
4314  // make_index_expression deleted $1.
4315  YYABORT;
4316  }
4317  }
4318 #line 4319 "libinterp/parse-tree/oct-parse.cc"
4319  break;
4320 
4321  case 97: /* power_expr: power_expr '(' arg_list ')' */
4322 #line 878 "../libinterp/parse-tree/oct-parse.yy"
4323  {
4324  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4325  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4326 
4327  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
4328  if (! (yyval.tree_expression_type))
4329  {
4330  // make_index_expression deleted $1 and $3.
4331  YYABORT;
4332  }
4333  }
4334 #line 4335 "libinterp/parse-tree/oct-parse.cc"
4335  break;
4336 
4337  case 98: /* power_expr: power_expr '{' '}' */
4338 #line 890 "../libinterp/parse-tree/oct-parse.yy"
4339  {
4340  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4341  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4342 
4343  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), nullptr, '{');
4344  if (! (yyval.tree_expression_type))
4345  {
4346  // make_index_expression deleted $1.
4347  YYABORT;
4348  }
4349  }
4350 #line 4351 "libinterp/parse-tree/oct-parse.cc"
4351  break;
4352 
4353  case 99: /* power_expr: power_expr '{' arg_list '}' */
4354 #line 902 "../libinterp/parse-tree/oct-parse.yy"
4355  {
4356  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4357  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4358 
4359  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
4360  if (! (yyval.tree_expression_type))
4361  {
4362  // make_index_expression deleted $1 and $3.
4363  YYABORT;
4364  }
4365  }
4366 #line 4367 "libinterp/parse-tree/oct-parse.cc"
4367  break;
4368 
4369  case 100: /* power_expr: power_expr indirect_ref_op STRUCT_ELT */
4370 #line 914 "../libinterp/parse-tree/oct-parse.yy"
4371  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
4372 #line 4373 "libinterp/parse-tree/oct-parse.cc"
4373  break;
4374 
4375  case 101: /* power_expr: power_expr indirect_ref_op '(' expression ')' */
4376 #line 916 "../libinterp/parse-tree/oct-parse.yy"
4377  {
4378  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4379  OCTAVE_YYUSE ((yyvsp[0].tok_val));
4380 
4381  (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type));
4382  }
4383 #line 4384 "libinterp/parse-tree/oct-parse.cc"
4384  break;
4385 
4386  case 102: /* power_expr: PLUS_PLUS power_expr */
4387 #line 923 "../libinterp/parse-tree/oct-parse.yy"
4388  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4389 #line 4390 "libinterp/parse-tree/oct-parse.cc"
4390  break;
4391 
4392  case 103: /* power_expr: MINUS_MINUS power_expr */
4393 #line 925 "../libinterp/parse-tree/oct-parse.yy"
4394  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4395 #line 4396 "libinterp/parse-tree/oct-parse.cc"
4396  break;
4397 
4398  case 104: /* power_expr: EXPR_NOT power_expr */
4399 #line 927 "../libinterp/parse-tree/oct-parse.yy"
4400  { (yyval.tree_expression_type) = parser.make_prefix_op (EXPR_NOT, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4401 #line 4402 "libinterp/parse-tree/oct-parse.cc"
4402  break;
4403 
4404  case 105: /* power_expr: '+' power_expr */
4405 #line 929 "../libinterp/parse-tree/oct-parse.yy"
4406  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4407 #line 4408 "libinterp/parse-tree/oct-parse.cc"
4408  break;
4409 
4410  case 106: /* power_expr: '-' power_expr */
4411 #line 931 "../libinterp/parse-tree/oct-parse.yy"
4412  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4413 #line 4414 "libinterp/parse-tree/oct-parse.cc"
4414  break;
4415 
4416  case 107: /* colon_expr: oper_expr ':' oper_expr */
4417 #line 935 "../libinterp/parse-tree/oct-parse.yy"
4418  {
4419  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4420 
4421  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-2].tree_expression_type), (yyvsp[0].tree_expression_type));
4422 
4423  if (! (yyval.tree_expression_type))
4424  {
4425  // finish_colon_expression deleted $1 and $3.
4426  YYABORT;
4427  }
4428  }
4429 #line 4430 "libinterp/parse-tree/oct-parse.cc"
4430  break;
4431 
4432  case 108: /* colon_expr: oper_expr ':' oper_expr ':' oper_expr */
4433 #line 947 "../libinterp/parse-tree/oct-parse.yy"
4434  {
4435  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
4436  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
4437 
4438  (yyval.tree_expression_type) = parser.make_colon_expression ((yyvsp[-4].tree_expression_type), (yyvsp[0].tree_expression_type), (yyvsp[-2].tree_expression_type));
4439 
4440  if (! (yyval.tree_expression_type))
4441  {
4442  // finish_colon_expression deleted $1, $3, and $5.
4443  YYABORT;
4444  }
4445  }
4446 #line 4447 "libinterp/parse-tree/oct-parse.cc"
4447  break;
4448 
4449  case 109: /* simple_expr: oper_expr */
4450 #line 962 "../libinterp/parse-tree/oct-parse.yy"
4451  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4452 #line 4453 "libinterp/parse-tree/oct-parse.cc"
4453  break;
4454 
4455  case 110: /* simple_expr: colon_expr */
4456 #line 964 "../libinterp/parse-tree/oct-parse.yy"
4457  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4458 #line 4459 "libinterp/parse-tree/oct-parse.cc"
4459  break;
4460 
4461  case 111: /* simple_expr: simple_expr EXPR_LT simple_expr */
4462 #line 966 "../libinterp/parse-tree/oct-parse.yy"
4463  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4464 #line 4465 "libinterp/parse-tree/oct-parse.cc"
4465  break;
4466 
4467  case 112: /* simple_expr: simple_expr EXPR_LE simple_expr */
4468 #line 968 "../libinterp/parse-tree/oct-parse.yy"
4469  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4470 #line 4471 "libinterp/parse-tree/oct-parse.cc"
4471  break;
4472 
4473  case 113: /* simple_expr: simple_expr EXPR_EQ simple_expr */
4474 #line 970 "../libinterp/parse-tree/oct-parse.yy"
4475  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_EQ, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4476 #line 4477 "libinterp/parse-tree/oct-parse.cc"
4477  break;
4478 
4479  case 114: /* simple_expr: simple_expr EXPR_GE simple_expr */
4480 #line 972 "../libinterp/parse-tree/oct-parse.yy"
4481  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4482 #line 4483 "libinterp/parse-tree/oct-parse.cc"
4483  break;
4484 
4485  case 115: /* simple_expr: simple_expr EXPR_GT simple_expr */
4486 #line 974 "../libinterp/parse-tree/oct-parse.yy"
4487  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4488 #line 4489 "libinterp/parse-tree/oct-parse.cc"
4489  break;
4490 
4491  case 116: /* simple_expr: simple_expr EXPR_NE simple_expr */
4492 #line 976 "../libinterp/parse-tree/oct-parse.yy"
4493  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_NE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4494 #line 4495 "libinterp/parse-tree/oct-parse.cc"
4495  break;
4496 
4497  case 117: /* simple_expr: simple_expr EXPR_AND simple_expr */
4498 #line 978 "../libinterp/parse-tree/oct-parse.yy"
4499  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_AND, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4500 #line 4501 "libinterp/parse-tree/oct-parse.cc"
4501  break;
4502 
4503  case 118: /* simple_expr: simple_expr EXPR_OR simple_expr */
4504 #line 980 "../libinterp/parse-tree/oct-parse.yy"
4505  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_OR, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4506 #line 4507 "libinterp/parse-tree/oct-parse.cc"
4507  break;
4508 
4509  case 119: /* simple_expr: simple_expr EXPR_AND_AND simple_expr */
4510 #line 982 "../libinterp/parse-tree/oct-parse.yy"
4511  { (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)); }
4512 #line 4513 "libinterp/parse-tree/oct-parse.cc"
4513  break;
4514 
4515  case 120: /* simple_expr: simple_expr EXPR_OR_OR simple_expr */
4516 #line 984 "../libinterp/parse-tree/oct-parse.yy"
4517  { (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)); }
4518 #line 4519 "libinterp/parse-tree/oct-parse.cc"
4519  break;
4520 
4521  case 121: /* assign_lhs: simple_expr */
4522 #line 988 "../libinterp/parse-tree/oct-parse.yy"
4523  {
4524  (yyval.tree_argument_list_type) = parser.validate_matrix_for_assignment ((yyvsp[0].tree_expression_type));
4525 
4526  if ((yyval.tree_argument_list_type))
4527  { lexer.m_looking_at_matrix_or_assign_lhs = false; }
4528  else
4529  {
4530  // validate_matrix_for_assignment deleted $1.
4531  YYABORT;
4532  }
4533  }
4534 #line 4535 "libinterp/parse-tree/oct-parse.cc"
4535  break;
4536 
4537  case 122: /* assign_expr: assign_lhs '=' expression */
4538 #line 1002 "../libinterp/parse-tree/oct-parse.yy"
4539  { (yyval.tree_expression_type) = parser.make_assign_op ('=', (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4540 #line 4541 "libinterp/parse-tree/oct-parse.cc"
4541  break;
4542 
4543  case 123: /* assign_expr: assign_lhs ADD_EQ expression */
4544 #line 1004 "../libinterp/parse-tree/oct-parse.yy"
4545  { (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)); }
4546 #line 4547 "libinterp/parse-tree/oct-parse.cc"
4547  break;
4548 
4549  case 124: /* assign_expr: assign_lhs SUB_EQ expression */
4550 #line 1006 "../libinterp/parse-tree/oct-parse.yy"
4551  { (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)); }
4552 #line 4553 "libinterp/parse-tree/oct-parse.cc"
4553  break;
4554 
4555  case 125: /* assign_expr: assign_lhs MUL_EQ expression */
4556 #line 1008 "../libinterp/parse-tree/oct-parse.yy"
4557  { (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)); }
4558 #line 4559 "libinterp/parse-tree/oct-parse.cc"
4559  break;
4560 
4561  case 126: /* assign_expr: assign_lhs DIV_EQ expression */
4562 #line 1010 "../libinterp/parse-tree/oct-parse.yy"
4563  { (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)); }
4564 #line 4565 "libinterp/parse-tree/oct-parse.cc"
4565  break;
4566 
4567  case 127: /* assign_expr: assign_lhs LEFTDIV_EQ expression */
4568 #line 1012 "../libinterp/parse-tree/oct-parse.yy"
4569  { (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)); }
4570 #line 4571 "libinterp/parse-tree/oct-parse.cc"
4571  break;
4572 
4573  case 128: /* assign_expr: assign_lhs POW_EQ expression */
4574 #line 1014 "../libinterp/parse-tree/oct-parse.yy"
4575  { (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)); }
4576 #line 4577 "libinterp/parse-tree/oct-parse.cc"
4577  break;
4578 
4579  case 129: /* assign_expr: assign_lhs EMUL_EQ expression */
4580 #line 1016 "../libinterp/parse-tree/oct-parse.yy"
4581  { (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)); }
4582 #line 4583 "libinterp/parse-tree/oct-parse.cc"
4583  break;
4584 
4585  case 130: /* assign_expr: assign_lhs EDIV_EQ expression */
4586 #line 1018 "../libinterp/parse-tree/oct-parse.yy"
4587  { (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)); }
4588 #line 4589 "libinterp/parse-tree/oct-parse.cc"
4589  break;
4590 
4591  case 131: /* assign_expr: assign_lhs ELEFTDIV_EQ expression */
4592 #line 1020 "../libinterp/parse-tree/oct-parse.yy"
4593  { (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)); }
4594 #line 4595 "libinterp/parse-tree/oct-parse.cc"
4595  break;
4596 
4597  case 132: /* assign_expr: assign_lhs EPOW_EQ expression */
4598 #line 1022 "../libinterp/parse-tree/oct-parse.yy"
4599  { (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)); }
4600 #line 4601 "libinterp/parse-tree/oct-parse.cc"
4601  break;
4602 
4603  case 133: /* assign_expr: assign_lhs AND_EQ expression */
4604 #line 1024 "../libinterp/parse-tree/oct-parse.yy"
4605  { (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)); }
4606 #line 4607 "libinterp/parse-tree/oct-parse.cc"
4607  break;
4608 
4609  case 134: /* assign_expr: assign_lhs OR_EQ expression */
4610 #line 1026 "../libinterp/parse-tree/oct-parse.yy"
4611  { (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)); }
4612 #line 4613 "libinterp/parse-tree/oct-parse.cc"
4613  break;
4614 
4615  case 135: /* expression: simple_expr */
4616 #line 1030 "../libinterp/parse-tree/oct-parse.yy"
4617  {
4618  if ((yyvsp[0].tree_expression_type) && ((yyvsp[0].tree_expression_type)->is_matrix () || (yyvsp[0].tree_expression_type)->iscell ()))
4619  {
4620  if (parser.validate_array_list ((yyvsp[0].tree_expression_type)))
4621  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4622  else
4623  {
4624  delete (yyvsp[0].tree_expression_type);
4625  YYABORT;
4626  }
4627  }
4628  else
4629  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4630  }
4631 #line 4632 "libinterp/parse-tree/oct-parse.cc"
4632  break;
4633 
4634  case 136: /* expression: assign_expr */
4635 #line 1045 "../libinterp/parse-tree/oct-parse.yy"
4636  {
4637  if (! (yyvsp[0].tree_expression_type))
4638  YYABORT;
4639 
4640  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4641  }
4642 #line 4643 "libinterp/parse-tree/oct-parse.cc"
4643  break;
4644 
4645  case 137: /* expression: anon_fcn_handle */
4646 #line 1052 "../libinterp/parse-tree/oct-parse.yy"
4647  { (yyval.tree_expression_type) = (yyvsp[0].tree_anon_fcn_handle_type); }
4648 #line 4649 "libinterp/parse-tree/oct-parse.cc"
4649  break;
4650 
4651  case 138: /* command: declaration */
4652 #line 1060 "../libinterp/parse-tree/oct-parse.yy"
4653  { (yyval.tree_command_type) = (yyvsp[0].tree_decl_command_type); }
4654 #line 4655 "libinterp/parse-tree/oct-parse.cc"
4655  break;
4656 
4657  case 139: /* command: select_command */
4658 #line 1062 "../libinterp/parse-tree/oct-parse.yy"
4659  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4660 #line 4661 "libinterp/parse-tree/oct-parse.cc"
4661  break;
4662 
4663  case 140: /* command: loop_command */
4664 #line 1064 "../libinterp/parse-tree/oct-parse.yy"
4665  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4666 #line 4667 "libinterp/parse-tree/oct-parse.cc"
4667  break;
4668 
4669  case 141: /* command: jump_command */
4670 #line 1066 "../libinterp/parse-tree/oct-parse.yy"
4671  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4672 #line 4673 "libinterp/parse-tree/oct-parse.cc"
4673  break;
4674 
4675  case 142: /* command: except_command */
4676 #line 1068 "../libinterp/parse-tree/oct-parse.yy"
4677  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4678 #line 4679 "libinterp/parse-tree/oct-parse.cc"
4679  break;
4680 
4681  case 143: /* command: function */
4682 #line 1070 "../libinterp/parse-tree/oct-parse.yy"
4683  { (yyval.tree_command_type) = (yyvsp[0].tree_function_def_type); }
4684 #line 4685 "libinterp/parse-tree/oct-parse.cc"
4685  break;
4686 
4687  case 144: /* command: file */
4688 #line 1072 "../libinterp/parse-tree/oct-parse.yy"
4689  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4690 #line 4691 "libinterp/parse-tree/oct-parse.cc"
4691  break;
4692 
4693  case 145: /* declaration: GLOBAL decl1 */
4694 #line 1080 "../libinterp/parse-tree/oct-parse.yy"
4695  {
4696  (yyval.tree_decl_command_type) = parser.make_decl_command (GLOBAL, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4697  lexer.m_looking_at_decl_list = false;
4698  }
4699 #line 4700 "libinterp/parse-tree/oct-parse.cc"
4700  break;
4701 
4702  case 146: /* declaration: PERSISTENT decl1 */
4703 #line 1085 "../libinterp/parse-tree/oct-parse.yy"
4704  {
4705  (yyval.tree_decl_command_type) = parser.make_decl_command (PERSISTENT, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4706  lexer.m_looking_at_decl_list = false;
4707  }
4708 #line 4709 "libinterp/parse-tree/oct-parse.cc"
4709  break;
4710 
4711  case 147: /* decl1: decl2 */
4712 #line 1092 "../libinterp/parse-tree/oct-parse.yy"
4713  { (yyval.tree_decl_init_list_type) = new octave::tree_decl_init_list ((yyvsp[0].tree_decl_elt_type)); }
4714 #line 4715 "libinterp/parse-tree/oct-parse.cc"
4715  break;
4716 
4717  case 148: /* decl1: decl1 decl2 */
4718 #line 1094 "../libinterp/parse-tree/oct-parse.yy"
4719  {
4720  (yyvsp[-1].tree_decl_init_list_type)->append ((yyvsp[0].tree_decl_elt_type));
4721  (yyval.tree_decl_init_list_type) = (yyvsp[-1].tree_decl_init_list_type);
4722  }
4723 #line 4724 "libinterp/parse-tree/oct-parse.cc"
4724  break;
4725 
4726  case 149: /* decl_param_init: %empty */
4727 #line 1101 "../libinterp/parse-tree/oct-parse.yy"
4728  {
4729  (yyval.dummy_type) = 0;
4730  lexer.m_looking_at_initializer_expression = true;
4731  }
4732 #line 4733 "libinterp/parse-tree/oct-parse.cc"
4733  break;
4734 
4735  case 150: /* decl2: identifier */
4736 #line 1107 "../libinterp/parse-tree/oct-parse.yy"
4737  { (yyval.tree_decl_elt_type) = new octave::tree_decl_elt ((yyvsp[0].tree_identifier_type)); }
4738 #line 4739 "libinterp/parse-tree/oct-parse.cc"
4739  break;
4740 
4741  case 151: /* decl2: identifier '=' decl_param_init expression */
4742 #line 1109 "../libinterp/parse-tree/oct-parse.yy"
4743  {
4744  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
4745 
4746  lexer.m_looking_at_initializer_expression = false;
4747  (yyval.tree_decl_elt_type) = new octave::tree_decl_elt ((yyvsp[-3].tree_identifier_type), (yyvsp[0].tree_expression_type));
4748  }
4749 #line 4750 "libinterp/parse-tree/oct-parse.cc"
4750  break;
4751 
4752  case 152: /* select_command: if_command */
4753 #line 1122 "../libinterp/parse-tree/oct-parse.yy"
4754  { (yyval.tree_command_type) = (yyvsp[0].tree_if_command_type); }
4755 #line 4756 "libinterp/parse-tree/oct-parse.cc"
4756  break;
4757 
4758  case 153: /* select_command: switch_command */
4759 #line 1124 "../libinterp/parse-tree/oct-parse.yy"
4760  { (yyval.tree_command_type) = (yyvsp[0].tree_switch_command_type); }
4761 #line 4762 "libinterp/parse-tree/oct-parse.cc"
4762  break;
4763 
4764  case 154: /* if_command: IF stash_comment if_cmd_list END */
4765 #line 1132 "../libinterp/parse-tree/oct-parse.yy"
4766  {
4767  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))))
4768  {
4769  // finish_if_command deleted $3.
4770  YYABORT;
4771  }
4772  }
4773 #line 4774 "libinterp/parse-tree/oct-parse.cc"
4774  break;
4775 
4776  case 155: /* if_cmd_list: if_cmd_list1 */
4777 #line 1142 "../libinterp/parse-tree/oct-parse.yy"
4778  { (yyval.tree_if_command_list_type) = (yyvsp[0].tree_if_command_list_type); }
4779 #line 4780 "libinterp/parse-tree/oct-parse.cc"
4780  break;
4781 
4782  case 156: /* if_cmd_list: if_cmd_list1 else_clause */
4783 #line 1144 "../libinterp/parse-tree/oct-parse.yy"
4784  {
4785  (yyvsp[-1].tree_if_command_list_type)->append ((yyvsp[0].tree_if_clause_type));
4786  (yyval.tree_if_command_list_type) = (yyvsp[-1].tree_if_command_list_type);
4787  }
4788 #line 4789 "libinterp/parse-tree/oct-parse.cc"
4789  break;
4790 
4791  case 157: /* if_cmd_list1: expression stmt_begin opt_sep opt_list */
4792 #line 1151 "../libinterp/parse-tree/oct-parse.yy"
4793  {
4794  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4795 
4796  (yyvsp[-3].tree_expression_type)->mark_braindead_shortcircuit ();
4797 
4798  (yyval.tree_if_command_list_type) = parser.start_if_command ((yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type));
4799  }
4800 #line 4801 "libinterp/parse-tree/oct-parse.cc"
4801  break;
4802 
4803  case 158: /* if_cmd_list1: if_cmd_list1 elseif_clause */
4804 #line 1159 "../libinterp/parse-tree/oct-parse.yy"
4805  {
4806  (yyvsp[-1].tree_if_command_list_type)->append ((yyvsp[0].tree_if_clause_type));
4807  (yyval.tree_if_command_list_type) = (yyvsp[-1].tree_if_command_list_type);
4808  }
4809 #line 4810 "libinterp/parse-tree/oct-parse.cc"
4810  break;
4811 
4812  case 159: /* elseif_clause: ELSEIF stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4813 #line 1166 "../libinterp/parse-tree/oct-parse.yy"
4814  {
4815  OCTAVE_YYUSE ((yyvsp[-4].punct_type));
4816  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4817 
4818  (yyvsp[-3].tree_expression_type)->mark_braindead_shortcircuit ();
4819 
4820  (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));
4821  }
4822 #line 4823 "libinterp/parse-tree/oct-parse.cc"
4823  break;
4824 
4825  case 160: /* else_clause: ELSE stash_comment opt_sep opt_list */
4826 #line 1177 "../libinterp/parse-tree/oct-parse.yy"
4827  {
4828  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
4829  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4830 
4831  (yyval.tree_if_clause_type) = new octave::tree_if_clause ((yyvsp[0].tree_statement_list_type), (yyvsp[-2].comment_type));
4832  }
4833 #line 4834 "libinterp/parse-tree/oct-parse.cc"
4834  break;
4835 
4836  case 161: /* switch_command: SWITCH stash_comment expression opt_sep case_list END */
4837 #line 1190 "../libinterp/parse-tree/oct-parse.yy"
4838  {
4839  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4840 
4841  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))))
4842  {
4843  // finish_switch_command deleted $3 adn $5.
4844  YYABORT;
4845  }
4846  }
4847 #line 4848 "libinterp/parse-tree/oct-parse.cc"
4848  break;
4849 
4850  case 162: /* case_list: %empty */
4851 #line 1202 "../libinterp/parse-tree/oct-parse.yy"
4852  { (yyval.tree_switch_case_list_type) = new octave::tree_switch_case_list (); }
4853 #line 4854 "libinterp/parse-tree/oct-parse.cc"
4854  break;
4855 
4856  case 163: /* case_list: default_case */
4857 #line 1204 "../libinterp/parse-tree/oct-parse.yy"
4858  { (yyval.tree_switch_case_list_type) = new octave::tree_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4859 #line 4860 "libinterp/parse-tree/oct-parse.cc"
4860  break;
4861 
4862  case 164: /* case_list: case_list1 */
4863 #line 1206 "../libinterp/parse-tree/oct-parse.yy"
4864  { (yyval.tree_switch_case_list_type) = (yyvsp[0].tree_switch_case_list_type); }
4865 #line 4866 "libinterp/parse-tree/oct-parse.cc"
4866  break;
4867 
4868  case 165: /* case_list: case_list1 default_case */
4869 #line 1208 "../libinterp/parse-tree/oct-parse.yy"
4870  {
4871  (yyvsp[-1].tree_switch_case_list_type)->append ((yyvsp[0].tree_switch_case_type));
4872  (yyval.tree_switch_case_list_type) = (yyvsp[-1].tree_switch_case_list_type);
4873  }
4874 #line 4875 "libinterp/parse-tree/oct-parse.cc"
4875  break;
4876 
4877  case 166: /* case_list1: switch_case */
4878 #line 1215 "../libinterp/parse-tree/oct-parse.yy"
4879  { (yyval.tree_switch_case_list_type) = new octave::tree_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4880 #line 4881 "libinterp/parse-tree/oct-parse.cc"
4881  break;
4882 
4883  case 167: /* case_list1: case_list1 switch_case */
4884 #line 1217 "../libinterp/parse-tree/oct-parse.yy"
4885  {
4886  (yyvsp[-1].tree_switch_case_list_type)->append ((yyvsp[0].tree_switch_case_type));
4887  (yyval.tree_switch_case_list_type) = (yyvsp[-1].tree_switch_case_list_type);
4888  }
4889 #line 4890 "libinterp/parse-tree/oct-parse.cc"
4890  break;
4891 
4892  case 168: /* switch_case: CASE stash_comment opt_sep expression stmt_begin opt_sep opt_list */
4893 #line 1224 "../libinterp/parse-tree/oct-parse.yy"
4894  {
4895  OCTAVE_YYUSE ((yyvsp[-4].punct_type));
4896  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4897 
4898  (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));
4899  }
4900 #line 4901 "libinterp/parse-tree/oct-parse.cc"
4901  break;
4902 
4903  case 169: /* default_case: OTHERWISE stash_comment opt_sep opt_list */
4904 #line 1233 "../libinterp/parse-tree/oct-parse.yy"
4905  {
4906  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
4907  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
4908 
4909  (yyval.tree_switch_case_type) = new octave::tree_switch_case ((yyvsp[0].tree_statement_list_type), (yyvsp[-2].comment_type));
4910  }
4911 #line 4912 "libinterp/parse-tree/oct-parse.cc"
4912  break;
4913 
4914  case 170: /* loop_command: WHILE stash_comment expression stmt_begin opt_sep opt_list END */
4915 #line 1246 "../libinterp/parse-tree/oct-parse.yy"
4916  {
4917  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4918 
4919  (yyvsp[-4].tree_expression_type)->mark_braindead_shortcircuit ();
4920 
4921  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))))
4922  {
4923  // make_while_command deleted $3 and $6.
4924  YYABORT;
4925  }
4926  }
4927 #line 4928 "libinterp/parse-tree/oct-parse.cc"
4928  break;
4929 
4930  case 171: /* loop_command: DO stash_comment opt_sep opt_list UNTIL expression */
4931 #line 1258 "../libinterp/parse-tree/oct-parse.yy"
4932  {
4933  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
4934  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
4935 
4936  (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));
4937  }
4938 #line 4939 "libinterp/parse-tree/oct-parse.cc"
4939  break;
4940 
4941  case 172: /* loop_command: FOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4942 #line 1265 "../libinterp/parse-tree/oct-parse.yy"
4943  {
4944  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
4945  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4946 
4947  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),
4948  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4949  {
4950  // make_for_command deleted $3, $5, and $8.
4951  YYABORT;
4952  }
4953  }
4954 #line 4955 "libinterp/parse-tree/oct-parse.cc"
4955  break;
4956 
4957  case 173: /* loop_command: FOR stash_comment '(' assign_lhs '=' expression ')' opt_sep opt_list END */
4958 #line 1277 "../libinterp/parse-tree/oct-parse.yy"
4959  {
4960  OCTAVE_YYUSE ((yyvsp[-7].tok_val));
4961  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
4962  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
4963  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4964 
4965  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),
4966  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-8].comment_type))))
4967  {
4968  // make_for_command deleted $4, $6, and $9.
4969  YYABORT;
4970  }
4971  }
4972 #line 4973 "libinterp/parse-tree/oct-parse.cc"
4973  break;
4974 
4975  case 174: /* loop_command: PARFOR stash_comment assign_lhs '=' expression stmt_begin opt_sep opt_list END */
4976 #line 1291 "../libinterp/parse-tree/oct-parse.yy"
4977  {
4978  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
4979  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4980 
4981  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),
4982  nullptr, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4983  {
4984  // make_for_command deleted $3, $5, and $8.
4985  YYABORT;
4986  }
4987  }
4988 #line 4989 "libinterp/parse-tree/oct-parse.cc"
4989  break;
4990 
4991  case 175: /* loop_command: PARFOR stash_comment '(' assign_lhs '=' expression ',' expression ')' opt_sep opt_list END */
4992 #line 1303 "../libinterp/parse-tree/oct-parse.yy"
4993  {
4994  OCTAVE_YYUSE ((yyvsp[-9].tok_val));
4995  OCTAVE_YYUSE ((yyvsp[-7].tok_val));
4996  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
4997  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
4998  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
4999 
5000  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),
5001  (yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-10].comment_type))))
5002  {
5003  // make_for_command deleted $4, $6, $8, and $11.
5004  YYABORT;
5005  }
5006  }
5007 #line 5008 "libinterp/parse-tree/oct-parse.cc"
5008  break;
5009 
5010  case 176: /* jump_command: BREAK */
5011 #line 1324 "../libinterp/parse-tree/oct-parse.yy"
5012  {
5013  if (! ((yyval.tree_command_type) = parser.make_break_command ((yyvsp[0].tok_val))))
5014  YYABORT;
5015  }
5016 #line 5017 "libinterp/parse-tree/oct-parse.cc"
5017  break;
5018 
5019  case 177: /* jump_command: CONTINUE */
5020 #line 1329 "../libinterp/parse-tree/oct-parse.yy"
5021  {
5022  if (! ((yyval.tree_command_type) = parser.make_continue_command ((yyvsp[0].tok_val))))
5023  YYABORT;
5024  }
5025 #line 5026 "libinterp/parse-tree/oct-parse.cc"
5026  break;
5027 
5028  case 178: /* jump_command: FUNC_RET */
5029 #line 1334 "../libinterp/parse-tree/oct-parse.yy"
5030  { (yyval.tree_command_type) = parser.make_return_command ((yyvsp[0].tok_val)); }
5031 #line 5032 "libinterp/parse-tree/oct-parse.cc"
5032  break;
5033 
5034  case 179: /* except_command: UNWIND stash_comment opt_sep opt_list CLEANUP stash_comment opt_sep opt_list END */
5035 #line 1343 "../libinterp/parse-tree/oct-parse.yy"
5036  {
5037  OCTAVE_YYUSE ((yyvsp[-6].punct_type));
5038  OCTAVE_YYUSE ((yyvsp[-4].tok_val));
5039  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5040 
5041  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))))
5042  {
5043  // make_unwind_command deleted $4 and $8.
5044  YYABORT;
5045  }
5046  }
5047 #line 5048 "libinterp/parse-tree/oct-parse.cc"
5048  break;
5049 
5050  case 180: /* except_command: TRY stash_comment opt_sep opt_list CATCH stash_comment opt_sep opt_list END */
5051 #line 1356 "../libinterp/parse-tree/oct-parse.yy"
5052  {
5053  OCTAVE_YYUSE ((yyvsp[-6].punct_type));
5054  OCTAVE_YYUSE ((yyvsp[-4].tok_val));
5055  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5056 
5057  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))))
5058  {
5059  // make_try_command deleted $4 and $8.
5060  YYABORT;
5061  }
5062  }
5063 #line 5064 "libinterp/parse-tree/oct-parse.cc"
5064  break;
5065 
5066  case 181: /* except_command: TRY stash_comment opt_sep opt_list END */
5067 #line 1368 "../libinterp/parse-tree/oct-parse.yy"
5068  {
5069  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5070 
5071  if (! ((yyval.tree_command_type) = parser.make_try_command ((yyvsp[-4].tok_val), (yyvsp[-1].tree_statement_list_type), 0, nullptr,
5072  (yyvsp[0].tok_val), (yyvsp[-3].comment_type), nullptr)))
5073  {
5074  // make_try_command deleted $4.
5075  YYABORT;
5076  }
5077  }
5078 #line 5079 "libinterp/parse-tree/oct-parse.cc"
5079  break;
5080 
5081  case 182: /* push_fcn_symtab: %empty */
5082 #line 1385 "../libinterp/parse-tree/oct-parse.yy"
5083  {
5084  if (! parser.push_fcn_symtab ())
5085  YYABORT;
5086 
5087  (yyval.dummy_type) = 0;
5088  }
5089 #line 5090 "libinterp/parse-tree/oct-parse.cc"
5090  break;
5091 
5092  case 183: /* param_list_beg: '(' */
5093 #line 1398 "../libinterp/parse-tree/oct-parse.yy"
5094  {
5095  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5096 
5097  (yyval.dummy_type) = 0;
5098  lexer.m_looking_at_parameter_list = true;
5099 
5100  if (lexer.m_looking_at_function_handle)
5101  {
5102  // Will get a real name later.
5103  lexer.m_symtab_context.push (octave::symbol_scope ("parser:param_lsit_beg"));
5104  lexer.m_looking_at_function_handle--;
5105  lexer.m_looking_at_anon_fcn_args = true;
5106  }
5107  }
5108 #line 5109 "libinterp/parse-tree/oct-parse.cc"
5109  break;
5110 
5111  case 184: /* param_list_end: ')' */
5112 #line 1415 "../libinterp/parse-tree/oct-parse.yy"
5113  {
5114  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5115 
5116  (yyval.dummy_type) = 0;
5117  lexer.m_looking_at_parameter_list = false;
5118  lexer.m_looking_for_object_index = false;
5119  }
5120 #line 5121 "libinterp/parse-tree/oct-parse.cc"
5121  break;
5122 
5123  case 185: /* opt_param_list: %empty */
5124 #line 1425 "../libinterp/parse-tree/oct-parse.yy"
5125  { (yyval.tree_parameter_list_type) = nullptr; }
5126 #line 5127 "libinterp/parse-tree/oct-parse.cc"
5127  break;
5128 
5129  case 186: /* opt_param_list: param_list */
5130 #line 1427 "../libinterp/parse-tree/oct-parse.yy"
5131  { (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type); }
5132 #line 5133 "libinterp/parse-tree/oct-parse.cc"
5133  break;
5134 
5135  case 187: /* param_list: param_list_beg param_list1 param_list_end */
5136 #line 1431 "../libinterp/parse-tree/oct-parse.yy"
5137  {
5138  if ((yyvsp[-1].tree_parameter_list_type))
5139  lexer.mark_as_variables ((yyvsp[-1].tree_parameter_list_type)->variable_names ());
5140 
5141  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
5142  }
5143 #line 5144 "libinterp/parse-tree/oct-parse.cc"
5144  break;
5145 
5146  case 188: /* param_list: param_list_beg error */
5147 #line 1438 "../libinterp/parse-tree/oct-parse.yy"
5148  {
5149  (yyval.tree_parameter_list_type) = nullptr;
5150  parser.bison_error ("invalid parameter list");
5151  YYABORT;
5152  }
5153 #line 5154 "libinterp/parse-tree/oct-parse.cc"
5154  break;
5155 
5156  case 189: /* param_list1: %empty */
5157 #line 1446 "../libinterp/parse-tree/oct-parse.yy"
5158  { (yyval.tree_parameter_list_type) = new octave::tree_parameter_list (octave::tree_parameter_list::in); }
5159 #line 5160 "libinterp/parse-tree/oct-parse.cc"
5160  break;
5161 
5162  case 190: /* param_list1: param_list2 */
5163 #line 1448 "../libinterp/parse-tree/oct-parse.yy"
5164  {
5165  (yyvsp[0].tree_parameter_list_type)->mark_as_formal_parameters ();
5166 
5167  if (parser.validate_param_list ((yyvsp[0].tree_parameter_list_type), octave::tree_parameter_list::in))
5168  {
5169  lexer.mark_as_variables ((yyvsp[0].tree_parameter_list_type)->variable_names ());
5170  (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type);
5171  }
5172  else
5173  {
5174  delete (yyvsp[0].tree_parameter_list_type);
5175  YYABORT;
5176  }
5177  }
5178 #line 5179 "libinterp/parse-tree/oct-parse.cc"
5179  break;
5180 
5181  case 191: /* param_list2: param_list_elt */
5182 #line 1465 "../libinterp/parse-tree/oct-parse.yy"
5183  { (yyval.tree_parameter_list_type) = new octave::tree_parameter_list (octave::tree_parameter_list::in, (yyvsp[0].tree_decl_elt_type)); }
5184 #line 5185 "libinterp/parse-tree/oct-parse.cc"
5185  break;
5186 
5187  case 192: /* param_list2: param_list2 ',' param_list_elt */
5188 #line 1467 "../libinterp/parse-tree/oct-parse.yy"
5189  {
5190  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5191 
5192  (yyvsp[-2].tree_parameter_list_type)->append ((yyvsp[0].tree_decl_elt_type));
5193  (yyval.tree_parameter_list_type) = (yyvsp[-2].tree_parameter_list_type);
5194  }
5195 #line 5196 "libinterp/parse-tree/oct-parse.cc"
5196  break;
5197 
5198  case 193: /* param_list_elt: decl2 */
5199 #line 1476 "../libinterp/parse-tree/oct-parse.yy"
5200  { (yyval.tree_decl_elt_type) = (yyvsp[0].tree_decl_elt_type); }
5201 #line 5202 "libinterp/parse-tree/oct-parse.cc"
5202  break;
5203 
5204  case 194: /* param_list_elt: magic_tilde */
5205 #line 1478 "../libinterp/parse-tree/oct-parse.yy"
5206  { (yyval.tree_decl_elt_type) = new octave::tree_decl_elt ((yyvsp[0].tree_identifier_type)); }
5207 #line 5208 "libinterp/parse-tree/oct-parse.cc"
5208  break;
5209 
5210  case 195: /* return_list: '[' ']' */
5211 #line 1486 "../libinterp/parse-tree/oct-parse.yy"
5212  {
5213  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5214  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5215 
5216  lexer.m_looking_at_return_list = false;
5217 
5218  (yyval.tree_parameter_list_type) = new octave::tree_parameter_list (octave::tree_parameter_list::out);
5219  }
5220 #line 5221 "libinterp/parse-tree/oct-parse.cc"
5221  break;
5222 
5223  case 196: /* return_list: identifier */
5224 #line 1495 "../libinterp/parse-tree/oct-parse.yy"
5225  {
5226  lexer.m_looking_at_return_list = false;
5227 
5229  = new octave::tree_parameter_list (octave::tree_parameter_list::out, (yyvsp[0].tree_identifier_type));
5230 
5231  // Even though this parameter list can contain only
5232  // a single identifier, we still need to validate it
5233  // to check for varargin or varargout.
5234 
5236  (yyval.tree_parameter_list_type) = tmp;
5237  else
5238  {
5239  delete tmp;
5240  YYABORT;
5241  }
5242  }
5243 #line 5244 "libinterp/parse-tree/oct-parse.cc"
5244  break;
5245 
5246  case 197: /* return_list: '[' return_list1 ']' */
5247 #line 1514 "../libinterp/parse-tree/oct-parse.yy"
5248  {
5249  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
5250  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5251 
5252  lexer.m_looking_at_return_list = false;
5253 
5254  // Check for duplicate parameter names, varargin,
5255  // or varargout.
5256 
5257  if (parser.validate_param_list ((yyvsp[-1].tree_parameter_list_type), octave::tree_parameter_list::out))
5258  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
5259  else
5260  {
5261  delete (yyvsp[-1].tree_parameter_list_type);
5262  YYABORT;
5263  }
5264  }
5265 #line 5266 "libinterp/parse-tree/oct-parse.cc"
5266  break;
5267 
5268  case 198: /* return_list1: identifier */
5269 #line 1534 "../libinterp/parse-tree/oct-parse.yy"
5270  {
5271  (yyval.tree_parameter_list_type) = new octave::tree_parameter_list (octave::tree_parameter_list::out, new octave::tree_decl_elt ((yyvsp[0].tree_identifier_type)));
5272  }
5273 #line 5274 "libinterp/parse-tree/oct-parse.cc"
5274  break;
5275 
5276  case 199: /* return_list1: return_list1 ',' identifier */
5277 #line 1538 "../libinterp/parse-tree/oct-parse.yy"
5278  {
5279  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5280 
5281  (yyvsp[-2].tree_parameter_list_type)->append (new octave::tree_decl_elt ((yyvsp[0].tree_identifier_type)));
5282  (yyval.tree_parameter_list_type) = (yyvsp[-2].tree_parameter_list_type);
5283  }
5284 #line 5285 "libinterp/parse-tree/oct-parse.cc"
5285  break;
5286 
5287  case 200: /* parsing_local_fcns: %empty */
5288 #line 1552 "../libinterp/parse-tree/oct-parse.yy"
5289  { parser.parsing_local_functions (true); }
5290 #line 5291 "libinterp/parse-tree/oct-parse.cc"
5291  break;
5292 
5293  case 201: /* push_script_symtab: %empty */
5294 #line 1556 "../libinterp/parse-tree/oct-parse.yy"
5295  {
5296  (yyval.dummy_type) = 0;
5297 
5298  // This scope may serve as the parent scope for local
5299  // functions in classdef files..
5300  lexer.m_symtab_context.push (octave::symbol_scope ("parser:push_script_symtab"));
5301  }
5302 #line 5303 "libinterp/parse-tree/oct-parse.cc"
5303  break;
5304 
5305  case 202: /* begin_file: push_script_symtab INPUT_FILE */
5306 #line 1566 "../libinterp/parse-tree/oct-parse.yy"
5307  { (yyval.dummy_type) = 0; }
5308 #line 5309 "libinterp/parse-tree/oct-parse.cc"
5309  break;
5310 
5311  case 203: /* file: begin_file opt_nl opt_list END_OF_INPUT */
5312 #line 1570 "../libinterp/parse-tree/oct-parse.yy"
5313  {
5314  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5315 
5316  if (lexer.m_reading_fcn_file)
5317  {
5318  // Delete the dummy statement_list we created
5319  // after parsing the function. Any function
5320  // definitions found in the file have already
5321  // been stored in the symbol table or in
5322  // base_parser::m_primary_fcn.
5323 
5324  // Unused symbol table context.
5325  lexer.m_symtab_context.pop ();
5326 
5327  delete (yyvsp[-1].tree_statement_list_type);
5328  }
5329  else
5330  {
5331  octave::tree_statement *end_of_script
5332  = parser.make_end ("endscript", true,
5333  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5334 
5335  parser.make_script ((yyvsp[-1].tree_statement_list_type), end_of_script);
5336  }
5337 
5338  (yyval.tree_command_type) = nullptr;
5339  }
5340 #line 5341 "libinterp/parse-tree/oct-parse.cc"
5341  break;
5342 
5343  case 204: /* file: begin_file opt_nl classdef parsing_local_fcns opt_sep opt_fcn_list END_OF_INPUT */
5344 #line 1598 "../libinterp/parse-tree/oct-parse.yy"
5345  {
5346  OCTAVE_YYUSE ((yyvsp[-5].punct_type));
5347  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5348  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5349 
5350  // Unused symbol table context.
5351  lexer.m_symtab_context.pop ();
5352 
5353  parser.finish_classdef_file ((yyvsp[-4].tree_classdef_type), (yyvsp[-1].tree_statement_list_type));
5354 
5355  (yyval.tree_command_type) = nullptr;
5356  }
5357 #line 5358 "libinterp/parse-tree/oct-parse.cc"
5358  break;
5359 
5360  case 205: /* function_beg: push_fcn_symtab FCN */
5361 #line 1617 "../libinterp/parse-tree/oct-parse.yy"
5362  {
5363  (yyval.tok_val) = (yyvsp[0].tok_val);
5364  if (lexer.m_reading_classdef_file
5365  || lexer.m_parsing_classdef)
5366  lexer.m_maybe_classdef_get_set_method = true;
5367  }
5368 #line 5369 "libinterp/parse-tree/oct-parse.cc"
5369  break;
5370 
5371  case 206: /* fcn_name: identifier */
5372 #line 1626 "../libinterp/parse-tree/oct-parse.yy"
5373  {
5374  (yyval.tree_identifier_type) = parser.make_fcn_name ((yyvsp[0].tree_identifier_type));
5375  if (! (yyval.tree_identifier_type))
5376  {
5377  // make_fcn_name deleted $1.
5378  YYABORT;
5379  }
5380  }
5381 #line 5382 "libinterp/parse-tree/oct-parse.cc"
5382  break;
5383 
5384  case 207: /* fcn_name: GET '.' identifier */
5385 #line 1635 "../libinterp/parse-tree/oct-parse.yy"
5386  {
5387  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
5388  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5389 
5390  lexer.m_parsed_function_name.top () = true;
5391  lexer.m_maybe_classdef_get_set_method = false;
5392  lexer.m_parsing_classdef_get_method = true;
5393  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5394  }
5395 #line 5396 "libinterp/parse-tree/oct-parse.cc"
5396  break;
5397 
5398  case 208: /* fcn_name: SET '.' identifier */
5399 #line 1645 "../libinterp/parse-tree/oct-parse.yy"
5400  {
5401  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
5402  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5403 
5404  lexer.m_parsed_function_name.top () = true;
5405  lexer.m_maybe_classdef_get_set_method = false;
5406  lexer.m_parsing_classdef_set_method = true;
5407  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
5408  }
5409 #line 5410 "libinterp/parse-tree/oct-parse.cc"
5410  break;
5411 
5412  case 209: /* function_end: END */
5413 #line 1657 "../libinterp/parse-tree/oct-parse.yy"
5414  {
5415  parser.endfunction_found (true);
5416 
5417  if (parser.end_token_ok ((yyvsp[0].tok_val), octave::token::function_end))
5418  (yyval.tree_statement_type) = parser.make_end ("endfunction", false,
5419  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5420  else
5421  {
5422  parser.end_token_error ((yyvsp[0].tok_val), octave::token::function_end);
5423  YYABORT;
5424  }
5425  }
5426 #line 5427 "libinterp/parse-tree/oct-parse.cc"
5427  break;
5428 
5429  case 210: /* function_end: END_OF_INPUT */
5430 #line 1670 "../libinterp/parse-tree/oct-parse.yy"
5431  {
5432 // A lot of tests are based on the assumption that this is OK
5433 // if (lexer.m_reading_script_file)
5434 // {
5435 // parser.bison_error ("function body open at end of script");
5436 // YYABORT;
5437 // }
5438 
5439  if (parser.endfunction_found ())
5440  {
5441  parser.bison_error ("inconsistent function endings -- "
5442  "if one function is explicitly ended, "
5443  "so must all the others");
5444  YYABORT;
5445  }
5446 
5447  if (! (lexer.m_reading_fcn_file || lexer.m_reading_script_file
5448  || lexer.input_from_eval_string ()))
5449  {
5450  parser.bison_error ("function body open at end of input");
5451  YYABORT;
5452  }
5453 
5454  if (lexer.m_reading_classdef_file)
5455  {
5456  parser.bison_error ("classdef body open at end of input");
5457  YYABORT;
5458  }
5459 
5460  (yyval.tree_statement_type) = parser.make_end ("endfunction", true,
5461  (yyvsp[0].tok_val)->beg_pos (), (yyvsp[0].tok_val)->end_pos ());
5462  }
5463 #line 5464 "libinterp/parse-tree/oct-parse.cc"
5464  break;
5465 
5466  case 211: /* function: function_beg stash_comment fcn_name opt_param_list opt_sep opt_list function_end */
5467 #line 1706 "../libinterp/parse-tree/oct-parse.yy"
5468  {
5469  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5470 
5471  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-6].tok_val), nullptr, (yyvsp[-4].tree_identifier_type), (yyvsp[-3].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-5].comment_type));
5472  }
5473 #line 5474 "libinterp/parse-tree/oct-parse.cc"
5474  break;
5475 
5476  case 212: /* function: function_beg stash_comment return_list '=' fcn_name opt_param_list opt_sep opt_list function_end */
5477 #line 1713 "../libinterp/parse-tree/oct-parse.yy"
5478  {
5479  OCTAVE_YYUSE ((yyvsp[-5].tok_val));
5480  OCTAVE_YYUSE ((yyvsp[-2].punct_type));
5481 
5482  (yyval.tree_function_def_type) = parser.make_function ((yyvsp[-8].tok_val), (yyvsp[-6].tree_parameter_list_type), (yyvsp[-4].tree_identifier_type), (yyvsp[-3].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type), (yyvsp[-7].comment_type));
5483  }
5484 #line 5485 "libinterp/parse-tree/oct-parse.cc"
5485  break;
5486 
5487  case 213: /* classdef_beg: CLASSDEF */
5488 #line 1726 "../libinterp/parse-tree/oct-parse.yy"
5489  {
5490  if (! lexer.m_reading_classdef_file)
5491  {
5492  parser.bison_error ("classdef must appear inside a file containing only a class definition");
5493  YYABORT;
5494  }
5495 
5496  // Create invalid parent scope.
5497  lexer.m_symtab_context.push (octave::symbol_scope ());
5498  lexer.m_parsing_classdef = true;
5499  lexer.m_parsing_classdef_decl = true;
5500 
5501  (yyval.tok_val) = (yyvsp[0].tok_val);
5502  }
5503 #line 5504 "libinterp/parse-tree/oct-parse.cc"
5504  break;
5505 
5506  case 214: /* classdef: classdef_beg stash_comment attr_list identifier opt_sep superclass_list class_body END */
5507 #line 1743 "../libinterp/parse-tree/oct-parse.yy"
5508  {
5509  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5510 
5511  octave::comment_list *lc = (yyvsp[-6].comment_type);
5512  octave::comment_list *tc = lexer.get_comment ();
5513 
5514  lexer.m_parsing_classdef = false;
5515 
5516  if (! ((yyval.tree_classdef_type) = parser.make_classdef ((yyvsp[-7].tok_val), (yyvsp[-5].tree_classdef_attribute_list_type), (yyvsp[-4].tree_identifier_type), (yyvsp[-2].tree_classdef_superclass_list_type), (yyvsp[-1].tree_classdef_body_type), (yyvsp[0].tok_val),
5517  lc, tc)))
5518  {
5519  // make_classdef deleted $3, $4, $6, $7, LC, and
5520  // TC.
5521  YYABORT;
5522  }
5523  }
5524 #line 5525 "libinterp/parse-tree/oct-parse.cc"
5525  break;
5526 
5527  case 215: /* attr_list: %empty */
5528 #line 1762 "../libinterp/parse-tree/oct-parse.yy"
5529  { (yyval.tree_classdef_attribute_list_type) = nullptr; }
5530 #line 5531 "libinterp/parse-tree/oct-parse.cc"
5531  break;
5532 
5533  case 216: /* attr_list: '(' attr_list1 ')' opt_sep */
5534 #line 1764 "../libinterp/parse-tree/oct-parse.yy"
5535  {
5536  OCTAVE_YYUSE ((yyvsp[-3].tok_val));
5537  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5538  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5539 
5540  (yyval.tree_classdef_attribute_list_type) = (yyvsp[-2].tree_classdef_attribute_list_type);
5541  }
5542 #line 5543 "libinterp/parse-tree/oct-parse.cc"
5543  break;
5544 
5545  case 217: /* attr_list1: attr */
5546 #line 1774 "../libinterp/parse-tree/oct-parse.yy"
5547  { (yyval.tree_classdef_attribute_list_type) = new octave::tree_classdef_attribute_list ((yyvsp[0].tree_classdef_attribute_type)); }
5548 #line 5549 "libinterp/parse-tree/oct-parse.cc"
5549  break;
5550 
5551  case 218: /* attr_list1: attr_list1 ',' attr */
5552 #line 1776 "../libinterp/parse-tree/oct-parse.yy"
5553  {
5554  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5555 
5556  (yyvsp[-2].tree_classdef_attribute_list_type)->append ((yyvsp[0].tree_classdef_attribute_type));
5557  (yyval.tree_classdef_attribute_list_type) = (yyvsp[-2].tree_classdef_attribute_list_type);
5558  }
5559 #line 5560 "libinterp/parse-tree/oct-parse.cc"
5560  break;
5561 
5562  case 219: /* attr: identifier */
5563 #line 1785 "../libinterp/parse-tree/oct-parse.yy"
5564  { (yyval.tree_classdef_attribute_type) = new octave::tree_classdef_attribute ((yyvsp[0].tree_identifier_type)); }
5565 #line 5566 "libinterp/parse-tree/oct-parse.cc"
5566  break;
5567 
5568  case 220: /* attr: identifier '=' decl_param_init expression */
5569 #line 1787 "../libinterp/parse-tree/oct-parse.yy"
5570  {
5571  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
5572 
5573  lexer.m_looking_at_initializer_expression = false;
5574  (yyval.tree_classdef_attribute_type) = new octave::tree_classdef_attribute ((yyvsp[-3].tree_identifier_type), (yyvsp[0].tree_expression_type));
5575  }
5576 #line 5577 "libinterp/parse-tree/oct-parse.cc"
5577  break;
5578 
5579  case 221: /* attr: EXPR_NOT identifier */
5580 #line 1794 "../libinterp/parse-tree/oct-parse.yy"
5581  {
5582  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5583 
5584  (yyval.tree_classdef_attribute_type) = new octave::tree_classdef_attribute ((yyvsp[0].tree_identifier_type), false);
5585  }
5586 #line 5587 "libinterp/parse-tree/oct-parse.cc"
5587  break;
5588 
5589  case 222: /* superclass_list: %empty */
5590 #line 1802 "../libinterp/parse-tree/oct-parse.yy"
5591  {
5592  lexer.m_parsing_classdef_decl = false;
5593  lexer.m_parsing_classdef_superclass = false;
5594 
5595  (yyval.tree_classdef_superclass_list_type) = nullptr;
5596  }
5597 #line 5598 "libinterp/parse-tree/oct-parse.cc"
5598  break;
5599 
5600  case 223: /* superclass_list: superclass_list1 opt_sep */
5601 #line 1809 "../libinterp/parse-tree/oct-parse.yy"
5602  {
5603  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5604 
5605  lexer.m_parsing_classdef_decl = false;
5606  lexer.m_parsing_classdef_superclass = false;
5607 
5608  (yyval.tree_classdef_superclass_list_type) = (yyvsp[-1].tree_classdef_superclass_list_type);
5609  }
5610 #line 5611 "libinterp/parse-tree/oct-parse.cc"
5611  break;
5612 
5613  case 224: /* superclass_list1: EXPR_LT superclass */
5614 #line 1821 "../libinterp/parse-tree/oct-parse.yy"
5615  {
5616  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5617 
5618  (yyval.tree_classdef_superclass_list_type) = new octave::tree_classdef_superclass_list ((yyvsp[0].tree_classdef_superclass_type));
5619  }
5620 #line 5621 "libinterp/parse-tree/oct-parse.cc"
5621  break;
5622 
5623  case 225: /* superclass_list1: superclass_list1 EXPR_AND superclass */
5624 #line 1827 "../libinterp/parse-tree/oct-parse.yy"
5625  {
5626  OCTAVE_YYUSE ((yyvsp[-1].tok_val));
5627 
5628  (yyvsp[-2].tree_classdef_superclass_list_type)->append ((yyvsp[0].tree_classdef_superclass_type));
5629  (yyval.tree_classdef_superclass_list_type) = (yyvsp[-2].tree_classdef_superclass_list_type);
5630  }
5631 #line 5632 "libinterp/parse-tree/oct-parse.cc"
5632  break;
5633 
5634  case 226: /* superclass: FQ_IDENT */
5635 #line 1836 "../libinterp/parse-tree/oct-parse.yy"
5636  { (yyval.tree_classdef_superclass_type) = new octave::tree_classdef_superclass ((yyvsp[0].tok_val)->text ()); }
5637 #line 5638 "libinterp/parse-tree/oct-parse.cc"
5638  break;
5639 
5640  case 227: /* class_body: %empty */
5641 #line 1840 "../libinterp/parse-tree/oct-parse.yy"
5642  { (yyval.tree_classdef_body_type) = nullptr; }
5643 #line 5644 "libinterp/parse-tree/oct-parse.cc"
5644  break;
5645 
5646  case 228: /* class_body: class_body1 opt_sep */
5647 #line 1842 "../libinterp/parse-tree/oct-parse.yy"
5648  {
5649  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5650 
5651  (yyval.tree_classdef_body_type) = (yyvsp[-1].tree_classdef_body_type);
5652  }
5653 #line 5654 "libinterp/parse-tree/oct-parse.cc"
5654  break;
5655 
5656  case 229: /* class_body1: properties_block */
5657 #line 1850 "../libinterp/parse-tree/oct-parse.yy"
5658  { (yyval.tree_classdef_body_type) = new octave::tree_classdef_body ((yyvsp[0].tree_classdef_properties_block_type)); }
5659 #line 5660 "libinterp/parse-tree/oct-parse.cc"
5660  break;
5661 
5662  case 230: /* class_body1: methods_block */
5663 #line 1852 "../libinterp/parse-tree/oct-parse.yy"
5664  { (yyval.tree_classdef_body_type) = new octave::tree_classdef_body ((yyvsp[0].tree_classdef_methods_block_type)); }
5665 #line 5666 "libinterp/parse-tree/oct-parse.cc"
5666  break;
5667 
5668  case 231: /* class_body1: events_block */
5669 #line 1854 "../libinterp/parse-tree/oct-parse.yy"
5670  { (yyval.tree_classdef_body_type) = new octave::tree_classdef_body ((yyvsp[0].tree_classdef_events_block_type)); }
5671 #line 5672 "libinterp/parse-tree/oct-parse.cc"
5672  break;
5673 
5674  case 232: /* class_body1: enum_block */
5675 #line 1856 "../libinterp/parse-tree/oct-parse.yy"
5676  { (yyval.tree_classdef_body_type) = new octave::tree_classdef_body ((yyvsp[0].tree_classdef_enum_block_type)); }
5677 #line 5678 "libinterp/parse-tree/oct-parse.cc"
5678  break;
5679 
5680  case 233: /* class_body1: class_body1 opt_sep properties_block */
5681 #line 1858 "../libinterp/parse-tree/oct-parse.yy"
5682  {
5683  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5684 
5685  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_properties_block_type));
5686  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5687  }
5688 #line 5689 "libinterp/parse-tree/oct-parse.cc"
5689  break;
5690 
5691  case 234: /* class_body1: class_body1 opt_sep methods_block */
5692 #line 1865 "../libinterp/parse-tree/oct-parse.yy"
5693  {
5694  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5695 
5696  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_methods_block_type));
5697  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5698  }
5699 #line 5700 "libinterp/parse-tree/oct-parse.cc"
5700  break;
5701 
5702  case 235: /* class_body1: class_body1 opt_sep events_block */
5703 #line 1872 "../libinterp/parse-tree/oct-parse.yy"
5704  {
5705  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5706 
5707  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_events_block_type));
5708  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5709  }
5710 #line 5711 "libinterp/parse-tree/oct-parse.cc"
5711  break;
5712 
5713  case 236: /* class_body1: class_body1 opt_sep enum_block */
5714 #line 1879 "../libinterp/parse-tree/oct-parse.yy"
5715  {
5716  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5717 
5718  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_enum_block_type));
5719  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5720  }
5721 #line 5722 "libinterp/parse-tree/oct-parse.cc"
5722  break;
5723 
5724  case 237: /* properties_block: PROPERTIES stash_comment opt_sep attr_list property_list END */
5725 #line 1889 "../libinterp/parse-tree/oct-parse.yy"
5726  {
5727  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5728 
5729  octave::comment_list *lc = (yyvsp[-4].comment_type);
5730  octave::comment_list *tc = lexer.get_comment ();
5731 
5732  if (! ((yyval.tree_classdef_properties_block_type) = parser.make_classdef_properties_block
5733  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_property_list_type), (yyvsp[0].tok_val), lc, tc)))
5734  {
5735  // make_classdef_properties_block deleted $4,
5736  // $5, LC, and TC.
5737  YYABORT;
5738  }
5739  }
5740 #line 5741 "libinterp/parse-tree/oct-parse.cc"
5741  break;
5742 
5743  case 238: /* property_list: %empty */
5744 #line 1906 "../libinterp/parse-tree/oct-parse.yy"
5745  { (yyval.tree_classdef_property_list_type) = nullptr; }
5746 #line 5747 "libinterp/parse-tree/oct-parse.cc"
5747  break;
5748 
5749  case 239: /* property_list: property_list1 opt_sep */
5750 #line 1908 "../libinterp/parse-tree/oct-parse.yy"
5751  {
5752  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5753 
5754  (yyval.tree_classdef_property_list_type) = (yyvsp[-1].tree_classdef_property_list_type);
5755  }
5756 #line 5757 "libinterp/parse-tree/oct-parse.cc"
5757  break;
5758 
5759  case 240: /* property_list1: class_property */
5760 #line 1917 "../libinterp/parse-tree/oct-parse.yy"
5761  { (yyval.tree_classdef_property_list_type) = new octave::tree_classdef_property_list ((yyvsp[0].tree_classdef_property_type)); }
5762 #line 5763 "libinterp/parse-tree/oct-parse.cc"
5763  break;
5764 
5765  case 241: /* property_list1: property_list1 sep class_property */
5766 #line 1919 "../libinterp/parse-tree/oct-parse.yy"
5767  {
5768  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5769 
5770  // We don't look ahead to grab end-of-line comments.
5771  // Instead, they are grabbed when we see the
5772  // identifier that becomes the next element in the
5773  // list. If the element at the end of the list
5774  // doesn't have a doc string, see whether the
5775  // element we are adding is stroing an end-of-line
5776  // comment for us to use.
5777 
5778  octave::tree_classdef_property *last_elt = (yyvsp[-2].tree_classdef_property_list_type)->back ();
5779 
5780  if (! last_elt->have_doc_string ())
5781  {
5782  octave::comment_list *cl = (yyvsp[0].tree_classdef_property_type)->comments ();
5783 
5784  if (cl)
5785  {
5786  octave::comment_elt elt = cl->front ();
5787 
5788  if (elt.is_end_of_line ())
5789  last_elt->doc_string (elt.text ());
5790  }
5791  }
5792 
5793  (yyvsp[-2].tree_classdef_property_list_type)->append ((yyvsp[0].tree_classdef_property_type));
5794  (yyval.tree_classdef_property_list_type) = (yyvsp[-2].tree_classdef_property_list_type);
5795  }
5796 #line 5797 "libinterp/parse-tree/oct-parse.cc"
5797  break;
5798 
5799  case 242: /* class_property: stash_comment identifier */
5800 #line 1951 "../libinterp/parse-tree/oct-parse.yy"
5801  {
5802  (yyval.tree_classdef_property_type) = new octave::tree_classdef_property ((yyvsp[0].tree_identifier_type), (yyvsp[-1].comment_type));
5803  }
5804 #line 5805 "libinterp/parse-tree/oct-parse.cc"
5805  break;
5806 
5807  case 243: /* class_property: stash_comment identifier '=' decl_param_init expression */
5808 #line 1955 "../libinterp/parse-tree/oct-parse.yy"
5809  {
5810  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
5811 
5812  lexer.m_looking_at_initializer_expression = false;
5813 
5814  (yyval.tree_classdef_property_type) = new octave::tree_classdef_property ((yyvsp[-3].tree_identifier_type), (yyvsp[0].tree_expression_type), (yyvsp[-4].comment_type));
5815  }
5816 #line 5817 "libinterp/parse-tree/oct-parse.cc"
5817  break;
5818 
5819  case 244: /* methods_block: METHODS stash_comment opt_sep attr_list methods_list END */
5820 #line 1965 "../libinterp/parse-tree/oct-parse.yy"
5821  {
5822  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5823 
5824  octave::comment_list *lc = (yyvsp[-4].comment_type);
5825  octave::comment_list *tc = lexer.get_comment ();
5826 
5827  if (! ((yyval.tree_classdef_methods_block_type) = parser.make_classdef_methods_block
5828  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_methods_list_type), (yyvsp[0].tok_val), lc, tc)))
5829  {
5830  // make_classdef_methods_block deleted $4, $5,
5831  // LC, and TC.
5832  YYABORT;
5833  }
5834  }
5835 #line 5836 "libinterp/parse-tree/oct-parse.cc"
5836  break;
5837 
5838  case 245: /* method_decl1: identifier */
5839 #line 1982 "../libinterp/parse-tree/oct-parse.yy"
5840  {
5841  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[0].tree_identifier_type), nullptr)))
5842  YYABORT;
5843  }
5844 #line 5845 "libinterp/parse-tree/oct-parse.cc"
5845  break;
5846 
5847  case 246: /* method_decl1: identifier param_list */
5848 #line 1987 "../libinterp/parse-tree/oct-parse.yy"
5849  {
5850  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_parameter_list_type))))
5851  YYABORT;
5852  }
5853 #line 5854 "libinterp/parse-tree/oct-parse.cc"
5854  break;
5855 
5856  case 247: /* method_decl: stash_comment method_decl1 */
5857 #line 1994 "../libinterp/parse-tree/oct-parse.yy"
5858  { (yyval.tree_function_def_type) = parser.finish_classdef_external_method ((yyvsp[0].octave_user_function_type), nullptr, (yyvsp[-1].comment_type)); }
5859 #line 5860 "libinterp/parse-tree/oct-parse.cc"
5860  break;
5861 
5862  case 248: /* $@1: %empty */
5863 #line 1996 "../libinterp/parse-tree/oct-parse.yy"
5864  {
5865  OCTAVE_YYUSE ((yyvsp[0].tok_val));
5866 
5867  lexer.m_defining_func++;
5868  lexer.m_parsed_function_name.push (false);
5869  }
5870 #line 5871 "libinterp/parse-tree/oct-parse.cc"
5871  break;
5872 
5873  case 249: /* method_decl: stash_comment return_list '=' $@1 method_decl1 */
5874 #line 2003 "../libinterp/parse-tree/oct-parse.yy"
5875  {
5876  lexer.m_defining_func--;
5877  lexer.m_parsed_function_name.pop ();
5878 
5879  (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));
5880  }
5881 #line 5882 "libinterp/parse-tree/oct-parse.cc"
5882  break;
5883 
5884  case 250: /* method: method_decl */
5885 #line 2012 "../libinterp/parse-tree/oct-parse.yy"
5886  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5887 #line 5888 "libinterp/parse-tree/oct-parse.cc"
5888  break;
5889 
5890  case 251: /* method: function */
5891 #line 2014 "../libinterp/parse-tree/oct-parse.yy"
5892  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5893 #line 5894 "libinterp/parse-tree/oct-parse.cc"
5894  break;
5895 
5896  case 252: /* methods_list: %empty */
5897 #line 2018 "../libinterp/parse-tree/oct-parse.yy"
5898  { (yyval.tree_classdef_methods_list_type) = nullptr; }
5899 #line 5900 "libinterp/parse-tree/oct-parse.cc"
5900  break;
5901 
5902  case 253: /* methods_list: methods_list1 opt_sep */
5903 #line 2020 "../libinterp/parse-tree/oct-parse.yy"
5904  {
5905  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5906 
5907  (yyval.tree_classdef_methods_list_type) = (yyvsp[-1].tree_classdef_methods_list_type);
5908  }
5909 #line 5910 "libinterp/parse-tree/oct-parse.cc"
5910  break;
5911 
5912  case 254: /* methods_list1: method */
5913 #line 2028 "../libinterp/parse-tree/oct-parse.yy"
5914  {
5915  octave_value fcn;
5916  if ((yyvsp[0].tree_function_def_type))
5917  fcn = (yyvsp[0].tree_function_def_type)->function ();
5918  delete (yyvsp[0].tree_function_def_type);
5919  (yyval.tree_classdef_methods_list_type) = new octave::tree_classdef_methods_list (fcn);
5920  }
5921 #line 5922 "libinterp/parse-tree/oct-parse.cc"
5922  break;
5923 
5924  case 255: /* methods_list1: methods_list1 opt_sep method */
5925 #line 2036 "../libinterp/parse-tree/oct-parse.yy"
5926  {
5927  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5928 
5929  octave_value fcn;
5930  if ((yyvsp[0].tree_function_def_type))
5931  fcn = (yyvsp[0].tree_function_def_type)->function ();
5932  delete (yyvsp[0].tree_function_def_type);
5933 
5934  (yyvsp[-2].tree_classdef_methods_list_type)->append (fcn);
5935  (yyval.tree_classdef_methods_list_type) = (yyvsp[-2].tree_classdef_methods_list_type);
5936  }
5937 #line 5938 "libinterp/parse-tree/oct-parse.cc"
5938  break;
5939 
5940  case 256: /* events_block: EVENTS stash_comment opt_sep attr_list events_list END */
5941 #line 2050 "../libinterp/parse-tree/oct-parse.yy"
5942  {
5943  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
5944 
5945  octave::comment_list *lc = (yyvsp[-4].comment_type);
5946  octave::comment_list *tc = lexer.get_comment ();
5947 
5948  if (! ((yyval.tree_classdef_events_block_type) = parser.make_classdef_events_block
5949  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_events_list_type), (yyvsp[0].tok_val), lc, tc)))
5950  {
5951  // make_classdef_events_block deleted $4, $5,
5952  // LC, and TC.
5953  YYABORT;
5954  }
5955  }
5956 #line 5957 "libinterp/parse-tree/oct-parse.cc"
5957  break;
5958 
5959  case 257: /* events_list: %empty */
5960 #line 2067 "../libinterp/parse-tree/oct-parse.yy"
5961  { (yyval.tree_classdef_events_list_type) = nullptr; }
5962 #line 5963 "libinterp/parse-tree/oct-parse.cc"
5963  break;
5964 
5965  case 258: /* events_list: events_list1 opt_sep */
5966 #line 2069 "../libinterp/parse-tree/oct-parse.yy"
5967  {
5968  OCTAVE_YYUSE ((yyvsp[0].punct_type));
5969 
5970  (yyval.tree_classdef_events_list_type) = (yyvsp[-1].tree_classdef_events_list_type);
5971  }
5972 #line 5973 "libinterp/parse-tree/oct-parse.cc"
5973  break;
5974 
5975  case 259: /* events_list1: class_event */
5976 #line 2077 "../libinterp/parse-tree/oct-parse.yy"
5977  { (yyval.tree_classdef_events_list_type) = new octave::tree_classdef_events_list ((yyvsp[0].tree_classdef_event_type)); }
5978 #line 5979 "libinterp/parse-tree/oct-parse.cc"
5979  break;
5980 
5981  case 260: /* events_list1: events_list1 opt_sep class_event */
5982 #line 2079 "../libinterp/parse-tree/oct-parse.yy"
5983  {
5984  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
5985 
5986  (yyvsp[-2].tree_classdef_events_list_type)->append ((yyvsp[0].tree_classdef_event_type));
5987  (yyval.tree_classdef_events_list_type) = (yyvsp[-2].tree_classdef_events_list_type);
5988  }
5989 #line 5990 "libinterp/parse-tree/oct-parse.cc"
5990  break;
5991 
5992  case 261: /* class_event: stash_comment identifier */
5993 #line 2088 "../libinterp/parse-tree/oct-parse.yy"
5994  { (yyval.tree_classdef_event_type) = new octave::tree_classdef_event ((yyvsp[0].tree_identifier_type), (yyvsp[-1].comment_type)); }
5995 #line 5996 "libinterp/parse-tree/oct-parse.cc"
5996  break;
5997 
5998  case 262: /* enum_block: ENUMERATION stash_comment opt_sep attr_list enum_list END */
5999 #line 2092 "../libinterp/parse-tree/oct-parse.yy"
6000  {
6001  OCTAVE_YYUSE ((yyvsp[-3].punct_type));
6002 
6003  octave::comment_list *lc = (yyvsp[-4].comment_type);
6004  octave::comment_list *tc = lexer.get_comment ();
6005 
6006  if (! ((yyval.tree_classdef_enum_block_type) = parser.make_classdef_enum_block
6007  ((yyvsp[-5].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), (yyvsp[-1].tree_classdef_enum_list_type), (yyvsp[0].tok_val), lc, tc)))
6008  {
6009  // make_classdef_enum_block deleted $4, $5, LC,
6010  // and TC.
6011  YYABORT;
6012  }
6013  }
6014 #line 6015 "libinterp/parse-tree/oct-parse.cc"
6015  break;
6016 
6017  case 263: /* enum_list: %empty */
6018 #line 2109 "../libinterp/parse-tree/oct-parse.yy"
6019  { (yyval.tree_classdef_enum_list_type) = nullptr; }
6020 #line 6021 "libinterp/parse-tree/oct-parse.cc"
6021  break;
6022 
6023  case 264: /* enum_list: enum_list1 opt_sep */
6024 #line 2111 "../libinterp/parse-tree/oct-parse.yy"
6025  {
6026  OCTAVE_YYUSE ((yyvsp[0].punct_type));
6027 
6028  (yyval.tree_classdef_enum_list_type) = (yyvsp[-1].tree_classdef_enum_list_type);
6029  }
6030 #line 6031 "libinterp/parse-tree/oct-parse.cc"
6031  break;
6032 
6033  case 265: /* enum_list1: class_enum */
6034 #line 2119 "../libinterp/parse-tree/oct-parse.yy"
6035  { (yyval.tree_classdef_enum_list_type) = new octave::tree_classdef_enum_list ((yyvsp[0].tree_classdef_enum_type)); }
6036 #line 6037 "libinterp/parse-tree/oct-parse.cc"
6037  break;
6038 
6039  case 266: /* enum_list1: enum_list1 opt_sep class_enum */
6040 #line 2121 "../libinterp/parse-tree/oct-parse.yy"
6041  {
6042  OCTAVE_YYUSE ((yyvsp[-1].punct_type));
6043 
6044  (yyvsp[-2].tree_classdef_enum_list_type)->append ((yyvsp[0].tree_classdef_enum_type));
6045  (yyval.tree_classdef_enum_list_type) = (yyvsp[-2].tree_classdef_enum_list_type);
6046  }
6047 #line 6048 "libinterp/parse-tree/oct-parse.cc"
6048  break;
6049 
6050  case 267: /* class_enum: stash_comment identifier '(' expression ')' */
6051 #line 2130 "../libinterp/parse-tree/oct-parse.yy"
6052  {
6053  OCTAVE_YYUSE ((yyvsp[-2].tok_val));
6054  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6055 
6056  (yyval.tree_classdef_enum_type) = new octave::tree_classdef_enum ((yyvsp[-3].tree_identifier_type), (yyvsp[-1].tree_expression_type), (yyvsp[-4].comment_type));
6057  }
6058 #line 6059 "libinterp/parse-tree/oct-parse.cc"
6059  break;
6060 
6061  case 268: /* stmt_begin: %empty */
6062 #line 2143 "../libinterp/parse-tree/oct-parse.yy"
6063  {
6064  (yyval.dummy_type) = 0;
6065  lexer.m_at_beginning_of_statement = true;
6066  }
6067 #line 6068 "libinterp/parse-tree/oct-parse.cc"
6068  break;
6069 
6070  case 269: /* anon_fcn_begin: %empty */
6071 #line 2150 "../libinterp/parse-tree/oct-parse.yy"
6072  {
6073  (yyval.dummy_type) = 0;
6074  lexer.m_at_beginning_of_statement = true;
6075  lexer.m_parsing_anon_fcn_body = true;
6076  }
6077 #line 6078 "libinterp/parse-tree/oct-parse.cc"
6078  break;
6079 
6080  case 270: /* stash_comment: %empty */
6081 #line 2158 "../libinterp/parse-tree/oct-parse.yy"
6082  { (yyval.comment_type) = lexer.get_comment (); }
6083 #line 6084 "libinterp/parse-tree/oct-parse.cc"
6084  break;
6085 
6086  case 271: /* parse_error: LEXICAL_ERROR */
6087 #line 2162 "../libinterp/parse-tree/oct-parse.yy"
6088  {
6089  (yyval.dummy_type) = 0;
6090  std::string msg = (yyvsp[0].tok_val)->text ();
6091  parser.bison_error (msg.c_str ());
6092  }
6093 #line 6094 "libinterp/parse-tree/oct-parse.cc"
6094  break;
6095 
6096  case 272: /* parse_error: error */
6097 #line 2168 "../libinterp/parse-tree/oct-parse.yy"
6098  { (yyval.dummy_type) = 0; }
6099 #line 6100 "libinterp/parse-tree/oct-parse.cc"
6100  break;
6101 
6102  case 273: /* sep_no_nl: ',' */
6103 #line 2172 "../libinterp/parse-tree/oct-parse.yy"
6104  {
6105  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6106 
6107  (yyval.punct_type) = ',';
6108  }
6109 #line 6110 "libinterp/parse-tree/oct-parse.cc"
6110  break;
6111 
6112  case 274: /* sep_no_nl: ';' */
6113 #line 2178 "../libinterp/parse-tree/oct-parse.yy"
6114  {
6115  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6116 
6117  (yyval.punct_type) = ';';
6118  }
6119 #line 6120 "libinterp/parse-tree/oct-parse.cc"
6120  break;
6121 
6122  case 275: /* sep_no_nl: sep_no_nl ',' */
6123 #line 2184 "../libinterp/parse-tree/oct-parse.yy"
6124  {
6125  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6126 
6127  (yyval.punct_type) = (yyvsp[-1].punct_type);
6128  }
6129 #line 6130 "libinterp/parse-tree/oct-parse.cc"
6130  break;
6131 
6132  case 276: /* sep_no_nl: sep_no_nl ';' */
6133 #line 2190 "../libinterp/parse-tree/oct-parse.yy"
6134  {
6135  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6136 
6137  (yyval.punct_type) = (yyvsp[-1].punct_type);
6138  }
6139 #line 6140 "libinterp/parse-tree/oct-parse.cc"
6140  break;
6141 
6142  case 277: /* opt_sep_no_nl: %empty */
6143 #line 2198 "../libinterp/parse-tree/oct-parse.yy"
6144  { (yyval.punct_type) = 0; }
6145 #line 6146 "libinterp/parse-tree/oct-parse.cc"
6146  break;
6147 
6148  case 278: /* opt_sep_no_nl: sep_no_nl */
6149 #line 2200 "../libinterp/parse-tree/oct-parse.yy"
6150  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6151 #line 6152 "libinterp/parse-tree/oct-parse.cc"
6152  break;
6153 
6154  case 279: /* opt_nl: %empty */
6155 #line 2204 "../libinterp/parse-tree/oct-parse.yy"
6156  { (yyval.punct_type) = 0; }
6157 #line 6158 "libinterp/parse-tree/oct-parse.cc"
6158  break;
6159 
6160  case 280: /* opt_nl: nl */
6161 #line 2206 "../libinterp/parse-tree/oct-parse.yy"
6162  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6163 #line 6164 "libinterp/parse-tree/oct-parse.cc"
6164  break;
6165 
6166  case 281: /* nl: '\n' */
6167 #line 2210 "../libinterp/parse-tree/oct-parse.yy"
6168  {
6169  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6170 
6171  (yyval.punct_type) = '\n';
6172  }
6173 #line 6174 "libinterp/parse-tree/oct-parse.cc"
6174  break;
6175 
6176  case 282: /* nl: nl '\n' */
6177 #line 2216 "../libinterp/parse-tree/oct-parse.yy"
6178  {
6179  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6180 
6181  (yyval.punct_type) = (yyvsp[-1].punct_type);
6182  }
6183 #line 6184 "libinterp/parse-tree/oct-parse.cc"
6184  break;
6185 
6186  case 283: /* sep: ',' */
6187 #line 2224 "../libinterp/parse-tree/oct-parse.yy"
6188  {
6189  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6190 
6191  (yyval.punct_type) = ',';
6192  }
6193 #line 6194 "libinterp/parse-tree/oct-parse.cc"
6194  break;
6195 
6196  case 284: /* sep: ';' */
6197 #line 2230 "../libinterp/parse-tree/oct-parse.yy"
6198  {
6199  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6200 
6201  (yyval.punct_type) = ';';
6202  }
6203 #line 6204 "libinterp/parse-tree/oct-parse.cc"
6204  break;
6205 
6206  case 285: /* sep: '\n' */
6207 #line 2236 "../libinterp/parse-tree/oct-parse.yy"
6208  {
6209  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6210 
6211  (yyval.punct_type) = '\n';
6212  }
6213 #line 6214 "libinterp/parse-tree/oct-parse.cc"
6214  break;
6215 
6216  case 286: /* sep: sep ',' */
6217 #line 2242 "../libinterp/parse-tree/oct-parse.yy"
6218  {
6219  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6220 
6221  (yyval.punct_type) = (yyvsp[-1].punct_type);
6222  }
6223 #line 6224 "libinterp/parse-tree/oct-parse.cc"
6224  break;
6225 
6226  case 287: /* sep: sep ';' */
6227 #line 2248 "../libinterp/parse-tree/oct-parse.yy"
6228  {
6229  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6230 
6231  (yyval.punct_type) = (yyvsp[-1].punct_type);
6232  }
6233 #line 6234 "libinterp/parse-tree/oct-parse.cc"
6234  break;
6235 
6236  case 288: /* sep: sep '\n' */
6237 #line 2254 "../libinterp/parse-tree/oct-parse.yy"
6238  {
6239  OCTAVE_YYUSE ((yyvsp[0].tok_val));
6240 
6241  (yyval.punct_type) = (yyvsp[-1].punct_type);
6242  }
6243 #line 6244 "libinterp/parse-tree/oct-parse.cc"
6244  break;
6245 
6246  case 289: /* opt_sep: %empty */
6247 #line 2262 "../libinterp/parse-tree/oct-parse.yy"
6248  { (yyval.punct_type) = 0; }
6249 #line 6250 "libinterp/parse-tree/oct-parse.cc"
6250  break;
6251 
6252  case 290: /* opt_sep: sep */
6253 #line 2264 "../libinterp/parse-tree/oct-parse.yy"
6254  { (yyval.punct_type) = (yyvsp[0].punct_type); }
6255 #line 6256 "libinterp/parse-tree/oct-parse.cc"
6256  break;
6257 
6258 
6259 #line 6260 "libinterp/parse-tree/oct-parse.cc"
6260 
6261  default: break;
6262  }
6263  /* User semantic actions sometimes alter yychar, and that requires
6264  that yytoken be updated with the new translation. We take the
6265  approach of translating immediately before every use of yytoken.
6266  One alternative is translating here after every semantic action,
6267  but that translation would be missed if the semantic action invokes
6268  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
6269  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
6270  incorrect destructor might then be invoked immediately. In the
6271  case of YYERROR or YYBACKUP, subsequent parser actions might lead
6272  to an incorrect destructor call or verbose syntax error message
6273  before the lookahead is translated. */
6274  YY_SYMBOL_PRINT ("-> $$ =", YY_CAST (yysymbol_kind_t, yyr1[yyn]), &yyval, &yyloc);
6275 
6276  YYPOPSTACK (yylen);
6277  yylen = 0;
6278 
6279  *++yyvsp = yyval;
6280 
6281  /* Now 'shift' the result of the reduction. Determine what state
6282  that goes to, based on the state we popped back to and the rule
6283  number reduced by. */
6284  {
6285  const int yylhs = yyr1[yyn] - YYNTOKENS;
6286  const int yyi = yypgoto[yylhs] + *yyssp;
6287  yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
6288  ? yytable[yyi]
6289  : yydefgoto[yylhs]);
6290  }
6291 
6292  goto yynewstate;
6293 
6294 
6295 /*--------------------------------------.
6296 | yyerrlab -- here on detecting error. |
6297 `--------------------------------------*/
6298 yyerrlab:
6299  /* Make sure we have latest lookahead translation. See comments at
6300  user semantic actions for why this is necessary. */
6301  yytoken = yychar == OCTAVE_EMPTY ? YYSYMBOL_YYEMPTY : YYTRANSLATE (yychar);
6302  /* If not already recovering from an error, report this error. */
6303  if (!yyerrstatus)
6304  {
6305  ++yynerrs;
6306  yyerror (parser, YY_("syntax error"));
6307  }
6308 
6309  if (yyerrstatus == 3)
6310  {
6311  /* If just tried and failed to reuse lookahead token after an
6312  error, discard it. */
6313 
6314  if (yychar <= OCTAVE_EOF)
6315  {
6316  /* Return failure if at end of input. */
6317  if (yychar == OCTAVE_EOF)
6318  YYABORT;
6319  }
6320  else
6321  {
6322  yydestruct ("Error: discarding",
6323  yytoken, &yylval, parser);
6324  yychar = OCTAVE_EMPTY;
6325  }
6326  }
6327 
6328  /* Else will try to reuse lookahead token after shifting the error
6329  token. */
6330  goto yyerrlab1;
6331 
6332 
6333 /*---------------------------------------------------.
6334 | yyerrorlab -- error raised explicitly by YYERROR. |
6335 `---------------------------------------------------*/
6336 yyerrorlab:
6337  /* Pacify compilers when the user code never invokes YYERROR and the
6338  label yyerrorlab therefore never appears in user code. */
6339  if (0)
6340  YYERROR;
6341 
6342  /* Do not reclaim the symbols of the rule whose action triggered
6343  this YYERROR. */
6344  YYPOPSTACK (yylen);
6345  yylen = 0;
6347  yystate = *yyssp;
6348  goto yyerrlab1;
6349 
6350 
6351 /*-------------------------------------------------------------.
6352 | yyerrlab1 -- common code for both syntax error and YYERROR. |
6353 `-------------------------------------------------------------*/
6354 yyerrlab1:
6355  yyerrstatus = 3; /* Each real token shifted decrements this. */
6356 
6357  /* Pop stack until we find a state that shifts the error token. */
6358  for (;;)
6359  {
6360  yyn = yypact[yystate];
6361  if (!yypact_value_is_default (yyn))
6362  {
6363  yyn += YYSYMBOL_YYerror;
6364  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYSYMBOL_YYerror)
6365  {
6366  yyn = yytable[yyn];
6367  if (0 < yyn)
6368  break;
6369  }
6370  }
6371 
6372  /* Pop the current state because it cannot handle the error token. */
6373  if (yyssp == yyss)
6374  YYABORT;
6375 
6376 
6377  yydestruct ("Error: popping",
6378  YY_ACCESSING_SYMBOL (yystate), yyvsp, parser);
6379  YYPOPSTACK (1);
6380  yystate = *yyssp;
6382  }
6383 
6385  *++yyvsp = yylval;
6387 
6388 
6389  /* Shift the error token. */
6390  YY_SYMBOL_PRINT ("Shifting", YY_ACCESSING_SYMBOL (yyn), yyvsp, yylsp);
6391 
6392  yystate = yyn;
6393  goto yynewstate;
6394 
6395 
6396 /*-------------------------------------.
6397 | yyacceptlab -- YYACCEPT comes here. |
6398 `-------------------------------------*/
6399 yyacceptlab:
6400  yyresult = 0;
6401  goto yyreturn;
6402 
6403 
6404 /*-----------------------------------.
6405 | yyabortlab -- YYABORT comes here. |
6406 `-----------------------------------*/
6407 yyabortlab:
6408  yyresult = 1;
6409  goto yyreturn;
6410 
6411 
6412 #if !defined yyoverflow
6413 /*-------------------------------------------------.
6414 | yyexhaustedlab -- memory exhaustion comes here. |
6415 `-------------------------------------------------*/
6416 yyexhaustedlab:
6417  yyerror (parser, YY_("memory exhausted"));
6418  yyresult = 2;
6419  goto yyreturn;
6420 #endif
6421 
6422 
6423 /*-------------------------------------------------------.
6424 | yyreturn -- parsing is finished, clean up and return. |
6425 `-------------------------------------------------------*/
6426 yyreturn:
6427  if (yychar != OCTAVE_EMPTY)
6428  {
6429  /* Make sure we have latest lookahead translation. See comments at
6430  user semantic actions for why this is necessary. */
6431  yytoken = YYTRANSLATE (yychar);
6432  yydestruct ("Cleanup: discarding lookahead",
6433  yytoken, &yylval, parser);
6434  }
6435  /* Do not reclaim the symbols of the rule whose action triggered
6436  this YYABORT or YYACCEPT. */
6437  YYPOPSTACK (yylen);
6439  while (yyssp != yyss)
6440  {
6441  yydestruct ("Cleanup: popping",
6442  YY_ACCESSING_SYMBOL (+*yyssp), yyvsp, parser);
6443  YYPOPSTACK (1);
6444  }
6445  yyps->yynew = 2;
6446  goto yypushreturn;
6447 
6448 
6449 /*-------------------------.
6450 | yypushreturn -- return. |
6451 `-------------------------*/
6452 yypushreturn:
6453 
6454  return yyresult;
6455 }
6456 #undef octave_nerrs
6457 #undef yystate
6458 #undef yyerrstatus
6459 #undef yyssa
6460 #undef yyss
6461 #undef yyssp
6462 #undef yyvsa
6463 #undef yyvs
6464 #undef yyvsp
6465 #undef yystacksize
6466 #line 2267 "../libinterp/parse-tree/oct-parse.yy"
6467 
6468 
6469 #if defined (HAVE_PRAGMA_GCC_DIAGNOSTIC)
6470  // Restore prevailing warning state for remainder of the file.
6471 # pragma GCC diagnostic pop
6472 #endif
6473 
6474 // Generic error messages.
6475 
6476 #undef lexer
6477 #undef scanner
6478 
6479 static void
6480 yyerror (octave::base_parser& parser, const char *s)
6481 {
6482  parser.bison_error (s);
6483 }
6484 
6485 namespace octave
6486 {
6487  size_t
6489  {
6490  return m_info.size ();
6491  }
6492 
6493  void
6495  {
6496  m_info.push_back (elt);
6497  }
6498 
6499  void
6501  {
6502  push (value_type (scope, ""));
6503  }
6504 
6505  void
6507  {
6508  m_info.pop_back ();
6509  }
6510 
6511  bool
6513  {
6514  // Name can't be the same as any parent function or any other
6515  // function we've already seen. We could maintain a complex
6516  // tree structure of names, or we can just store the set of
6517  // full names of all the functions, which must be unique.
6518 
6519  std::string full_name;
6520 
6521  for (size_t i = 0; i < size()-1; i++)
6522  {
6523  const value_type& elt = m_info[i];
6524 
6525  if (name == elt.second)
6526  return false;
6527 
6528  full_name += elt.second + ">";
6529  }
6530 
6531  full_name += name;
6532 
6533  if (m_all_names.find (full_name) != m_all_names.end ())
6534  {
6535  // Return false (failure) if we are parsing a subfunction, local
6536  // function, or nested function. Otherwise, it is OK to have a
6537  // duplicate name.
6538 
6539  return ! (m_parser.parsing_subfunctions ()
6540  || m_parser.parsing_local_functions ()
6541  || m_parser.curr_fcn_depth () > 0);
6542  }
6543 
6544  m_all_names.insert (full_name);
6545 
6546  return true;
6547  }
6548 
6549  bool
6551  {
6552  if (! name_ok (name))
6553  return false;
6554 
6555  if (size () > 0)
6556  m_info.back().second = name;
6557 
6558  return true;
6559  }
6560 
6561  symbol_scope
6563  {
6564  return size () > 1 ? m_info[size()-2].first : symbol_scope ();
6565  }
6566 
6567  std::string
6569  {
6570  return m_info[size()-2].second;
6571  }
6572 
6574  {
6575  m_info.clear ();
6576  m_all_names.clear ();
6577  }
6578 
6580  : m_endfunction_found (false), m_autoloading (false),
6587  { }
6588 
6590  {
6591  delete &m_lexer;
6592 
6593  // FIXME: Deleting the internal Bison parser state structure does
6594  // not clean up any partial parse trees in the event of an interrupt or
6595  // error. It's not clear how to safely do that with the C language
6596  // parser that Bison generates. The C++ language parser that Bison
6597  // generates would do it for us automatically whenever an exception
6598  // is thrown while parsing input, but there is currently no C++
6599  // interface for a push parser.
6600 
6601  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6602  }
6603 
6604  void
6606  {
6607  m_endfunction_found = false;
6608  m_autoloading = false;
6610  m_parsing_subfunctions = false;
6611  m_parsing_local_functions = false;
6612  m_max_fcn_depth = -1;
6613  m_curr_fcn_depth = -1;
6615  m_curr_class_name = "";
6616  m_curr_package_name = "";
6619  m_subfunction_names.clear ();
6620  m_classdef_object.reset ();
6621  m_stmt_list.reset ();
6622 
6623  m_lexer.reset ();
6624 
6625  yypstate_delete (static_cast<yypstate *> (m_parser_state));
6627  }
6628 
6629  // Error messages for mismatched end tokens.
6630 
6631  static std::string
6633  {
6634  std::string retval = "<unknown>";
6635 
6636  switch (ettype)
6637  {
6638  case token::simple_end:
6639  retval = "end";
6640  break;
6641 
6642  case token::classdef_end:
6643  retval = "endclassdef";
6644  break;
6645 
6647  retval = "endenumeration";
6648  break;
6649 
6650  case token::events_end:
6651  retval = "endevents";
6652  break;
6653 
6654  case token::for_end:
6655  retval = "endfor";
6656  break;
6657 
6658  case token::function_end:
6659  retval = "endfunction";
6660  break;
6661 
6662  case token::if_end:
6663  retval = "endif";
6664  break;
6665 
6666  case token::methods_end:
6667  retval = "endmethods";
6668  break;
6669 
6670  case token::parfor_end:
6671  retval = "endparfor";
6672  break;
6673 
6674  case token::properties_end:
6675  retval = "endproperties";
6676  break;
6677 
6678  case token::switch_end:
6679  retval = "endswitch";
6680  break;
6681 
6682  case token::try_catch_end:
6683  retval = "end_try_catch";
6684  break;
6685 
6687  retval = "end_unwind_protect";
6688  break;
6689 
6690  case token::while_end:
6691  retval = "endwhile";
6692  break;
6693 
6694  default:
6695  panic_impossible ();
6696  break;
6697  }
6698 
6699  return retval;
6700  }
6701 
6702  void
6703  base_parser::statement_list (std::shared_ptr<tree_statement_list>& lst)
6704  {
6705  if (! lst)
6706  return;
6707 
6708  if (m_stmt_list)
6709  {
6710  // Append additional code to existing statement list.
6711 
6712  while (! lst->empty ())
6713  {
6714  m_stmt_list->push_back (lst->front ());
6715  lst->pop_front ();
6716  }
6717  }
6718  else
6719  m_stmt_list = lst;
6720  }
6721 
6722  void
6724  {
6725  std::string msg = ("'" + end_token_as_string (expected)
6726  + "' command matched by '"
6727  + end_token_as_string (tok->ettype ()) + "'");
6728 
6729  bison_error (msg, tok->beg_pos ());
6730  }
6731 
6732  // Check to see that end tokens are properly matched.
6733 
6734  bool
6736  {
6737  token::end_tok_type ettype = tok->ettype ();
6738 
6739  return ettype == expected || ettype == token::simple_end;
6740  }
6741 
6742  bool
6744  {
6745  m_curr_fcn_depth++;
6746 
6749 
6750  // Will get a real name later.
6751  m_lexer.m_symtab_context.push (octave::symbol_scope ("parser:push_fcn_symtab"));
6753 
6756  {
6759  }
6760 
6762  {
6763  bison_error ("nested functions not implemented in this context");
6764 
6765  return false;
6766  }
6767 
6768  return true;
6769  }
6770 
6771  // Make a constant.
6772 
6773  tree_constant *
6775  {
6776  int l = tok_val->line ();
6777  int c = tok_val->column ();
6778 
6779  tree_constant *retval = nullptr;
6780 
6781  switch (op)
6782  {
6783  case NUM:
6784  {
6785  octave_value tmp (tok_val->number ());
6786  retval = new tree_constant (tmp, l, c);
6787  retval->stash_original_text (tok_val->text_rep ());
6788  }
6789  break;
6790 
6791  case IMAG_NUM:
6792  {
6793  octave_value tmp (Complex (0.0, tok_val->number ()));
6794  retval = new tree_constant (tmp, l, c);
6795  retval->stash_original_text (tok_val->text_rep ());
6796  }
6797  break;
6798 
6799  case DQ_STRING:
6800  case SQ_STRING:
6801  {
6802  std::string txt = tok_val->text ();
6803 
6804  char delim = op == DQ_STRING ? '"' : '\'';
6805  octave_value tmp (txt, delim);
6806 
6807  if (txt.empty ())
6808  {
6809  if (op == DQ_STRING)
6811  else
6813  }
6814 
6815  retval = new tree_constant (tmp, l, c);
6816 
6817  if (op == DQ_STRING)
6818  txt = undo_string_escapes (txt);
6819 
6820  // FIXME: maybe this should also be handled by
6821  // tok_val->text_rep () for character strings?
6822  retval->stash_original_text (delim + txt + delim);
6823  }
6824  break;
6825 
6826  default:
6827  panic_impossible ();
6828  break;
6829  }
6830 
6831  return retval;
6832  }
6833 
6834  // Make a function handle.
6835 
6836  tree_fcn_handle *
6838  {
6839  int l = tok_val->line ();
6840  int c = tok_val->column ();
6841 
6842  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
6843 
6844  return retval;
6845  }
6846 
6847  // Make an anonymous function handle.
6848 
6851  tree_expression *expr,
6852  const filepos& at_pos)
6853  {
6854  // FIXME: We need to examine EXPR and issue an error if any
6855  // sub-expression contains an assignment, compound assignment,
6856  // increment, or decrement operator.
6857 
6858  anon_fcn_validator validator (param_list, expr);
6859 
6860  if (! validator.ok ())
6861  {
6862  delete param_list;
6863  delete expr;
6864 
6865  bison_error (validator.message (), validator.line (),
6866  validator.column ());
6867 
6868  return nullptr;
6869  }
6870 
6873 
6875 
6876  expr->set_print_flag (false);
6877 
6878  fcn_scope.mark_static ();
6879 
6880  int at_line = at_pos.line ();
6881  int at_column = at_pos.column ();
6882 
6884  = new tree_anon_fcn_handle (param_list, expr, fcn_scope,
6885  parent_scope, at_line, at_column);
6886 
6887  std::ostringstream buf;
6888 
6889  tree_print_code tpc (buf);
6890 
6891  retval->accept (tpc);
6892 
6893  std::string file = m_lexer.m_fcn_file_full_name;
6894  if (! file.empty ())
6895  buf << ": file: " << file;
6896  else if (m_lexer.input_from_terminal ())
6897  buf << ": *terminal input*";
6898  else if (m_lexer.input_from_eval_string ())
6899  buf << ": *eval string*";
6900  buf << ": line: " << at_line << " column: " << at_column;
6901 
6902  std::string scope_name = buf.str ();
6903 
6904  fcn_scope.cache_name (scope_name);
6905 
6906  // FIXME: Stash the filename. This does not work and produces
6907  // errors when executed.
6908  //retval->stash_file_name (m_lexer.m_fcn_file_name);
6909 
6910  return retval;
6911  }
6912 
6913  // Build a colon expression.
6914 
6915  tree_expression *
6917  tree_expression *limit,
6918  tree_expression *incr)
6919  {
6920  tree_expression *retval = nullptr;
6921 
6922  if (! base || ! limit)
6923  {
6924  delete base;
6925  delete limit;
6926  delete incr;
6927 
6928  return retval;
6929  }
6930 
6931  int l = base->line ();
6932  int c = base->column ();
6933 
6934  tree_colon_expression *expr
6935  = new tree_colon_expression (base, limit, incr, l, c);
6936 
6937  retval = expr;
6938 
6939  if (base->is_constant () && limit->is_constant ()
6940  && (! incr || incr->is_constant ()))
6941  {
6942  interpreter& interp = __get_interpreter__ ("finish_colon_expression");
6943 
6944  try
6945  {
6946  // If the evaluation generates a warning message, restore
6947  // the previous value of last_warning_message and skip the
6948  // conversion to a constant value.
6949 
6950  unwind_protect frame;
6951 
6952  error_system& es = interp.get_error_system ();
6953 
6955  es.last_warning_message (""));
6956 
6958  es.discard_warning_messages (true));
6959 
6960  tree_evaluator& tw = interp.get_evaluator ();
6961 
6962  octave_value tmp = expr->evaluate (tw);
6963 
6964  std::string msg = es.last_warning_message ();
6965 
6966  if (msg.empty ())
6967  {
6968  tree_constant *tc_retval
6969  = new tree_constant (tmp, expr->line (), expr->column ());
6970 
6971  std::ostringstream buf;
6972 
6973  tree_print_code tpc (buf);
6974 
6975  expr->accept (tpc);
6976 
6977  tc_retval->stash_original_text (buf.str ());
6978 
6979  delete expr;
6980 
6981  retval = tc_retval;
6982  }
6983  }
6984  catch (const execution_exception&)
6985  {
6986  interp.recover_from_exception ();
6987  }
6988  }
6989 
6990  return retval;
6991  }
6992 
6993  // Build a binary expression.
6994 
6995  tree_expression *
6997  token *tok_val, tree_expression *op2)
6998  {
7000 
7001  switch (op)
7002  {
7003  case POW:
7005  break;
7006 
7007  case EPOW:
7009  break;
7010 
7011  case '+':
7013  break;
7014 
7015  case '-':
7017  break;
7018 
7019  case '*':
7021  break;
7022 
7023  case '/':
7025  break;
7026 
7027  case EMUL:
7029  break;
7030 
7031  case EDIV:
7033  break;
7034 
7035  case LEFTDIV:
7037  break;
7038 
7039  case ELEFTDIV:
7041  break;
7042 
7043  case EXPR_LT:
7044  t = octave_value::op_lt;
7045  break;
7046 
7047  case EXPR_LE:
7048  t = octave_value::op_le;
7049  break;
7050 
7051  case EXPR_EQ:
7052  t = octave_value::op_eq;
7053  break;
7054 
7055  case EXPR_GE:
7056  t = octave_value::op_ge;
7057  break;
7058 
7059  case EXPR_GT:
7060  t = octave_value::op_gt;
7061  break;
7062 
7063  case EXPR_NE:
7064  t = octave_value::op_ne;
7065  break;
7066 
7067  case EXPR_AND:
7069  break;
7070 
7071  case EXPR_OR:
7073  break;
7074 
7075  default:
7076  panic_impossible ();
7077  break;
7078  }
7079 
7080  int l = tok_val->line ();
7081  int c = tok_val->column ();
7082 
7083  return maybe_compound_binary_expression (op1, op2, l, c, t);
7084  }
7085 
7086  // Build a boolean expression.
7087 
7088  tree_expression *
7090  token *tok_val, tree_expression *op2)
7091  {
7093 
7094  switch (op)
7095  {
7096  case EXPR_AND_AND:
7098  break;
7099 
7100  case EXPR_OR_OR:
7102  break;
7103 
7104  default:
7105  panic_impossible ();
7106  break;
7107  }
7108 
7109  int l = tok_val->line ();
7110  int c = tok_val->column ();
7111 
7112  return new tree_boolean_expression (op1, op2, l, c, t);
7113  }
7114 
7115  // Build a prefix expression.
7116 
7117  tree_expression *
7119  {
7121 
7122  switch (op)
7123  {
7124  case EXPR_NOT:
7126  break;
7127 
7128  case '+':
7130  break;
7131 
7132  case '-':
7134  break;
7135 
7136  case PLUS_PLUS:
7138  break;
7139 
7140  case MINUS_MINUS:
7142  break;
7143 
7144  default:
7145  panic_impossible ();
7146  break;
7147  }
7148 
7149  int l = tok_val->line ();
7150  int c = tok_val->column ();
7151 
7152  return new tree_prefix_expression (op1, l, c, t);
7153  }
7154 
7155  // Build a postfix expression.
7156 
7157  tree_expression *
7159  {
7161 
7162  switch (op)
7163  {
7164  case HERMITIAN:
7166  break;
7167 
7168  case TRANSPOSE:
7170  break;
7171 
7172  case PLUS_PLUS:
7174  break;
7175 
7176  case MINUS_MINUS:
7178  break;
7179 
7180  default:
7181  panic_impossible ();
7182  break;
7183  }
7184 
7185  int l = tok_val->line ();
7186  int c = tok_val->column ();
7187 
7188  return new tree_postfix_expression (op1, l, c, t);
7189  }
7190 
7191  // Build an unwind-protect command.
7192 
7193  tree_command *
7195  tree_statement_list *body,
7196  tree_statement_list *cleanup_stmts,
7197  token *end_tok,
7198  comment_list *lc,
7199  comment_list *mc)
7200  {
7201  tree_command *retval = nullptr;
7202 
7203  if (end_token_ok (end_tok, token::unwind_protect_end))
7204  {
7206 
7207  int l = unwind_tok->line ();
7208  int c = unwind_tok->column ();
7209 
7210  retval = new tree_unwind_protect_command (body, cleanup_stmts,
7211  lc, mc, tc, l, c);
7212  }
7213  else
7214  {
7215  delete body;
7216  delete cleanup_stmts;
7217 
7219  }
7220 
7221  return retval;
7222  }
7223 
7224  // Build a try-catch command.
7225 
7226  tree_command *
7228  tree_statement_list *body,
7229  char catch_sep,
7230  tree_statement_list *cleanup_stmts,
7231  token *end_tok,
7232  comment_list *lc,
7233  comment_list *mc)
7234  {
7235  tree_command *retval = nullptr;
7236 
7237  if (end_token_ok (end_tok, token::try_catch_end))
7238  {
7240 
7241  int l = try_tok->line ();
7242  int c = try_tok->column ();
7243 
7244  tree_identifier *id = nullptr;
7245 
7246  if (! catch_sep && cleanup_stmts && ! cleanup_stmts->empty ())
7247  {
7248  tree_statement *stmt = cleanup_stmts->front ();
7249 
7250  if (stmt)
7251  {
7252  tree_expression *expr = stmt->expression ();
7253 
7254  if (expr && expr->is_identifier ())
7255  {
7256  id = dynamic_cast<tree_identifier *> (expr);
7257 
7258  cleanup_stmts->pop_front ();
7259 
7260  stmt->set_expression (nullptr);
7261  delete stmt;
7262  }
7263  }
7264  }
7265 
7266  retval = new tree_try_catch_command (body, cleanup_stmts, id,
7267  lc, mc, tc, l, c);
7268  }
7269  else
7270  {
7271  delete body;
7272  delete cleanup_stmts;
7273 
7275  }
7276 
7277  return retval;
7278  }
7279 
7280  // Build a while command.
7281 
7282  tree_command *
7284  tree_expression *expr,
7285  tree_statement_list *body,
7286  token *end_tok,
7287  comment_list *lc)
7288  {
7289  tree_command *retval = nullptr;
7290 
7292 
7293  if (end_token_ok (end_tok, token::while_end))
7294  {
7296 
7297  m_lexer.m_looping--;
7298 
7299  int l = while_tok->line ();
7300  int c = while_tok->column ();
7301 
7302  retval = new tree_while_command (expr, body, lc, tc, l, c);
7303  }
7304  else
7305  {
7306  delete expr;
7307  delete body;
7308 
7309  end_token_error (end_tok, token::while_end);
7310  }
7311 
7312  return retval;
7313  }
7314 
7315  // Build a do-until command.
7316 
7317  tree_command *
7319  tree_statement_list *body,
7320  tree_expression *expr,
7321  comment_list *lc)
7322  {
7324 
7326 
7327  m_lexer.m_looping--;
7328 
7329  int l = until_tok->line ();
7330  int c = until_tok->column ();
7331 
7332  return new tree_do_until_command (expr, body, lc, tc, l, c);
7333  }
7334 
7335  // Build a for command.
7336 
7337  tree_command *
7338  base_parser::make_for_command (int tok_id, token *for_tok,
7339  tree_argument_list *lhs,
7340  tree_expression *expr,
7341  tree_expression *maxproc,
7342  tree_statement_list *body,
7343  token *end_tok,
7344  comment_list *lc)
7345  {
7346  tree_command *retval = nullptr;
7347 
7348  bool parfor = tok_id == PARFOR;
7349 
7350  if (end_token_ok (end_tok, parfor ? token::parfor_end : token::for_end))
7351  {
7352  expr->mark_as_for_cmd_expr ();
7353 
7355 
7356  m_lexer.m_looping--;
7357 
7358  int l = for_tok->line ();
7359  int c = for_tok->column ();
7360 
7361  if (lhs->length () == 1)
7362  {
7363  tree_expression *tmp = lhs->remove_front ();
7364 
7365  retval = new tree_simple_for_command (parfor, tmp, expr, maxproc,
7366  body, lc, tc, l, c);
7367 
7368  delete lhs;
7369  }
7370  else
7371  {
7372  if (parfor)
7373  {
7374  delete lhs;
7375  delete expr;
7376  delete maxproc;
7377  delete body;
7378 
7379  bison_error ("invalid syntax for parfor statement");
7380  }
7381  else
7382  retval = new tree_complex_for_command (lhs, expr, body,
7383  lc, tc, l, c);
7384  }
7385  }
7386  else
7387  {
7388  delete lhs;
7389  delete expr;
7390  delete maxproc;
7391  delete body;
7392 
7393  end_token_error (end_tok, parfor ? token::parfor_end : token::for_end);
7394  }
7395 
7396  return retval;
7397  }
7398 
7399  // Build a break command.
7400 
7401  tree_command *
7403  {
7404  int l = break_tok->line ();
7405  int c = break_tok->column ();
7406 
7407  if (! m_lexer.m_looping)
7408  {
7409  bison_error ("break must appear within a loop");
7410  return nullptr;
7411  }
7412  else
7413  return new tree_break_command (l, c);
7414  }
7415 
7416  // Build a continue command.
7417 
7418  tree_command *
7420  {
7421  int l = continue_tok->line ();
7422  int c = continue_tok->column ();
7423 
7424  if (! m_lexer.m_looping)
7425  {
7426  bison_error ("continue must appear within a loop");
7427  return nullptr;
7428  }
7429  else
7430  return new tree_continue_command (l, c);
7431  }
7432 
7433  // Build a return command.
7434 
7435  tree_command *
7437  {
7438  int l = return_tok->line ();
7439  int c = return_tok->column ();
7440 
7441  return new tree_return_command (l, c);
7442  }
7443 
7444  // Start an if command.
7445 
7448  tree_statement_list *list)
7449  {
7451 
7452  tree_if_clause *t = new tree_if_clause (expr, list);
7453 
7454  return new tree_if_command_list (t);
7455  }
7456 
7457  // Finish an if command.
7458 
7459  tree_if_command *
7461  tree_if_command_list *list,
7462  token *end_tok,
7463  comment_list *lc)
7464  {
7465  tree_if_command *retval = nullptr;
7466 
7467  if (end_token_ok (end_tok, token::if_end))
7468  {
7470 
7471  int l = if_tok->line ();
7472  int c = if_tok->column ();
7473 
7474  if (list && ! list->empty ())
7475  {
7476  tree_if_clause *elt = list->front ();
7477 
7478  if (elt)
7479  {
7480  elt->line (l);
7481  elt->column (c);
7482  }
7483  }
7484 
7485  retval = new tree_if_command (list, lc, tc, l, c);
7486  }
7487  else
7488  {
7489  delete list;
7490 
7491  end_token_error (end_tok, token::if_end);
7492  }
7493 
7494  return retval;
7495  }
7496 
7497  // Build an elseif clause.
7498 
7499  tree_if_clause *
7501  tree_expression *expr,
7502  tree_statement_list *list,
7503  comment_list *lc)
7504  {
7506 
7507  int l = elseif_tok->line ();
7508  int c = elseif_tok->column ();
7509 
7510  return new tree_if_clause (expr, list, lc, l, c);
7511  }
7512 
7513  // Finish a switch command.
7514 
7517  tree_expression *expr,
7518  tree_switch_case_list *list,
7519  token *end_tok,
7520  comment_list *lc)
7521  {
7522  tree_switch_command *retval = nullptr;
7523 
7524  if (end_token_ok (end_tok, token::switch_end))
7525  {
7527 
7528  int l = switch_tok->line ();
7529  int c = switch_tok->column ();
7530 
7531  if (list && ! list->empty ())
7532  {
7533  tree_switch_case *elt = list->front ();
7534 
7535  if (elt)
7536  {
7537  elt->line (l);
7538  elt->column (c);
7539  }
7540  }
7541 
7542  retval = new tree_switch_command (expr, list, lc, tc, l, c);
7543  }
7544  else
7545  {
7546  delete expr;
7547  delete list;
7548 
7550  }
7551 
7552  return retval;
7553  }
7554 
7555  // Build a switch case.
7556 
7559  tree_expression *expr,
7560  tree_statement_list *list,
7561  comment_list *lc)
7562  {
7564 
7565  int l = case_tok->line ();
7566  int c = case_tok->column ();
7567 
7568  return new tree_switch_case (expr, list, lc, l, c);
7569  }
7570 
7571  // Build an assignment to a variable.
7572 
7573  tree_expression *
7575  token *eq_tok, tree_expression *rhs)
7576  {
7578 
7579  switch (op)
7580  {
7581  case '=':
7583  break;
7584 
7585  case ADD_EQ:
7587  break;
7588 
7589  case SUB_EQ:
7591  break;
7592 
7593  case MUL_EQ:
7595  break;
7596 
7597  case DIV_EQ:
7599  break;
7600 
7601  case LEFTDIV_EQ:
7603  break;
7604 
7605  case POW_EQ:
7607  break;
7608 
7609  case EMUL_EQ:
7611  break;
7612 
7613  case EDIV_EQ:
7615  break;
7616 
7617  case ELEFTDIV_EQ:
7619  break;
7620 
7621  case EPOW_EQ:
7623  break;
7624 
7625  case AND_EQ:
7627  break;
7628 
7629  case OR_EQ:
7631  break;
7632 
7633  default:
7634  panic_impossible ();
7635  break;
7636  }
7637 
7638  int l = eq_tok->line ();
7639  int c = eq_tok->column ();
7640 
7641  if (! lhs->is_simple_assign_lhs () && t != octave_value::op_asn_eq)
7642  {
7643  // Multiple assignments like [x,y] OP= rhs are only valid for
7644  // '=', not '+=', etc.
7645 
7646  delete lhs;
7647  delete rhs;
7648 
7649  bison_error ("computed multiple assignment not allowed",
7650  eq_tok->beg_pos ());
7651 
7652  return nullptr;
7653  }
7654 
7655  if (lhs->is_simple_assign_lhs ())
7656  {
7657  // We are looking at a simple assignment statement like x = rhs;
7658 
7659  tree_expression *tmp = lhs->remove_front ();
7660 
7661  if ((tmp->is_identifier () || tmp->is_index_expression ())
7662  && iskeyword (tmp->name ()))
7663  {
7664  std::string kw = tmp->name ();
7665 
7666  delete tmp;
7667  delete lhs;
7668  delete rhs;
7669 
7670  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7671  eq_tok->beg_pos ());
7672 
7673  return nullptr;
7674  }
7675 
7676  delete lhs;
7677 
7678  return new tree_simple_assignment (tmp, rhs, false, l, c, t);
7679  }
7680  else
7681  {
7682  std::list<std::string> names = lhs->variable_names ();
7683 
7684  for (const auto& kw : names)
7685  {
7686  if (iskeyword (kw))
7687  {
7688  delete lhs;
7689  delete rhs;
7690 
7691  bison_error ("invalid assignment to keyword \"" + kw + "\"",
7692  eq_tok->beg_pos ());
7693 
7694  return nullptr;
7695  }
7696  }
7697 
7698  return new tree_multi_assignment (lhs, rhs, false, l, c);
7699  }
7700  }
7701 
7702  // Define a script.
7703 
7704  void
7706  tree_statement *end_script)
7707  {
7708  if (! cmds)
7709  cmds = new tree_statement_list ();
7710 
7711  cmds->append (end_script);
7712 
7713  symbol_scope script_scope = m_lexer.m_symtab_context.curr_scope ();
7714 
7715  script_scope.cache_name (m_lexer.m_fcn_file_full_name);
7717  script_scope.cache_dir_name (m_lexer.m_dir_name);
7718 
7719  octave_user_script *script
7721  m_lexer.m_fcn_file_name, script_scope,
7722  cmds, m_lexer.m_help_text);
7723 
7725  m_lexer.m_help_text = "";
7726 
7727  sys::time now;
7728 
7729  script->stash_fcn_file_time (now);
7730  script->stash_dir_name (m_lexer.m_dir_name);
7731 
7732  m_primary_fcn = octave_value (script);
7733  }
7734 
7735  tree_identifier *
7737  {
7738  std::string id_name = id->name ();
7739 
7740  // Make classdef local functions unique from classdef methods.
7741 
7743  id_name = m_lexer.m_fcn_file_name + ">" + id_name;
7744 
7745  if (! m_function_scopes.name_current_scope (id_name))
7746  {
7747  bison_error ("duplicate subfunction or nested function name",
7748  id->line (), id->column ());
7749 
7750  delete id;
7751  return nullptr;
7752  }
7753 
7755  curr_scope.cache_name (id_name);
7756 
7757  m_lexer.m_parsed_function_name.top () = true;
7759 
7760  return id;
7761  }
7762 
7763  // Define a function.
7764 
7765  // FIXME: combining start_function, finish_function, and
7766  // recover_from_parsing_function should be possible, but it makes
7767  // for a large mess. Maybe this could be a bit better organized?
7768 
7771  tree_parameter_list *ret_list,
7772  tree_identifier *id,
7773  tree_parameter_list *param_list,
7774  tree_statement_list *body,
7775  tree_statement *end_fcn_stmt,
7776  comment_list *lc)
7777  {
7778  int l = fcn_tok->line ();
7779  int c = fcn_tok->column ();
7780 
7781  octave_user_function *tmp_fcn
7782  = start_function (id, param_list, body, end_fcn_stmt);
7783 
7784  tree_function_def *retval = finish_function (ret_list, tmp_fcn, lc, l, c);
7785 
7787 
7788  return retval;
7789  }
7790 
7791  // Begin defining a function.
7792 
7795  tree_parameter_list *param_list,
7796  tree_statement_list *body,
7797  tree_statement *end_fcn_stmt)
7798  {
7799  // We'll fill in the return list later.
7800 
7801  std::string id_name = id->name ();
7802 
7803  delete id;
7804 
7806  id_name.insert (0, "get.");
7808  id_name.insert (0, "set.");
7809 
7812 
7813  if (! body)
7814  body = new tree_statement_list ();
7815 
7816  body->append (end_fcn_stmt);
7817 
7820  param_list, nullptr, body);
7821 
7823 
7824  fcn->stash_trailing_comment (tc);
7825  fcn->stash_fcn_end_location (end_fcn_stmt->line (),
7826  end_fcn_stmt->column ());
7827 
7828  // If input is coming from a file, issue a warning if the name of
7829  // the file does not match the name of the function stated in the
7830  // file. Matlab doesn't provide a diagnostic (it ignores the stated
7831  // name).
7834  {
7835  // FIXME: should m_lexer.m_fcn_file_name already be
7836  // preprocessed when we get here? It seems to only be a
7837  // problem with relative filenames.
7838 
7839  std::string nm = m_lexer.m_fcn_file_name;
7840 
7841  size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
7842 
7843  if (pos != std::string::npos)
7844  nm = m_lexer.m_fcn_file_name.substr (pos+1);
7845 
7846  if (nm != id_name)
7847  {
7849  ("Octave:function-name-clash",
7850  "function name '%s' does not agree with function filename '%s'",
7851  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
7852 
7853  id_name = nm;
7854  }
7855  }
7856 
7857  sys::time now;
7858 
7860  fcn->stash_fcn_file_time (now);
7863  fcn->mark_as_system_fcn_file ();
7864  fcn->stash_function_name (id_name);
7865 
7867  {
7869  fcn->mark_relative ();
7870 
7872  {
7874  {
7875  if (m_curr_class_name == id_name)
7877  else
7878  fcn->mark_as_classdef_method ();
7879  }
7880  else
7881  {
7882  if (m_curr_class_name == id_name)
7884  else
7885  fcn->mark_as_legacy_method ();
7886  }
7887 
7889  }
7890 
7891  std::string nm = fcn->fcn_file_name ();
7892 
7893  sys::file_stat fs (nm);
7894 
7895  if (fs && fs.is_newer (now))
7896  warning_with_id ("Octave:future-time-stamp",
7897  "time stamp for '%s' is in the future", nm.c_str ());
7898  }
7899  else if (! m_lexer.input_from_tmp_history_file ()
7900  && ! m_lexer.m_force_script
7902  && m_lexer.m_fcn_file_name == id_name)
7903  {
7904  warning ("function '%s' defined within script file '%s'",
7905  id_name.c_str (), m_lexer.m_fcn_file_full_name.c_str ());
7906  }
7907 
7908  // Record help text for functions other than nested functions.
7909  // We cannot currently record help for nested functions (bug #46008)
7910  // because the doc_string of the outermost function is read first,
7911  // whereas this function is called for the innermost function first.
7912  // We could have a stack of help_text in lexer.
7913  if (! m_lexer.m_help_text.empty () && m_curr_fcn_depth == 0)
7914  {
7915  fcn->document (m_lexer.m_help_text);
7916 
7917  m_lexer.m_help_text = "";
7918  }
7919 
7922  m_primary_fcn = octave_value (fcn);
7923 
7924  return fcn;
7925  }
7926 
7927  tree_statement *
7928  base_parser::make_end (const std::string& type, bool eof,
7929  const filepos& beg_pos, const filepos& /*end_pos*/)
7930  {
7931  int l = beg_pos.line ();
7932  int c = beg_pos.column ();
7933 
7934  return make_statement (new tree_no_op_command (type, eof, l, c));
7935  }
7936 
7939  octave_user_function *fcn,
7940  comment_list *lc,
7941  int l, int c)
7942  {
7943  tree_function_def *retval = nullptr;
7944 
7945  if (! ret_list)
7947 
7948  ret_list->mark_as_formal_parameters ();
7949 
7950  if (fcn)
7951  {
7952  std::string fcn_nm = fcn->name ();
7953  std::string file = fcn->fcn_file_name ();
7954 
7955  std::string tmp = fcn_nm;
7956  if (! file.empty ())
7957  tmp += ": " + file;
7958 
7959  symbol_scope fcn_scope = fcn->scope ();
7960  fcn_scope.cache_name (tmp);
7961  fcn_scope.cache_fcn_name (fcn_nm);
7962  fcn_scope.cache_fcn_file_name (file);
7963  fcn_scope.cache_dir_name (m_lexer.m_dir_name);
7964 
7965  if (lc)
7966  fcn->stash_leading_comment (lc);
7967 
7968  fcn->define_ret_list (ret_list);
7969 
7971  {
7972  fcn->stash_fcn_location (l, c);
7974 
7975  octave_value ov_fcn (fcn);
7976 
7978  {
7979  fcn->mark_as_nested_function ();
7980  fcn_scope.set_nesting_depth (m_curr_fcn_depth);
7981 
7983  fcn_scope.set_parent (pscope);
7985  pscope.install_nestfunction (fcn_nm, ov_fcn, fcn_scope);
7986 
7987  // For nested functions, the list of parent functions is
7988  // set in symbol_scope::update_nest.
7989  }
7990  else
7991  {
7992  fcn->mark_as_subfunction ();
7993  m_subfunction_names.push_back (fcn_nm);
7994  fcn_scope.set_parent (m_primary_fcn_scope);
7997  m_primary_fcn_scope.install_subfunction (fcn_nm, ov_fcn);
7998 
7999  // Prepend name of primary fucntion to list of parent
8000  // functions (if any) for subfunction.
8001 
8002  std::list<std::string> plst
8003  = fcn_scope.parent_fcn_names ();
8004  plst.push_front (m_primary_fcn_scope.fcn_name ());
8005  fcn_scope.cache_parent_fcn_names (plst);
8006  }
8007  }
8008 
8009  if (m_curr_fcn_depth == 0)
8010  fcn_scope.update_nest ();
8011 
8013  {
8014  // We are either reading a script file or defining a function
8015  // at the command line, so this definition creates a
8016  // tree_function object that is placed in the parse tree.
8017  // Otherwise, it is just inserted in the symbol table,
8018  // either as a subfunction or nested function (see above),
8019  // or as the primary function for the file, via
8020  // m_primary_fcn (see also load_fcn_from_file,,
8021  // parse_fcn_file, and
8022  // fcn_info::fcn_info_rep::find_user_function).
8023 
8025  {
8027  fcn->time_parsed ());
8029  }
8030 
8031  retval = new tree_function_def (fcn);
8032  }
8033  }
8034 
8035  return retval;
8036  }
8037 
8038  void
8040  {
8042 
8045  m_parsing_subfunctions = true;
8046 
8047  m_curr_fcn_depth--;
8049 
8054  }
8055 
8056  // A CLASSDEF block defines a class that has a constructor and other
8057  // methods, but it is not an executable command. Parsing the block
8058  // makes some changes in the symbol table (inserting the constructor
8059  // and methods, and adding to the list of known objects) and creates
8060  // a parse tree containing meta information about the class.
8061 
8062  // LC contains comments appearing before the classdef keyword.
8063  // TC contains comments appearing between the classdef elements
8064  // and the final end token for the classdef block.
8065 
8066  tree_classdef *
8069  tree_identifier *id,
8071  tree_classdef_body *body, token *end_tok,
8072  comment_list *lc, comment_list *tc)
8073  {
8074  tree_classdef *retval = nullptr;
8075 
8077 
8078  std::string cls_name = id->name ();
8079 
8080  std::string nm = m_lexer.m_fcn_file_name;
8081 
8082  size_t pos = nm.find_last_of (sys::file_ops::dir_sep_chars ());
8083 
8084  if (pos != std::string::npos)
8085  nm = m_lexer.m_fcn_file_name.substr (pos+1);
8086 
8087  if (nm != cls_name)
8088  {
8089  int l = id->line ();
8090  int c = id->column ();
8091 
8092  delete a;
8093  delete id;
8094  delete sc;
8095  delete body;
8096  delete lc;
8097  delete tc;
8098 
8099  bison_error ("invalid classdef definition, the class name must match the filename", l, c);
8100 
8101  }
8102  else
8103  {
8104  if (end_token_ok (end_tok, token::classdef_end))
8105  {
8106  int l = tok_val->line ();
8107  int c = tok_val->column ();
8108 
8109  if (! body)
8110  body = new tree_classdef_body ();
8111 
8113  a, id, sc, body, lc, tc,
8114  m_curr_package_name, l, c);
8115  }
8116  else
8117  {
8118  delete a;
8119  delete id;
8120  delete sc;
8121  delete body;
8122  delete lc;
8123  delete tc;
8124 
8126  }
8127  }
8128 
8129  return retval;
8130  }
8131 
8132  // LC contains comments appearing before the properties keyword.
8133  // If this properties block appears first in the list of classdef
8134  // elements, this comment list will be used for the help text for the
8135  // classdef block.
8136 
8137  // TC contains comments appearing between the list of properties
8138  // and the final end token for the properties block and may be used to
8139  // find the doc string for the final property in the list.
8140 
8145  token *end_tok,
8146  comment_list *lc,
8147  comment_list *tc)
8148  {
8150 
8151  if (end_token_ok (end_tok, token::properties_end))
8152  {
8153  int l = tok_val->line ();
8154  int c = tok_val->column ();
8155 
8156  if (plist)
8157  {
8158  // If the element at the end of the list doesn't have a doc
8159  // string, see whether the first element of TC is an
8160  // end-of-line comment for us to use.
8161 
8162  if (tc)
8163  {
8164  tree_classdef_property *last_elt = plist->back ();
8165 
8166  if (! last_elt->have_doc_string ())
8167  {
8168  comment_elt first_comment_elt = tc->front ();
8169 
8170  if (first_comment_elt.is_end_of_line ())
8171  {
8172  std::string eol_comment = first_comment_elt.text ();
8173 
8174  last_elt->doc_string (eol_comment);
8175  }
8176  }
8177  }
8178  }
8179  else
8180  plist = new tree_classdef_property_list ();
8181 
8182  retval = new tree_classdef_properties_block (a, plist, lc, tc, l, c);
8183  }
8184  else
8185  {
8186  delete a;
8187  delete plist;
8188  delete lc;
8189  delete tc;
8190 
8192  }
8193 
8194  return retval;
8195  }
8196 
8197  // LC contains comments appearing before the methods keyword.
8198  // If this methods block appears first in the list of classdef
8199  // elements, this comment list will be used for the help text for the
8200  // classdef block.
8201 
8206  token *end_tok, comment_list *lc,
8207  comment_list *tc)
8208  {
8210 
8211  if (end_token_ok (end_tok, token::methods_end))
8212  {
8213  int l = tok_val->line ();
8214  int c = tok_val->column ();
8215 
8216  if (! mlist)
8217  mlist = new tree_classdef_methods_list ();
8218 
8219  retval = new tree_classdef_methods_block (a, mlist, lc, tc, l, c);
8220  }
8221  else
8222  {
8223  delete a;
8224  delete mlist;
8225  delete lc;
8226  delete tc;
8227 
8229  }
8230 
8231  return retval;
8232  }
8233 
8234  // LC contains comments appearing before the events keyword.
8235  // If this events block appears first in the list of classdef
8236  // elements, this comment list will be used for the help text for the
8237  // classdef block.
8238 
8239  // TC contains comments appearing between the list of events and
8240  // the final end token for the events block and may be used to find
8241  // the doc string for the final event in the list.
8242 
8247  token *end_tok,
8248  comment_list *lc,
8249  comment_list *tc)
8250  {
8252 
8253  if (end_token_ok (end_tok, token::events_end))
8254  {
8255  int l = tok_val->line ();
8256  int c = tok_val->column ();
8257 
8258  if (! elist)
8259  elist = new tree_classdef_events_list ();
8260 
8261  retval = new tree_classdef_events_block (a, elist, lc, tc, l, c);
8262  }
8263  else
8264  {
8265  delete a;
8266  delete elist;
8267  delete lc;
8268  delete tc;
8269 
8271  }
8272 
8273  return retval;
8274  }
8275 
8276  // LC contains comments appearing before the enumeration keyword.
8277  // If this enumeration block appears first in the list of classdef
8278  // elements, this comment list will be used for the help text for the
8279  // classdef block.
8280 
8281  // TC contains comments appearing between the list of
8282  // enumerations and the final end token for the enumeration block and
8283  // may be used to find the doc string for the final enumeration in the
8284  // list.
8285 
8289  tree_classdef_enum_list *elist,
8290  token *end_tok,
8291  comment_list *lc,
8292  comment_list *tc)
8293  {
8294  tree_classdef_enum_block *retval = nullptr;
8295 
8296  if (end_token_ok (end_tok, token::enumeration_end))
8297  {
8298  int l = tok_val->line ();
8299  int c = tok_val->column ();
8300 
8301  if (! elist)
8302  elist = new tree_classdef_enum_list ();
8303 
8304  retval = new tree_classdef_enum_block (a, elist, lc, tc, l, c);
8305  }
8306  else
8307  {
8308  delete a;
8309  delete elist;
8310  delete lc;
8311  delete tc;
8312 
8314  }
8315 
8316  return retval;
8317  }
8318 
8321  tree_parameter_list *pl)
8322  {
8323  octave_user_function* retval = nullptr;
8324 
8325  // External methods are only allowed within @-folders. In this case,
8326  // m_curr_class_name will be non-empty.
8327 
8328  if (! m_curr_class_name.empty ())
8329  {
8330 
8331  std::string mname = id->name ();
8332 
8333  // Methods that cannot be declared outside the classdef file:
8334  // - methods with '.' character (e.g. property accessors)
8335  // - class constructor
8336  // - 'delete'
8337 
8338  if (mname.find_first_of (".") == std::string::npos
8339  && mname != "delete"
8340  && mname != m_curr_class_name)
8341  {
8342  // Create a dummy function that is used until the real method
8343  // is loaded.
8344 
8345  retval = new octave_user_function (symbol_scope (), pl);
8346 
8347  retval->stash_function_name (mname);
8348 
8349  int l = id->line ();
8350  int c = id->column ();
8351 
8352  retval->stash_fcn_location (l, c);
8353  }
8354  else
8355  bison_error ("invalid external method declaration, an external "
8356  "method cannot be the class constructor, 'delete' "
8357  "or have a dot (.) character in its name");
8358  }
8359  else
8360  bison_error ("external methods are only allowed in @-folders");
8361 
8362  if (! retval)
8363  delete id;
8364 
8365  return retval;
8366  }
8367 
8370  tree_parameter_list *ret_list,
8371  comment_list *cl)
8372  {
8373  if (! ret_list)
8375 
8376  fcn->define_ret_list (ret_list);
8377 
8378  if (cl)
8379  fcn->stash_leading_comment (cl);
8380 
8381  int l = fcn->beginning_line ();
8382  int c = fcn->beginning_column ();
8383 
8384  return new tree_function_def (fcn, l, c);
8385  }
8386 
8387  void
8389  tree_statement_list *local_fcns)
8390  {
8392  m_classdef_object = std::shared_ptr<tree_classdef> (cls);
8393 
8394  if (local_fcns)
8395  {
8396  symbol_table& symtab
8397  = __get_symbol_table__ ("base_parser::finish_classdef_file");
8398 
8399  for (tree_statement *elt : *local_fcns)
8400  {
8401  tree_command *cmd = elt->command ();
8402 
8403  tree_function_def *fcn_def
8404  = dynamic_cast<tree_function_def *> (cmd);
8405 
8406  octave_value ov_fcn = fcn_def->function ();
8407  octave_function *fcn = ov_fcn.function_value ();
8408  std::string nm = fcn->name ();
8409  std::string file = fcn->fcn_file_name ();
8410 
8411  symtab.install_local_function (nm, ov_fcn, file);
8412  }
8413 
8414  delete local_fcns;
8415  }
8416  }
8417 
8418  // Make an index expression.
8419 
8422  tree_argument_list *args,
8423  char type)
8424  {
8425  tree_index_expression *retval = nullptr;
8426 
8427  if (args && args->has_magic_tilde ())
8428  {
8429  delete expr;
8430  delete args;
8431 
8432  bison_error ("invalid use of empty argument (~) in index expression");
8433  }
8434  else
8435  {
8436  int l = expr->line ();
8437  int c = expr->column ();
8438 
8439  if (! expr->is_postfix_indexed ())
8440  expr->set_postfix_index (type);
8441 
8442  if (expr->is_index_expression ())
8443  {
8445  = dynamic_cast<tree_index_expression *> (expr);
8446 
8447  tmp->append (args, type);
8448 
8449  retval = tmp;
8450  }
8451  else
8452  retval = new tree_index_expression (expr, args, l, c, type);
8453  }
8454 
8455  return retval;
8456  }
8457 
8458  // Make an indirect reference expression.
8459 
8462  const std::string& elt)
8463  {
8464  tree_index_expression *retval = nullptr;
8465 
8466  int l = expr->line ();
8467  int c = expr->column ();
8468 
8469  if (! expr->is_postfix_indexed ())
8470  expr->set_postfix_index ('.');
8471 
8472  if (expr->is_index_expression ())
8473  {
8475  = dynamic_cast<tree_index_expression *> (expr);
8476 
8477  tmp->append (elt);
8478 
8479  retval = tmp;
8480  }
8481  else
8482  retval = new tree_index_expression (expr, elt, l, c);
8483 
8485 
8486  return retval;
8487  }
8488 
8489  // Make an indirect reference expression with dynamic field name.
8490 
8493  tree_expression *elt)
8494  {
8495  tree_index_expression *retval = nullptr;
8496 
8497  int l = expr->line ();
8498  int c = expr->column ();
8499 
8500  if (! expr->is_postfix_indexed ())
8501  expr->set_postfix_index ('.');
8502 
8503  if (expr->is_index_expression ())
8504  {
8506  = dynamic_cast<tree_index_expression *> (expr);
8507 
8508  tmp->append (elt);
8509 
8510  retval = tmp;
8511  }
8512  else
8513  retval = new tree_index_expression (expr, elt, l, c);
8514 
8516 
8517  return retval;
8518  }
8519 
8520  // Make a declaration command.
8521 
8524  tree_decl_init_list *lst)
8525  {
8526  tree_decl_command *retval = nullptr;
8527 
8528  int l = tok_val->line ();
8529  int c = tok_val->column ();
8530 
8531  if (lst)
8533 
8534  switch (tok)
8535  {
8536  case GLOBAL:
8537  {
8538  retval = new tree_decl_command ("global", lst, l, c);
8539  retval->mark_global ();
8540  }
8541  break;
8542 
8543  case PERSISTENT:
8544  if (m_curr_fcn_depth >= 0)
8545  {
8546  retval = new tree_decl_command ("persistent", lst, l, c);
8547  retval->mark_persistent ();
8548  }
8549  else
8550  {
8552  warning ("ignoring persistent declaration near line %d of file '%s'",
8553  l, m_lexer.m_fcn_file_full_name.c_str ());
8554  else
8555  warning ("ignoring persistent declaration near line %d", l);
8556  }
8557  break;
8558 
8559  default:
8560  panic_impossible ();
8561  break;
8562  }
8563 
8564  return retval;
8565  }
8566 
8567  bool
8570  {
8571  std::set<std::string> dict;
8572 
8573  for (tree_decl_elt *elt : *lst)
8574  {
8575  tree_identifier *id = elt->ident ();
8576 
8577  if (id)
8578  {
8579  std::string name = id->name ();
8580 
8581  if (id->is_black_hole ())
8582  {
8584  {
8585  bison_error ("invalid use of ~ in output list");
8586  return false;
8587  }
8588  }
8589  else if (dict.find (name) != dict.end ())
8590  {
8591  bison_error ("'" + name
8592  + "' appears more than once in parameter list");
8593  return false;
8594  }
8595  else
8596  dict.insert (name);
8597  }
8598  }
8599 
8600  std::string va_type = (type == tree_parameter_list::in
8601  ? "varargin" : "varargout");
8602 
8603  size_t len = lst->length ();
8604 
8605  if (len > 0)
8606  {
8607  tree_decl_elt *elt = lst->back ();
8608 
8609  tree_identifier *id = elt->ident ();
8610 
8611  if (id && id->name () == va_type)
8612  {
8613  if (len == 1)
8614  lst->mark_varargs_only ();
8615  else
8616  lst->mark_varargs ();
8617 
8618  tree_parameter_list::iterator p = lst->end ();
8619  --p;
8620  delete *p;
8621  lst->erase (p);
8622  }
8623  }
8624 
8625  return true;
8626  }
8627 
8628  bool
8630  {
8631  bool retval = true;
8632 
8633  tree_array_list *al = dynamic_cast<tree_array_list *> (e);
8634 
8635  for (tree_argument_list* row : *al)
8636  {
8637  if (row && row->has_magic_tilde ())
8638  {
8639  retval = false;
8640 
8641  if (e->is_matrix ())
8642  bison_error ("invalid use of tilde (~) in matrix expression");
8643  else
8644  bison_error ("invalid use of tilde (~) in cell expression");
8645 
8646  break;
8647  }
8648  }
8649 
8650  return retval;
8651  }
8652 
8655  {
8656  tree_argument_list *retval = nullptr;
8657 
8658  if (e->is_constant ())
8659  {
8660  tree_evaluator& tw
8661  = __get_evaluator__ ("validate_matrix_for_assignment");
8662 
8663  octave_value ov = e->evaluate (tw);
8664 
8665  delete e;
8666 
8667  if (ov.isempty ())
8668  bison_error ("invalid empty left hand side of assignment");
8669  else
8670  bison_error ("invalid constant left hand side of assignment");
8671  }
8672  else
8673  {
8674  bool is_simple_assign = true;
8675 
8676  tree_argument_list *tmp = nullptr;
8677 
8678  if (e->is_matrix ())
8679  {
8680  tree_matrix *mat = dynamic_cast<tree_matrix *> (e);
8681 
8682  if (mat && mat->size () == 1)
8683  {
8684  tmp = mat->front ();
8685  mat->pop_front ();
8686  delete e;
8687  is_simple_assign = false;
8688  }
8689  }
8690  else
8691  tmp = new tree_argument_list (e);
8692 
8693  if (tmp && tmp->is_valid_lvalue_list ())
8694  {
8696  retval = tmp;
8697  }
8698  else
8699  {
8700  delete tmp;
8701 
8702  bison_error ("invalid left hand side of assignment");
8703  }
8704 
8705  if (retval && is_simple_assign)
8706  retval->mark_as_simple_assign_lhs ();
8707  }
8708 
8709  return retval;
8710  }
8711 
8712  // Finish building an array_list.
8713 
8714  tree_expression *
8716  token */*open_delim*/, token *close_delim)
8717  {
8718  tree_expression *retval = array_list;
8719 
8720  array_list->set_location (close_delim->line (), close_delim->column ());
8721 
8722  if (array_list->all_elements_are_constant ())
8723  {
8724  interpreter& interp = __get_interpreter__ ("finish_array_list");
8725 
8726  try
8727  {
8728  // If the evaluation generates a warning message, restore
8729  // the previous value of last_warning_message and skip the
8730  // conversion to a constant value.
8731 
8732  unwind_protect frame;
8733 
8734  error_system& es = interp.get_error_system ();
8735 
8737  es.last_warning_message (""));
8738 
8740  es.discard_warning_messages (true));
8741 
8742  tree_evaluator& tw = interp.get_evaluator ();
8743 
8744  octave_value tmp = array_list->evaluate (tw);
8745 
8746  std::string msg = es.last_warning_message ();
8747 
8748  if (msg.empty ())
8749  {
8750  tree_constant *tc_retval
8751  = new tree_constant (tmp, close_delim->line (),
8752  close_delim->column ());
8753 
8754  std::ostringstream buf;
8755 
8756  tree_print_code tpc (buf);
8757 
8758  array_list->accept (tpc);
8759 
8760  tc_retval->stash_original_text (buf.str ());
8761 
8762  delete array_list;
8763 
8764  retval = tc_retval;
8765  }
8766  }
8767  catch (const execution_exception&)
8768  {
8769  interp.recover_from_exception ();
8770  }
8771  }
8772 
8773  return retval;
8774  }
8775 
8776  // Finish building a matrix list.
8777 
8778  tree_expression *
8780  token *close_delim)
8781  {
8782  return (m
8783  ? finish_array_list (m, open_delim, close_delim)
8785  close_delim->line (), close_delim->column ()));
8786  }
8787 
8788  // Finish building a cell list.
8789 
8790  tree_expression *
8792  token *close_delim)
8793  {
8794  return (c
8795  ? finish_array_list (c, open_delim, close_delim)
8796  : new tree_constant (octave_value (Cell ()),
8797  close_delim->line (), close_delim->column ()));
8798  }
8799 
8802  char sep, bool warn_missing_semi)
8803  {
8804  tree_statement *tmp = list->back ();
8805 
8806  switch (sep)
8807  {
8808  case ';':
8809  tmp->set_print_flag (false);
8810  break;
8811 
8812  case 0:
8813  case ',':
8814  case '\n':
8815  tmp->set_print_flag (true);
8816  if (warn_missing_semi)
8817  maybe_warn_missing_semi (list);
8818  break;
8819 
8820  default:
8821  warning ("unrecognized separator type!");
8822  break;
8823  }
8824 
8825  // Even if a statement is null, we add it to the list then remove it
8826  // here so that the print flag is applied to the correct statement.
8827 
8828  if (tmp->is_null_statement ())
8829  {
8830  list->pop_back ();
8831  delete tmp;
8832  }
8833 
8834  return list;
8835  }
8836 
8837  // Finish building a statement.
8838  template <typename T>
8839  tree_statement *
8841  {
8842  comment_list *comment = m_lexer.get_comment ();
8843 
8844  return new tree_statement (arg, comment);
8845  }
8846 
8849  {
8850  return new tree_statement_list (stmt);
8851  }
8852 
8855  char sep, tree_statement *stmt,
8856  bool warn_missing_semi)
8857  {
8858  set_stmt_print_flag (list, sep, warn_missing_semi);
8859 
8860  list->append (stmt);
8861 
8862  return list;
8863  }
8864 
8865  void
8867  {
8869  }
8870 
8871  // FIXME: this function partially duplicates do_dbtype in debug.cc.
8872  static std::string
8873  get_file_line (const std::string& name, int line)
8874  {
8875  // NAME should be an absolute file name and the file should exist.
8876 
8877  std::ifstream fs = sys::ifstream (name.c_str (), std::ios::in);
8878 
8879  std::string text;
8880 
8881  if (fs)
8882  {
8883  int i = 1;
8884 
8885  do
8886  {
8887  if (! std::getline (fs, text))
8888  {
8889  text = "";
8890  break;
8891  }
8892  }
8893  while (i++ < line);
8894  }
8895 
8896  return text;
8897  }
8898 
8899  void
8900  base_parser::bison_error (const std::string& str)
8901  {
8902  bison_error (str, m_lexer.m_filepos);
8903  }
8904 
8905  void
8906  base_parser::bison_error (const std::string& str, const filepos& pos)
8907  {
8908  bison_error (str, pos.line (), pos.column ());
8909  }
8910 
8911  void
8912  base_parser::bison_error (const std::string& str, int err_line, int err_col)
8913  {
8914  std::ostringstream output_buf;
8915 
8918  output_buf << "parse error near line " << err_line
8919  << " of file " << m_lexer.m_fcn_file_full_name;
8920  else
8921  output_buf << "parse error:";
8922 
8923  if (str != "parse error")
8924  output_buf << "\n\n " << str;
8925 
8926  output_buf << "\n\n";
8927 
8928  std::string curr_line;
8929 
8932  curr_line = get_file_line (m_lexer.m_fcn_file_full_name, err_line);
8933  else
8934  curr_line = m_lexer.m_current_input_line;
8935 
8936  // Adjust the error column for display because it is 1-based in the
8937  // lexer for easier reporting.
8938  err_col--;
8939 
8940  if (! curr_line.empty ())
8941  {
8942  // FIXME: we could do better if we just cached lines from the
8943  // input file in a list. See also functions for managing input
8944  // buffers in lex.ll.
8945 
8946  size_t len = curr_line.length ();
8947 
8948  if (curr_line[len-1] == '\n')
8949  curr_line.resize (len-1);
8950 
8951  // Print the line, maybe with a pointer near the error token.
8952 
8953  output_buf << ">>> " << curr_line << "\n";
8954 
8955  if (err_col == 0)
8956  err_col = len;
8957 
8958  for (int i = 0; i < err_col + 3; i++)
8959  output_buf << " ";
8960 
8961  output_buf << "^";
8962  }
8963 
8964  output_buf << "\n";
8965 
8966  m_parse_error_msg = output_buf.str ();
8967  }
8968 
8969  int
8971  {
8972  int status = -1;
8973 
8974  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
8975 
8976  try
8977  {
8978  status = octave_pull_parse (pstate, *this);
8979  }
8980  catch (const execution_exception&)
8981  {
8982  // FIXME: In previous versions, we emitted a parse error here
8983  // but that is not always correct because the error could have
8984  // happened inside a GUI callback functions executing in the
8985  // readline event_hook loop. Maybe we need a separate exception
8986  // class for parse errors?
8987 
8988  throw;
8989  }
8990  catch (const exit_exception&)
8991  {
8992  throw;
8993  }
8994  catch (const interrupt_exception&)
8995  {
8996  throw;
8997  }
8998  catch (...)
8999  {
9000  std::string file = m_lexer.m_fcn_file_full_name;
9001 
9002  if (file.empty ())
9003  error ("unexpected exception while parsing input");
9004  else
9005  error ("unexpected exception while parsing %s", file.c_str ());
9006  }
9007 
9008  if (status != 0)
9009  parse_error ("%s", m_parse_error_msg.c_str ());
9010 
9011  return status;
9012  }
9013 
9014  // Parse input from INPUT. Pass TRUE for EOF if the end of INPUT should
9015  // finish the parse.
9016 
9017  int
9018  push_parser::run (const std::string& input, bool eof)
9019  {
9020  int status = -1;
9021 
9022  dynamic_cast<push_lexer&> (m_lexer).append_input (input, eof);
9023 
9024  do
9025  {
9026  YYSTYPE lval;
9027 
9028  int token = octave_lex (&lval, m_lexer.m_scanner);
9029 
9030  if (token < 0)
9031  {
9032  // TOKEN == -2 means that the lexer recognized a comment
9033  // and we should be at the end of the buffer but not the
9034  // end of the file so we should return 0 to indicate
9035  // "complete input" instead of -1 to request more input.
9036 
9037  status = (token == -2 ? 0 : -1);
9038 
9039  if (! eof && m_lexer.at_end_of_buffer ())
9040  return status;
9041 
9042  break;
9043  }
9044 
9045  yypstate *pstate = static_cast<yypstate *> (m_parser_state);
9046 
9047  try
9048  {
9049  status = octave_push_parse (pstate, token, &lval, *this);
9050  }
9051  catch (execution_exception& e)
9052  {
9053  std::string file = m_lexer.m_fcn_file_full_name;
9054 
9055  if (file.empty ())
9056  error (e, "parse error");
9057  else
9058  error (e, "parse error in %s", file.c_str ());
9059  }
9060  catch (const exit_exception&)
9061  {
9062  throw;
9063  }
9064  catch (interrupt_exception &)
9065  {
9066  throw;
9067  }
9068  catch (...)
9069  {
9070  std::string file = m_lexer.m_fcn_file_full_name;
9071 
9072  if (file.empty ())
9073  error ("unexpected exception while parsing input");
9074  else
9075  error ("unexpected exception while parsing %s", file.c_str ());
9076  }
9077  }
9078  while (status == YYPUSH_MORE || ! m_lexer.at_end_of_buffer ());
9079 
9080  if (status != 0)
9081  parse_error ("%s", m_parse_error_msg.c_str ());
9082 
9083  return status;
9084  }
9085 
9086  int
9088  {
9089  if (! m_reader)
9090  error ("push_parser::run requires valid input_reader");
9091 
9092  int exit_status = 0;
9093 
9095 
9096  std::string prompt
9097  = command_editor::decode_prompt_string (input_sys.PS1 ());
9098 
9099  do
9100  {
9101  // Reset status each time through the read loop so that
9102  // it won't be set to -1 and cause us to exit the outer
9103  // loop early if there is an exception while reading
9104  // input or parsing.
9105 
9106  exit_status = 0;
9107 
9108  bool eof = false;
9109  std::string input_line = m_reader->get_input (prompt, eof);
9110 
9111  if (eof)
9112  {
9113  exit_status = EOF;
9114  break;
9115  }
9116 
9117  exit_status = run (input_line, false);
9118 
9119  prompt = command_editor::decode_prompt_string (input_sys.PS2 ());
9120  }
9121  while (exit_status < 0);
9122 
9123  return exit_status;
9124  }
9125 
9126  octave_value
9127  parse_fcn_file (interpreter& interp, const std::string& full_file,
9128  const std::string& file, const std::string& dir_name,
9129  const std::string& dispatch_type,
9130  const std::string& package_name, bool require_file,
9131  bool force_script, bool autoload, bool relative_lookup)
9132  {
9134 
9135  FILE *ffile = nullptr;
9136 
9137  if (! full_file.empty ())
9138  ffile = sys::fopen (full_file, "rb");
9139 
9140  if (! ffile)
9141  {
9142  if (require_file)
9143  error ("no such file, '%s'", full_file.c_str ());
9144 
9145  return octave_value ();
9146  }
9147 
9148  unwind_action act ([ffile] (void)
9149  {
9150  fclose (ffile);
9151  });
9152 
9153  parser parser (ffile, interp);
9154 
9155  parser.m_curr_class_name = dispatch_type;
9156  parser.m_curr_package_name = package_name;
9157  parser.m_autoloading = autoload;
9158  parser.m_fcn_file_from_relative_lookup = relative_lookup;
9159 
9160  parser.m_lexer.m_force_script = force_script;
9162  parser.m_lexer.m_parsing_class_method = ! dispatch_type.empty ();
9163 
9165  parser.m_lexer.m_fcn_file_full_name = full_file;
9166  parser.m_lexer.m_dir_name = dir_name;
9167  parser.m_lexer.m_package_name = package_name;
9168 
9169  int err = parser.run ();
9170 
9171  if (err)
9172  error ("parse error while reading file %s", full_file.c_str ());
9173 
9175 
9177  && parser.classdef_object ())
9178  {
9179  // Convert parse tree for classdef object to
9180  // meta.class info (and stash it in the symbol
9181  // table?). Return pointer to constructor?
9182 
9183  if (ov_fcn.is_defined ())
9184  panic_impossible ();
9185 
9186  bool is_at_folder = ! dispatch_type.empty ();
9187 
9188  std::shared_ptr<tree_classdef> cdef_obj
9189  = parser.classdef_object();
9190 
9191  return cdef_obj->make_meta_class (interp, is_at_folder);
9192  }
9193  else if (ov_fcn.is_defined ())
9194  {
9195  octave_function *fcn = ov_fcn.function_value ();
9196 
9197  fcn->maybe_relocate_end ();
9198 
9200  {
9202  parser.m_subfunction_names.reverse ();
9203 
9205  }
9206 
9207  return ov_fcn;
9208  }
9209 
9210  return octave_value ();
9211  }
9212 
9213  // Maybe print a warning if an assignment expression is used as the
9214  // test in a logical expression.
9215 
9216  void
9218  {
9219  if (expr->is_assignment_expression ()
9220  && expr->paren_count () < 2)
9221  {
9222  if (m_lexer.m_fcn_file_full_name.empty ())
9224  ("Octave:assign-as-truth-value",
9225  "suggest parenthesis around assignment used as truth value");
9226  else
9228  ("Octave:assign-as-truth-value",
9229  "suggest parenthesis around assignment used as truth value near line %d, column %d in file '%s'",
9230  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
9231  }
9232  }
9233 
9234  // Maybe print a warning about switch labels that aren't constants.
9235 
9236  void
9238  {
9239  if (! expr->is_constant ())
9240  {
9241  if (m_lexer.m_fcn_file_full_name.empty ())
9242  warning_with_id ("Octave:variable-switch-label",
9243  "variable switch label");
9244  else
9246  ("Octave:variable-switch-label",
9247  "variable switch label near line %d, column %d in file '%s'",
9248  expr->line (), expr->column (), m_lexer.m_fcn_file_full_name.c_str ());
9249  }
9250  }
9251 
9252  void
9254  {
9255  if (m_curr_fcn_depth >= 0)
9256  {
9257  tree_statement *tmp = t->back ();
9258 
9259  if (tmp->is_expression ())
9261  ("Octave:missing-semicolon",
9262  "missing semicolon near line %d, column %d in file '%s'",
9263  tmp->line (), tmp->column (), m_lexer.m_fcn_file_full_name.c_str ());
9264  }
9265  }
9266 
9267  std::string
9268  get_help_from_file (const std::string& nm, bool& symbol_found,
9269  std::string& full_file)
9270  {
9271  std::string retval;
9272 
9273  full_file = fcn_file_in_path (nm);
9274 
9275  std::string file = full_file;
9276 
9277  size_t file_len = file.length ();
9278 
9279  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
9280  || (file_len > 4 && file.substr (file_len-4) == ".mex")
9281  || (file_len > 2 && file.substr (file_len-2) == ".m"))
9282  {
9283  file = sys::env::base_pathname (file);
9284  file = file.substr (0, file.find_last_of ('.'));
9285 
9286  size_t pos = file.find_last_of (sys::file_ops::dir_sep_str ());
9287  if (pos != std::string::npos)
9288  file = file.substr (pos+1);
9289  }
9290 
9291  if (! file.empty ())
9292  {
9293  interpreter& interp = __get_interpreter__ ("get_help_from_file");
9294 
9295  symbol_found = true;
9296 
9297  octave_value ov_fcn
9298  = parse_fcn_file (interp, full_file, file, "", "", "", true,
9299  false, false, false);
9300 
9301  if (ov_fcn.is_defined ())
9302  {
9303  octave_function *fcn = ov_fcn.function_value ();
9304 
9305  if (fcn)
9306  retval = fcn->doc_string ();
9307  }
9308  }
9309 
9310  return retval;
9311  }
9312 
9313  std::string
9314  get_help_from_file (const std::string& nm, bool& symbol_found)
9315  {
9316  std::string file;
9317  return get_help_from_file (nm, symbol_found, file);
9318  }
9319 
9320  octave_value
9321  load_fcn_from_file (const std::string& file_name,
9322  const std::string& dir_name,
9323  const std::string& dispatch_type,
9324  const std::string& package_name,
9325  const std::string& fcn_name, bool autoload)
9326  {
9328 
9329  unwind_protect frame;
9330 
9331  std::string nm = file_name;
9332 
9333  size_t nm_len = nm.length ();
9334 
9335  std::string file;
9336 
9337  bool relative_lookup = false;
9338 
9339  file = nm;
9340 
9341  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
9342  || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
9343  || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
9344  {
9345  nm = sys::env::base_pathname (file);
9346  nm = nm.substr (0, nm.find_last_of ('.'));
9347 
9348  size_t pos = nm.find_last_of (sys::file_ops::dir_sep_str ());
9349  if (pos != std::string::npos)
9350  nm = nm.substr (pos+1);
9351  }
9352 
9353  relative_lookup = ! sys::env::absolute_pathname (file);
9354 
9355  file = sys::env::make_absolute (file);
9356 
9357  int len = file.length ();
9358 
9359  interpreter& interp = __get_interpreter__ ("load_fcn_from_file");
9360 
9361  dynamic_loader& dyn_loader = interp.get_dynamic_loader ();
9362 
9363  if (len > 4 && file.substr (len-4, len-1) == ".oct")
9364  {
9365  if (autoload && ! fcn_name.empty ())
9366  nm = fcn_name;
9367 
9368  octave_function *tmpfcn
9369  = dyn_loader.load_oct (nm, file, relative_lookup);
9370 
9371  if (tmpfcn)
9372  {
9373  tmpfcn->stash_package_name (package_name);
9374  retval = octave_value (tmpfcn);
9375  }
9376  }
9377  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
9378  {
9379  // Temporarily load m-file version of mex-file, if it exists,
9380  // to get the help-string to use.
9381 
9382  std::string doc_string;
9383 
9384  octave_value ov_fcn
9385  = parse_fcn_file (interp, file.substr (0, len - 2), nm, dir_name,
9386  dispatch_type, package_name, false,
9387  autoload, autoload, relative_lookup);
9388 
9389  if (ov_fcn.is_defined ())
9390  {
9391  octave_function *tmpfcn = ov_fcn.function_value ();
9392 
9393  if (tmpfcn)
9394  doc_string = tmpfcn->doc_string ();
9395  }
9396 
9397  octave_function *tmpfcn
9398  = dyn_loader.load_mex (nm, file, relative_lookup);
9399 
9400  if (tmpfcn)
9401  {
9402  tmpfcn->document (doc_string);
9403  tmpfcn->stash_package_name (package_name);
9404 
9405  retval = octave_value (tmpfcn);
9406  }
9407  }
9408  else if (len > 2)
9409  {
9410  retval = parse_fcn_file (interp, file, nm, dir_name,
9411  dispatch_type, package_name, true,
9412  autoload, autoload, relative_lookup);
9413  }
9414 
9415  return retval;
9416  }
9417 }
9418 
9419 DEFMETHOD (autoload, interp, args, ,
9420  doc: /* -*- texinfo -*-
9421 @deftypefn {} {@var{autoload_map} =} autoload ()
9422 @deftypefnx {} {} autoload (@var{function}, @var{file})
9423 @deftypefnx {} {} autoload (@dots{}, "remove")
9424 Define @var{function} to autoload from @var{file}.
9425 
9426 The second argument, @var{file}, should be an absolute filename or a file
9427 name in the same directory as the function or script from which the autoload
9428 command was run. @var{file} @emph{should not} depend on the Octave load
9429 path.
9430 
9431 Normally, calls to @code{autoload} appear in PKG_ADD script files that are
9432 evaluated when a directory is added to Octave's load path. To avoid having
9433 to hardcode directory names in @var{file}, if @var{file} is in the same
9434 directory as the PKG_ADD script then
9435 
9436 @example
9437 autoload ("foo", "bar.oct");
9438 @end example
9439 
9440 @noindent
9441 will load the function @code{foo} from the file @code{bar.oct}. The above
9442 usage when @code{bar.oct} is not in the same directory, or usages such as
9443 
9444 @example
9445 autoload ("foo", file_in_loadpath ("bar.oct"))
9446 @end example
9447 
9448 @noindent
9449 are strongly discouraged, as their behavior may be unpredictable.
9450 
9451 With no arguments, return a structure containing the current autoload map.
9452 
9453 If a third argument @qcode{"remove"} is given, the function is cleared and
9454 not loaded anymore during the current Octave session.
9455 
9456 @seealso{PKG_ADD}
9457 @end deftypefn */)
9458 {
9459  int nargin = args.length ();
9460 
9461  if (nargin == 1 || nargin > 3)
9462  print_usage ();
9463 
9464  octave::tree_evaluator& tw = interp.get_evaluator ();
9465 
9466  if (nargin == 0)
9467  return octave_value (tw.get_autoload_map ());
9468  else
9469  {
9470  string_vector argv = args.make_argv ("autoload");
9471 
9472  if (nargin == 2)
9473  tw.add_autoload (argv[1], argv[2]);
9474  else if (nargin == 3)
9475  {
9476  if (argv[3] != "remove")
9477  error_with_id ("Octave:invalid-input-arg",
9478  "autoload: third argument can only be 'remove'");
9479 
9480  tw.remove_autoload (argv[1], argv[2]);
9481  }
9482  }
9483 
9484  return octave_value_list ();
9485 }
9486 
9487 DEFMETHOD (mfilename, interp, args, ,
9488  doc: /* -*- texinfo -*-
9489 @deftypefn {} {} mfilename ()
9490 @deftypefnx {} {} mfilename ("fullpath")
9491 @deftypefnx {} {} mfilename ("fullpathext")
9492 Return the name of the currently executing file.
9493 
9494 The base name of the currently executing script or function is returned without
9495 any extension. If called from outside an m-file, such as the command line,
9496 return the empty string.
9497 
9498 Given the argument @qcode{"fullpath"}, include the directory part of the
9499 filename, but not the extension.
9500 
9501 Given the argument @qcode{"fullpathext"}, include the directory part of
9502 the filename and the extension.
9503 @seealso{inputname, dbstack}
9504 @end deftypefn */)
9505 {
9506  int nargin = args.length ();
9507 
9508  if (nargin > 1)
9509  print_usage ();
9510 
9511  std::string opt;
9512 
9513  if (nargin == 1)
9514  opt = args(0).xstring_value ("mfilename: option argument must be a string");
9515 
9516  return octave_value (interp.mfilename (opt));
9517 }
9518 
9519 namespace octave
9520 {
9521  // Execute the contents of a script file. For compatibility with
9522  // Matlab, also execute a function file by calling the function it
9523  // defines with no arguments and nargout = 0.
9524 
9525  void
9526  source_file (const std::string& file_name, const std::string& context,
9527  bool verbose, bool require_file)
9528  {
9529  interpreter& interp = __get_interpreter__ ("source_file");
9530 
9531  interp.source_file (file_name, context, verbose, require_file);
9532  }
9533 }
9534 
9535 DEFMETHOD (source, interp, args, ,
9536  doc: /* -*- texinfo -*-
9537 @deftypefn {} {} source (@var{file})
9538 @deftypefnx {} {} source (@var{file}, @var{context})
9539 Parse and execute the contents of @var{file}.
9540 
9541 Without specifying @var{context}, this is equivalent to executing commands
9542 from a script file, but without requiring the file to be named
9543 @file{@var{file}.m} or to be on the execution path.
9544 
9545 Instead of the current context, the script may be executed in either the
9546 context of the function that called the present function
9547 (@qcode{"caller"}), or the top-level context (@qcode{"base"}).
9548 @seealso{run}
9549 @end deftypefn */)
9550 {
9551  int nargin = args.length ();
9552 
9553  if (nargin < 1 || nargin > 2)
9554  print_usage ();
9555 
9556  std::string file_name
9557  = args(0).xstring_value ("source: FILE must be a string");
9558 
9559  std::string context;
9560  if (nargin == 2)
9561  context = args(1).xstring_value ("source: CONTEXT must be a string");
9562 
9563  interp.source_file (file_name, context);
9564 
9565  return octave_value_list ();
9566 }
9567 
9568 namespace octave
9569 {
9570  //! Evaluate an Octave function (built-in or interpreted) and return
9571  //! the list of result values.
9572  //!
9573  //! @param name The name of the function to call.
9574  //! @param args The arguments to the function.
9575  //! @param nargout The number of output arguments expected.
9576  //! @return A list of output values. The length of the list is not
9577  //! necessarily the same as @c nargout.
9578 
9580  feval (const char *name, const octave_value_list& args, int nargout)
9581  {
9582  interpreter& interp = __get_interpreter__ ("feval");
9583 
9584  return interp.feval (name, args, nargout);
9585  }
9586 
9588  feval (const std::string& name, const octave_value_list& args, int nargout)
9589  {
9590  interpreter& interp = __get_interpreter__ ("feval");
9591 
9592  return interp.feval (name, args, nargout);
9593  }
9594 
9596  feval (octave_function *fcn, const octave_value_list& args, int nargout)
9597  {
9598  interpreter& interp = __get_interpreter__ ("feval");
9599 
9600  return interp.feval (fcn, args, nargout);
9601  }
9602 
9604  feval (const octave_value& val, const octave_value_list& args, int nargout)
9605  {
9606  interpreter& interp = __get_interpreter__ ("feval");
9607 
9608  return interp.feval (val, args, nargout);
9609  }
9610 
9612  feval (const octave_value_list& args, int nargout)
9613  {
9614  interpreter& interp = __get_interpreter__ ("feval");
9615 
9616  return interp.feval (args, nargout);
9617  }
9618 }
9619 
9620 DEFMETHOD (feval, interp, args, nargout,
9621  doc: /* -*- texinfo -*-
9622 @deftypefn {} {} feval (@var{name}, @dots{})
9623 Evaluate the function named @var{name}.
9624 
9625 Any arguments after the first are passed as inputs to the named function.
9626 For example,
9627 
9628 @example
9629 @group
9630 feval ("acos", -1)
9631  @result{} 3.1416
9632 @end group
9633 @end example
9634 
9635 @noindent
9636 calls the function @code{acos} with the argument @samp{-1}.
9637 
9638 The function @code{feval} can also be used with function handles of any sort
9639 (@pxref{Function Handles}). Historically, @code{feval} was the only way to
9640 call user-supplied functions in strings, but function handles are now
9641 preferred due to the cleaner syntax they offer. For example,
9642 
9643 @example
9644 @group
9645 @var{f} = @@exp;
9646 feval (@var{f}, 1)
9647  @result{} 2.7183
9648 @var{f} (1)
9649  @result{} 2.7183
9650 @end group
9651 @end example
9652 
9653 @noindent
9654 are equivalent ways to call the function referred to by @var{f}. If it
9655 cannot be predicted beforehand whether @var{f} is a function handle,
9656 function name in a string, or inline function then @code{feval} can be used
9657 instead.
9658 @end deftypefn */)
9659 {
9660  if (args.length () == 0)
9661  print_usage ();
9662 
9663  return interp.feval (args, nargout);
9664 }
9665 
9666 DEFMETHOD (builtin, interp, args, nargout,
9667  doc: /* -*- texinfo -*-
9668 @deftypefn {} {[@dots{}] =} builtin (@var{f}, @dots{})
9669 Call the base function @var{f} even if @var{f} is overloaded to another
9670 function for the given type signature.
9671 
9672 This is normally useful when doing object-oriented programming and there is
9673 a requirement to call one of Octave's base functions rather than the
9674 overloaded one of a new class.
9675 
9676 A trivial example which redefines the @code{sin} function to be the
9677 @code{cos} function shows how @code{builtin} works.
9678 
9679 @example
9680 @group
9681 sin (0)
9682  @result{} 0
9683 function y = sin (x), y = cos (x); endfunction
9684 sin (0)
9685  @result{} 1
9686 builtin ("sin", 0)
9687  @result{} 0
9688 @end group
9689 @end example
9690 @end deftypefn */)
9691 {
9693 
9694  if (args.length () == 0)
9695  print_usage ();
9696 
9697  const std::string name (args(0).xstring_value ("builtin: function name (F) must be a string"));
9698 
9699  octave::symbol_table& symtab = interp.get_symbol_table ();
9700 
9701  octave_value fcn = symtab.builtin_find (name);
9702 
9703  if (fcn.is_defined ())
9704  retval = interp.feval (fcn.function_value (), args.splice (0, 1), nargout);
9705  else
9706  error ("builtin: lookup for symbol '%s' failed", name.c_str ());
9707 
9708  return retval;
9709 }
9710 
9711 namespace octave
9712 {
9714  eval_string (const std::string& eval_str, bool silent,
9715  int& parse_status, int nargout)
9716  {
9717  interpreter& interp = __get_interpreter__ ("eval_string");
9718 
9719  return interp.eval_string (eval_str, silent, parse_status, nargout);
9720  }
9721 
9722  octave_value
9723  eval_string (const std::string& eval_str, bool silent, int& parse_status)
9724  {
9725  interpreter& interp = __get_interpreter__ ("eval_string");
9726 
9727  return interp.eval_string (eval_str, silent, parse_status);
9728  }
9729 
9730  void
9732  {
9733  if (*lst)
9734  {
9735  delete *lst;
9736  *lst = nullptr;
9737  }
9738  }
9739 }
9740 
9741 DEFMETHOD (eval, interp, args, nargout,
9742  doc: /* -*- texinfo -*-
9743 @deftypefn {} {} eval (@var{try})
9744 @deftypefnx {} {} eval (@var{try}, @var{catch})
9745 Parse the string @var{try} and evaluate it as if it were an Octave
9746 program.
9747 
9748 If execution fails, evaluate the optional string @var{catch}.
9749 
9750 The string @var{try} is evaluated in the current context, so any results
9751 remain available after @code{eval} returns.
9752 
9753 The following example creates the variable @var{A} with the approximate
9754 value of 3.1416 in the current workspace.
9755 
9756 @example
9757 eval ("A = acos(-1);");
9758 @end example
9759 
9760 If an error occurs during the evaluation of @var{try} then the @var{catch}
9761 string is evaluated, as the following example shows:
9762 
9763 @example
9764 @group
9765 eval ('error ("This is a bad example");',
9766  'printf ("This error occurred:\n%s\n", lasterr ());');
9767  @print{} This error occurred:
9768  This is a bad example
9769 @end group
9770 @end example
9771 
9772 Programming Note: if you are only using @code{eval} as an error-capturing
9773 mechanism, rather than for the execution of arbitrary code strings,
9774 Consider using try/catch blocks or unwind_protect/unwind_protect_cleanup
9775 blocks instead. These techniques have higher performance and don't
9776 introduce the security considerations that the evaluation of arbitrary code
9777 does.
9778 @seealso{evalin, evalc, assignin, feval}
9779 @end deftypefn */)
9780 {
9781  int nargin = args.length ();
9782 
9783  if (nargin < 1 || nargin > 2)
9784  print_usage ();
9785 
9786  if (! args(0).is_string () || args(0).rows () > 1 || args(0).ndims () != 2)
9787  error ("eval: TRY must be a string");
9788 
9789  std::string try_code = args(0).string_value ();
9790 
9791  if (nargin == 1)
9792  return interp.eval (try_code, nargout);
9793  else
9794  {
9795  if (! args(1).is_string () || args(1).rows () > 1
9796  || args(1).ndims () != 2)
9797  error ("eval: CATCH must be a string");
9798 
9799  std::string catch_code = args(1).string_value ();
9800 
9801  return interp.eval (try_code, catch_code, nargout);
9802  }
9803 }
9804 
9805 /*
9806 
9807 %!shared x
9808 %! x = 1;
9809 
9810 %!assert (eval ("x"), 1)
9811 %!assert (eval ("x;"))
9812 %!assert (eval ("x;"), 1)
9813 
9814 %!test
9815 %! y = eval ("x");
9816 %! assert (y, 1);
9817 
9818 %!test
9819 %! y = eval ("x;");
9820 %! assert (y, 1);
9821 
9822 %!test
9823 %! eval ("x = 1;");
9824 %! assert (x,1);
9825 
9826 %!test
9827 %! eval ("flipud = 2;");
9828 %! assert (flipud, 2);
9829 
9830 %!function y = __f ()
9831 %! eval ("flipud = 2;");
9832 %! y = flipud;
9833 %!endfunction
9834 %!assert (__f(), 2)
9835 
9836 %!test <*35645>
9837 %! [a,] = gcd (1,2);
9838 %! [a,b,] = gcd (1, 2);
9839 
9840 ## Can't assign to a keyword
9841 %!error eval ("switch = 13;")
9842 
9843 %!shared str
9844 %! str = "disp ('hello');";
9845 %! str(:,:,2) = str(:,:,1);
9846 
9847 %!error <TRY must be a string> eval (1)
9848 %!error <TRY must be a string> eval (['a';'b'])
9849 %!error <TRY must be a string> eval (str)
9850 
9851 %!error <CATCH must be a string> eval (str(:,:,1), 1)
9852 %!error <CATCH must be a string> eval (str(:,:,1), ['a';'b'])
9853 %!error <CATCH must be a string> eval (str(:,:,1), str)
9854 
9855 */
9856 
9857 DEFMETHOD (assignin, interp, args, ,
9858  doc: /* -*- texinfo -*-
9859 @deftypefn {} {} assignin (@var{context}, @var{varname}, @var{value})
9860 Assign @var{value} to @var{varname} in context @var{context}, which
9861 may be either @qcode{"base"} or @qcode{"caller"}.
9862 @seealso{evalin}
9863 @end deftypefn */)
9864 {
9865  if (args.length () != 3)
9866  print_usage ();
9867 
9868  std::string context
9869  = args(0).xstring_value ("assignin: CONTEXT must be a string");
9870 
9871  std::string varname
9872  = args(1).xstring_value ("assignin: VARNAME must be a string");
9873 
9874  interp.assignin (context, varname, args(2));
9875 
9876  return octave_value_list ();
9877 }
9878 
9879 /*
9880 
9881 %!error assignin ("base", "switch", "13")
9882 
9883 */
9884 
9885 DEFMETHOD (evalin, interp, args, nargout,
9886  doc: /* -*- texinfo -*-
9887 @deftypefn {} {} evalin (@var{context}, @var{try})
9888 @deftypefnx {} {} evalin (@var{context}, @var{try}, @var{catch})
9889 Like @code{eval}, except that the expressions are evaluated in the context
9890 @var{context}, which may be either @qcode{"caller"} or @qcode{"base"}.
9891 @seealso{eval, assignin}
9892 @end deftypefn */)
9893 {
9894  int nargin = args.length ();
9895 
9896  if (nargin < 2 || nargin > 3)
9897  print_usage ();
9898 
9899  std::string context
9900  = args(0).xstring_value ("evalin: CONTEXT must be a string");
9901 
9902  std::string try_code
9903  = args(1).xstring_value ("evalin: TRY must be a string");
9904 
9905  if (nargin == 3)
9906  {
9907  std::string catch_code
9908  = args(2).xstring_value ("evalin: CATCH must be a string");
9909 
9910  return interp.evalin (context, try_code, catch_code, nargout);
9911  }
9912 
9913  return interp.evalin (context, try_code, nargout);
9914 }
9915 
9916 DEFMETHOD (evalc, interp, args, nargout,
9917  doc: /* -*- texinfo -*-
9918 @deftypefn {} {@var{s} =} evalc (@var{try})
9919 @deftypefnx {} {@var{s} =} evalc (@var{try}, @var{catch})
9920 Parse and evaluate the string @var{try} as if it were an Octave program,
9921 while capturing the output into the return variable @var{s}.
9922 
9923 If execution fails, evaluate the optional string @var{catch}.
9924 
9925 This function behaves like @code{eval}, but any output or warning messages
9926 which would normally be written to the console are captured and returned in
9927 the string @var{s}.
9928 
9929 The @code{diary} is disabled during the execution of this function. When
9930 @code{system} is used, any output produced by external programs is
9931 @emph{not} captured, unless their output is captured by the @code{system}
9932 function itself.
9933 
9934 @example
9935 @group
9936 s = evalc ("t = 42"), t
9937  @result{} s = t = 42
9938 
9939  @result{} t = 42
9940 @end group
9941 @end example
9942 @seealso{eval, diary}
9943 @end deftypefn */)
9944 {
9945  int nargin = args.length ();
9946 
9947  if (nargin == 0 || nargin > 2)
9948  print_usage ();
9949 
9950  // Flush pending output and redirect stdout/stderr to capturing
9951  // buffer.
9952 
9953  octave_stdout.flush ();
9954  std::cerr.flush ();
9955 
9956  std::stringbuf buffer;
9957 
9958  std::streambuf *old_out_buf = octave_stdout.rdbuf (&buffer);
9959  std::streambuf *old_err_buf = std::cerr.rdbuf (&buffer);
9960 
9961  // Restore previous output buffers no matter how control exits this
9962  // function. There's no need to flush here. That has already
9963  // happened for the normal execution path. If an error happens during
9964  // the eval, then the message is stored in the exception object and we
9965  // will display it later, after the buffers have been restored.
9966 
9967  octave::unwind_action act ([old_out_buf, old_err_buf] (void)
9968  {
9969  octave_stdout.rdbuf (old_out_buf);
9970  std::cerr.rdbuf (old_err_buf);
9971  });
9972 
9973  // Call standard eval function.
9974 
9975  int eval_nargout = std::max (0, nargout - 1);
9976 
9977  octave_value_list retval = Feval (interp, args, eval_nargout);
9978 
9979  // Make sure we capture all pending output.
9980 
9981  octave_stdout.flush ();
9982  std::cerr.flush ();
9983 
9984  retval.prepend (buffer.str ());
9985 
9986  return retval;
9987 }
9988 
9989 /*
9990 
9991 %!test
9992 %! [old_fmt, old_spacing] = format ();
9993 %! unwind_protect
9994 %! format short;
9995 %! str = evalc ("1");
9996 %! assert (str, "ans = 1\n");
9997 %! unwind_protect_cleanup
9998 %! format (old_fmt);
9999 %! format (old_spacing);
10000 %! end_unwind_protect
10001 
10002 %!assert (evalc ("1;"), "")
10003 
10004 %!test
10005 %! [s, y] = evalc ("1");
10006 %! assert (s, "");
10007 %! assert (y, 1);
10008 
10009 %!test
10010 %! [s, y] = evalc ("1;");
10011 %! assert (s, "");
10012 %! assert (y, 1);
10013 
10014 %!test
10015 %! [old_fmt, old_spacing] = format ();
10016 %! unwind_protect
10017 %! format short;
10018 %! str = evalc ("y = 2");
10019 %! assert (str, "y = 2\n");
10020 %! assert (y, 2);
10021 %! unwind_protect_cleanup
10022 %! format (old_fmt);
10023 %! format (old_spacing);
10024 %! end_unwind_protect
10025 
10026 %!test
10027 %! assert (evalc ("y = 3;"), "");
10028 %! assert (y, 3);
10029 
10030 %!test
10031 %! [s, a, b] = evalc ("deal (1, 2)");
10032 %! assert (s, "");
10033 %! assert (a, 1);
10034 %! assert (b, 2);
10035 
10036 %!function [a, b] = __f_evalc ()
10037 %! printf ("foo");
10038 %! fprintf (stdout, "bar ");
10039 %! disp (pi);
10040 %! a = 1;
10041 %! b = 2;
10042 %!endfunction
10043 %!test
10044 %! [old_fmt, old_spacing] = format ();
10045 %! unwind_protect
10046 %! format short;
10047 %! [s, a, b] = evalc ("__f_evalc ()");
10048 %! assert (s, "foobar 3.1416\n");
10049 %! assert (a, 1);
10050 %! assert (b, 2);
10051 %! unwind_protect_cleanup
10052 %! format (old_fmt);
10053 %! format (old_spacing);
10054 %! end_unwind_protect
10055 
10056 %!error <foo> (evalc ("error ('foo')"))
10057 %!error <bar> (evalc ("error ('foo')", "error ('bar')"))
10058 
10059 %!test
10060 %! warning ("off", "quiet", "local");
10061 %! str = evalc ("warning ('foo')");
10062 %! assert (str(1:13), "warning: foo\n");
10063 
10064 %!test
10065 %! warning ("off", "quiet", "local");
10066 %! str = evalc ("error ('foo')", "warning ('bar')");
10067 %! assert (str(1:13), "warning: bar\n");
10068 
10069 %!error evalc ("switch = 13;")
10070 
10071 */
10072 
10073 DEFUN (__parser_debug_flag__, args, nargout,
10074  doc: /* -*- texinfo -*-
10075 @deftypefn {} {@var{val} =} __parser_debug_flag__ ()
10076 @deftypefnx {} {@var{old_val} =} __parser_debug_flag__ (@var{new_val})
10077 Query or set the internal flag that determines whether Octave's parser
10078 prints debug information as it processes an expression.
10079 @seealso{__lexer_debug_flag__}
10080 @end deftypefn */)
10081 {
10083 
10084  bool debug_flag = octave_debug;
10085 
10086  retval = set_internal_variable (debug_flag, args, nargout,
10087  "__parser_debug_flag__");
10088 
10089  octave_debug = debug_flag;
10090 
10091  return retval;
10092 }
10093 
10094 DEFMETHOD (__parse_file__, interp, args, ,
10095  doc: /* -*- texinfo -*-
10096 @deftypefn {} {} __parse_file__ (@var{file}, @var{verbose})
10097 Undocumented internal function.
10098 @end deftypefn */)
10099 {
10101 
10102  int nargin = args.length ();
10103 
10104  if (nargin < 1 || nargin > 2)
10105  print_usage ();
10106 
10107  std::string file = args(0).xstring_value ("__parse_file__: expecting filename as argument");
10108 
10109  std::string full_file
10111 
10112  full_file = octave::sys::env::make_absolute (full_file);
10113 
10114  std::string dir_name;
10115 
10116  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 = octave::sys::env::base_pathname (file);
10123  file = file.substr (0, file.find_last_of ('.'));
10124 
10125  size_t pos = file.find_last_of (octave::sys::file_ops::dir_sep_str ());
10126  if (pos != std::string::npos)
10127  {
10128  dir_name = file.substr (0, pos);
10129  file = file.substr (pos+1);
10130  }
10131  }
10132 
10133  if (nargin == 2)
10134  octave_stdout << "parsing " << full_file << std::endl;
10135 
10136  octave_value ov_fcn
10137  = parse_fcn_file (interp, full_file, file, dir_name, "", "", true,
10138  false, false, false);
10139 
10140  return retval;
10141 }
charNDArray max(char d, const charNDArray &m)
Definition: chNDArray.cc:230
Array< T > column(octave_idx_type k) const
Extract column: A(:,k+1).
Definition: Array.cc:261
Definition: Cell.h:43
void add_method(T *obj, void(T::*method)(Params...), Args &&... args)
std::string message(void) const
comment_list * get_comment(void)
Definition: lex.h:586
virtual bool input_from_eval_string(void) const
Definition: lex.h:729
comment_buffer m_comment_buf
Definition: lex.h:721
virtual bool input_from_terminal(void) const
Definition: lex.h:725
bool at_end_of_buffer(void) const
Definition: lex.h:634
virtual void reset(void)
Definition: lex.cc:5334
void * m_scanner
Definition: lex.h:715
void prep_for_file(void)
Definition: lex.cc:5357
comment_list * get_comment(void)
Definition: lex.h:670
bool input_from_tmp_history_file(void)
Definition: lex.cc:6433
void pop_front(void)
Definition: base-list.h:88
void append(const elt_type &s)
Definition: base-list.h:92
bool empty(void) const
Definition: base-list.h:50
void pop_back(void)
Definition: base-list.h:89
size_t length(void) const
Definition: base-list.h:53
elt_type & front(void)
Definition: base-list.h:79
iterator erase(iterator pos)
Definition: base-list.h:55
size_t size(void) const
Definition: base-list.h:52
std::list< tree_decl_elt * >::iterator iterator
Definition: base-list.h:43
elt_type & back(void)
Definition: base-list.h:80
iterator end(void)
Definition: base-list.h:68
bool name_current_scope(const std::string &name)
Definition: oct-parse.cc:6550
symbol_scope parent_scope(void) const
Definition: oct-parse.cc:6562
bool name_ok(const std::string &name)
Definition: oct-parse.cc:6512
std::pair< symbol_scope, std::string > value_type
Definition: parse.h:107
void push(const value_type &elt)
Definition: oct-parse.cc:6494
std::string parent_name(void) const
Definition: oct-parse.cc:6568
std::deque< value_type > m_info
Definition: parse.h:150
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:7194
bool validate_array_list(tree_expression *e)
Definition: oct-parse.cc:8629
tree_decl_command * make_decl_command(int tok, token *tok_val, tree_decl_init_list *lst)
Definition: oct-parse.cc:8523
tree_expression * make_postfix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7158
octave_user_function * start_function(tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_function)
Definition: oct-parse.cc:7794
void disallow_command_syntax(void)
Definition: oct-parse.cc:8866
tree_expression * make_assign_op(int op, tree_argument_list *lhs, token *eq_tok, tree_expression *rhs)
Definition: oct-parse.cc:7574
tree_anon_fcn_handle * make_anon_fcn_handle(tree_parameter_list *param_list, tree_expression *expr, const filepos &at_pos)
Definition: oct-parse.cc:6850
tree_expression * make_binary_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:6996
tree_switch_case * make_switch_case(token *case_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7558
void bison_error(const std::string &s)
Definition: oct-parse.cc:8900
tree_if_command_list * start_if_command(tree_expression *expr, tree_statement_list *list)
Definition: oct-parse.cc:7447
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:8142
tree_command * make_return_command(token *return_tok)
Definition: oct-parse.cc:7436
bool m_parsing_local_functions
Definition: parse.h:524
octave_value m_primary_fcn
Definition: parse.h:553
void * m_parser_state
Definition: parse.h:570
void recover_from_parsing_function(void)
Definition: oct-parse.cc:8039
tree_command * make_do_until_command(token *until_tok, tree_statement_list *body, tree_expression *expr, comment_list *lc)
Definition: oct-parse.cc:7318
tree_expression * make_prefix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:7118
tree_function_def * finish_classdef_external_method(octave_user_function *fcn, tree_parameter_list *ret_list, comment_list *cl)
Definition: oct-parse.cc:8369
void finish_classdef_file(tree_classdef *cls, tree_statement_list *local_fcns)
Definition: oct-parse.cc:8388
std::shared_ptr< tree_classdef > m_classdef_object
Definition: parse.h:561
parent_scope_info m_function_scopes
Definition: parse.h:550
int m_curr_fcn_depth
Definition: parse.h:535
tree_statement_list * set_stmt_print_flag(tree_statement_list *, char, bool)
Definition: oct-parse.cc:8801
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:8244
tree_statement_list * append_statement_list(tree_statement_list *list, char sep, tree_statement *stmt, bool warn_missing_semi)
Definition: oct-parse.cc:8854
symbol_scope m_primary_fcn_scope
Definition: parse.h:539
tree_statement * make_statement(T *arg)
Definition: oct-parse.cc:8840
tree_if_clause * make_elseif_clause(token *elseif_tok, tree_expression *expr, tree_statement_list *list, comment_list *lc)
Definition: oct-parse.cc:7500
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:7283
tree_command * make_break_command(token *break_tok)
Definition: oct-parse.cc:7402
void endfunction_found(bool flag)
Definition: parse.h:214
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:7938
tree_expression * make_colon_expression(tree_expression *base, tree_expression *limit, tree_expression *incr=nullptr)
Definition: oct-parse.cc:6916
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:8287
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:7227
void maybe_warn_missing_semi(tree_statement_list *)
Definition: oct-parse.cc:9253
bool m_fcn_file_from_relative_lookup
Definition: parse.h:515
std::string m_curr_class_name
Definition: parse.h:543
tree_index_expression * make_indirect_ref(tree_expression *expr, const std::string &)
Definition: oct-parse.cc:8461
std::string m_curr_package_name
Definition: parse.h:547
void parsing_local_functions(bool flag)
Definition: parse.h:199
std::list< std::string > m_subfunction_names
Definition: parse.h:558
void maybe_warn_variable_switch_label(tree_expression *expr)
Definition: oct-parse.cc:9237
base_lexer & m_lexer
Definition: parse.h:567
tree_function_def * make_function(token *fcn_tok, tree_parameter_list *ret_list, tree_identifier *id, tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_fcn_stmt, comment_list *lc)
Definition: oct-parse.cc:7770
tree_constant * make_constant(int op, token *tok_val)
Definition: oct-parse.cc:6774
tree_command * make_continue_command(token *continue_tok)
Definition: oct-parse.cc:7419
tree_if_command * finish_if_command(token *if_tok, tree_if_command_list *list, token *end_tok, comment_list *lc)
Definition: oct-parse.cc:7460
void make_script(tree_statement_list *cmds, tree_statement *end_script)
Definition: oct-parse.cc:7705
void maybe_warn_assign_as_truth_value(tree_expression *expr)
Definition: oct-parse.cc:9217
tree_identifier * make_fcn_name(tree_identifier *id)
Definition: oct-parse.cc:7736
tree_statement * make_end(const std::string &type, bool eof, const filepos &beg_pos, const filepos &end_pos)
Definition: oct-parse.cc:7928
octave_user_function * start_classdef_external_method(tree_identifier *id, tree_parameter_list *pl)
Definition: oct-parse.cc:8320
bool push_fcn_symtab(void)
Definition: oct-parse.cc:6743
tree_expression * finish_matrix(tree_matrix *m, token *open_delim, token *close_delim)
Definition: oct-parse.cc:8779
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:7338
tree_expression * make_boolean_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:7089
tree_index_expression * make_index_expression(tree_expression *expr, tree_argument_list *args, char type)
Definition: oct-parse.cc:8421
void classdef_object(const std::shared_ptr< tree_classdef > &obj)
Definition: parse.h:172
bool m_parsing_subfunctions
Definition: parse.h:519
void end_token_error(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6723
std::string m_parse_error_msg
Definition: parse.h:505
tree_argument_list * validate_matrix_for_assignment(tree_expression *e)
Definition: oct-parse.cc:8654
void statement_list(std::shared_ptr< tree_statement_list > &lst)
Definition: oct-parse.cc:6703
std::shared_ptr< tree_statement_list > statement_list(void) const
Definition: parse.h:184
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:7516
tree_expression * finish_array_list(tree_array_list *a, token *open_delim, token *close_delim)
Definition: oct-parse.cc:8715
bool m_endfunction_found
Definition: parse.h:508
bool m_autoloading
Definition: parse.h:511
bool end_token_ok(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6735
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:8203
bool validate_param_list(tree_parameter_list *lst, tree_parameter_list::in_or_out type)
Definition: oct-parse.cc:8568
tree_classdef * make_classdef(token *tok_val, tree_classdef_attribute_list *a, tree_identifier *id, tree_classdef_superclass_list *sc, tree_classdef_body *body, token *end_tok, comment_list *lc, comment_list *tc)
Definition: oct-parse.cc:8067
tree_statement_list * make_statement_list(tree_statement *stmt)
Definition: oct-parse.cc:8848
std::shared_ptr< tree_statement_list > m_stmt_list
Definition: parse.h:564
tree_fcn_handle * make_fcn_handle(token *tok_val)
Definition: oct-parse.cc:6837
base_parser(base_lexer &lxr)
Definition: oct-parse.cc:6579
tree_expression * finish_cell(tree_cell *c, token *open_delim, token *close_delim)
Definition: oct-parse.cc:8791
static std::string decode_prompt_string(const std::string &s)
Definition: cmd-edit.cc:1269
std::string text(void) const
Definition: comment-list.h:75
bool is_end_of_line(void) const
Definition: comment-list.h:81
octave_function * load_oct(const std::string &fcn_name, const std::string &file_name="", bool relative=false)
Definition: dynamic-ld.cc:149
octave_function * load_mex(const std::string &fcn_name, const std::string &file_name="", bool relative=false)
Definition: dynamic-ld.cc:203
octave_value discard_warning_messages(const octave_value_list &args, int nargout)
Definition: error.cc:298
void set_discard_warning_messages(bool flag)
Definition: error.h:101
octave_value last_warning_message(const octave_value_list &args, int nargout)
Definition: error.cc:342
void set_last_warning_message(const std::string &val)
Definition: error.h:190
void line(int l)
Definition: filepos.h:51
void column(int c)
Definition: filepos.h:52
octave_value PS1(const octave_value_list &args, int nargout)
octave_value PS2(const octave_value_list &args, int nargout)
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.
input_system & get_input_system(void)
Definition: interpreter.h:223
octave_value_list eval_string(const std::string &eval_str, bool silent, int &parse_status, int nargout)
void recover_from_exception(void)
error_system & get_error_system(void)
Definition: interpreter.h:213
void source_file(const std::string &file_name, const std::string &context="", bool verbose=false, bool require_file=true)
tree_evaluator & get_evaluator(void)
dynamic_loader & get_dynamic_loader(void)
Definition: interpreter.h:238
symbol_scope parent_scope(void) const
Definition: lex.cc:5053
void push(const symbol_scope &scope)
Definition: lex.h:75
symbol_scope curr_scope(void) const
Definition: lex.cc:5044
std::stack< bool > m_parsed_function_name
Definition: lex.h:512
std::string m_current_input_line
Definition: lex.h:482
bool m_looking_at_return_list
Definition: lex.h:370
bool m_reading_classdef_file
Definition: lex.h:437
bool m_allow_command_syntax
Definition: lex.h:360
bool m_looking_at_parameter_list
Definition: lex.h:373
bool m_parsing_classdef_get_method
Definition: lex.h:418
bool m_parsing_classdef_set_method
Definition: lex.h:421
bool m_reading_script_file
Definition: lex.h:434
symbol_table_context m_symtab_context
Definition: lex.h:518
bool m_buffer_function_text
Definition: lex.h:441
std::string m_help_text
Definition: lex.h:488
std::string m_fcn_file_full_name
Definition: lex.h:497
bool m_maybe_classdef_get_set_method
Definition: lex.h:415
std::string m_package_name
Definition: lex.h:503
bool m_parsing_class_method
Definition: lex.h:398
bool m_looking_at_indirect_ref
Definition: lex.h:392
void mark_as_variables(const std::list< std::string > &lst)
Definition: lex.cc:5211
std::string m_dir_name
Definition: lex.h:500
std::string m_function_text
Definition: lex.h:491
std::string m_fcn_file_name
Definition: lex.h:494
int run(void)
Definition: oct-parse.cc:8970
std::shared_ptr< input_reader > m_reader
Definition: parse.h:669
interpreter & m_interpreter
Definition: parse.h:667
void install_subfunction(const std::string &name, const octave_value &fval)
Definition: symscope.h:504
void set_primary_parent(const symbol_scope &p)
Definition: symscope.h:629
void mark_primary_fcn_scope(void)
Definition: symscope.h:657
void install_nestfunction(const std::string &name, const octave_value &fval, const symbol_scope &fcn_scope)
Definition: symscope.h:511
void cache_parent_fcn_names(const std::list< std::string > &names)
Definition: symscope.h:606
void set_parent(const symbol_scope &p)
Definition: symscope.h:623
void set_nesting_depth(size_t depth)
Definition: symscope.h:433
std::list< std::string > parent_fcn_names(void) const
Definition: symscope.h:601
void update_nest(void)
Definition: symscope.h:673
void cache_dir_name(const std::string &name)
Definition: symscope.h:641
std::string fcn_name(void) const
Definition: symscope.h:590
void cache_fcn_name(const std::string &name)
Definition: symscope.h:595
void mark_static(void)
Definition: symscope.h:449
void cache_fcn_file_name(const std::string &name)
Definition: symscope.h:635
void cache_name(const std::string &name)
Definition: symscope.h:584
octave_value builtin_find(const std::string &name, const symbol_scope &search_scope=symbol_scope())
Definition: symtab.cc:190
void install_local_function(const std::string &name, const octave_value &fcn, const std::string &file_name)
Definition: symtab.cc:356
bool is_newer(const sys::time &time) const
Definition: file-stat.h:152
static std::string base_pathname(const std::string &s)
Definition: oct-env.cc:126
static bool absolute_pathname(const std::string &s)
Definition: oct-env.cc:112
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
Definition: oct-env.cc:133
end_tok_type ettype(void) const
Definition: token.cc:131
int line(void) const
Definition: token.h:118
@ try_catch_end
Definition: token.h:66
@ unwind_protect_end
Definition: token.h:67
@ while_end
Definition: token.h:68
@ parfor_end
Definition: token.h:63
@ switch_end
Definition: token.h:65
@ classdef_end
Definition: token.h:56
@ events_end
Definition: token.h:58
@ methods_end
Definition: token.h:62
@ function_end
Definition: token.h:60
@ simple_end
Definition: token.h:55
@ properties_end
Definition: token.h:64
@ enumeration_end
Definition: token.h:57
std::string text(void) const
Definition: token.cc:104
double number(void) const
Definition: token.cc:118
int column(void) const
Definition: token.h:119
filepos beg_pos(void) const
Definition: token.h:111
std::string text_rep(void) const
Definition: token.cc:159
tree_expression * remove_front(void)
Definition: pt-arg-list.h:82
std::list< std::string > variable_names(void) const
Definition: pt-arg-list.cc:116
bool is_valid_lvalue_list(void) const
Definition: pt-arg-list.cc:81
bool is_simple_assign_lhs(void)
Definition: pt-arg-list.h:94
bool has_magic_tilde(void) const
Definition: pt-arg-list.h:72
bool all_elements_are_constant(void) const
void accept(tree_walker &tw)
bool have_doc_string(void) const
Definition: pt-classdef.h:348
void doc_string(const std::string &txt)
Definition: pt-classdef.h:344
void accept(tree_walker &tw)
Definition: pt-colon.h:99
octave_value evaluate(tree_evaluator &, int nargout=1)
Definition: pt-colon.cc:53
void stash_original_text(const std::string &s)
Definition: pt-const.h:98
tree_identifier * ident(void)
Definition: pt-decl.h:88
std::list< std::string > variable_names(void) const
Definition: pt-decl.h:148
void remove_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:3730
octave_map get_autoload_map(void) const
Definition: pt-eval.cc:3662
void add_autoload(const std::string &fcn, const std::string &nm)
Definition: pt-eval.cc:3722
virtual bool is_identifier(void) const
Definition: pt-exp.h:70
virtual bool is_index_expression(void) const
Definition: pt-exp.h:72
void mark_as_for_cmd_expr(void)
Definition: pt-exp.h:109
virtual bool is_matrix(void) const
Definition: pt-exp.h:66
tree_expression * set_postfix_index(char type)
Definition: pt-exp.h:119
virtual std::string name(void) const
Definition: pt-exp.h:103
virtual octave_value evaluate(tree_evaluator &tw, int nargout=1)=0
int paren_count(void) const
Definition: pt-exp.h:90
virtual bool is_assignment_expression(void) const
Definition: pt-exp.h:74
bool is_postfix_indexed(void) const
Definition: pt-exp.h:92
tree_expression * set_print_flag(bool print)
Definition: pt-exp.h:125
virtual bool is_constant(void) const
Definition: pt-exp.h:64
octave_value function(void)
Definition: pt-cmd.h:119
std::string name(void) const
Definition: pt-id.h:73
virtual bool is_black_hole(void) const
Definition: pt-id.h:75
void append(tree_argument_list *lst=nullptr, char t='(')
Definition: pt-idx.cc:81
void mark_varargs_only(void)
Definition: pt-misc.h:83
void mark_as_formal_parameters(void)
Definition: pt-misc.cc:48
int column(void) const
Definition: pt-stmt.cc:125
int line(void) const
Definition: pt-stmt.cc:117
bool is_expression(void) const
Definition: pt-stmt.h:80
tree_expression * expression(void)
Definition: pt-stmt.h:101
void set_expression(tree_expression *e)
Definition: pt-stmt.h:120
void set_print_flag(bool print_flag)
Definition: pt-stmt.cc:64
bool is_null_statement(void) const
Definition: pt-stmt.h:105
virtual int column(void) const
Definition: pt.h:62
void set_location(int l, int c)
Definition: pt.h:68
virtual int line(void) const
Definition: pt.h:60
virtual std::string fcn_file_name(void) const
Definition: ov-fcn.h:78
virtual std::string doc_string(const std::string &="") const
Definition: ov-fcn.h:227
virtual void maybe_relocate_end(void)
Definition: ov-fcn.h:198
void mark_relative(void)
Definition: ov-fcn.h:210
void document(const std::string &ds)
Definition: ov-fcn.h:224
void stash_dir_name(const std::string &dir)
Definition: ov-fcn.h:175
void stash_dispatch_class(const std::string &nm)
Definition: ov-fcn.h:149
std::string name(void) const
Definition: ov-fcn.h:214
void stash_package_name(const std::string &pack)
Definition: ov-fcn.h:153
virtual void stash_subfunction_names(const std::list< std::string > &)
Definition: ov-fcn.h:203
static const octave_value instance
Definition: ov-null-mat.h:52
static const octave_value instance
Definition: ov-null-mat.h:94
static const octave_value instance
Definition: ov-null-mat.h:73
void stash_fcn_file_name(const std::string &nm)
Definition: ov-usr-fcn.h:100
std::string fcn_file_name(void) const
Definition: ov-usr-fcn.h:110
octave::sys::time time_parsed(void) const
Definition: ov-usr-fcn.h:112
void cache_function_text(const std::string &text, const octave::sys::time &timestamp)
Definition: ov-usr-fcn.cc:119
void stash_fcn_file_time(const octave::sys::time &t)
Definition: ov-usr-fcn.h:104
octave::symbol_scope scope(void)
Definition: ov-usr-fcn.h:98
void stash_trailing_comment(octave::comment_list *tc)
Definition: ov-usr-fcn.h:265
void stash_function_name(const std::string &s)
Definition: ov-usr-fcn.h:311
void mark_as_system_fcn_file(void)
Definition: ov-usr-fcn.cc:347
octave_user_function * define_ret_list(octave::tree_parameter_list *t)
Definition: ov-usr-fcn.cc:247
void mark_as_classdef_method(void)
Definition: ov-usr-fcn.h:373
int beginning_column(void) const
Definition: ov-usr-fcn.h:246
void mark_as_classdef_constructor(void)
Definition: ov-usr-fcn.h:357
void mark_as_legacy_constructor(void)
Definition: ov-usr-fcn.h:349
void stash_parent_fcn_name(const std::string &p)
Definition: ov-usr-fcn.h:259
void stash_leading_comment(octave::comment_list *lc)
Definition: ov-usr-fcn.h:263
int beginning_line(void) const
Definition: ov-usr-fcn.h:245
void stash_fcn_location(int line, int col)
Definition: ov-usr-fcn.h:239
void stash_fcn_end_location(int line, int col)
Definition: ov-usr-fcn.h:248
void mark_as_legacy_method(void)
Definition: ov-usr-fcn.h:365
void mark_as_subfunction(void)
Definition: ov-usr-fcn.h:313
void mark_as_nested_function(void)
Definition: ov-usr-fcn.h:343
unary_op
Definition: ov.h:83
@ op_hermitian
Definition: ov.h:88
@ op_uminus
Definition: ov.h:86
@ op_not
Definition: ov.h:84
@ op_transpose
Definition: ov.h:87
@ unknown_unary_op
Definition: ov.h:92
@ op_uplus
Definition: ov.h:85
@ op_incr
Definition: ov.h:89
@ op_decr
Definition: ov.h:90
bool is_defined(void) const
Definition: ov.h:551
assign_op
Definition: ov.h:138
@ op_pow_eq
Definition: ov.h:145
@ op_asn_eq
Definition: ov.h:139
@ op_add_eq
Definition: ov.h:140
@ op_el_pow_eq
Definition: ov.h:149
@ op_mul_eq
Definition: ov.h:142
@ op_div_eq
Definition: ov.h:143
@ op_el_and_eq
Definition: ov.h:150
@ op_el_ldiv_eq
Definition: ov.h:148
@ op_sub_eq
Definition: ov.h:141
@ op_el_mul_eq
Definition: ov.h:146
@ op_el_or_eq
Definition: ov.h:151
@ unknown_assign_op
Definition: ov.h:153
@ op_el_div_eq
Definition: ov.h:147
@ op_ldiv_eq
Definition: ov.h:144
octave_function * function_value(bool silent=false) const
@ magic_colon_t
Definition: ov.h:173
binary_op
Definition: ov.h:96
@ op_ldiv
Definition: ov.h:102
@ op_ne
Definition: ov.h:108
@ unknown_binary_op
Definition: ov.h:117
@ op_el_or
Definition: ov.h:114
@ op_el_ldiv
Definition: ov.h:112
@ op_pow
Definition: ov.h:101
@ op_ge
Definition: ov.h:106
@ op_div
Definition: ov.h:100
@ op_el_pow
Definition: ov.h:111
@ op_mul
Definition: ov.h:99
@ op_add
Definition: ov.h:97
@ op_sub
Definition: ov.h:98
@ op_el_mul
Definition: ov.h:109
@ op_le
Definition: ov.h:104
@ op_lt
Definition: ov.h:103
@ op_gt
Definition: ov.h:107
@ op_eq
Definition: ov.h:105
@ op_el_and
Definition: ov.h:113
@ op_el_div
Definition: ov.h:110
bool isempty(void) const
Definition: ov.h:557
OCTINTERP_API void print_usage(void)
Definition: defun.cc:53
#define DEFMETHOD(name, interp_name, args_name, nargout_name, doc)
Macro to define a builtin method.
Definition: defun.h:138
#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:1013
void warning(const char *fmt,...)
Definition: error.cc:1050
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:1065
void parse_error(const char *fmt,...)
Definition: error.cc:1080
void error(const char *fmt,...)
Definition: error.cc:968
#define panic_impossible()
Definition: error.h:380
QString name
T octave_idx_type m
Definition: mx-inlines.cc:773
std::string dir_sep_str(void)
Definition: file-ops.cc:243
std::string tilde_expand(const std::string &name)
Definition: file-ops.cc:286
std::string dir_sep_chars(void)
Definition: file-ops.cc:252
std::FILE * fopen(const std::string &filename, const std::string &mode)
Definition: lo-sysdep.cc:295
std::ifstream ifstream(const std::string &filename, const std::ios::openmode mode)
Definition: lo-sysdep.cc:381
tree_binary_expression * maybe_compound_binary_expression(tree_expression *a, tree_expression *b, int l, int c, octave_value::binary_op t)
Definition: pt-cbinop.cc:203
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:9127
void cleanup_statement_list(tree_statement_list **lst)
Definition: oct-parse.cc:9731
octave_value load_fcn_from_file(const std::string &file_name, const std::string &dir_name, const std::string &dispatch_type, const std::string &package_name, const std::string &fcn_name, bool autoload)
Definition: oct-parse.cc:9321
octave_value_list eval_string(const std::string &eval_str, bool silent, int &parse_status, int nargout)
Definition: oct-parse.cc:9714
static llvm::LLVMContext & context
Definition: jit-typeinfo.cc:80
static std::string get_file_line(const std::string &name, int line)
Definition: oct-parse.cc:8873
interpreter & __get_interpreter__(const std::string &who)
bool iskeyword(const std::string &s)
Definition: lex.cc:1283
tree_evaluator & __get_evaluator__(const std::string &who)
static std::string end_token_as_string(token::end_tok_type ettype)
Definition: oct-parse.cc:6632
std::string fcn_file_in_path(const std::string &name)
Definition: utils.cc:592
octave_value_list feval(const octave_value_list &args, int nargout)
Definition: oct-parse.cc:9612
octave_value_list feval(const char *name, const octave_value_list &args, int nargout)
Evaluate an Octave function (built-in or interpreted) and return the list of result values.
Definition: oct-parse.cc:9580
symbol_table & __get_symbol_table__(const std::string &who)
void source_file(const std::string &file_name, const std::string &context, bool verbose, bool require_file)
Definition: oct-parse.cc:9526
std::string get_help_from_file(const std::string &nm, bool &symbol_found, std::string &full_file)
Definition: oct-parse.cc:9268
std::string undo_string_escapes(const std::string &s)
Definition: utils.cc:885
std::complex< double > Complex
Definition: oct-cmplx.h:33
#define OCTAVE_EOF
Definition: oct-parse.cc:302
#define PARFOR
Definition: oct-parse.cc:348
OCTAVE_EXPORT octave_value_list Feval(octave::interpreter &interp, const octave_value_list &args, int nargout)
Definition: oct-parse.cc:9779
#define OCTAVE_YYUSE(X)
Definition: oct-parse.cc:155
#define ELSE
Definition: oct-parse.cc:354
static const yytype_uint8 yyr1[]
Definition: oct-parse.cc:1716
octave_pstate * octave_pstate_new(void)
Definition: oct-parse.cc:3253
void * malloc(unsigned)
#define yyss
Definition: oct-parse.cc:3227
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: oct-parse.cc:858
#define YYMAXDEPTH
Definition: oct-parse.cc:1968
#define lexer
Definition: oct-parse.cc:146
#define YYSTACK_FREE
Definition: oct-parse.cc:896
#define MINUS_MINUS
Definition: oct-parse.cc:337
static const yytype_int8 yytranslate[]
Definition: oct-parse.cc:1010
#define EXPR_GE
Definition: oct-parse.cc:326
yysymbol_kind_t
Definition: oct-parse.cc:476
@ YYSYMBOL_END
Definition: oct-parse.cc:537
@ YYSYMBOL_POW
Definition: oct-parse.cc:531
@ YYSYMBOL_INPUT_FILE
Definition: oct-parse.cc:574
@ YYSYMBOL_param_list_beg
Definition: oct-parse.cc:633
@ YYSYMBOL_CLASSDEF
Definition: oct-parse.cc:561
@ YYSYMBOL_TRANSPOSE
Definition: oct-parse.cc:528
@ YYSYMBOL_method_decl
Definition: oct-parse.cc:666
@ YYSYMBOL_opt_list
Definition: oct-parse.cc:580
@ YYSYMBOL_7_
Definition: oct-parse.cc:485
@ YYSYMBOL_matrix
Definition: oct-parse.cc:594
@ YYSYMBOL_3_
Definition: oct-parse.cc:481
@ YYSYMBOL_EXPR_NE
Definition: oct-parse.cc:518
@ YYSYMBOL_MINUS_MINUS
Definition: oct-parse.cc:530
@ YYSYMBOL_power_expr
Definition: oct-parse.cc:607
@ YYSYMBOL_param_list2
Definition: oct-parse.cc:638
@ YYSYMBOL_YYUNDEF
Definition: oct-parse.cc:480
@ YYSYMBOL_anon_fcn_begin
Definition: oct-parse.cc:680
@ YYSYMBOL_EXPR_LT
Definition: oct-parse.cc:515
@ YYSYMBOL_class_body1
Definition: oct-parse.cc:659
@ YYSYMBOL_properties_block
Definition: oct-parse.cc:660
@ YYSYMBOL_14_
Definition: oct-parse.cc:492
@ YYSYMBOL_function_beg
Definition: oct-parse.cc:646
@ YYSYMBOL_TRY
Definition: oct-parse.cc:556
@ YYSYMBOL_parse_error
Definition: oct-parse.cc:682
@ YYSYMBOL_class_property
Definition: oct-parse.cc:663
@ YYSYMBOL_magic_tilde
Definition: oct-parse.cc:603
@ YYSYMBOL_UNTIL
Definition: oct-parse.cc:544
@ YYSYMBOL_classdef_beg
Definition: oct-parse.cc:650
@ YYSYMBOL_begin_file
Definition: oct-parse.cc:644
@ YYSYMBOL_jump_command
Definition: oct-parse.cc:630
@ YYSYMBOL_HERMITIAN
Definition: oct-parse.cc:527
@ YYSYMBOL_17_
Definition: oct-parse.cc:495
@ YYSYMBOL_IF
Definition: oct-parse.cc:545
@ YYSYMBOL_LEFTDIV
Definition: oct-parse.cc:521
@ YYSYMBOL_enum_block
Definition: oct-parse.cc:675
@ YYSYMBOL_PROPERTIES
Definition: oct-parse.cc:562
@ YYSYMBOL_decl_param_init
Definition: oct-parse.cc:616
@ YYSYMBOL_list1
Definition: oct-parse.cc:582
@ YYSYMBOL_method
Definition: oct-parse.cc:668
@ YYSYMBOL_ELSEIF
Definition: oct-parse.cc:546
@ YYSYMBOL_189_1
Definition: oct-parse.cc:667
@ YYSYMBOL_simple_list
Definition: oct-parse.cc:578
@ YYSYMBOL_property_list1
Definition: oct-parse.cc:662
@ YYSYMBOL_classdef
Definition: oct-parse.cc:651
@ YYSYMBOL_switch_case
Definition: oct-parse.cc:627
@ YYSYMBOL_case_list1
Definition: oct-parse.cc:626
@ YYSYMBOL_UNARY
Definition: oct-parse.cc:575
@ YYSYMBOL_superclass_list1
Definition: oct-parse.cc:656
@ YYSYMBOL_file
Definition: oct-parse.cc:645
@ YYSYMBOL_return_list
Definition: oct-parse.cc:640
@ YYSYMBOL_YYerror
Definition: oct-parse.cc:479
@ YYSYMBOL_BREAK
Definition: oct-parse.cc:551
@ YYSYMBOL_SET
Definition: oct-parse.cc:570
@ YYSYMBOL_OR_EQ
Definition: oct-parse.cc:509
@ YYSYMBOL_12_
Definition: oct-parse.cc:490
@ YYSYMBOL_constant
Definition: oct-parse.cc:593
@ YYSYMBOL_opt_sep_no_nl
Definition: oct-parse.cc:684
@ YYSYMBOL_push_fcn_symtab
Definition: oct-parse.cc:632
@ YYSYMBOL_EXPR_AND
Definition: oct-parse.cc:512
@ YYSYMBOL_property_list
Definition: oct-parse.cc:661
@ YYSYMBOL_loop_command
Definition: oct-parse.cc:629
@ YYSYMBOL_sep_no_nl
Definition: oct-parse.cc:683
@ YYSYMBOL_methods_block
Definition: oct-parse.cc:664
@ YYSYMBOL_10_
Definition: oct-parse.cc:488
@ YYSYMBOL_LEXICAL_ERROR
Definition: oct-parse.cc:572
@ YYSYMBOL_parsing_local_fcns
Definition: oct-parse.cc:642
@ YYSYMBOL_attr_list1
Definition: oct-parse.cc:653
@ YYSYMBOL_EXPR_LE
Definition: oct-parse.cc:516
@ YYSYMBOL_assign_lhs
Definition: oct-parse.cc:610
@ YYSYMBOL_EXPR_GT
Definition: oct-parse.cc:520
@ YYSYMBOL_FCN
Definition: oct-parse.cc:571
@ YYSYMBOL_CATCH
Definition: oct-parse.cc:557
@ YYSYMBOL_simple_expr
Definition: oct-parse.cc:609
@ YYSYMBOL_if_cmd_list
Definition: oct-parse.cc:620
@ YYSYMBOL_19_n_
Definition: oct-parse.cc:497
@ YYSYMBOL_magic_colon
Definition: oct-parse.cc:602
@ YYSYMBOL_opt_fcn_list
Definition: oct-parse.cc:583
@ YYSYMBOL_enum_list
Definition: oct-parse.cc:676
@ YYSYMBOL_LEFTDIV_EQ
Definition: oct-parse.cc:502
@ YYSYMBOL_8_
Definition: oct-parse.cc:486
@ YYSYMBOL_EXPR_OR_OR
Definition: oct-parse.cc:511
@ YYSYMBOL_indirect_ref_op
Definition: oct-parse.cc:605
@ YYSYMBOL_function
Definition: oct-parse.cc:649
@ YYSYMBOL_9_
Definition: oct-parse.cc:487
@ YYSYMBOL_cell_or_matrix_row
Definition: oct-parse.cc:598
@ YYSYMBOL_class_event
Definition: oct-parse.cc:674
@ YYSYMBOL_function_end
Definition: oct-parse.cc:648
@ YYSYMBOL_fcn_list
Definition: oct-parse.cc:584
@ YYSYMBOL_expression
Definition: oct-parse.cc:612
@ YYSYMBOL_PARFOR
Definition: oct-parse.cc:541
@ YYSYMBOL_METAQUERY
Definition: oct-parse.cc:566
@ YYSYMBOL_DQ_STRING
Definition: oct-parse.cc:538
@ YYSYMBOL_events_list1
Definition: oct-parse.cc:673
@ YYSYMBOL_if_cmd_list1
Definition: oct-parse.cc:621
@ YYSYMBOL_methods_list1
Definition: oct-parse.cc:670
@ YYSYMBOL_ELEFTDIV_EQ
Definition: oct-parse.cc:506
@ YYSYMBOL_11_
Definition: oct-parse.cc:489
@ YYSYMBOL_param_list
Definition: oct-parse.cc:636
@ YYSYMBOL_superclass_identifier
Definition: oct-parse.cc:590
@ YYSYMBOL_EMUL
Definition: oct-parse.cc:522
@ YYSYMBOL_events_block
Definition: oct-parse.cc:671
@ YYSYMBOL_simple_list1
Definition: oct-parse.cc:579
@ YYSYMBOL_word_list_cmd
Definition: oct-parse.cc:587
@ YYSYMBOL_ENUMERATION
Definition: oct-parse.cc:565
@ YYSYMBOL_decl2
Definition: oct-parse.cc:617
@ YYSYMBOL_SUPERCLASSREF
Definition: oct-parse.cc:567
@ YYSYMBOL_attr_list
Definition: oct-parse.cc:652
@ YYSYMBOL_string
Definition: oct-parse.cc:592
@ YYSYMBOL_superclass_list
Definition: oct-parse.cc:655
@ YYSYMBOL_identifier
Definition: oct-parse.cc:589
@ YYSYMBOL_nl
Definition: oct-parse.cc:686
@ YYSYMBOL_15_
Definition: oct-parse.cc:493
@ YYSYMBOL_6_
Definition: oct-parse.cc:484
@ YYSYMBOL_ELSE
Definition: oct-parse.cc:547
@ YYSYMBOL_primary_expr
Definition: oct-parse.cc:601
@ YYSYMBOL_switch_command
Definition: oct-parse.cc:624
@ YYSYMBOL_FUNC_RET
Definition: oct-parse.cc:553
@ YYSYMBOL_EXPR_GE
Definition: oct-parse.cc:519
@ YYSYMBOL_EPLUS
Definition: oct-parse.cc:525
@ YYSYMBOL_cell_rows
Definition: oct-parse.cc:597
@ YYSYMBOL_sep
Definition: oct-parse.cc:687
@ YYSYMBOL_END_OF_INPUT
Definition: oct-parse.cc:573
@ YYSYMBOL_CONTINUE
Definition: oct-parse.cc:552
@ YYSYMBOL_EMUL_EQ
Definition: oct-parse.cc:504
@ YYSYMBOL_MUL_EQ
Definition: oct-parse.cc:500
@ YYSYMBOL_EPOW_EQ
Definition: oct-parse.cc:507
@ YYSYMBOL_EPOW
Definition: oct-parse.cc:532
@ YYSYMBOL_FCN_HANDLE
Definition: oct-parse.cc:560
@ YYSYMBOL_opt_param_list
Definition: oct-parse.cc:635
@ YYSYMBOL_attr
Definition: oct-parse.cc:654
@ YYSYMBOL_NUM
Definition: oct-parse.cc:533
@ YYSYMBOL_IMAG_NUM
Definition: oct-parse.cc:534
@ YYSYMBOL_stash_comment
Definition: oct-parse.cc:681
@ YYSYMBOL_WHILE
Definition: oct-parse.cc:542
@ YYSYMBOL_18_
Definition: oct-parse.cc:496
@ YYSYMBOL_class_enum
Definition: oct-parse.cc:678
@ YYSYMBOL_decl1
Definition: oct-parse.cc:615
@ YYSYMBOL_declaration
Definition: oct-parse.cc:614
@ YYSYMBOL_arg_list
Definition: oct-parse.cc:604
@ YYSYMBOL_UNWIND
Definition: oct-parse.cc:554
@ YYSYMBOL_else_clause
Definition: oct-parse.cc:623
@ YYSYMBOL_param_list_end
Definition: oct-parse.cc:634
@ YYSYMBOL_GET
Definition: oct-parse.cc:569
@ YYSYMBOL_matrix_rows
Definition: oct-parse.cc:595
@ YYSYMBOL_SWITCH
Definition: oct-parse.cc:548
@ YYSYMBOL_return_list1
Definition: oct-parse.cc:641
@ YYSYMBOL_SUB_EQ
Definition: oct-parse.cc:499
@ YYSYMBOL_opt_sep
Definition: oct-parse.cc:688
@ YYSYMBOL_fcn_handle
Definition: oct-parse.cc:599
@ YYSYMBOL_YYACCEPT
Definition: oct-parse.cc:576
@ YYSYMBOL_statement
Definition: oct-parse.cc:586
@ YYSYMBOL_EXPR_AND_AND
Definition: oct-parse.cc:510
@ YYSYMBOL_4_
Definition: oct-parse.cc:482
@ YYSYMBOL_EXPR_EQ
Definition: oct-parse.cc:517
@ YYSYMBOL_assign_expr
Definition: oct-parse.cc:611
@ YYSYMBOL_param_list_elt
Definition: oct-parse.cc:639
@ YYSYMBOL_EDIV
Definition: oct-parse.cc:523
@ YYSYMBOL_select_command
Definition: oct-parse.cc:618
@ YYSYMBOL_YYEOF
Definition: oct-parse.cc:478
@ YYSYMBOL_list
Definition: oct-parse.cc:581
@ YYSYMBOL_GLOBAL
Definition: oct-parse.cc:558
@ YYSYMBOL_13_
Definition: oct-parse.cc:491
@ YYSYMBOL_opt_nl
Definition: oct-parse.cc:685
@ YYSYMBOL_AND_EQ
Definition: oct-parse.cc:508
@ YYSYMBOL_push_script_symtab
Definition: oct-parse.cc:643
@ YYSYMBOL_class_body
Definition: oct-parse.cc:658
@ YYSYMBOL_input
Definition: oct-parse.cc:577
@ YYSYMBOL_oper_expr
Definition: oct-parse.cc:606
@ YYSYMBOL_DO
Definition: oct-parse.cc:543
@ YYSYMBOL_POW_EQ
Definition: oct-parse.cc:503
@ YYSYMBOL_colon_expr
Definition: oct-parse.cc:608
@ YYSYMBOL_methods_list
Definition: oct-parse.cc:669
@ YYSYMBOL_cell
Definition: oct-parse.cc:596
@ YYSYMBOL_SQ_STRING
Definition: oct-parse.cc:539
@ YYSYMBOL_case_list
Definition: oct-parse.cc:625
@ YYSYMBOL_CASE
Definition: oct-parse.cc:549
@ YYSYMBOL_default_case
Definition: oct-parse.cc:628
@ YYSYMBOL_meta_identifier
Definition: oct-parse.cc:591
@ YYSYMBOL_word_list
Definition: oct-parse.cc:588
@ YYSYMBOL_YYEMPTY
Definition: oct-parse.cc:477
@ YYSYMBOL_method_decl1
Definition: oct-parse.cc:665
@ YYSYMBOL_CLEANUP
Definition: oct-parse.cc:555
@ YYSYMBOL_OTHERWISE
Definition: oct-parse.cc:550
@ YYSYMBOL_PERSISTENT
Definition: oct-parse.cc:559
@ YYSYMBOL_EDIV_EQ
Definition: oct-parse.cc:505
@ YYSYMBOL_EXPR_OR
Definition: oct-parse.cc:513
@ YYSYMBOL_STRUCT_ELT
Definition: oct-parse.cc:535
@ YYSYMBOL_fcn_name
Definition: oct-parse.cc:647
@ YYSYMBOL_except_command
Definition: oct-parse.cc:631
@ YYSYMBOL_superclass
Definition: oct-parse.cc:657
@ YYSYMBOL_EMINUS
Definition: oct-parse.cc:526
@ YYSYMBOL_DIV_EQ
Definition: oct-parse.cc:501
@ YYSYMBOL_16_
Definition: oct-parse.cc:494
@ YYSYMBOL_fcn_list1
Definition: oct-parse.cc:585
@ YYSYMBOL_NAME
Definition: oct-parse.cc:536
@ YYSYMBOL_5_
Definition: oct-parse.cc:483
@ YYSYMBOL_ADD_EQ
Definition: oct-parse.cc:498
@ YYSYMBOL_ELEFTDIV
Definition: oct-parse.cc:524
@ YYSYMBOL_PLUS_PLUS
Definition: oct-parse.cc:529
@ YYSYMBOL_FOR
Definition: oct-parse.cc:540
@ YYSYMBOL_enum_list1
Definition: oct-parse.cc:677
@ YYSYMBOL_FQ_IDENT
Definition: oct-parse.cc:568
@ YYSYMBOL_events_list
Definition: oct-parse.cc:672
@ YYSYMBOL_if_command
Definition: oct-parse.cc:619
@ YYSYMBOL_param_list1
Definition: oct-parse.cc:637
@ YYSYMBOL_command
Definition: oct-parse.cc:613
@ YYSYMBOL_elseif_clause
Definition: oct-parse.cc:622
@ YYSYMBOL_METHODS
Definition: oct-parse.cc:563
@ YYSYMBOL_EXPR_NOT
Definition: oct-parse.cc:514
@ YYSYMBOL_stmt_begin
Definition: oct-parse.cc:679
@ YYSYMBOL_EVENTS
Definition: oct-parse.cc:564
@ YYSYMBOL_anon_fcn_handle
Definition: oct-parse.cc:600
#define YY_ASSERT(E)
Definition: oct-parse.cc:878
#define yyerrstatus
Definition: oct-parse.cc:3225
#define YY_(Msgid)
Definition: oct-parse.cc:818
#define END
Definition: oct-parse.cc:344
#define INPUT_FILE
Definition: oct-parse.cc:381
#define yypstate
Definition: oct-parse.cc:75
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: oct-parse.cc:859
#define YYNSTATES
Definition: oct-parse.cc:995
#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:874
#define yypstate_clear
Definition: oct-parse.cc:73
#define yypstate_new
Definition: oct-parse.cc:72
short yytype_int16
Definition: oct-parse.cc:729
#define EDIV
Definition: oct-parse.cc:330
#define END_OF_INPUT
Definition: oct-parse.cc:380
int octave_push_parse(octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave::base_parser &parser)
Definition: oct-parse.cc:3288
static const yytype_int16 yydefact[]
Definition: oct-parse.cc:1236
#define YYABORT
Definition: oct-parse.cc:1792
#define GLOBAL
Definition: oct-parse.cc:365
#define EMUL_EQ
Definition: oct-parse.cc:311
#define YYSTACK_BYTES(N)
Definition: oct-parse.cc:939
#define PLUS_PLUS
Definition: oct-parse.cc:336
#define METHODS
Definition: oct-parse.cc:370
#define EPOW_EQ
Definition: oct-parse.cc:314
yytype_int16 yy_state_t
Definition: oct-parse.cc:805
#define NAME
Definition: oct-parse.cc:343
#define SUB_EQ
Definition: oct-parse.cc:306
static const yytype_int16 yydefgoto[]
Definition: oct-parse.cc:1311
#define YY_REDUCE_PRINT(Rule)
Definition: oct-parse.cc:1951
#define YY_CAST(Type, Val)
Definition: oct-parse.cc:174
#define WHILE
Definition: oct-parse.cc:349
int octave_pull_parse(octave_pstate *ps, octave::base_parser &parser)
Definition: oct-parse.cc:3211
static const yytype_int16 yypact[]
Definition: oct-parse.cc:1176
#define yylex
Definition: oct-parse.cc:76
#define YYMALLOC
Definition: oct-parse.cc:909
#define OCTAVE_UNDEF
Definition: oct-parse.cc:304
#define HERMITIAN
Definition: oct-parse.cc:334
#define SET
Definition: oct-parse.cc:377
#define YY_NULLPTR
Definition: oct-parse.cc:186
#define CLASSDEF
Definition: oct-parse.cc:368
void octave_pstate_delete(octave_pstate *ps)
Definition: oct-parse.cc:3267
#define UNTIL
Definition: oct-parse.cc:351
#define YYFINAL
Definition: oct-parse.cc:984
#define FOR
Definition: oct-parse.cc:347
#define EMINUS
Definition: oct-parse.cc:333
#define YY_ACCESSING_SYMBOL(State)
Accessing symbol of state STATE.
Definition: oct-parse.cc:1086
#define YY_SYMBOL_PRINT(Title, Kind, Value, Location)
Definition: oct-parse.cc:1949
#define OCTAVE_error
Definition: oct-parse.cc:303
static const yytype_int16 yypgoto[]
Definition: oct-parse.cc:1294
#define YY_INITIAL_VALUE(Value)
Definition: oct-parse.cc:855
#define LEFTDIV_EQ
Definition: oct-parse.cc:309
#define yyparse
Definition: oct-parse.cc:69
#define YYNTOKENS
Definition: oct-parse.cc:989
#define EXPR_NE
Definition: oct-parse.cc:325
#define EMUL
Definition: oct-parse.cc:329
unsigned char yytype_uint8
Definition: oct-parse.cc:750
#define YY_STACK_PRINT(Bottom, Top)
Definition: oct-parse.cc:1950
#define POW
Definition: oct-parse.cc:338
#define YYSIZE_T
Definition: oct-parse.cc:791
#define EXPR_OR_OR
Definition: oct-parse.cc:318
#define yydebug
Definition: oct-parse.cc:78
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition: oct-parse.cc:873
#define yyssa
Definition: oct-parse.cc:3226
#define PERSISTENT
Definition: oct-parse.cc:366
int octave_parse(octave::base_parser &parser)
Definition: oct-parse.cc:3197
#define FUNC_RET
Definition: oct-parse.cc:360
#define PROPERTIES
Definition: oct-parse.cc:369
#define TRANSPOSE
Definition: oct-parse.cc:335
static const yytype_int8 yyr2[]
Definition: oct-parse.cc:1751
#define METAQUERY
Definition: oct-parse.cc:373
#define DO
Definition: oct-parse.cc:350
#define LEXICAL_ERROR
Definition: oct-parse.cc:379
#define CLEANUP
Definition: oct-parse.cc:362
#define YYPTRDIFF_T
Definition: oct-parse.cc:777
#define POW_EQ
Definition: oct-parse.cc:310
#define EXPR_LE
Definition: oct-parse.cc:323
#define yynerrs
Definition: oct-parse.cc:79
static void yydestruct(const char *yymsg, yysymbol_kind_t yykind, OCTAVE_STYPE *yyvaluep, octave::base_parser &parser)
Definition: oct-parse.cc:2010
#define ELEFTDIV
Definition: oct-parse.cc:331
#define GET
Definition: oct-parse.cc:376
#define STRUCT_ELT
Definition: oct-parse.cc:342
#define EPLUS
Definition: oct-parse.cc:332
#define ELSEIF
Definition: oct-parse.cc:353
#define yyvsp
Definition: oct-parse.cc:3231
#define FCN
Definition: oct-parse.cc:378
static const yytype_int16 yytable[]
Definition: oct-parse.cc:1330
#define DQ_STRING
Definition: oct-parse.cc:345
#define scanner
Definition: oct-parse.cc:147
#define EPOW
Definition: oct-parse.cc:339
#define YYACCEPT
Definition: oct-parse.cc:1791
#define yytable_value_is_error(Yyn)
Definition: oct-parse.cc:1171
#define YYTRANSLATE(YYX)
Definition: oct-parse.cc:1003
#define UNARY
Definition: oct-parse.cc:382
#define yyssp
Definition: oct-parse.cc:3228
#define NUM
Definition: oct-parse.cc:340
@ YYENOMEM
Definition: oct-parse.cc:1786
#define AND_EQ
Definition: oct-parse.cc:315
#define ENUMERATION
Definition: oct-parse.cc:372
#define OR_EQ
Definition: oct-parse.cc:316
#define yystacksize
Definition: oct-parse.cc:3232
#define YY_ATTRIBUTE_UNUSED
Definition: oct-parse.cc:835
#define OTHERWISE
Definition: oct-parse.cc:357
#define yyvs
Definition: oct-parse.cc:3230
#define CONTINUE
Definition: oct-parse.cc:359
#define EXPR_OR
Definition: oct-parse.cc:320
#define OCTAVE_EMPTY
Definition: oct-parse.cc:301
static const yytype_uint8 yystos[]
Definition: oct-parse.cc:1658
#define BREAK
Definition: oct-parse.cc:358
#define IF
Definition: oct-parse.cc:352
#define SWITCH
Definition: oct-parse.cc:355
#define ELEFTDIV_EQ
Definition: oct-parse.cc:313
#define yystate
Definition: oct-parse.cc:3224
#define EXPR_NOT
Definition: oct-parse.cc:321
#define YYFREE
Definition: oct-parse.cc:915
#define FQ_IDENT
Definition: oct-parse.cc:375
#define EDIV_EQ
Definition: oct-parse.cc:312
#define TRY
Definition: oct-parse.cc:363
#define YYPOPSTACK(N)
#define SQ_STRING
Definition: oct-parse.cc:346
#define EVENTS
Definition: oct-parse.cc:371
int yy_state_fast_t
Definition: oct-parse.cc:808
#define ADD_EQ
Definition: oct-parse.cc:305
unsigned short yytype_uint16
Definition: oct-parse.cc:761
#define EXPR_AND
Definition: oct-parse.cc:319
int octave_lex(OCTAVE_STYPE *, void *)
The main scanner function which does all the work.
Definition: lex.cc:1550
#define CATCH
Definition: oct-parse.cc:364
#define YYLAST
Definition: oct-parse.cc:986
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: oct-parse.cc:950
#define DIV_EQ
Definition: oct-parse.cc:308
#define yypact_value_is_default(Yyn)
Definition: oct-parse.cc:1166
#define EXPR_LT
Definition: oct-parse.cc:322
#define MUL_EQ
Definition: oct-parse.cc:307
#define YYINITDEPTH
Definition: oct-parse.cc:1957
#define LEFTDIV
Definition: oct-parse.cc:328
#define yypush_parse
Definition: oct-parse.cc:70
signed char yytype_int8
Definition: oct-parse.cc:721
#define EXPR_GT
Definition: oct-parse.cc:327
#define EXPR_EQ
Definition: oct-parse.cc:324
void free(void *)
#define YYERROR
Definition: oct-parse.cc:1793
#define CASE
Definition: oct-parse.cc:356
#define YYSIZEOF(X)
Definition: oct-parse.cc:801
static const yytype_int16 yycheck[]
Definition: oct-parse.cc:1493
#define YYSTACK_ALLOC
Definition: oct-parse.cc:895
#define UNWIND
Definition: oct-parse.cc:361
#define FCN_HANDLE
Definition: oct-parse.cc:367
#define yyvsa
Definition: oct-parse.cc:3229
#define SUPERCLASSREF
Definition: oct-parse.cc:374
#define YYDPRINTF(Args)
Definition: oct-parse.cc:1948
#define IMAG_NUM
Definition: oct-parse.cc:341
#define YY_USE(E)
Definition: oct-parse.cc:841
#define yyerror
Definition: oct-parse.cc:77
#define EXPR_AND_AND
Definition: oct-parse.cc:317
enum octave_tokentype octave_token_kind_t
Definition: oct-parse.h:144
@ YYPUSH_MORE
Definition: oct-parse.h:305
octave_tokentype
Definition: oct-parse.h:60
static int input(yyscan_t yyscanner)
#define yylval
#define yyalloc
yysymbol_kind_t
short yytype_int16
unsigned char yytype_uint8
int yy_state_fast_t
signed char yytype_int8
yytype_int8 yy_state_t
return octave_value(v1.char_array_value() . concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string()) ? '\'' :'"'))
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition: ov.cc:811
#define octave_stdout
Definition: pager.h:313
int octave_debug
yy_state_fast_t yystate
Definition: oct-parse.cc:1976
yy_state_t * yyssp
Definition: oct-parse.cc:1989
yy_state_t * yyss
Definition: oct-parse.cc:1988
OCTAVE_STYPE * yyvsp
Definition: oct-parse.cc:1994
OCTAVE_STYPE * yyvs
Definition: oct-parse.cc:1993
octave::tree_switch_command * tree_switch_command_type
Definition: oct-parse.h:265
int dummy_type
Definition: oct-parse.h:236
octave::tree_argument_list * tree_argument_list_type
Definition: oct-parse.h:259
octave::tree_switch_case * tree_switch_case_type
Definition: oct-parse.h:266
octave::tree_classdef_enum * tree_classdef_enum_type
Definition: oct-parse.h:289
octave::tree_classdef_methods_block * tree_classdef_methods_block_type
Definition: oct-parse.h:285
octave::tree_command * tree_command_type
Definition: oct-parse.h:261
octave::tree_if_clause * tree_if_clause_type
Definition: oct-parse.h:263
octave::tree_expression * tree_expression_type
Definition: oct-parse.h:249
octave::tree_classdef_body * tree_classdef_body_type
Definition: oct-parse.h:280
octave::tree_classdef_properties_block * tree_classdef_properties_block_type
Definition: oct-parse.h:283
octave::tree_classdef_events_list * tree_classdef_events_list_type
Definition: oct-parse.h:287
octave::tree_classdef_events_block * tree_classdef_events_block_type
Definition: oct-parse.h:288
octave::tree_classdef_enum_list * tree_classdef_enum_list_type
Definition: oct-parse.h:290
octave::tree_if_command * tree_if_command_type
Definition: oct-parse.h:262
octave::tree_decl_elt * tree_decl_elt_type
Definition: oct-parse.h:268
octave::tree_parameter_list * tree_parameter_list_type
Definition: oct-parse.h:260
octave::tree_index_expression * tree_index_expression_type
Definition: oct-parse.h:257
octave::tree_anon_fcn_handle * tree_anon_fcn_handle_type
Definition: oct-parse.h:255
octave::tree_classdef_superclass * tree_classdef_superclass_type
Definition: oct-parse.h:278
octave::comment_list * comment_type
Definition: oct-parse.h:242
octave::tree * tree_type
Definition: oct-parse.h:246
octave::tree_constant * tree_constant_type
Definition: oct-parse.h:250
octave::tree_decl_command * tree_decl_command_type
Definition: oct-parse.h:270
octave::tree_metaclass_query * tree_metaclass_query_type
Definition: oct-parse.h:253
octave::tree_superclass_ref * tree_superclass_ref_type
Definition: oct-parse.h:252
octave::tree_matrix * tree_matrix_type
Definition: oct-parse.h:247
octave::tree_colon_expression * tree_colon_expression_type
Definition: oct-parse.h:258
octave::token * tok_val
Definition: oct-parse.h:239
octave::tree_classdef_attribute * tree_classdef_attribute_type
Definition: oct-parse.h:276
octave::tree_classdef_property_list * tree_classdef_property_list_type
Definition: oct-parse.h:282
octave::tree_statement * tree_statement_type
Definition: oct-parse.h:271
octave::tree_statement_list * tree_statement_list_type
Definition: oct-parse.h:272
octave::tree_if_command_list * tree_if_command_list_type
Definition: oct-parse.h:264
octave::tree_decl_init_list * tree_decl_init_list_type
Definition: oct-parse.h:269
octave::tree_classdef * tree_classdef_type
Definition: oct-parse.h:275
octave::tree_identifier * tree_identifier_type
Definition: oct-parse.h:256
octave::tree_fcn_handle * tree_fcn_handle_type
Definition: oct-parse.h:251
octave::tree_classdef_attribute_list * tree_classdef_attribute_list_type
Definition: oct-parse.h:277
octave::tree_switch_case_list * tree_switch_case_list_type
Definition: oct-parse.h:267
octave::tree_function_def * tree_function_def_type
Definition: oct-parse.h:254
octave::tree_classdef_property * tree_classdef_property_type
Definition: oct-parse.h:281
char punct_type
Definition: oct-parse.h:245
octave::tree_classdef_methods_list * tree_classdef_methods_list_type
Definition: oct-parse.h:284
octave::tree_classdef_superclass_list * tree_classdef_superclass_list_type
Definition: oct-parse.h:279
octave_user_function * octave_user_function_type
Definition: oct-parse.h:273
octave::tree_classdef_enum_block * tree_classdef_enum_block_type
Definition: oct-parse.h:291
octave::tree_classdef_event * tree_classdef_event_type
Definition: oct-parse.h:286
octave::tree_cell * tree_cell_type
Definition: oct-parse.h:248
OCTAVE_STYPE yyvs_alloc
Definition: oct-parse.cc:931
yy_state_t yyss_alloc
Definition: oct-parse.cc:930
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
Definition: variables.cc:608
F77_RET_T len
Definition: xerbla.cc:61