GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
oct-parse.cc
Go to the documentation of this file.
1 /* A Bison parser, made by GNU Bison 3.0.2. */
2 
3 /* Bison implementation for Yacc-like parsers in C
4 
5  Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc.
6 
7  This program is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program. If not, see <http://www.gnu.org/licenses/>. */
19 
20 /* As a special exception, you may create a larger work that contains
21  part or all of the Bison parser skeleton and distribute that work
22  under terms of your choice, so long as that work isn't itself a
23  parser generator using the skeleton or a modified version thereof
24  as a parser skeleton. Alternatively, if you modify or redistribute
25  the parser skeleton itself, you may (at your option) remove this
26  special exception, which will cause the skeleton and the resulting
27  Bison output files to be licensed under the GNU General Public
28  License without this special exception.
29 
30  This special exception was added by the Free Software Foundation in
31  version 2.2 of Bison. */
32 
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34  simplifying the original so-called "semantic" parser. */
35 
36 /* All symbols defined below should begin with yy or YY, to avoid
37  infringing on user name space. This should be done even for local
38  variables, as they might otherwise be expanded by user macros.
39  There are some unavoidable exceptions within include files to
40  define necessary library symbols; they are noted "INFRINGES ON
41  USER NAME SPACE" below. */
42 
43 /* Identify Bison output. */
44 #define YYBISON 1
45 
46 /* Bison version. */
47 #define YYBISON_VERSION "3.0.2"
48 
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
51 
52 /* Pure parsers. */
53 #define YYPURE 1
54 
55 /* Push parsers. */
56 #define YYPUSH 1
57 
58 /* Pull parsers. */
59 #define YYPULL 1
60 
61 /* Substitute the type names. */
62 #define YYSTYPE OCTAVE_STYPE
63 /* Substitute the variable and function names. */
64 #define yyparse octave_parse
65 #define yypush_parse octave_push_parse
66 #define yypull_parse octave_pull_parse
67 #define yypstate_new octave_pstate_new
68 #define yypstate_delete octave_pstate_delete
69 #define yypstate octave_pstate
70 #define yylex octave_lex
71 #define yyerror octave_error
72 #define yydebug octave_debug
73 #define yynerrs octave_nerrs
74 
75 
76 /* Copy the first part of user declarations. */
77 #line 29 "parse-tree/oct-parse.yy" /* yacc.c:339 */
78 
79 #define YYDEBUG 1
80 
81 #ifdef HAVE_CONFIG_H
82 #include <config.h>
83 #endif
84 
85 #include <cassert>
86 #include <cstdio>
87 #include <cstdlib>
88 
89 #include <iostream>
90 #include <map>
91 #include <sstream>
92 
93 #include "Cell.h"
94 #include "Matrix.h"
95 #include "cmd-edit.h"
96 #include "cmd-hist.h"
97 #include "file-ops.h"
98 #include "file-stat.h"
99 #include "oct-env.h"
100 #include "oct-time.h"
101 #include "quit.h"
102 
103 #include "comment-list.h"
104 #include "defaults.h"
105 #include "defun.h"
106 #include "dirfns.h"
107 #include "dynamic-ld.h"
108 #include "error.h"
109 #include "input.h"
110 #include "lex.h"
111 #include "load-path.h"
112 #include "oct-hist.h"
113 #include "oct-map.h"
114 #include "ov-classdef.h"
115 #include "ov-fcn-handle.h"
116 #include "ov-usr-fcn.h"
117 #include "ov-null-mat.h"
118 #include "toplev.h"
119 #include "pager.h"
120 #include "parse.h"
121 #include "pt-all.h"
122 #include "pt-eval.h"
123 #include "pt-funcall.h"
124 #include "symtab.h"
125 #include "token.h"
126 #include "unwind-prot.h"
127 #include "utils.h"
128 #include "variables.h"
129 
130 // oct-parse.h must be included after pt-all.h
131 #include <oct-parse.h>
132 
133 extern int octave_lex (YYSTYPE *, void *);
134 
135 // Global access to currently active lexer.
136 // FIXME -- to be removed after more parser+lexer refactoring.
138 
139 #if defined (GNULIB_NAMESPACE)
140 // Calls to the following functions appear in the generated output from
141 // Bison without the namespace tag. Redefine them so we will use them
142 // via the gnulib namespace.
143 #define fclose GNULIB_NAMESPACE::fclose
144 #define fprintf GNULIB_NAMESPACE::fprintf
145 #define malloc GNULIB_NAMESPACE::malloc
146 #endif
147 
148 // TRUE means we printed messages about reading startup files.
150 
151 // List of autoloads (function -> file mapping).
152 static std::map<std::string, std::string> autoload_map;
153 
154 // Forward declarations for some functions defined at the bottom of
155 // the file.
156 
157 static void yyerror (octave_base_parser& parser, const char *s);
158 
159 #define ABORT_PARSE \
160  do \
161  { \
162  yyerrok; \
163  if (interactive && ! lexer.input_from_eval_string ()) \
164  YYACCEPT; \
165  else \
166  YYABORT; \
167  } \
168  while (0)
169 
170 #define lexer parser.lexer
171 #define scanner lexer.scanner
172 
173 
174 #line 175 "parse-tree/oct-parse.cc" /* yacc.c:339 */
175 
176 # ifndef YY_NULLPTR
177 # if defined __cplusplus && 201103L <= __cplusplus
178 # define YY_NULLPTR nullptr
179 # else
180 # define YY_NULLPTR 0
181 # endif
182 # endif
183 
184 /* Enabling verbose error messages. */
185 #ifdef YYERROR_VERBOSE
186 # undef YYERROR_VERBOSE
187 # define YYERROR_VERBOSE 1
188 #else
189 # define YYERROR_VERBOSE 0
190 #endif
191 
192 /* In a future release of Bison, this section will be replaced
193  by #include "y.tab.h". */
194 #ifndef YY_OCTAVE_PARSE_TREE_OCT_PARSE_H_INCLUDED
195 # define YY_OCTAVE_PARSE_TREE_OCT_PARSE_H_INCLUDED
196 /* Debug traces. */
197 #ifndef OCTAVE_DEBUG
198 # if defined YYDEBUG
199 #if YYDEBUG
200 # define OCTAVE_DEBUG 1
201 # else
202 # define OCTAVE_DEBUG 0
203 # endif
204 # else /* ! defined YYDEBUG */
205 # define OCTAVE_DEBUG 0
206 # endif /* ! defined YYDEBUG */
207 #endif /* ! defined OCTAVE_DEBUG */
208 #if OCTAVE_DEBUG
209 extern int octave_debug;
210 #endif
211 
212 /* Token type. */
213 #ifndef OCTAVE_TOKENTYPE
214 # define OCTAVE_TOKENTYPE
215  enum octave_tokentype
216  {
217  ADD_EQ = 258,
218  SUB_EQ = 259,
219  MUL_EQ = 260,
220  DIV_EQ = 261,
221  LEFTDIV_EQ = 262,
222  POW_EQ = 263,
223  EMUL_EQ = 264,
224  EDIV_EQ = 265,
225  ELEFTDIV_EQ = 266,
226  EPOW_EQ = 267,
227  AND_EQ = 268,
228  OR_EQ = 269,
229  LSHIFT_EQ = 270,
230  RSHIFT_EQ = 271,
231  LSHIFT = 272,
232  RSHIFT = 273,
233  EXPR_AND_AND = 274,
234  EXPR_OR_OR = 275,
235  EXPR_AND = 276,
236  EXPR_OR = 277,
237  EXPR_NOT = 278,
238  EXPR_LT = 279,
239  EXPR_LE = 280,
240  EXPR_EQ = 281,
241  EXPR_NE = 282,
242  EXPR_GE = 283,
243  EXPR_GT = 284,
244  LEFTDIV = 285,
245  EMUL = 286,
246  EDIV = 287,
247  ELEFTDIV = 288,
248  EPLUS = 289,
249  EMINUS = 290,
250  HERMITIAN = 291,
251  TRANSPOSE = 292,
252  PLUS_PLUS = 293,
253  MINUS_MINUS = 294,
254  POW = 295,
255  EPOW = 296,
256  NUM = 297,
257  IMAG_NUM = 298,
258  STRUCT_ELT = 299,
259  NAME = 300,
260  END = 301,
261  DQ_STRING = 302,
262  SQ_STRING = 303,
263  FOR = 304,
264  PARFOR = 305,
265  WHILE = 306,
266  DO = 307,
267  UNTIL = 308,
268  IF = 309,
269  ELSEIF = 310,
270  ELSE = 311,
271  SWITCH = 312,
272  CASE = 313,
273  OTHERWISE = 314,
274  BREAK = 315,
275  CONTINUE = 316,
276  FUNC_RET = 317,
277  UNWIND = 318,
278  CLEANUP = 319,
279  TRY = 320,
280  CATCH = 321,
281  GLOBAL = 322,
282  PERSISTENT = 323,
283  FCN_HANDLE = 324,
284  CLASSDEF = 325,
285  PROPERTIES = 326,
286  METHODS = 327,
287  EVENTS = 328,
288  ENUMERATION = 329,
289  METAQUERY = 330,
290  SUPERCLASSREF = 331,
291  FQ_IDENT = 332,
292  GET = 333,
293  SET = 334,
294  FCN = 335,
295  END_OF_INPUT = 336,
296  LEXICAL_ERROR = 337,
297  INPUT_FILE = 338,
298  UNARY = 339
299  };
300 #endif
301 /* Tokens. */
302 #define ADD_EQ 258
303 #define SUB_EQ 259
304 #define MUL_EQ 260
305 #define DIV_EQ 261
306 #define LEFTDIV_EQ 262
307 #define POW_EQ 263
308 #define EMUL_EQ 264
309 #define EDIV_EQ 265
310 #define ELEFTDIV_EQ 266
311 #define EPOW_EQ 267
312 #define AND_EQ 268
313 #define OR_EQ 269
314 #define LSHIFT_EQ 270
315 #define RSHIFT_EQ 271
316 #define LSHIFT 272
317 #define RSHIFT 273
318 #define EXPR_AND_AND 274
319 #define EXPR_OR_OR 275
320 #define EXPR_AND 276
321 #define EXPR_OR 277
322 #define EXPR_NOT 278
323 #define EXPR_LT 279
324 #define EXPR_LE 280
325 #define EXPR_EQ 281
326 #define EXPR_NE 282
327 #define EXPR_GE 283
328 #define EXPR_GT 284
329 #define LEFTDIV 285
330 #define EMUL 286
331 #define EDIV 287
332 #define ELEFTDIV 288
333 #define EPLUS 289
334 #define EMINUS 290
335 #define HERMITIAN 291
336 #define TRANSPOSE 292
337 #define PLUS_PLUS 293
338 #define MINUS_MINUS 294
339 #define POW 295
340 #define EPOW 296
341 #define NUM 297
342 #define IMAG_NUM 298
343 #define STRUCT_ELT 299
344 #define NAME 300
345 #define END 301
346 #define DQ_STRING 302
347 #define SQ_STRING 303
348 #define FOR 304
349 #define PARFOR 305
350 #define WHILE 306
351 #define DO 307
352 #define UNTIL 308
353 #define IF 309
354 #define ELSEIF 310
355 #define ELSE 311
356 #define SWITCH 312
357 #define CASE 313
358 #define OTHERWISE 314
359 #define BREAK 315
360 #define CONTINUE 316
361 #define FUNC_RET 317
362 #define UNWIND 318
363 #define CLEANUP 319
364 #define TRY 320
365 #define CATCH 321
366 #define GLOBAL 322
367 #define PERSISTENT 323
368 #define FCN_HANDLE 324
369 #define CLASSDEF 325
370 #define PROPERTIES 326
371 #define METHODS 327
372 #define EVENTS 328
373 #define ENUMERATION 329
374 #define METAQUERY 330
375 #define SUPERCLASSREF 331
376 #define FQ_IDENT 332
377 #define GET 333
378 #define SET 334
379 #define FCN 335
380 #define END_OF_INPUT 336
381 #define LEXICAL_ERROR 337
382 #define INPUT_FILE 338
383 #define UNARY 339
384 
385 /* Value type. */
386 #if ! defined OCTAVE_STYPE && ! defined OCTAVE_STYPE_IS_DECLARED
387 typedef union OCTAVE_STYPE OCTAVE_STYPE;
388 union OCTAVE_STYPE
389 {
390 #line 150 "parse-tree/oct-parse.yy" /* yacc.c:355 */
391 
392  int dummy_type;
393 
394  // The type of the basic tokens returned by the lexer.
395  token *tok_val;
396 
397  // Comment strings that we need to deal with mid-rule.
399 
400  // Types for the nonterminals we generate.
401  char punct_type;
402  tree *tree_type;
429 
447 
448 #line 449 "parse-tree/oct-parse.cc" /* yacc.c:355 */
449 };
450 # define OCTAVE_STYPE_IS_TRIVIAL 1
451 # define OCTAVE_STYPE_IS_DECLARED 1
452 #endif
453 
454 
455 
456 #ifndef YYPUSH_MORE_DEFINED
457 # define YYPUSH_MORE_DEFINED
458 enum { YYPUSH_MORE = 4 };
459 #endif
460 
462 
464 int octave_push_parse (octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave_base_parser& parser);
468 
469 #endif /* !YY_OCTAVE_PARSE_TREE_OCT_PARSE_H_INCLUDED */
470 
471 /* Copy the second part of user declarations. */
472 
473 #line 474 "parse-tree/oct-parse.cc" /* yacc.c:358 */
474 
475 #ifdef short
476 # undef short
477 #endif
478 
479 #ifdef YYTYPE_UINT8
480 typedef YYTYPE_UINT8 yytype_uint8;
481 #else
482 typedef unsigned char yytype_uint8;
483 #endif
484 
485 #ifdef YYTYPE_INT8
486 typedef YYTYPE_INT8 yytype_int8;
487 #else
488 typedef signed char yytype_int8;
489 #endif
490 
491 #ifdef YYTYPE_UINT16
492 typedef YYTYPE_UINT16 yytype_uint16;
493 #else
494 typedef unsigned short int yytype_uint16;
495 #endif
496 
497 #ifdef YYTYPE_INT16
498 typedef YYTYPE_INT16 yytype_int16;
499 #else
500 typedef short int yytype_int16;
501 #endif
502 
503 #ifndef YYSIZE_T
504 # ifdef __SIZE_TYPE__
505 # define YYSIZE_T __SIZE_TYPE__
506 # elif defined size_t
507 # define YYSIZE_T size_t
508 # elif ! defined YYSIZE_T
509 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
510 # define YYSIZE_T size_t
511 # else
512 # define YYSIZE_T unsigned int
513 # endif
514 #endif
515 
516 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
517 
518 #ifndef YY_
519 # if defined YYENABLE_NLS && YYENABLE_NLS
520 # if ENABLE_NLS
521 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
522 # define YY_(Msgid) dgettext ("bison-runtime", Msgid)
523 # endif
524 # endif
525 # ifndef YY_
526 # define YY_(Msgid) Msgid
527 # endif
528 #endif
529 
530 #ifndef YY_ATTRIBUTE
531 # if (defined __GNUC__ \
532  && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \
533  || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C
534 # define YY_ATTRIBUTE(Spec) __attribute__(Spec)
535 # else
536 # define YY_ATTRIBUTE(Spec) /* empty */
537 # endif
538 #endif
539 
540 #ifndef YY_ATTRIBUTE_PURE
541 # define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__))
542 #endif
543 
544 #ifndef YY_ATTRIBUTE_UNUSED
545 # define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__))
546 #endif
547 
548 #if !defined _Noreturn \
549  && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112)
550 # if defined _MSC_VER && 1200 <= _MSC_VER
551 # define _Noreturn __declspec (noreturn)
552 # else
553 # define _Noreturn YY_ATTRIBUTE ((__noreturn__))
554 # endif
555 #endif
556 
557 /* Suppress unused-variable warnings by "using" E. */
558 #if ! defined lint || defined __GNUC__
559 # define YYUSE(E) ((void) (E))
560 #else
561 # define YYUSE(E) /* empty */
562 #endif
563 
564 #if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
565 /* Suppress an incorrect diagnostic about yylval being uninitialized. */
566 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
567  _Pragma ("GCC diagnostic push") \
568  _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\
569  _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
570 # define YY_IGNORE_MAYBE_UNINITIALIZED_END \
571  _Pragma ("GCC diagnostic pop")
572 #else
573 # define YY_INITIAL_VALUE(Value) Value
574 #endif
575 #ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
576 # define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
577 # define YY_IGNORE_MAYBE_UNINITIALIZED_END
578 #endif
579 #ifndef YY_INITIAL_VALUE
580 # define YY_INITIAL_VALUE(Value) /* Nothing. */
581 #endif
582 
583 
584 #if ! defined yyoverflow || YYERROR_VERBOSE
585 
586 /* The parser invokes alloca or malloc; define the necessary symbols. */
587 
588 # ifdef YYSTACK_ALLOC
589  /* Pacify GCC's 'empty if-body' warning. */
590 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
591 # ifndef YYSTACK_ALLOC_MAXIMUM
592  /* The OS might guarantee only one guard page at the bottom of the stack,
593  and a page size can be as small as 4096 bytes. So we cannot safely
594  invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
595  to allow for a few compiler-allocated temporary stack slots. */
596 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
597 # endif
598 # else
599 # define YYSTACK_ALLOC YYMALLOC
600 # define YYSTACK_FREE YYFREE
601 # ifndef YYSTACK_ALLOC_MAXIMUM
602 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
603 # endif
604 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
605  && ! ((defined YYMALLOC || defined malloc) \
606  && (defined YYFREE || defined free)))
607 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
608 # ifndef EXIT_SUCCESS
609 # define EXIT_SUCCESS 0
610 # endif
611 # endif
612 # ifndef YYMALLOC
613 # define YYMALLOC malloc
614 # if ! defined malloc && ! defined EXIT_SUCCESS
615 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
616 # endif
617 # endif
618 # ifndef YYFREE
619 # define YYFREE free
620 # if ! defined free && ! defined EXIT_SUCCESS
621 void free (void *); /* INFRINGES ON USER NAME SPACE */
622 # endif
623 # endif
624 # endif
625 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
626 
627 
628 #if (! defined yyoverflow \
629  && (! defined __cplusplus \
630  || (defined OCTAVE_STYPE_IS_TRIVIAL && OCTAVE_STYPE_IS_TRIVIAL)))
631 
632 /* A type that is properly aligned for any stack member. */
633 union yyalloc
634 {
637 };
638 
639 /* The size of the maximum gap between one aligned stack and the next. */
640 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
641 
642 /* The size of an array large to enough to hold all stacks, each with
643  N elements. */
644 # define YYSTACK_BYTES(N) \
645  ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
646  + YYSTACK_GAP_MAXIMUM)
647 
648 # define YYCOPY_NEEDED 1
649 
650 /* Relocate STACK from its old location to the new one. The
651  local variables YYSIZE and YYSTACKSIZE give the old and new number of
652  elements in the stack, and YYPTR gives the new location of the
653  stack. Advance YYPTR to a properly aligned location for the next
654  stack. */
655 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
656  do \
657  { \
658  YYSIZE_T yynewbytes; \
659  YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
660  Stack = &yyptr->Stack_alloc; \
661  yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
662  yyptr += yynewbytes / sizeof (*yyptr); \
663  } \
664  while (0)
665 
666 #endif
667 
668 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
669 /* Copy COUNT objects from SRC to DST. The source and destination do
670  not overlap. */
671 # ifndef YYCOPY
672 # if defined __GNUC__ && 1 < __GNUC__
673 # define YYCOPY(Dst, Src, Count) \
674  __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))
675 # else
676 # define YYCOPY(Dst, Src, Count) \
677  do \
678  { \
679  YYSIZE_T yyi; \
680  for (yyi = 0; yyi < (Count); yyi++) \
681  (Dst)[yyi] = (Src)[yyi]; \
682  } \
683  while (0)
684 # endif
685 # endif
686 #endif /* !YYCOPY_NEEDED */
687 
688 /* YYFINAL -- State number of the termination state. */
689 #define YYFINAL 110
690 /* YYLAST -- Last index in YYTABLE. */
691 #define YYLAST 1478
692 
693 /* YYNTOKENS -- Number of terminals. */
694 #define YYNTOKENS 102
695 /* YYNNTS -- Number of nonterminals. */
696 #define YYNNTS 105
697 /* YYNRULES -- Number of rules. */
698 #define YYNRULES 282
699 /* YYNSTATES -- Number of states. */
700 #define YYNSTATES 524
701 
702 /* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned
703  by yylex, with out-of-bounds checking. */
704 #define YYUNDEFTOK 2
705 #define YYMAXUTOK 339
706 
707 #define YYTRANSLATE(YYX) \
708  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
709 
710 /* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
711  as returned by yylex, without out-of-bounds checking. */
712 static const yytype_uint8 yytranslate[] =
713 {
714  0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
715  100, 2, 2, 2, 2, 2, 2, 2, 2, 2,
716  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
717  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
718  90, 91, 7, 6, 97, 5, 96, 8, 2, 2,
719  2, 2, 2, 2, 2, 2, 2, 2, 4, 98,
720  2, 3, 2, 2, 99, 2, 2, 2, 2, 2,
721  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
722  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
723  2, 92, 2, 93, 2, 2, 2, 2, 2, 2,
724  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
725  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
726  2, 2, 2, 94, 2, 95, 2, 2, 2, 2,
727  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
728  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
729  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
730  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
731  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
732  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
733  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
734  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
735  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
736  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
737  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
738  2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
739  2, 2, 2, 2, 2, 2, 1, 2, 9, 10,
740  11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
741  21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
742  31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
743  41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
744  51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
745  61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
746  71, 72, 73, 74, 75, 76, 77, 78, 79, 80,
747  81, 82, 83, 84, 85, 86, 87, 88, 89, 101
748 };
749 
750 #if OCTAVE_DEBUG
751  /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
752 static const yytype_uint16 yyrline[] =
753 {
754  0, 399, 399, 405, 412, 419, 425, 429, 431, 436,
755  437, 441, 445, 447, 451, 453, 455, 467, 478, 480,
756  491, 499, 508, 516, 518, 522, 524, 526, 530, 534,
757  536, 550, 554, 556, 575, 576, 578, 580, 582, 584,
758  588, 595, 602, 604, 606, 608, 613, 615, 617, 619,
759  623, 632, 640, 642, 644, 646, 651, 656, 663, 670,
760  672, 674, 676, 685, 694, 703, 712, 714, 716, 718,
761  720, 722, 724, 726, 728, 730, 732, 734, 736, 738,
762  740, 742, 744, 746, 748, 750, 752, 756, 758, 760,
763  762, 771, 780, 789, 798, 800, 802, 804, 806, 808,
764  810, 814, 818, 820, 833, 835, 837, 839, 841, 843,
765  845, 847, 849, 851, 853, 855, 857, 861, 875, 877,
766  879, 881, 883, 885, 887, 889, 891, 893, 895, 897,
767  899, 901, 903, 907, 922, 924, 932, 934, 936, 938,
768  940, 942, 944, 952, 957, 964, 966, 974, 979, 981,
769  994, 996, 1004, 1014, 1016, 1023, 1031, 1038, 1049, 1062,
770  1075, 1076, 1078, 1080, 1087, 1089, 1096, 1105, 1118, 1130,
771  1137, 1149, 1161, 1173, 1191, 1193, 1195, 1203, 1216, 1229,
772  1246, 1275, 1289, 1297, 1304, 1313, 1314, 1330, 1332, 1339,
773  1341, 1349, 1355, 1373, 1390, 1392, 1403, 1429, 1445, 1454,
774  1460, 1470, 1479, 1488, 1499, 1517, 1523, 1531, 1540, 1580,
775  1593, 1606, 1621, 1622, 1626, 1628, 1635, 1637, 1644, 1654,
776  1655, 1660, 1659, 1668, 1667, 1680, 1684, 1686, 1688, 1690,
777  1692, 1699, 1706, 1713, 1723, 1735, 1749, 1751, 1760, 1762,
778  1771, 1783, 1797, 1802, 1809, 1812, 1811, 1826, 1828, 1832,
779  1840, 1854, 1866, 1879, 1881, 1890, 1894, 1906, 1919, 1921,
780  1930, 1939, 1946, 1949, 1954, 1958, 1960, 1962, 1964, 1969,
781  1970, 1975, 1976, 1980, 1982, 1986, 1988, 1990, 1992, 1994,
782  1996, 2001, 2002
783 };
784 #endif
785 
786 #if OCTAVE_DEBUG || YYERROR_VERBOSE || 0
787 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
788  First, the terminals, then, starting at YYNTOKENS, nonterminals. */
789 static const char *const yytname[] =
790 {
791  "$end", "error", "$undefined", "'='", "':'", "'-'", "'+'", "'*'", "'/'",
792  "ADD_EQ", "SUB_EQ", "MUL_EQ", "DIV_EQ", "LEFTDIV_EQ", "POW_EQ",
793  "EMUL_EQ", "EDIV_EQ", "ELEFTDIV_EQ", "EPOW_EQ", "AND_EQ", "OR_EQ",
794  "LSHIFT_EQ", "RSHIFT_EQ", "LSHIFT", "RSHIFT", "EXPR_AND_AND",
795  "EXPR_OR_OR", "EXPR_AND", "EXPR_OR", "EXPR_NOT", "EXPR_LT", "EXPR_LE",
796  "EXPR_EQ", "EXPR_NE", "EXPR_GE", "EXPR_GT", "LEFTDIV", "EMUL", "EDIV",
797  "ELEFTDIV", "EPLUS", "EMINUS", "HERMITIAN", "TRANSPOSE", "PLUS_PLUS",
798  "MINUS_MINUS", "POW", "EPOW", "NUM", "IMAG_NUM", "STRUCT_ELT", "NAME",
799  "END", "DQ_STRING", "SQ_STRING", "FOR", "PARFOR", "WHILE", "DO", "UNTIL",
800  "IF", "ELSEIF", "ELSE", "SWITCH", "CASE", "OTHERWISE", "BREAK",
801  "CONTINUE", "FUNC_RET", "UNWIND", "CLEANUP", "TRY", "CATCH", "GLOBAL",
802  "PERSISTENT", "FCN_HANDLE", "CLASSDEF", "PROPERTIES", "METHODS",
803  "EVENTS", "ENUMERATION", "METAQUERY", "SUPERCLASSREF", "FQ_IDENT", "GET",
804  "SET", "FCN", "END_OF_INPUT", "LEXICAL_ERROR", "INPUT_FILE", "'('",
805  "')'", "'['", "']'", "'{'", "'}'", "'.'", "','", "';'", "'@'", "'\\n'",
806  "UNARY", "$accept", "input", "simple_list", "simple_list1", "opt_list",
807  "list", "list1", "statement", "word_list_cmd", "word_list", "identifier",
808  "superclass_identifier", "meta_identifier", "string", "constant",
809  "matrix", "matrix_rows", "cell", "cell_rows", "cell_or_matrix_row",
810  "fcn_handle", "anon_fcn_handle", "primary_expr", "magic_colon",
811  "magic_tilde", "arg_list", "indirect_ref_op", "oper_expr", "power_expr",
812  "colon_expr", "colon_expr1", "simple_expr", "assign_lhs", "assign_expr",
813  "expression", "command", "declaration", "decl1", "decl_param_init",
814  "decl2", "select_command", "if_command", "if_cmd_list", "if_cmd_list1",
815  "elseif_clause", "else_clause", "switch_command", "case_list",
816  "case_list1", "switch_case", "default_case", "loop_command",
817  "jump_command", "except_command", "push_fcn_symtab", "param_list_beg",
818  "param_list_end", "param_list", "param_list1", "param_list2",
819  "param_list_elt", "return_list", "return_list1", "file", "function_beg",
820  "function", "fcn_name", "function1", "function2", "function_end",
821  "classdef_beg", "classdef", "opt_attr_list", "attr_list", "attr",
822  "opt_superclass_list", "superclass_list", "$@1", "$@2", "superclass",
823  "class_body", "properties_block", "property_list", "class_property",
824  "methods_block", "method_decl1", "method_decl", "$@3", "method",
825  "methods_list", "events_block", "events_list", "class_event",
826  "enum_block", "enum_list", "class_enum", "stmt_begin", "stash_comment",
827  "parse_error", "sep_no_nl", "opt_sep_no_nl", "opt_nl", "nl", "sep",
828  "opt_sep", YY_NULLPTR
829 };
830 #endif
831 
832 # ifdef YYPRINT
833 /* YYTOKNUM[NUM] -- (External) token number corresponding to the
834  (internal) symbol number NUM (which must be that of a token). */
835 static const yytype_uint16 yytoknum[] =
836 {
837  0, 256, 257, 61, 58, 45, 43, 42, 47, 258,
838  259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
839  269, 270, 271, 272, 273, 274, 275, 276, 277, 278,
840  279, 280, 281, 282, 283, 284, 285, 286, 287, 288,
841  289, 290, 291, 292, 293, 294, 295, 296, 297, 298,
842  299, 300, 301, 302, 303, 304, 305, 306, 307, 308,
843  309, 310, 311, 312, 313, 314, 315, 316, 317, 318,
844  319, 320, 321, 322, 323, 324, 325, 326, 327, 328,
845  329, 330, 331, 332, 333, 334, 335, 336, 337, 338,
846  40, 41, 91, 93, 123, 125, 46, 44, 59, 64,
847  10, 339
848 };
849 # endif
850 
851 #define YYPACT_NINF -421
852 
853 #define yypact_value_is_default(Yystate) \
854  (!!((Yystate) == (-421)))
855 
856 #define YYTABLE_NINF -270
857 
858 #define yytable_value_is_error(Yytable_value) \
859  0
860 
861  /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
862  STATE-NUM. */
863 static const yytype_int16 yypact[] =
864 {
865  557, -421, 380, 380, 380, 380, 380, -421, -421, -421,
866  -421, -421, -421, -421, -421, -421, -421, -421, -421, -421,
867  -421, -421, -421, 29, 29, -421, -421, -421, -64, 1171,
868  701, 701, -421, -421, -5, 54, 6, -36, -421, -421,
869  49, -421, -421, -421, -421, -421, -421, -421, -421, -421,
870  1343, -421, 142, 1443, 650, -421, -421, -421, -421, -421,
871  -421, -421, -421, -421, -421, 70, -421, -421, -421, -421,
872  90, -421, 98, -421, 5, 5, 5, 5, 5, 1197,
873  1253, 1171, 111, 1171, 1171, 111, 111, 162, 29, -421,
874  29, -421, 1003, 77, 105, -421, 380, 891, 7, -421,
875  -421, -421, 102, -421, 20, -421, -421, -421, 16, -421,
876  -421, -421, -421, 947, -421, 49, -421, 380, 380, 380,
877  380, 380, 380, 380, 380, 380, 380, -421, -421, -421,
878  -421, 1279, 1279, 727, 783, -421, -7, 380, 380, 380,
879  380, 380, 380, 380, 380, 380, 380, 380, 380, 380,
880  1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171, 1171,
881  1171, 1171, 1171, 1171, 1171, -421, 2, -421, -421, 1171,
882  898, 203, 1171, 210, -421, -421, -421, -421, 128, 1059,
883  -421, 175, 159, 111, 1059, 1059, -421, -421, -421, 152,
884  -421, 111, -421, -421, 111, -421, -421, 146, -421, 701,
885  891, -421, 701, -421, -421, -421, -421, 154, 151, -421,
886  1115, -421, -421, 1355, 1355, 5, 5, 5, 5, 5,
887  5, 1355, 1355, 1279, 1279, 1279, 1279, 1279, -421, -12,
888  -12, -421, 50, -421, 56, -421, 1171, 1343, -421, -421,
889  1204, 337, 253, 223, 193, 193, 193, 193, 193, 193,
890  -421, -421, -421, -421, -421, -421, -421, -421, -421, -421,
891  -421, -421, -421, -421, -421, 156, 169, -16, 272, 276,
892  14, -421, 748, 1171, 830, 1171, 111, -421, -421, -421,
893  232, 111, -421, -421, -421, -421, -421, 196, 224, 19,
894  1171, -421, 629, -421, 212, 214, 891, -421, -421, -421,
895  -421, -421, -421, -421, 13, -421, -12, -12, -12, -12,
896  -12, -421, -421, 809, 865, 8, -421, 891, -421, 218,
897  29, 29, -421, -421, 61, -10, 111, -421, 1059, 1171,
898  -421, 1171, -421, 1059, 1171, 1059, 111, 111, -421, -421,
899  256, 196, -421, -421, -421, -421, -421, -421, -421, 15,
900  29, -421, -421, -421, 52, -421, 143, -421, 1171, -421,
901  -421, -421, -421, 29, -421, -421, 1059, -15, 220, 111,
902  215, 111, 261, -421, -421, 1171, 1059, 111, 111, -421,
903  -421, -421, 111, 111, 29, 311, 53, -421, 285, -421,
904  -421, 225, -421, -15, -421, -421, -421, 111, 1059, 1171,
905  1059, -421, -421, -421, 1171, 1059, 1059, 1059, -421, -421,
906  -421, 15, -421, 111, 290, -421, -421, 1059, 266, 228,
907  270, 111, -421, -421, 271, 274, 1171, -421, 241, 103,
908  -421, 275, -421, 111, -421, 1059, 111, -421, -421, -421,
909  -421, -421, -421, -421, -421, -421, -421, 111, -421, -421,
910  -421, -421, 241, -421, 1059, -421, 1059, 212, 212, 212,
911  212, 155, -421, 277, -421, 111, 111, 111, 111, -421,
912  -421, -421, -421, -421, -421, 211, 3, 217, 219, -421,
913  327, 111, -421, -421, -421, -421, -421, 111, -11, -421,
914  -421, 111, -421, -421, 242, 111, -421, -421, 222, 11,
915  26, 328, -421, 246, 1171, 248, 1171, -421, -421, -421,
916  -421, -421, -421, -421, -421, 247, -421, -421, 243, 29,
917  -421, -421, 249, -421
918 };
919 
920  /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
921  Performed when YYTABLE does not specify something else to do. Zero
922  means the default is an error. */
923 static const yytype_uint16 yydefact[] =
924 {
925  0, 264, 0, 0, 0, 0, 0, 25, 26, 20,
926  23, 24, 262, 262, 262, 262, 262, 262, 174, 175,
927  176, 262, 262, 0, 0, 22, 21, 263, 271, 0,
928  34, 34, 265, 266, 0, 0, 0, 269, 7, 16,
929  42, 48, 47, 27, 43, 45, 46, 44, 135, 59,
930  102, 104, 101, 133, 0, 134, 14, 15, 136, 137,
931  150, 151, 138, 139, 140, 0, 142, 262, 141, 4,
932  270, 5, 0, 42, 74, 73, 72, 70, 71, 0,
933  0, 0, 281, 0, 0, 281, 281, 148, 143, 145,
934  144, 273, 9, 272, 0, 50, 51, 35, 0, 29,
935  53, 54, 36, 52, 0, 32, 40, 181, 0, 261,
936  1, 3, 2, 270, 6, 17, 18, 0, 0, 0,
937  0, 0, 0, 0, 0, 0, 0, 66, 67, 60,
938  61, 0, 0, 0, 0, 58, 0, 0, 0, 0,
939  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
940  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
941  0, 0, 0, 0, 0, 198, 0, 267, 268, 0,
942  117, 0, 0, 0, 261, 275, 276, 277, 282, 9,
943  261, 0, 153, 281, 9, 9, 147, 146, 209, 0,
944  10, 281, 12, 262, 281, 274, 49, 38, 28, 34,
945  37, 31, 34, 184, 51, 190, 189, 0, 186, 187,
946  180, 8, 19, 78, 77, 79, 80, 85, 83, 84,
947  86, 81, 82, 0, 0, 0, 0, 0, 87, 75,
948  76, 62, 0, 64, 0, 68, 0, 103, 105, 106,
949  115, 116, 113, 114, 107, 108, 109, 112, 110, 111,
950  118, 119, 120, 121, 122, 123, 124, 127, 128, 129,
951  130, 131, 132, 125, 126, 0, 0, 0, 201, 0,
952  281, 199, 0, 0, 0, 0, 281, 278, 279, 280,
953  0, 281, 152, 262, 262, 156, 154, 160, 0, 0,
954  0, 196, 282, 11, 212, 0, 39, 30, 55, 56,
955  57, 33, 182, 183, 0, 41, 100, 99, 98, 96,
956  97, 88, 89, 0, 0, 0, 63, 0, 65, 0,
957  0, 0, 191, 194, 0, 0, 281, 204, 9, 0,
958  261, 0, 261, 9, 0, 9, 281, 281, 262, 262,
959  0, 162, 164, 161, 262, 179, 262, 149, 13, 0,
960  0, 197, 188, 90, 0, 92, 0, 94, 0, 69,
961  202, 203, 193, 0, 201, 200, 9, 0, 0, 281,
962  118, 281, 0, 169, 155, 0, 9, 281, 281, 159,
963  165, 163, 281, 281, 0, 216, 0, 214, 219, 91,
964  93, 0, 195, 0, 207, 208, 206, 281, 9, 0,
965  9, 168, 261, 158, 0, 9, 9, 9, 218, 147,
966  213, 0, 221, 281, 220, 95, 205, 9, 0, 0,
967  0, 281, 261, 167, 0, 0, 0, 215, 0, 0,
968  223, 0, 170, 281, 172, 9, 281, 177, 178, 217,
969  225, 222, 211, 262, 262, 262, 262, 281, 226, 227,
970  228, 229, 0, 171, 9, 157, 9, 212, 212, 212,
971  212, 0, 224, 0, 166, 281, 281, 281, 281, 210,
972  230, 231, 232, 233, 173, 0, 262, 0, 0, 235,
973  238, 281, 236, 241, 248, 247, 249, 281, 0, 252,
974  255, 281, 253, 257, 0, 281, 258, 147, 0, 262,
975  242, 0, 244, 0, 0, 0, 0, 234, 237, 240,
976  250, 243, 245, 251, 254, 0, 256, 259, 0, 0,
977  260, 239, 242, 246
978 };
979 
980  /* YYPGOTO[NTERM-NUM]. */
981 static const yytype_int16 yypgoto[] =
982 {
983  -421, -421, -421, -421, -176, -421, -421, 4, -421, -421,
984  0, -421, -421, -19, -421, -421, -421, -421, -421, -13,
985  -421, -421, -63, -175, -81, -95, -105, 417, -56, -421,
986  -421, 427, -49, -421, -24, -421, -421, 316, -375, -62,
987  -421, -421, -421, -421, -421, -421, -421, -421, -421, 12,
988  17, -421, -421, -421, -421, -421, -421, -33, -421, -421,
989  39, -143, -421, -421, -421, -420, -421, 21, -421, -46,
990  -421, -421, -265, -421, -59, -421, -421, -421, -421, -104,
991  -421, -107, -421, -142, -106, -162, -421, -421, -140, -421,
992  -88, -421, -129, -84, -421, -127, -158, -2, -421, 342,
993  344, -421, -421, 192, 112
994 };
995 
996  /* YYDEFGOTO[NTERM-NUM]. */
997 static const yytype_int16 yydefgoto[] =
998 {
999  -1, 35, 36, 37, 189, 190, 191, 192, 39, 115,
1000  73, 41, 42, 43, 44, 45, 98, 46, 104, 99,
1001  47, 48, 49, 100, 101, 102, 136, 50, 229, 51,
1002  52, 53, 54, 55, 56, 57, 58, 88, 290, 89,
1003  59, 60, 181, 182, 285, 286, 61, 340, 341, 342,
1004  343, 62, 63, 64, 65, 108, 303, 511, 207, 208,
1005  209, 269, 324, 66, 67, 68, 270, 271, 327, 396,
1006  193, 194, 350, 386, 387, 413, 414, 428, 452, 441,
1007  447, 448, 481, 482, 449, 502, 485, 519, 486, 487,
1008  450, 491, 492, 451, 495, 496, 210, 488, 69, 70,
1009  71, 92, 93, 178, 179
1010 };
1011 
1012  /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1013  positive, shift that token. If negative, reduce the rule whose
1014  number is the opposite. If YYTABLE_NINF, syntax error. */
1015 static const yytype_int16 yytable[] =
1016 {
1017  40, 109, 197, 280, 38, 94, 103, 103, 288, 289,
1018  79, 80, 81, 82, 83, 84, 276, 203, 105, 85,
1019  86, 116, 281, 87, 87, 298, 187, 205, 187, -192,
1020  171, 173, 311, 312, 426, 9, 91, 394, 232, 234,
1021  9, 9, 204, 235, 384, 204, 206, 127, 128, 129,
1022  130, 131, 132, 9, 110, 483, 484, 174, 357, 180,
1023  183, 32, 33, 509, 9, 166, 9, 9, 228, 228,
1024  106, 345, 395, 103, 265, 266, 230, 322, 313, 484,
1025  9, 267, 314, 236, 135, 107, 265, 266, 87, -180,
1026  87, 346, 40, 111, 267, 133, 212, -180, 358, 134,
1027  198, 135, 10, 11, 107, 199, 112, -185, 87, 103,
1028  103, 175, 176, 40, 177, 201, 107, 211, 202, 299,
1029  272, 298, 506, 274, 315, 315, 250, 251, 252, 253,
1030  254, 255, 256, 257, 258, 259, 260, 261, 262, 263,
1031  264, 316, 298, 389, 410, 94, 137, 317, 94, 317,
1032  411, 318, 367, 317, 362, 442, 165, 372, 363, 374,
1033  228, 228, 228, 228, 228, 186, 268, 306, 307, 308,
1034  309, 310, 369, 106, 371, 103, 300, 195, 103, 40,
1035  443, 444, 445, 446, 40, 40, 297, 167, 168, 301,
1036  393, 294, 465, 466, 467, 468, 196, 184, 185, 200,
1037  403, 315, 315, 315, 315, 315, 273, 469, 175, 176,
1038  40, 177, 319, 275, 305, 299, 138, 139, 354, 356,
1039  283, 284, 418, 205, 420, 277, 278, 282, 279, 423,
1040  424, 425, 443, 444, 445, 446, 299, 326, 390, 291,
1041  317, 431, 206, 296, 421, 302, 138, 139, 304, 330,
1042  142, 332, 320, 144, 145, 146, 147, 148, 149, 455,
1043  338, 339, 9, 479, 436, 321, 347, 323, 9, 489,
1044  9, 493, 300, 9, 507, -192, 138, 139, 463, 325,
1045  464, 336, 337, 144, 145, 146, 147, 148, 149, 103,
1046  103, 334, 40, 300, 344, 287, 348, 9, 513, 9,
1047  516, 351, 349, 293, 87, 368, 295, 370, 379, 359,
1048  373, 397, 399, 401, 409, 412, 415, 430, 432, 433,
1049  360, 361, 434, 437, 440, 364, 438, 453, 40, 474,
1050  497, 512, 504, 40, 391, 40, 377, 378, 520, 107,
1051  90, 521, 382, 352, 383, 501, 365, 416, 462, 385,
1052  388, 402, 427, 380, 470, 471, 508, 523, 381, 510,
1053  138, 139, 140, 392, 142, 143, 40, 144, 145, 146,
1054  147, 148, 149, 472, 514, 419, 40, 473, 517, 113,
1055  422, 114, 328, 292, 408, 2, 3, 0, 333, 0,
1056  0, 0, 0, 335, 0, 0, 0, 0, 40, 0,
1057  40, 0, 439, 0, 0, 40, 40, 40, 0, 4,
1058  0, 385, 0, 0, 0, 0, 0, 40, 0, 74,
1059  75, 76, 77, 78, 5, 6, 0, 0, 7, 8,
1060  0, 9, 0, 10, 11, 40, 0, 0, 366, 0,
1061  0, 457, 458, 459, 460, 0, 0, 0, 375, 376,
1062  0, 0, 0, 0, 40, 0, 40, 0, 0, 0,
1063  0, 25, 26, 0, 0, 0, 0, 0, 0, 0,
1064  29, 0, 30, 0, 31, 480, 0, 490, 494, 72,
1065  515, 398, 518, 400, 0, 0, 0, 0, 500, 404,
1066  405, 0, 0, 0, 406, 407, 0, 0, 480, 0,
1067  0, 0, 0, 490, 0, 494, 170, 170, 0, 417,
1068  0, 0, 0, 76, 0, 0, 0, 0, 0, 522,
1069  0, 0, 0, 0, 0, 429, 0, 0, 0, 0,
1070  0, 0, 0, 435, 213, 214, 215, 216, 217, 218,
1071  219, 220, 221, 222, 0, 454, 0, 0, 456, 0,
1072  0, 0, 0, 0, 237, 0, 0, 0, 1, 461,
1073  0, 0, 2, 3, 0, 238, 239, 240, 241, 242,
1074  243, 244, 245, 246, 247, 248, 249, 475, 476, 477,
1075  478, 0, 0, 0, 0, 0, 4, 0, 0, 0,
1076  0, 0, 0, 498, 0, 0, 0, 0, 0, 499,
1077  0, 5, 6, 503, 0, 7, 8, 505, 9, 0,
1078  10, 11, 12, 13, 14, 15, 0, 16, 0, 0,
1079  17, 0, 0, 18, 19, 20, 21, 0, 22, 0,
1080  23, 24, 0, 0, 2, 3, 0, 0, 25, 26,
1081  0, 0, 0, -180, -269, 27, 28, 29, 0, 30,
1082  0, 31, 0, 150, 32, 33, 34, -269, 4, 151,
1083  152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1084  162, 163, 164, 5, 6, 0, 0, 7, 8, 0,
1085  9, 0, 10, 11, 12, 13, 14, 15, 0, 16,
1086  0, 0, 17, 0, 0, 18, 19, 20, 21, 0,
1087  22, 0, 23, 24, 0, 95, 2, 3, 0, 0,
1088  25, 26, 0, 0, 0, -180, 0, 0, 28, 29,
1089  0, 30, 0, 31, 0, 0, 277, 278, 34, 279,
1090  96, 95, 2, 3, 0, 0, 0, 0, 0, 0,
1091  0, 0, 0, 0, 0, 5, 6, 0, 0, 7,
1092  8, 329, 9, 0, 10, 11, 96, 151, 152, 153,
1093  154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
1094  164, 5, 6, 0, 0, 7, 8, 0, 9, 0,
1095  10, 11, 25, 26, 0, 0, 0, 95, 2, 3,
1096  0, 29, 0, 30, 0, 31, 0, 0, 97, 0,
1097  34, 0, 0, 0, 0, 0, 0, 0, 25, 26,
1098  0, 0, 96, 95, 2, 3, 0, 29, 231, 30,
1099  0, 31, 0, 0, 0, 0, 34, 5, 6, 0,
1100  0, 7, 8, 331, 9, 0, 10, 11, 96, 151,
1101  152, 153, 154, 155, 156, 157, 158, 159, 160, 161,
1102  162, 163, 164, 5, 6, 0, 0, 7, 8, 0,
1103  9, 0, 10, 11, 25, 26, 0, 0, 0, 95,
1104  2, 3, 0, 29, 0, 30, 0, 31, 233, 0,
1105  0, 0, 34, 0, 0, 0, 0, 0, 0, 0,
1106  25, 26, 0, 0, 96, 95, 2, 3, 0, 29,
1107  353, 30, 0, 31, 0, 0, 0, 0, 34, 5,
1108  6, 0, 0, 7, 8, 0, 9, 0, 10, 11,
1109  96, 138, 139, 140, 141, 142, 143, 0, 144, 145,
1110  146, 147, 148, 149, 0, 5, 6, 0, 0, 7,
1111  8, 0, 9, 0, 10, 11, 25, 26, 0, 0,
1112  0, 0, 2, 3, 0, 29, 0, 30, 0, 31,
1113  355, 0, 0, 0, 34, 0, 0, 0, 0, 0,
1114  0, 0, 25, 26, 0, 0, 4, 0, 0, 0,
1115  0, 29, 0, 30, 0, 31, 0, 0, 0, 0,
1116  34, 5, 6, 0, 0, 7, 8, 0, 9, 0,
1117  10, 11, 12, 13, 14, 15, 0, 16, 2, 3,
1118  17, 0, 0, 18, 19, 20, 21, 0, 22, 0,
1119  23, 24, 0, 0, 0, 0, 0, 0, 25, 26,
1120  0, 0, 4, -180, 0, 0, 28, 29, 0, 30,
1121  0, 31, 0, 0, 167, 168, 34, 5, 6, 0,
1122  0, 7, 8, 0, 9, 0, 10, 11, 12, 13,
1123  14, 15, 0, 16, 2, 3, 17, 0, 0, 18,
1124  19, 20, 21, 0, 22, 0, 23, 24, 0, 188,
1125  0, 0, 0, 0, 25, 26, 0, 0, 4, -180,
1126  0, 0, 28, 29, 0, 30, 0, 31, 0, 0,
1127  0, 0, 34, 5, 6, 0, 0, 7, 8, 0,
1128  9, 0, 10, 11, 12, 13, 14, 15, 0, 16,
1129  2, 3, 17, 0, 0, 18, 19, 20, 21, 0,
1130  22, 0, 23, 24, 0, 0, 0, 0, 0, 0,
1131  25, 26, 0, 0, 4, -180, 0, 0, 28, 29,
1132  0, 30, 0, 31, 0, 0, 0, 0, 34, 5,
1133  6, 0, 0, 7, 8, 0, 9, 0, 10, 11,
1134  12, 13, 14, 15, 0, 16, 2, 3, 17, 0,
1135  0, 18, 19, 20, 21, 0, 22, 0, 23, 24,
1136  0, 0, 0, 0, 0, 0, 25, 26, 0, 0,
1137  4, 0, 2, 3, 28, 29, 0, 30, 0, 31,
1138  0, 0, 0, 0, 34, 5, 6, 0, 0, 7,
1139  8, 0, 9, 0, 10, 11, 4, 138, 139, 0,
1140  0, 142, 143, 0, 144, 145, 146, 147, 148, 149,
1141  0, 5, 6, 0, 0, 7, 8, 0, 9, 0,
1142  10, 11, 25, 26, 0, 0, 0, 0, 2, 3,
1143  0, 29, 0, 30, 0, 31, 0, 0, 0, 0,
1144  34, 0, 0, 0, 0, 0, 0, 0, 25, 26,
1145  0, 0, 4, 0, 223, 224, 0, 169, 0, 30,
1146  0, 31, 0, 0, 0, 0, 72, 5, 6, 0,
1147  0, 7, 8, 0, 9, 0, 10, 11, 225, 0,
1148  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1149  0, 0, 0, 226, 227, 0, 0, 7, 8, 0,
1150  9, 0, 10, 11, 25, 26, 0, 0, 0, 0,
1151  0, 0, 0, 172, 0, 30, 0, 31, 117, 118,
1152  119, 120, 72, 0, 0, 0, 0, 0, 0, 0,
1153  25, 26, 119, 120, 0, 0, 0, 0, 0, 29,
1154  0, 30, 0, 31, 0, 0, 0, 0, 72, 121,
1155  122, 123, 124, 125, 126, 127, 128, 129, 130, 131,
1156  132, 121, 122, 123, 124, 0, 0, 127, 128, 129,
1157  130, 131, 132, 0, 0, 0, 0, 0, 0, 0,
1158  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1159  0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1160  0, 0, 0, 133, 0, 0, 0, 134, 0, 135,
1161  0, 0, 0, 0, 0, 133, -117, 0, 0, 134,
1162  0, 135, -117, -117, -117, -117, -117, -117, -117, -117,
1163  -117, -117, -117, -117, -117, -117, 138, 139, 140, 141,
1164  142, 143, 0, 144, 145, 146, 147, 148, 149
1165 };
1166 
1167 static const yytype_int16 yycheck[] =
1168 {
1169  0, 34, 97, 179, 0, 29, 30, 31, 184, 185,
1170  12, 13, 14, 15, 16, 17, 174, 1, 31, 21,
1171  22, 40, 180, 23, 24, 200, 88, 108, 90, 3,
1172  79, 80, 44, 45, 409, 51, 100, 52, 133, 134,
1173  51, 51, 29, 50, 29, 29, 108, 42, 43, 44,
1174  45, 46, 47, 51, 0, 52, 476, 81, 50, 83,
1175  84, 97, 98, 52, 51, 67, 51, 51, 131, 132,
1176  75, 52, 87, 97, 84, 85, 132, 93, 90, 499,
1177  51, 92, 94, 90, 96, 90, 84, 85, 88, 86,
1178  90, 72, 92, 87, 92, 90, 115, 86, 90, 94,
1179  93, 96, 53, 54, 90, 98, 100, 91, 108, 133,
1180  134, 97, 98, 113, 100, 95, 90, 113, 98, 200,
1181  169, 296, 497, 172, 229, 230, 150, 151, 152, 153,
1182  154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
1183  164, 91, 317, 91, 91, 169, 4, 97, 172, 97,
1184  97, 95, 328, 97, 93, 52, 86, 333, 97, 335,
1185  223, 224, 225, 226, 227, 3, 166, 223, 224, 225,
1186  226, 227, 330, 75, 332, 199, 200, 100, 202, 179,
1187  77, 78, 79, 80, 184, 185, 199, 97, 98, 202,
1188  366, 193, 457, 458, 459, 460, 91, 85, 86, 97,
1189  376, 306, 307, 308, 309, 310, 3, 52, 97, 98,
1190  210, 100, 236, 3, 210, 296, 23, 24, 313, 314,
1191  61, 62, 398, 304, 400, 97, 98, 52, 100, 405,
1192  406, 407, 77, 78, 79, 80, 317, 270, 95, 87,
1193  97, 417, 304, 97, 402, 91, 23, 24, 97, 273,
1194  27, 275, 96, 30, 31, 32, 33, 34, 35, 435,
1195  64, 65, 51, 52, 422, 96, 290, 267, 51, 52,
1196  51, 52, 296, 51, 52, 3, 23, 24, 454, 3,
1197  456, 283, 284, 30, 31, 32, 33, 34, 35, 313,
1198  314, 59, 292, 317, 70, 183, 292, 51, 52, 51,
1199  52, 87, 90, 191, 304, 329, 194, 331, 52, 91,
1200  334, 91, 97, 52, 3, 30, 91, 27, 52, 91,
1201  320, 321, 52, 52, 83, 325, 52, 52, 328, 52,
1202  3, 3, 90, 333, 358, 335, 338, 339, 91, 90,
1203  24, 98, 344, 304, 346, 488, 325, 393, 452, 349,
1204  350, 375, 411, 341, 461, 461, 498, 519, 341, 499,
1205  23, 24, 25, 363, 27, 28, 366, 30, 31, 32,
1206  33, 34, 35, 461, 503, 399, 376, 461, 505, 37,
1207  404, 37, 270, 191, 384, 5, 6, -1, 276, -1,
1208  -1, -1, -1, 281, -1, -1, -1, -1, 398, -1,
1209  400, -1, 426, -1, -1, 405, 406, 407, -1, 29,
1210  -1, 411, -1, -1, -1, -1, -1, 417, -1, 2,
1211  3, 4, 5, 6, 44, 45, -1, -1, 48, 49,
1212  -1, 51, -1, 53, 54, 435, -1, -1, 326, -1,
1213  -1, 443, 444, 445, 446, -1, -1, -1, 336, 337,
1214  -1, -1, -1, -1, 454, -1, 456, -1, -1, -1,
1215  -1, 81, 82, -1, -1, -1, -1, -1, -1, -1,
1216  90, -1, 92, -1, 94, 475, -1, 477, 478, 99,
1217  504, 369, 506, 371, -1, -1, -1, -1, 488, 377,
1218  378, -1, -1, -1, 382, 383, -1, -1, 498, -1,
1219  -1, -1, -1, 503, -1, 505, 79, 80, -1, 397,
1220  -1, -1, -1, 96, -1, -1, -1, -1, -1, 519,
1221  -1, -1, -1, -1, -1, 413, -1, -1, -1, -1,
1222  -1, -1, -1, 421, 117, 118, 119, 120, 121, 122,
1223  123, 124, 125, 126, -1, 433, -1, -1, 436, -1,
1224  -1, -1, -1, -1, 137, -1, -1, -1, 1, 447,
1225  -1, -1, 5, 6, -1, 138, 139, 140, 141, 142,
1226  143, 144, 145, 146, 147, 148, 149, 465, 466, 467,
1227  468, -1, -1, -1, -1, -1, 29, -1, -1, -1,
1228  -1, -1, -1, 481, -1, -1, -1, -1, -1, 487,
1229  -1, 44, 45, 491, -1, 48, 49, 495, 51, -1,
1230  53, 54, 55, 56, 57, 58, -1, 60, -1, -1,
1231  63, -1, -1, 66, 67, 68, 69, -1, 71, -1,
1232  73, 74, -1, -1, 5, 6, -1, -1, 81, 82,
1233  -1, -1, -1, 86, 87, 88, 89, 90, -1, 92,
1234  -1, 94, -1, 3, 97, 98, 99, 100, 29, 9,
1235  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1236  20, 21, 22, 44, 45, -1, -1, 48, 49, -1,
1237  51, -1, 53, 54, 55, 56, 57, 58, -1, 60,
1238  -1, -1, 63, -1, -1, 66, 67, 68, 69, -1,
1239  71, -1, 73, 74, -1, 4, 5, 6, -1, -1,
1240  81, 82, -1, -1, -1, 86, -1, -1, 89, 90,
1241  -1, 92, -1, 94, -1, -1, 97, 98, 99, 100,
1242  29, 4, 5, 6, -1, -1, -1, -1, -1, -1,
1243  -1, -1, -1, -1, -1, 44, 45, -1, -1, 48,
1244  49, 3, 51, -1, 53, 54, 29, 9, 10, 11,
1245  12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
1246  22, 44, 45, -1, -1, 48, 49, -1, 51, -1,
1247  53, 54, 81, 82, -1, -1, -1, 4, 5, 6,
1248  -1, 90, -1, 92, -1, 94, -1, -1, 97, -1,
1249  99, -1, -1, -1, -1, -1, -1, -1, 81, 82,
1250  -1, -1, 29, 4, 5, 6, -1, 90, 91, 92,
1251  -1, 94, -1, -1, -1, -1, 99, 44, 45, -1,
1252  -1, 48, 49, 3, 51, -1, 53, 54, 29, 9,
1253  10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
1254  20, 21, 22, 44, 45, -1, -1, 48, 49, -1,
1255  51, -1, 53, 54, 81, 82, -1, -1, -1, 4,
1256  5, 6, -1, 90, -1, 92, -1, 94, 95, -1,
1257  -1, -1, 99, -1, -1, -1, -1, -1, -1, -1,
1258  81, 82, -1, -1, 29, 4, 5, 6, -1, 90,
1259  91, 92, -1, 94, -1, -1, -1, -1, 99, 44,
1260  45, -1, -1, 48, 49, -1, 51, -1, 53, 54,
1261  29, 23, 24, 25, 26, 27, 28, -1, 30, 31,
1262  32, 33, 34, 35, -1, 44, 45, -1, -1, 48,
1263  49, -1, 51, -1, 53, 54, 81, 82, -1, -1,
1264  -1, -1, 5, 6, -1, 90, -1, 92, -1, 94,
1265  95, -1, -1, -1, 99, -1, -1, -1, -1, -1,
1266  -1, -1, 81, 82, -1, -1, 29, -1, -1, -1,
1267  -1, 90, -1, 92, -1, 94, -1, -1, -1, -1,
1268  99, 44, 45, -1, -1, 48, 49, -1, 51, -1,
1269  53, 54, 55, 56, 57, 58, -1, 60, 5, 6,
1270  63, -1, -1, 66, 67, 68, 69, -1, 71, -1,
1271  73, 74, -1, -1, -1, -1, -1, -1, 81, 82,
1272  -1, -1, 29, 86, -1, -1, 89, 90, -1, 92,
1273  -1, 94, -1, -1, 97, 98, 99, 44, 45, -1,
1274  -1, 48, 49, -1, 51, -1, 53, 54, 55, 56,
1275  57, 58, -1, 60, 5, 6, 63, -1, -1, 66,
1276  67, 68, 69, -1, 71, -1, 73, 74, -1, 76,
1277  -1, -1, -1, -1, 81, 82, -1, -1, 29, 86,
1278  -1, -1, 89, 90, -1, 92, -1, 94, -1, -1,
1279  -1, -1, 99, 44, 45, -1, -1, 48, 49, -1,
1280  51, -1, 53, 54, 55, 56, 57, 58, -1, 60,
1281  5, 6, 63, -1, -1, 66, 67, 68, 69, -1,
1282  71, -1, 73, 74, -1, -1, -1, -1, -1, -1,
1283  81, 82, -1, -1, 29, 86, -1, -1, 89, 90,
1284  -1, 92, -1, 94, -1, -1, -1, -1, 99, 44,
1285  45, -1, -1, 48, 49, -1, 51, -1, 53, 54,
1286  55, 56, 57, 58, -1, 60, 5, 6, 63, -1,
1287  -1, 66, 67, 68, 69, -1, 71, -1, 73, 74,
1288  -1, -1, -1, -1, -1, -1, 81, 82, -1, -1,
1289  29, -1, 5, 6, 89, 90, -1, 92, -1, 94,
1290  -1, -1, -1, -1, 99, 44, 45, -1, -1, 48,
1291  49, -1, 51, -1, 53, 54, 29, 23, 24, -1,
1292  -1, 27, 28, -1, 30, 31, 32, 33, 34, 35,
1293  -1, 44, 45, -1, -1, 48, 49, -1, 51, -1,
1294  53, 54, 81, 82, -1, -1, -1, -1, 5, 6,
1295  -1, 90, -1, 92, -1, 94, -1, -1, -1, -1,
1296  99, -1, -1, -1, -1, -1, -1, -1, 81, 82,
1297  -1, -1, 29, -1, 5, 6, -1, 90, -1, 92,
1298  -1, 94, -1, -1, -1, -1, 99, 44, 45, -1,
1299  -1, 48, 49, -1, 51, -1, 53, 54, 29, -1,
1300  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1301  -1, -1, -1, 44, 45, -1, -1, 48, 49, -1,
1302  51, -1, 53, 54, 81, 82, -1, -1, -1, -1,
1303  -1, -1, -1, 90, -1, 92, -1, 94, 5, 6,
1304  7, 8, 99, -1, -1, -1, -1, -1, -1, -1,
1305  81, 82, 7, 8, -1, -1, -1, -1, -1, 90,
1306  -1, 92, -1, 94, -1, -1, -1, -1, 99, 36,
1307  37, 38, 39, 40, 41, 42, 43, 44, 45, 46,
1308  47, 36, 37, 38, 39, -1, -1, 42, 43, 44,
1309  45, 46, 47, -1, -1, -1, -1, -1, -1, -1,
1310  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1311  -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
1312  -1, -1, -1, 90, -1, -1, -1, 94, -1, 96,
1313  -1, -1, -1, -1, -1, 90, 3, -1, -1, 94,
1314  -1, 96, 9, 10, 11, 12, 13, 14, 15, 16,
1315  17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
1316  27, 28, -1, 30, 31, 32, 33, 34, 35
1317 };
1318 
1319  /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1320  symbol of state STATE-NUM. */
1321 static const yytype_uint8 yystos[] =
1322 {
1323  0, 1, 5, 6, 29, 44, 45, 48, 49, 51,
1324  53, 54, 55, 56, 57, 58, 60, 63, 66, 67,
1325  68, 69, 71, 73, 74, 81, 82, 88, 89, 90,
1326  92, 94, 97, 98, 99, 103, 104, 105, 109, 110,
1327  112, 113, 114, 115, 116, 117, 119, 122, 123, 124,
1328  129, 131, 132, 133, 134, 135, 136, 137, 138, 142,
1329  143, 148, 153, 154, 155, 156, 165, 166, 167, 200,
1330  201, 202, 99, 112, 129, 129, 129, 129, 129, 199,
1331  199, 199, 199, 199, 199, 199, 199, 112, 139, 141,
1332  139, 100, 203, 204, 136, 4, 29, 97, 118, 121,
1333  125, 126, 127, 136, 120, 121, 75, 90, 157, 159,
1334  0, 87, 100, 201, 202, 111, 115, 5, 6, 7,
1335  8, 36, 37, 38, 39, 40, 41, 42, 43, 44,
1336  45, 46, 47, 90, 94, 96, 128, 4, 23, 24,
1337  25, 26, 27, 28, 30, 31, 32, 33, 34, 35,
1338  3, 9, 10, 11, 12, 13, 14, 15, 16, 17,
1339  18, 19, 20, 21, 22, 86, 199, 97, 98, 90,
1340  133, 134, 90, 134, 136, 97, 98, 100, 205, 206,
1341  136, 144, 145, 136, 206, 206, 3, 141, 76, 106,
1342  107, 108, 109, 172, 173, 100, 91, 127, 93, 98,
1343  97, 95, 98, 1, 29, 126, 141, 160, 161, 162,
1344  198, 109, 115, 129, 129, 129, 129, 129, 129, 129,
1345  129, 129, 129, 5, 6, 29, 44, 45, 124, 130,
1346  130, 91, 127, 95, 127, 50, 90, 129, 133, 133,
1347  133, 133, 133, 133, 133, 133, 133, 133, 133, 133,
1348  136, 136, 136, 136, 136, 136, 136, 136, 136, 136,
1349  136, 136, 136, 136, 136, 84, 85, 92, 112, 163,
1350  168, 169, 134, 3, 134, 3, 198, 97, 98, 100,
1351  106, 198, 52, 61, 62, 146, 147, 206, 106, 106,
1352  140, 87, 205, 206, 199, 206, 97, 121, 125, 126,
1353  136, 121, 91, 158, 97, 109, 130, 130, 130, 130,
1354  130, 44, 45, 90, 94, 128, 91, 97, 95, 136,
1355  96, 96, 93, 112, 164, 3, 159, 170, 206, 3,
1356  136, 3, 136, 206, 59, 206, 199, 199, 64, 65,
1357  149, 150, 151, 152, 70, 52, 72, 136, 109, 90,
1358  174, 87, 162, 91, 127, 95, 127, 50, 90, 91,
1359  112, 112, 93, 97, 112, 169, 206, 106, 136, 198,
1360  136, 198, 106, 136, 106, 206, 206, 199, 199, 52,
1361  151, 152, 199, 199, 29, 112, 175, 176, 112, 91,
1362  95, 136, 112, 106, 52, 87, 171, 91, 206, 97,
1363  206, 52, 136, 106, 206, 206, 206, 206, 112, 3,
1364  91, 97, 30, 177, 178, 91, 171, 206, 106, 136,
1365  106, 198, 136, 106, 106, 106, 140, 176, 179, 206,
1366  27, 106, 52, 91, 52, 206, 198, 52, 52, 136,
1367  83, 181, 52, 77, 78, 79, 80, 182, 183, 186,
1368  192, 195, 180, 52, 206, 106, 206, 199, 199, 199,
1369  199, 206, 181, 106, 106, 174, 174, 174, 174, 52,
1370  183, 186, 192, 195, 52, 206, 206, 206, 206, 52,
1371  112, 184, 185, 52, 167, 188, 190, 191, 199, 52,
1372  112, 193, 194, 52, 112, 196, 197, 3, 206, 206,
1373  112, 163, 187, 206, 90, 206, 140, 52, 185, 52,
1374  190, 159, 3, 52, 194, 136, 52, 197, 136, 189,
1375  91, 98, 112, 187
1376 };
1377 
1378  /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1379 static const yytype_uint8 yyr1[] =
1380 {
1381  0, 102, 103, 103, 103, 104, 104, 105, 105, 106,
1382  106, 107, 108, 108, 109, 109, 109, 110, 111, 111,
1383  112, 113, 114, 115, 115, 116, 116, 116, 117, 118,
1384  118, 119, 120, 120, 121, 121, 121, 121, 121, 121,
1385  122, 123, 124, 124, 124, 124, 124, 124, 124, 124,
1386  125, 126, 127, 127, 127, 127, 127, 127, 128, 129,
1387  129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1388  129, 129, 129, 129, 129, 129, 129, 129, 129, 129,
1389  129, 129, 129, 129, 129, 129, 129, 130, 130, 130,
1390  130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
1391  130, 131, 132, 132, 133, 133, 133, 133, 133, 133,
1392  133, 133, 133, 133, 133, 133, 133, 134, 135, 135,
1393  135, 135, 135, 135, 135, 135, 135, 135, 135, 135,
1394  135, 135, 135, 136, 136, 136, 137, 137, 137, 137,
1395  137, 137, 137, 138, 138, 139, 139, 140, 141, 141,
1396  142, 142, 143, 144, 144, 145, 145, 146, 147, 148,
1397  149, 149, 149, 149, 150, 150, 151, 152, 153, 153,
1398  153, 153, 153, 153, 154, 154, 154, 155, 155, 155,
1399  156, 157, 158, 159, 159, 160, 160, 161, 161, 162,
1400  162, 163, 163, 163, 164, 164, 165, 165, 166, 167,
1401  167, 168, 168, 168, 169, 170, 170, 171, 171, 172,
1402  173, 173, 174, 174, 175, 175, 176, 176, 176, 177,
1403  177, 179, 178, 180, 178, 181, 182, 182, 182, 182,
1404  182, 182, 182, 182, 183, 183, 184, 184, 185, 185,
1405  186, 186, 187, 187, 188, 189, 188, 190, 190, 191,
1406  191, 192, 192, 193, 193, 194, 195, 195, 196, 196,
1407  197, 198, 199, 200, 200, 201, 201, 201, 201, 202,
1408  202, 203, 203, 204, 204, 205, 205, 205, 205, 205,
1409  205, 206, 206
1410 };
1411 
1412  /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1413 static const yytype_uint8 yyr2[] =
1414 {
1415  0, 2, 2, 2, 1, 1, 2, 1, 3, 0,
1416  1, 2, 1, 3, 1, 1, 1, 2, 1, 2,
1417  1, 1, 1, 1, 1, 1, 1, 1, 3, 1,
1418  3, 3, 1, 3, 0, 1, 1, 2, 2, 3,
1419  2, 4, 1, 1, 1, 1, 1, 1, 1, 3,
1420  1, 1, 1, 1, 1, 3, 3, 3, 1, 1,
1421  2, 2, 3, 4, 3, 4, 2, 2, 3, 5,
1422  2, 2, 2, 2, 2, 3, 3, 3, 3, 3,
1423  3, 3, 3, 3, 3, 3, 3, 1, 2, 2,
1424  3, 4, 3, 4, 3, 5, 2, 2, 2, 2,
1425  2, 1, 1, 3, 1, 3, 3, 3, 3, 3,
1426  3, 3, 3, 3, 3, 3, 3, 1, 3, 3,
1427  3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
1428  3, 3, 3, 1, 1, 1, 1, 1, 1, 1,
1429  1, 1, 1, 2, 2, 1, 2, 0, 1, 4,
1430  1, 1, 4, 1, 2, 4, 2, 7, 4, 6,
1431  0, 1, 1, 2, 1, 2, 7, 4, 7, 6,
1432  9, 10, 9, 12, 1, 1, 1, 9, 9, 5,
1433  0, 1, 1, 3, 2, 0, 1, 1, 3, 1,
1434  1, 2, 1, 3, 1, 3, 4, 5, 2, 3,
1435  5, 1, 3, 3, 2, 4, 3, 1, 1, 1,
1436  9, 7, 0, 3, 1, 3, 1, 4, 2, 0,
1437  1, 0, 3, 0, 4, 1, 1, 1, 1, 1,
1438  3, 3, 3, 3, 7, 5, 1, 3, 1, 5,
1439  7, 5, 1, 2, 2, 0, 5, 1, 1, 1,
1440  3, 7, 5, 1, 3, 1, 7, 5, 1, 3,
1441  4, 0, 0, 1, 1, 1, 1, 2, 2, 0,
1442  1, 0, 1, 1, 2, 1, 1, 1, 2, 2,
1443  2, 0, 1
1444 };
1445 
1446 
1447 #define yyerrok (yyerrstatus = 0)
1448 #define yyclearin (yychar = YYEMPTY)
1449 #define YYEMPTY (-2)
1450 #define YYEOF 0
1451 
1452 #define YYACCEPT goto yyacceptlab
1453 #define YYABORT goto yyabortlab
1454 #define YYERROR goto yyerrorlab
1455 
1456 
1457 #define YYRECOVERING() (!!yyerrstatus)
1458 
1459 #define YYBACKUP(Token, Value) \
1460 do \
1461  if (yychar == YYEMPTY) \
1462  { \
1463  yychar = (Token); \
1464  yylval = (Value); \
1465  YYPOPSTACK (yylen); \
1466  yystate = *yyssp; \
1467  goto yybackup; \
1468  } \
1469  else \
1470  { \
1471  yyerror (parser, YY_("syntax error: cannot back up")); \
1472  YYERROR; \
1473  } \
1474 while (0)
1475 
1476 /* Error token number */
1477 #define YYTERROR 1
1478 #define YYERRCODE 256
1479 
1480 
1481 
1482 /* Enable debugging if requested. */
1483 #if OCTAVE_DEBUG
1484 
1485 # ifndef YYFPRINTF
1486 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1487 # define YYFPRINTF fprintf
1488 # endif
1489 
1490 # define YYDPRINTF(Args) \
1491 do { \
1492  if (yydebug) \
1493  YYFPRINTF Args; \
1494 } while (0)
1495 
1496 /* This macro is provided for backward compatibility. */
1497 #ifndef YY_LOCATION_PRINT
1498 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1499 #endif
1500 
1501 
1502 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1503 do { \
1504  if (yydebug) \
1505  { \
1506  YYFPRINTF (stderr, "%s ", Title); \
1507  yy_symbol_print (stderr, \
1508  Type, Value, parser); \
1509  YYFPRINTF (stderr, "\n"); \
1510  } \
1511 } while (0)
1512 
1513 
1514 /*----------------------------------------.
1515 | Print this symbol's value on YYOUTPUT. |
1516 `----------------------------------------*/
1517 
1518 static void
1519 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, octave_base_parser& parser)
1520 {
1521  FILE *yyo = yyoutput;
1522  YYUSE (yyo);
1523  YYUSE (parser);
1524  if (!yyvaluep)
1525  return;
1526 # ifdef YYPRINT
1527  if (yytype < YYNTOKENS)
1528  YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1529 # endif
1530  YYUSE (yytype);
1531 }
1532 
1533 
1534 /*--------------------------------.
1535 | Print this symbol on YYOUTPUT. |
1536 `--------------------------------*/
1537 
1538 static void
1539 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, octave_base_parser& parser)
1540 {
1541  YYFPRINTF (yyoutput, "%s %s (",
1542  yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1543 
1544  yy_symbol_value_print (yyoutput, yytype, yyvaluep, parser);
1545  YYFPRINTF (yyoutput, ")");
1546 }
1547 
1548 /*------------------------------------------------------------------.
1549 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1550 | TOP (included). |
1551 `------------------------------------------------------------------*/
1552 
1553 static void
1554 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1555 {
1556  YYFPRINTF (stderr, "Stack now");
1557  for (; yybottom <= yytop; yybottom++)
1558  {
1559  int yybot = *yybottom;
1560  YYFPRINTF (stderr, " %d", yybot);
1561  }
1562  YYFPRINTF (stderr, "\n");
1563 }
1564 
1565 # define YY_STACK_PRINT(Bottom, Top) \
1566 do { \
1567  if (yydebug) \
1568  yy_stack_print ((Bottom), (Top)); \
1569 } while (0)
1570 
1571 
1572 /*------------------------------------------------.
1573 | Report that the YYRULE is going to be reduced. |
1574 `------------------------------------------------*/
1575 
1576 static void
1577 yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule, octave_base_parser& parser)
1578 {
1579  unsigned long int yylno = yyrline[yyrule];
1580  int yynrhs = yyr2[yyrule];
1581  int yyi;
1582  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1583  yyrule - 1, yylno);
1584  /* The symbols being reduced. */
1585  for (yyi = 0; yyi < yynrhs; yyi++)
1586  {
1587  YYFPRINTF (stderr, " $%d = ", yyi + 1);
1588  yy_symbol_print (stderr,
1589  yystos[yyssp[yyi + 1 - yynrhs]],
1590  &(yyvsp[(yyi + 1) - (yynrhs)])
1591  , parser);
1592  YYFPRINTF (stderr, "\n");
1593  }
1594 }
1595 
1596 # define YY_REDUCE_PRINT(Rule) \
1597 do { \
1598  if (yydebug) \
1599  yy_reduce_print (yyssp, yyvsp, Rule, parser); \
1600 } while (0)
1601 
1602 /* Nonzero means print parse trace. It is left uninitialized so that
1603  multiple parsers can coexist. */
1604 int yydebug;
1605 #else /* !OCTAVE_DEBUG */
1606 # define YYDPRINTF(Args)
1607 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1608 # define YY_STACK_PRINT(Bottom, Top)
1609 # define YY_REDUCE_PRINT(Rule)
1610 #endif /* !OCTAVE_DEBUG */
1611 
1612 
1613 /* YYINITDEPTH -- initial size of the parser's stacks. */
1614 #ifndef YYINITDEPTH
1615 # define YYINITDEPTH 200
1616 #endif
1617 
1618 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1619  if the built-in stack extension method is used).
1620 
1621  Do not make this value too large; the results are undefined if
1622  YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1623  evaluated with infinite-precision integer arithmetic. */
1624 
1625 #ifndef YYMAXDEPTH
1626 # define YYMAXDEPTH 10000
1627 #endif
1628 
1629 
1630 #if YYERROR_VERBOSE
1631 
1632 # ifndef yystrlen
1633 # if defined __GLIBC__ && defined _STRING_H
1634 # define yystrlen strlen
1635 # else
1636 /* Return the length of YYSTR. */
1637 static YYSIZE_T
1638 yystrlen (const char *yystr)
1639 {
1640  YYSIZE_T yylen;
1641  for (yylen = 0; yystr[yylen]; yylen++)
1642  continue;
1643  return yylen;
1644 }
1645 # endif
1646 # endif
1647 
1648 # ifndef yystpcpy
1649 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1650 # define yystpcpy stpcpy
1651 # else
1652 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1653  YYDEST. */
1654 static char *
1655 yystpcpy (char *yydest, const char *yysrc)
1656 {
1657  char *yyd = yydest;
1658  const char *yys = yysrc;
1659 
1660  while ((*yyd++ = *yys++) != '\0')
1661  continue;
1662 
1663  return yyd - 1;
1664 }
1665 # endif
1666 # endif
1667 
1668 # ifndef yytnamerr
1669 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1670  quotes and backslashes, so that it's suitable for yyerror. The
1671  heuristic is that double-quoting is unnecessary unless the string
1672  contains an apostrophe, a comma, or backslash (other than
1673  backslash-backslash). YYSTR is taken from yytname. If YYRES is
1674  null, do not copy; instead, return the length of what the result
1675  would have been. */
1676 static YYSIZE_T
1677 yytnamerr (char *yyres, const char *yystr)
1678 {
1679  if (*yystr == '"')
1680  {
1681  YYSIZE_T yyn = 0;
1682  char const *yyp = yystr;
1683 
1684  for (;;)
1685  switch (*++yyp)
1686  {
1687  case '\'':
1688  case ',':
1689  goto do_not_strip_quotes;
1690 
1691  case '\\':
1692  if (*++yyp != '\\')
1693  goto do_not_strip_quotes;
1694  /* Fall through. */
1695  default:
1696  if (yyres)
1697  yyres[yyn] = *yyp;
1698  yyn++;
1699  break;
1700 
1701  case '"':
1702  if (yyres)
1703  yyres[yyn] = '\0';
1704  return yyn;
1705  }
1706  do_not_strip_quotes: ;
1707  }
1708 
1709  if (! yyres)
1710  return yystrlen (yystr);
1711 
1712  return yystpcpy (yyres, yystr) - yyres;
1713 }
1714 # endif
1715 
1716 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1717  about the unexpected token YYTOKEN for the state stack whose top is
1718  YYSSP.
1719 
1720  Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1721  not large enough to hold the message. In that case, also set
1722  *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1723  required number of bytes is too large to store. */
1724 static int
1725 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1726  yytype_int16 *yyssp, int yytoken)
1727 {
1728  YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1729  YYSIZE_T yysize = yysize0;
1730  enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1731  /* Internationalized format string. */
1732  const char *yyformat = YY_NULLPTR;
1733  /* Arguments of yyformat. */
1734  char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1735  /* Number of reported tokens (one for the "unexpected", one per
1736  "expected"). */
1737  int yycount = 0;
1738 
1739  /* There are many possibilities here to consider:
1740  - If this state is a consistent state with a default action, then
1741  the only way this function was invoked is if the default action
1742  is an error action. In that case, don't check for expected
1743  tokens because there are none.
1744  - The only way there can be no lookahead present (in yychar) is if
1745  this state is a consistent state with a default action. Thus,
1746  detecting the absence of a lookahead is sufficient to determine
1747  that there is no unexpected or expected token to report. In that
1748  case, just report a simple "syntax error".
1749  - Don't assume there isn't a lookahead just because this state is a
1750  consistent state with a default action. There might have been a
1751  previous inconsistent state, consistent state with a non-default
1752  action, or user semantic action that manipulated yychar.
1753  - Of course, the expected token list depends on states to have
1754  correct lookahead information, and it depends on the parser not
1755  to perform extra reductions after fetching a lookahead from the
1756  scanner and before detecting a syntax error. Thus, state merging
1757  (from LALR or IELR) and default reductions corrupt the expected
1758  token list. However, the list is correct for canonical LR with
1759  one exception: it will still contain any token that will not be
1760  accepted due to an error action in a later state.
1761  */
1762  if (yytoken != YYEMPTY)
1763  {
1764  int yyn = yypact[*yyssp];
1765  yyarg[yycount++] = yytname[yytoken];
1766  if (!yypact_value_is_default (yyn))
1767  {
1768  /* Start YYX at -YYN if negative to avoid negative indexes in
1769  YYCHECK. In other words, skip the first -YYN actions for
1770  this state because they are default actions. */
1771  int yyxbegin = yyn < 0 ? -yyn : 0;
1772  /* Stay within bounds of both yycheck and yytname. */
1773  int yychecklim = YYLAST - yyn + 1;
1774  int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1775  int yyx;
1776 
1777  for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1778  if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1779  && !yytable_value_is_error (yytable[yyx + yyn]))
1780  {
1781  if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1782  {
1783  yycount = 1;
1784  yysize = yysize0;
1785  break;
1786  }
1787  yyarg[yycount++] = yytname[yyx];
1788  {
1789  YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1790  if (! (yysize <= yysize1
1791  && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1792  return 2;
1793  yysize = yysize1;
1794  }
1795  }
1796  }
1797  }
1798 
1799  switch (yycount)
1800  {
1801 # define YYCASE_(N, S) \
1802  case N: \
1803  yyformat = S; \
1804  break
1805  YYCASE_(0, YY_("syntax error"));
1806  YYCASE_(1, YY_("syntax error, unexpected %s"));
1807  YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1808  YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1809  YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1810  YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1811 # undef YYCASE_
1812  }
1813 
1814  {
1815  YYSIZE_T yysize1 = yysize + yystrlen (yyformat);
1816  if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1817  return 2;
1818  yysize = yysize1;
1819  }
1820 
1821  if (*yymsg_alloc < yysize)
1822  {
1823  *yymsg_alloc = 2 * yysize;
1824  if (! (yysize <= *yymsg_alloc
1825  && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1826  *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1827  return 1;
1828  }
1829 
1830  /* Avoid sprintf, as that infringes on the user's name space.
1831  Don't have undefined behavior even if the translation
1832  produced a string with the wrong number of "%s"s. */
1833  {
1834  char *yyp = *yymsg;
1835  int yyi = 0;
1836  while ((*yyp = *yyformat) != '\0')
1837  if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1838  {
1839  yyp += yytnamerr (yyp, yyarg[yyi++]);
1840  yyformat += 2;
1841  }
1842  else
1843  {
1844  yyp++;
1845  yyformat++;
1846  }
1847  }
1848  return 0;
1849 }
1850 #endif /* YYERROR_VERBOSE */
1851 
1852 /*-----------------------------------------------.
1853 | Release the memory associated to this symbol. |
1854 `-----------------------------------------------*/
1855 
1856 static void
1857 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, octave_base_parser& parser)
1858 {
1859  YYUSE (yyvaluep);
1860  YYUSE (parser);
1861  if (!yymsg)
1862  yymsg = "Deleting";
1863  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1864 
1866  switch (yytype)
1867  {
1868  case 3: /* '=' */
1869 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1870  { }
1871 #line 1872 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1872  break;
1873 
1874  case 4: /* ':' */
1875 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1876  { }
1877 #line 1878 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1878  break;
1879 
1880  case 5: /* '-' */
1881 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1882  { }
1883 #line 1884 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1884  break;
1885 
1886  case 6: /* '+' */
1887 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1888  { }
1889 #line 1890 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1890  break;
1891 
1892  case 7: /* '*' */
1893 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1894  { }
1895 #line 1896 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1896  break;
1897 
1898  case 8: /* '/' */
1899 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1900  { }
1901 #line 1902 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1902  break;
1903 
1904  case 9: /* ADD_EQ */
1905 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1906  { }
1907 #line 1908 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1908  break;
1909 
1910  case 10: /* SUB_EQ */
1911 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1912  { }
1913 #line 1914 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1914  break;
1915 
1916  case 11: /* MUL_EQ */
1917 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1918  { }
1919 #line 1920 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1920  break;
1921 
1922  case 12: /* DIV_EQ */
1923 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1924  { }
1925 #line 1926 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1926  break;
1927 
1928  case 13: /* LEFTDIV_EQ */
1929 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1930  { }
1931 #line 1932 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1932  break;
1933 
1934  case 14: /* POW_EQ */
1935 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1936  { }
1937 #line 1938 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1938  break;
1939 
1940  case 15: /* EMUL_EQ */
1941 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1942  { }
1943 #line 1944 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1944  break;
1945 
1946  case 16: /* EDIV_EQ */
1947 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1948  { }
1949 #line 1950 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1950  break;
1951 
1952  case 17: /* ELEFTDIV_EQ */
1953 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1954  { }
1955 #line 1956 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1956  break;
1957 
1958  case 18: /* EPOW_EQ */
1959 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1960  { }
1961 #line 1962 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1962  break;
1963 
1964  case 19: /* AND_EQ */
1965 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1966  { }
1967 #line 1968 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1968  break;
1969 
1970  case 20: /* OR_EQ */
1971 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1972  { }
1973 #line 1974 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1974  break;
1975 
1976  case 21: /* LSHIFT_EQ */
1977 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1978  { }
1979 #line 1980 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1980  break;
1981 
1982  case 22: /* RSHIFT_EQ */
1983 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1984  { }
1985 #line 1986 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1986  break;
1987 
1988  case 23: /* LSHIFT */
1989 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1990  { }
1991 #line 1992 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1992  break;
1993 
1994  case 24: /* RSHIFT */
1995 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
1996  { }
1997 #line 1998 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
1998  break;
1999 
2000  case 25: /* EXPR_AND_AND */
2001 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2002  { }
2003 #line 2004 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2004  break;
2005 
2006  case 26: /* EXPR_OR_OR */
2007 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2008  { }
2009 #line 2010 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2010  break;
2011 
2012  case 27: /* EXPR_AND */
2013 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2014  { }
2015 #line 2016 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2016  break;
2017 
2018  case 28: /* EXPR_OR */
2019 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2020  { }
2021 #line 2022 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2022  break;
2023 
2024  case 29: /* EXPR_NOT */
2025 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2026  { }
2027 #line 2028 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2028  break;
2029 
2030  case 30: /* EXPR_LT */
2031 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2032  { }
2033 #line 2034 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2034  break;
2035 
2036  case 31: /* EXPR_LE */
2037 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2038  { }
2039 #line 2040 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2040  break;
2041 
2042  case 32: /* EXPR_EQ */
2043 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2044  { }
2045 #line 2046 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2046  break;
2047 
2048  case 33: /* EXPR_NE */
2049 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2050  { }
2051 #line 2052 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2052  break;
2053 
2054  case 34: /* EXPR_GE */
2055 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2056  { }
2057 #line 2058 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2058  break;
2059 
2060  case 35: /* EXPR_GT */
2061 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2062  { }
2063 #line 2064 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2064  break;
2065 
2066  case 36: /* LEFTDIV */
2067 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2068  { }
2069 #line 2070 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2070  break;
2071 
2072  case 37: /* EMUL */
2073 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2074  { }
2075 #line 2076 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2076  break;
2077 
2078  case 38: /* EDIV */
2079 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2080  { }
2081 #line 2082 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2082  break;
2083 
2084  case 39: /* ELEFTDIV */
2085 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2086  { }
2087 #line 2088 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2088  break;
2089 
2090  case 40: /* EPLUS */
2091 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2092  { }
2093 #line 2094 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2094  break;
2095 
2096  case 41: /* EMINUS */
2097 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2098  { }
2099 #line 2100 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2100  break;
2101 
2102  case 42: /* HERMITIAN */
2103 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2104  { }
2105 #line 2106 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2106  break;
2107 
2108  case 43: /* TRANSPOSE */
2109 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2110  { }
2111 #line 2112 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2112  break;
2113 
2114  case 44: /* PLUS_PLUS */
2115 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2116  { }
2117 #line 2118 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2118  break;
2119 
2120  case 45: /* MINUS_MINUS */
2121 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2122  { }
2123 #line 2124 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2124  break;
2125 
2126  case 46: /* POW */
2127 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2128  { }
2129 #line 2130 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2130  break;
2131 
2132  case 47: /* EPOW */
2133 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2134  { }
2135 #line 2136 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2136  break;
2137 
2138  case 48: /* NUM */
2139 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2140  { }
2141 #line 2142 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2142  break;
2143 
2144  case 49: /* IMAG_NUM */
2145 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2146  { }
2147 #line 2148 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2148  break;
2149 
2150  case 50: /* STRUCT_ELT */
2151 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2152  { }
2153 #line 2154 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2154  break;
2155 
2156  case 51: /* NAME */
2157 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2158  { }
2159 #line 2160 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2160  break;
2161 
2162  case 52: /* END */
2163 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2164  { }
2165 #line 2166 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2166  break;
2167 
2168  case 53: /* DQ_STRING */
2169 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2170  { }
2171 #line 2172 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2172  break;
2173 
2174  case 54: /* SQ_STRING */
2175 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2176  { }
2177 #line 2178 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2178  break;
2179 
2180  case 55: /* FOR */
2181 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2182  { }
2183 #line 2184 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2184  break;
2185 
2186  case 56: /* PARFOR */
2187 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2188  { }
2189 #line 2190 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2190  break;
2191 
2192  case 57: /* WHILE */
2193 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2194  { }
2195 #line 2196 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2196  break;
2197 
2198  case 58: /* DO */
2199 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2200  { }
2201 #line 2202 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2202  break;
2203 
2204  case 59: /* UNTIL */
2205 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2206  { }
2207 #line 2208 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2208  break;
2209 
2210  case 60: /* IF */
2211 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2212  { }
2213 #line 2214 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2214  break;
2215 
2216  case 61: /* ELSEIF */
2217 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2218  { }
2219 #line 2220 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2220  break;
2221 
2222  case 62: /* ELSE */
2223 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2224  { }
2225 #line 2226 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2226  break;
2227 
2228  case 63: /* SWITCH */
2229 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2230  { }
2231 #line 2232 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2232  break;
2233 
2234  case 64: /* CASE */
2235 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2236  { }
2237 #line 2238 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2238  break;
2239 
2240  case 65: /* OTHERWISE */
2241 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2242  { }
2243 #line 2244 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2244  break;
2245 
2246  case 66: /* BREAK */
2247 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2248  { }
2249 #line 2250 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2250  break;
2251 
2252  case 67: /* CONTINUE */
2253 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2254  { }
2255 #line 2256 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2256  break;
2257 
2258  case 68: /* FUNC_RET */
2259 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2260  { }
2261 #line 2262 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2262  break;
2263 
2264  case 69: /* UNWIND */
2265 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2266  { }
2267 #line 2268 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2268  break;
2269 
2270  case 70: /* CLEANUP */
2271 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2272  { }
2273 #line 2274 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2274  break;
2275 
2276  case 71: /* TRY */
2277 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2278  { }
2279 #line 2280 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2280  break;
2281 
2282  case 72: /* CATCH */
2283 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2284  { }
2285 #line 2286 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2286  break;
2287 
2288  case 73: /* GLOBAL */
2289 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2290  { }
2291 #line 2292 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2292  break;
2293 
2294  case 74: /* PERSISTENT */
2295 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2296  { }
2297 #line 2298 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2298  break;
2299 
2300  case 75: /* FCN_HANDLE */
2301 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2302  { }
2303 #line 2304 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2304  break;
2305 
2306  case 76: /* CLASSDEF */
2307 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2308  { }
2309 #line 2310 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2310  break;
2311 
2312  case 77: /* PROPERTIES */
2313 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2314  { }
2315 #line 2316 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2316  break;
2317 
2318  case 78: /* METHODS */
2319 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2320  { }
2321 #line 2322 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2322  break;
2323 
2324  case 79: /* EVENTS */
2325 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2326  { }
2327 #line 2328 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2328  break;
2329 
2330  case 80: /* ENUMERATION */
2331 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2332  { }
2333 #line 2334 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2334  break;
2335 
2336  case 81: /* METAQUERY */
2337 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2338  { }
2339 #line 2340 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2340  break;
2341 
2342  case 82: /* SUPERCLASSREF */
2343 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2344  { }
2345 #line 2346 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2346  break;
2347 
2348  case 83: /* FQ_IDENT */
2349 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2350  { }
2351 #line 2352 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2352  break;
2353 
2354  case 84: /* GET */
2355 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2356  { }
2357 #line 2358 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2358  break;
2359 
2360  case 85: /* SET */
2361 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2362  { }
2363 #line 2364 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2364  break;
2365 
2366  case 86: /* FCN */
2367 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2368  { }
2369 #line 2370 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2370  break;
2371 
2372  case 101: /* UNARY */
2373 #line 333 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2374  { }
2375 #line 2376 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2376  break;
2377 
2378  case 103: /* input */
2379 #line 335 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2380  { delete ((*yyvaluep).tree_type); }
2381 #line 2382 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2382  break;
2383 
2384  case 104: /* simple_list */
2385 #line 360 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2386  { delete ((*yyvaluep).tree_statement_list_type); }
2387 #line 2388 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2388  break;
2389 
2390  case 105: /* simple_list1 */
2391 #line 360 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2392  { delete ((*yyvaluep).tree_statement_list_type); }
2393 #line 2394 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2394  break;
2395 
2396  case 106: /* opt_list */
2397 #line 360 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2398  { delete ((*yyvaluep).tree_statement_list_type); }
2399 #line 2400 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2400  break;
2401 
2402  case 107: /* list */
2403 #line 360 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2404  { delete ((*yyvaluep).tree_statement_list_type); }
2405 #line 2406 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2406  break;
2407 
2408  case 108: /* list1 */
2409 #line 360 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2410  { delete ((*yyvaluep).tree_statement_list_type); }
2411 #line 2412 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2412  break;
2413 
2414  case 109: /* statement */
2415 #line 359 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2416  { delete ((*yyvaluep).tree_statement_type); }
2417 #line 2418 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2418  break;
2419 
2420  case 110: /* word_list_cmd */
2421 #line 345 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2422  { delete ((*yyvaluep).tree_index_expression_type); }
2423 #line 2424 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2424  break;
2425 
2426  case 111: /* word_list */
2427 #line 347 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2428  { delete ((*yyvaluep).tree_argument_list_type); }
2429 #line 2430 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2430  break;
2431 
2432  case 112: /* identifier */
2433 #line 344 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2434  { delete ((*yyvaluep).tree_identifier_type); }
2435 #line 2436 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2436  break;
2437 
2438  case 113: /* superclass_identifier */
2439 #line 341 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2440  { delete ((*yyvaluep).tree_funcall_type); }
2441 #line 2442 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2442  break;
2443 
2444  case 114: /* meta_identifier */
2445 #line 341 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2446  { delete ((*yyvaluep).tree_funcall_type); }
2447 #line 2448 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2448  break;
2449 
2450  case 115: /* string */
2451 #line 339 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2452  { delete ((*yyvaluep).tree_constant_type); }
2453 #line 2454 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2454  break;
2455 
2456  case 116: /* constant */
2457 #line 339 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2458  { delete ((*yyvaluep).tree_constant_type); }
2459 #line 2460 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2460  break;
2461 
2462  case 117: /* matrix */
2463 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2464  { delete ((*yyvaluep).tree_expression_type); }
2465 #line 2466 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2466  break;
2467 
2468  case 118: /* matrix_rows */
2469 #line 336 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2470  { delete ((*yyvaluep).tree_matrix_type); }
2471 #line 2472 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2472  break;
2473 
2474  case 119: /* cell */
2475 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2476  { delete ((*yyvaluep).tree_expression_type); }
2477 #line 2478 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2478  break;
2479 
2480  case 120: /* cell_rows */
2481 #line 337 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2482  { delete ((*yyvaluep).tree_cell_type); }
2483 #line 2484 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2484  break;
2485 
2486  case 121: /* cell_or_matrix_row */
2487 #line 347 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2488  { delete ((*yyvaluep).tree_argument_list_type); }
2489 #line 2490 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2490  break;
2491 
2492  case 122: /* fcn_handle */
2493 #line 340 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2494  { delete ((*yyvaluep).tree_fcn_handle_type); }
2495 #line 2496 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2496  break;
2497 
2498  case 123: /* anon_fcn_handle */
2499 #line 343 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2500  { delete ((*yyvaluep).tree_anon_fcn_handle_type); }
2501 #line 2502 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2502  break;
2503 
2504  case 124: /* primary_expr */
2505 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2506  { delete ((*yyvaluep).tree_expression_type); }
2507 #line 2508 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2508  break;
2509 
2510  case 125: /* magic_colon */
2511 #line 339 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2512  { delete ((*yyvaluep).tree_constant_type); }
2513 #line 2514 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2514  break;
2515 
2516  case 126: /* magic_tilde */
2517 #line 344 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2518  { delete ((*yyvaluep).tree_identifier_type); }
2519 #line 2520 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2520  break;
2521 
2522  case 127: /* arg_list */
2523 #line 347 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2524  { delete ((*yyvaluep).tree_argument_list_type); }
2525 #line 2526 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2526  break;
2527 
2528  case 129: /* oper_expr */
2529 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2530  { delete ((*yyvaluep).tree_expression_type); }
2531 #line 2532 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2532  break;
2533 
2534  case 130: /* power_expr */
2535 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2536  { delete ((*yyvaluep).tree_expression_type); }
2537 #line 2538 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2538  break;
2539 
2540  case 131: /* colon_expr */
2541 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2542  { delete ((*yyvaluep).tree_expression_type); }
2543 #line 2544 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2544  break;
2545 
2546  case 132: /* colon_expr1 */
2547 #line 346 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2548  { delete ((*yyvaluep).tree_colon_expression_type); }
2549 #line 2550 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2550  break;
2551 
2552  case 133: /* simple_expr */
2553 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2554  { delete ((*yyvaluep).tree_expression_type); }
2555 #line 2556 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2556  break;
2557 
2558  case 134: /* assign_lhs */
2559 #line 347 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2560  { delete ((*yyvaluep).tree_argument_list_type); }
2561 #line 2562 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2562  break;
2563 
2564  case 135: /* assign_expr */
2565 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2566  { delete ((*yyvaluep).tree_expression_type); }
2567 #line 2568 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2568  break;
2569 
2570  case 136: /* expression */
2571 #line 338 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2572  { delete ((*yyvaluep).tree_expression_type); }
2573 #line 2574 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2574  break;
2575 
2576  case 137: /* command */
2577 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2578  { delete ((*yyvaluep).tree_command_type); }
2579 #line 2580 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2580  break;
2581 
2582  case 138: /* declaration */
2583 #line 358 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2584  { delete ((*yyvaluep).tree_decl_command_type); }
2585 #line 2586 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2586  break;
2587 
2588  case 139: /* decl1 */
2589 #line 357 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2590  { delete ((*yyvaluep).tree_decl_init_list_type); }
2591 #line 2592 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2592  break;
2593 
2594  case 141: /* decl2 */
2595 #line 356 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2596  { delete ((*yyvaluep).tree_decl_elt_type); }
2597 #line 2598 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2598  break;
2599 
2600  case 142: /* select_command */
2601 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2602  { delete ((*yyvaluep).tree_command_type); }
2603 #line 2604 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2604  break;
2605 
2606  case 143: /* if_command */
2607 #line 350 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2608  { delete ((*yyvaluep).tree_if_command_type); }
2609 #line 2610 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2610  break;
2611 
2612  case 144: /* if_cmd_list */
2613 #line 352 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2614  { delete ((*yyvaluep).tree_if_command_list_type); }
2615 #line 2616 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2616  break;
2617 
2618  case 145: /* if_cmd_list1 */
2619 #line 352 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2620  { delete ((*yyvaluep).tree_if_command_list_type); }
2621 #line 2622 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2622  break;
2623 
2624  case 146: /* elseif_clause */
2625 #line 351 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2626  { delete ((*yyvaluep).tree_if_clause_type); }
2627 #line 2628 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2628  break;
2629 
2630  case 147: /* else_clause */
2631 #line 351 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2632  { delete ((*yyvaluep).tree_if_clause_type); }
2633 #line 2634 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2634  break;
2635 
2636  case 148: /* switch_command */
2637 #line 353 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2638  { delete ((*yyvaluep).tree_switch_command_type); }
2639 #line 2640 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2640  break;
2641 
2642  case 149: /* case_list */
2643 #line 355 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2644  { delete ((*yyvaluep).tree_switch_case_list_type); }
2645 #line 2646 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2646  break;
2647 
2648  case 150: /* case_list1 */
2649 #line 355 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2650  { delete ((*yyvaluep).tree_switch_case_list_type); }
2651 #line 2652 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2652  break;
2653 
2654  case 151: /* switch_case */
2655 #line 354 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2656  { delete ((*yyvaluep).tree_switch_case_type); }
2657 #line 2658 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2658  break;
2659 
2660  case 152: /* default_case */
2661 #line 354 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2662  { delete ((*yyvaluep).tree_switch_case_type); }
2663 #line 2664 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2664  break;
2665 
2666  case 153: /* loop_command */
2667 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2668  { delete ((*yyvaluep).tree_command_type); }
2669 #line 2670 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2670  break;
2671 
2672  case 154: /* jump_command */
2673 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2674  { delete ((*yyvaluep).tree_command_type); }
2675 #line 2676 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2676  break;
2677 
2678  case 155: /* except_command */
2679 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2680  { delete ((*yyvaluep).tree_command_type); }
2681 #line 2682 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2682  break;
2683 
2684  case 159: /* param_list */
2685 #line 348 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2686  { delete ((*yyvaluep).tree_parameter_list_type); }
2687 #line 2688 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2688  break;
2689 
2690  case 160: /* param_list1 */
2691 #line 348 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2692  { delete ((*yyvaluep).tree_parameter_list_type); }
2693 #line 2694 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2694  break;
2695 
2696  case 161: /* param_list2 */
2697 #line 348 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2698  { delete ((*yyvaluep).tree_parameter_list_type); }
2699 #line 2700 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2700  break;
2701 
2702  case 162: /* param_list_elt */
2703 #line 356 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2704  { delete ((*yyvaluep).tree_decl_elt_type); }
2705 #line 2706 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2706  break;
2707 
2708  case 163: /* return_list */
2709 #line 348 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2710  { delete ((*yyvaluep).tree_parameter_list_type); }
2711 #line 2712 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2712  break;
2713 
2714  case 164: /* return_list1 */
2715 #line 348 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2716  { delete ((*yyvaluep).tree_parameter_list_type); }
2717 #line 2718 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2718  break;
2719 
2720  case 165: /* file */
2721 #line 349 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2722  { delete ((*yyvaluep).tree_command_type); }
2723 #line 2724 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2724  break;
2725 
2726  case 166: /* function_beg */
2727 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2728  { }
2729 #line 2730 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2730  break;
2731 
2732  case 167: /* function */
2733 #line 342 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2734  { delete ((*yyvaluep).tree_function_def_type); }
2735 #line 2736 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2736  break;
2737 
2738  case 168: /* fcn_name */
2739 #line 344 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2740  { delete ((*yyvaluep).tree_identifier_type); }
2741 #line 2742 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2742  break;
2743 
2744  case 169: /* function1 */
2745 #line 361 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2746  { delete ((*yyvaluep).octave_user_function_type); }
2747 #line 2748 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2748  break;
2749 
2750  case 170: /* function2 */
2751 #line 361 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2752  { delete ((*yyvaluep).octave_user_function_type); }
2753 #line 2754 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2754  break;
2755 
2756  case 171: /* function_end */
2757 #line 359 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2758  { delete ((*yyvaluep).tree_statement_type); }
2759 #line 2760 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2760  break;
2761 
2762  case 172: /* classdef_beg */
2763 #line 330 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2764  { }
2765 #line 2766 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2766  break;
2767 
2768  case 173: /* classdef */
2769 #line 363 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2770  { delete ((*yyvaluep).tree_classdef_type); }
2771 #line 2772 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2772  break;
2773 
2774  case 174: /* opt_attr_list */
2775 #line 365 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2776  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2777 #line 2778 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2778  break;
2779 
2780  case 175: /* attr_list */
2781 #line 365 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2782  { delete ((*yyvaluep).tree_classdef_attribute_list_type); }
2783 #line 2784 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2784  break;
2785 
2786  case 176: /* attr */
2787 #line 364 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2788  { delete ((*yyvaluep).tree_classdef_attribute_type); }
2789 #line 2790 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2790  break;
2791 
2792  case 177: /* opt_superclass_list */
2793 #line 367 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2794  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2795 #line 2796 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2796  break;
2797 
2798  case 178: /* superclass_list */
2799 #line 367 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2800  { delete ((*yyvaluep).tree_classdef_superclass_list_type); }
2801 #line 2802 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2802  break;
2803 
2804  case 181: /* superclass */
2805 #line 366 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2806  { delete ((*yyvaluep).tree_classdef_superclass_type); }
2807 #line 2808 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2808  break;
2809 
2810  case 182: /* class_body */
2811 #line 368 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2812  { delete ((*yyvaluep).tree_classdef_body_type); }
2813 #line 2814 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2814  break;
2815 
2816  case 183: /* properties_block */
2817 #line 371 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2818  { delete ((*yyvaluep).tree_classdef_properties_block_type); }
2819 #line 2820 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2820  break;
2821 
2822  case 184: /* property_list */
2823 #line 370 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2824  { delete ((*yyvaluep).tree_classdef_property_list_type); }
2825 #line 2826 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2826  break;
2827 
2828  case 185: /* class_property */
2829 #line 369 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2830  { delete ((*yyvaluep).tree_classdef_property_type); }
2831 #line 2832 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2832  break;
2833 
2834  case 186: /* methods_block */
2835 #line 373 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2836  { delete ((*yyvaluep).tree_classdef_methods_block_type); }
2837 #line 2838 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2838  break;
2839 
2840  case 187: /* method_decl1 */
2841 #line 361 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2842  { delete ((*yyvaluep).octave_user_function_type); }
2843 #line 2844 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2844  break;
2845 
2846  case 188: /* method_decl */
2847 #line 342 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2848  { delete ((*yyvaluep).tree_function_def_type); }
2849 #line 2850 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2850  break;
2851 
2852  case 190: /* method */
2853 #line 342 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2854  { delete ((*yyvaluep).tree_function_def_type); }
2855 #line 2856 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2856  break;
2857 
2858  case 191: /* methods_list */
2859 #line 372 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2860  { delete ((*yyvaluep).tree_classdef_methods_list_type); }
2861 #line 2862 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2862  break;
2863 
2864  case 192: /* events_block */
2865 #line 376 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2866  { delete ((*yyvaluep).tree_classdef_events_block_type); }
2867 #line 2868 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2868  break;
2869 
2870  case 193: /* events_list */
2871 #line 375 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2872  { delete ((*yyvaluep).tree_classdef_events_list_type); }
2873 #line 2874 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2874  break;
2875 
2876  case 194: /* class_event */
2877 #line 374 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2878  { delete ((*yyvaluep).tree_classdef_event_type); }
2879 #line 2880 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2880  break;
2881 
2882  case 195: /* enum_block */
2883 #line 379 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2884  { delete ((*yyvaluep).tree_classdef_enum_block_type); }
2885 #line 2886 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2886  break;
2887 
2888  case 196: /* enum_list */
2889 #line 378 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2890  { delete ((*yyvaluep).tree_classdef_enum_list_type); }
2891 #line 2892 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2892  break;
2893 
2894  case 197: /* class_enum */
2895 #line 377 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2896  { delete ((*yyvaluep).tree_classdef_enum_type); }
2897 #line 2898 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2898  break;
2899 
2900  case 199: /* stash_comment */
2901 #line 332 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2902  { }
2903 #line 2904 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2904  break;
2905 
2906  case 201: /* sep_no_nl */
2907 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2908  { }
2909 #line 2910 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2910  break;
2911 
2912  case 202: /* opt_sep_no_nl */
2913 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2914  { }
2915 #line 2916 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2916  break;
2917 
2918  case 203: /* opt_nl */
2919 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2920  { }
2921 #line 2922 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2922  break;
2923 
2924  case 204: /* nl */
2925 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2926  { }
2927 #line 2928 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2928  break;
2929 
2930  case 205: /* sep */
2931 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2932  { }
2933 #line 2934 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2934  break;
2935 
2936  case 206: /* opt_sep */
2937 #line 331 "parse-tree/oct-parse.yy" /* yacc.c:1257 */
2938  { }
2939 #line 2940 "parse-tree/oct-parse.cc" /* yacc.c:1257 */
2940  break;
2941 
2942 
2943  default:
2944  break;
2945  }
2947 }
2948 
2949 
2950 
2951 struct yypstate
2952  {
2953  /* Number of syntax errors so far. */
2954  int yynerrs;
2955 
2956  int yystate;
2957  /* Number of tokens to shift before error messages enabled. */
2959 
2960  /* The stacks and their tools:
2961  'yyss': related to states.
2962  'yyvs': related to semantic values.
2963 
2964  Refer to the stacks through separate pointers, to allow yyoverflow
2965  to reallocate them elsewhere. */
2966 
2967  /* The state stack. */
2971 
2972  /* The semantic value stack. */
2976 
2978  /* Used to determine if this is the first time this instance has
2979  been used. */
2980  int yynew;
2981  };
2982 
2983 int
2985 {
2986  return yypull_parse (YY_NULLPTR, parser);
2987 }
2988 
2989 int
2991 {
2992  int yystatus;
2993  yypstate *yyps_local;
2994  int yychar;
2995  YYSTYPE yylval;
2996  if (yyps)
2997  yyps_local = yyps;
2998  else
2999  {
3000  yyps_local = yypstate_new ();
3001  if (!yyps_local)
3002  {
3003  yyerror (parser, YY_("memory exhausted"));
3004  return 2;
3005  }
3006  }
3007  do {
3008  yychar = yylex (&yylval, scanner);
3009  yystatus =
3010  yypush_parse (yyps_local, yychar, &yylval, parser);
3011  } while (yystatus == YYPUSH_MORE);
3012  if (!yyps)
3013  yypstate_delete (yyps_local);
3014  return yystatus;
3015 }
3016 
3017 /* Initialize the parser data structure. */
3018 yypstate *
3020 {
3021  yypstate *yyps;
3022  yyps = (yypstate *) malloc (sizeof *yyps);
3023  if (!yyps)
3024  return YY_NULLPTR;
3025  yyps->yynew = 1;
3026  return yyps;
3027 }
3028 
3029 void
3031 {
3032 #ifndef yyoverflow
3033  /* If the stack was reallocated but the parse did not complete, then the
3034  stack still needs to be freed. */
3035  if (!yyps->yynew && yyps->yyss != yyps->yyssa)
3036  YYSTACK_FREE (yyps->yyss);
3037 #endif
3038  free (yyps);
3039 }
3040 
3041 #define octave_nerrs yyps->octave_nerrs
3042 #define yystate yyps->yystate
3043 #define yyerrstatus yyps->yyerrstatus
3044 #define yyssa yyps->yyssa
3045 #define yyss yyps->yyss
3046 #define yyssp yyps->yyssp
3047 #define yyvsa yyps->yyvsa
3048 #define yyvs yyps->yyvs
3049 #define yyvsp yyps->yyvsp
3050 #define yystacksize yyps->yystacksize
3051 
3052 
3053 /*---------------.
3054 | yypush_parse. |
3055 `---------------*/
3056 
3057 int
3058 yypush_parse (yypstate *yyps, int yypushed_char, YYSTYPE const *yypushed_val, octave_base_parser& parser)
3059 {
3060 /* The lookahead symbol. */
3061 int yychar;
3062 
3063 
3064 /* The semantic value of the lookahead symbol. */
3065 /* Default value used for initialization, for pacifying older GCCs
3066  or non-GCC compilers. */
3067 YY_INITIAL_VALUE (static YYSTYPE yyval_default;)
3068 YYSTYPE yylval YY_INITIAL_VALUE (= yyval_default);
3069 
3070  int yyn;
3071  int yyresult;
3072  /* Lookahead token as an internal (translated) token number. */
3073  int yytoken = 0;
3074  /* The variables used to return semantic value and location from the
3075  action routines. */
3076  YYSTYPE yyval;
3077 
3078 #if YYERROR_VERBOSE
3079  /* Buffer for error messages, and its allocated size. */
3080  char yymsgbuf[128];
3081  char *yymsg = yymsgbuf;
3082  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
3083 #endif
3084 
3085 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
3086 
3087  /* The number of symbols on the RHS of the reduced rule.
3088  Keep to zero when no symbol should be popped. */
3089  int yylen = 0;
3090 
3091  if (!yyps->yynew)
3092  {
3093  yyn = yypact[yystate];
3094  goto yyread_pushed_token;
3095  }
3096 
3097  yyssp = yyss = yyssa;
3098  yyvsp = yyvs = yyvsa;
3100 
3101  YYDPRINTF ((stderr, "Starting parse\n"));
3102 
3103  yystate = 0;
3104  yyerrstatus = 0;
3105  yynerrs = 0;
3106  yychar = YYEMPTY; /* Cause a token to be read. */
3107  goto yysetstate;
3108 
3109 /*------------------------------------------------------------.
3110 | yynewstate -- Push a new state, which is found in yystate. |
3111 `------------------------------------------------------------*/
3112  yynewstate:
3113  /* In all cases, when you get here, the value and location stacks
3114  have just been pushed. So pushing a state here evens the stacks. */
3115  yyssp++;
3116 
3117  yysetstate:
3118  *yyssp = yystate;
3119 
3120  if (yyss + yystacksize - 1 <= yyssp)
3121  {
3122  /* Get the current used size of the three stacks, in elements. */
3123  YYSIZE_T yysize = yyssp - yyss + 1;
3124 
3125 #ifdef yyoverflow
3126  {
3127  /* Give user a chance to reallocate the stack. Use copies of
3128  these so that the &'s don't force the real ones into
3129  memory. */
3130  YYSTYPE *yyvs1 = yyvs;
3131  yytype_int16 *yyss1 = yyss;
3132 
3133  /* Each stack pointer address is followed by the size of the
3134  data in use in that stack, in bytes. This used to be a
3135  conditional around just the two extra args, but that might
3136  be undefined if yyoverflow is a macro. */
3137  yyoverflow (YY_("memory exhausted"),
3138  &yyss1, yysize * sizeof (*yyssp),
3139  &yyvs1, yysize * sizeof (*yyvsp),
3140  &yystacksize);
3141 
3142  yyss = yyss1;
3143  yyvs = yyvs1;
3144  }
3145 #else /* no yyoverflow */
3146 # ifndef YYSTACK_RELOCATE
3147  goto yyexhaustedlab;
3148 # else
3149  /* Extend the stack our own way. */
3150  if (YYMAXDEPTH <= yystacksize)
3151  goto yyexhaustedlab;
3152  yystacksize *= 2;
3153  if (YYMAXDEPTH < yystacksize)
3155 
3156  {
3157  yytype_int16 *yyss1 = yyss;
3158  union yyalloc *yyptr =
3160  if (! yyptr)
3161  goto yyexhaustedlab;
3162  YYSTACK_RELOCATE (yyss_alloc, yyss);
3164 # undef YYSTACK_RELOCATE
3165  if (yyss1 != yyssa)
3166  YYSTACK_FREE (yyss1);
3167  }
3168 # endif
3169 #endif /* no yyoverflow */
3170 
3171  yyssp = yyss + yysize - 1;
3172  yyvsp = yyvs + yysize - 1;
3173 
3174  YYDPRINTF ((stderr, "Stack size increased to %lu\n",
3175  (unsigned long int) yystacksize));
3176 
3177  if (yyss + yystacksize - 1 <= yyssp)
3178  YYABORT;
3179  }
3180 
3181  YYDPRINTF ((stderr, "Entering state %d\n", yystate));
3182 
3183  if (yystate == YYFINAL)
3184  YYACCEPT;
3185 
3186  goto yybackup;
3187 
3188 /*-----------.
3189 | yybackup. |
3190 `-----------*/
3191 yybackup:
3192 
3193  /* Do appropriate processing given the current state. Read a
3194  lookahead token if we need one and don't already have one. */
3195 
3196  /* First try to decide what to do without reference to lookahead token. */
3197  yyn = yypact[yystate];
3198  if (yypact_value_is_default (yyn))
3199  goto yydefault;
3200 
3201  /* Not known => get a lookahead token if don't already have one. */
3202 
3203  /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
3204  if (yychar == YYEMPTY)
3205  {
3206  if (!yyps->yynew)
3207  {
3208  YYDPRINTF ((stderr, "Return for a new token:\n"));
3209  yyresult = YYPUSH_MORE;
3210  goto yypushreturn;
3211  }
3212  yyps->yynew = 0;
3213 yyread_pushed_token:
3214  YYDPRINTF ((stderr, "Reading a token: "));
3215  yychar = yypushed_char;
3216  if (yypushed_val)
3217  yylval = *yypushed_val;
3218  }
3219 
3220  if (yychar <= YYEOF)
3221  {
3222  yychar = yytoken = YYEOF;
3223  YYDPRINTF ((stderr, "Now at end of input.\n"));
3224  }
3225  else
3226  {
3227  yytoken = YYTRANSLATE (yychar);
3228  YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
3229  }
3230 
3231  /* If the proper action on seeing token YYTOKEN is to reduce or to
3232  detect an error, take that action. */
3233  yyn += yytoken;
3234  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
3235  goto yydefault;
3236  yyn = yytable[yyn];
3237  if (yyn <= 0)
3238  {
3239  if (yytable_value_is_error (yyn))
3240  goto yyerrlab;
3241  yyn = -yyn;
3242  goto yyreduce;
3243  }
3244 
3245  /* Count tokens shifted since error; after three, turn off error
3246  status. */
3247  if (yyerrstatus)
3248  yyerrstatus--;
3249 
3250  /* Shift the lookahead token. */
3251  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
3252 
3253  /* Discard the shifted token. */
3254  yychar = YYEMPTY;
3255 
3256  yystate = yyn;
3258  *++yyvsp = yylval;
3260 
3261  goto yynewstate;
3262 
3263 
3264 /*-----------------------------------------------------------.
3265 | yydefault -- do the default action for the current state. |
3266 `-----------------------------------------------------------*/
3267 yydefault:
3268  yyn = yydefact[yystate];
3269  if (yyn == 0)
3270  goto yyerrlab;
3271  goto yyreduce;
3272 
3273 
3274 /*-----------------------------.
3275 | yyreduce -- Do a reduction. |
3276 `-----------------------------*/
3277 yyreduce:
3278  /* yyn is the number of a rule to reduce with. */
3279  yylen = yyr2[yyn];
3280 
3281  /* If YYLEN is nonzero, implement the default value of the action:
3282  '$$ = $1'.
3283 
3284  Otherwise, the following line sets YYVAL to garbage.
3285  This behavior is undocumented and Bison
3286  users should not rely upon it. Assigning to YYVAL
3287  unconditionally makes the parser a bit smaller, and it avoids a
3288  GCC warning that YYVAL may be used uninitialized. */
3289  yyval = yyvsp[1-yylen];
3290 
3291 
3292  YY_REDUCE_PRINT (yyn);
3293  switch (yyn)
3294  {
3295  case 2:
3296 #line 400 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3297  {
3298  (yyval.tree_type) = 0;
3299  parser.stmt_list = (yyvsp[-1].tree_statement_list_type);
3300  YYACCEPT;
3301  }
3302 #line 3303 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3303  break;
3304 
3305  case 3:
3306 #line 406 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3307  {
3308  (yyval.tree_type) = 0;
3309  lexer.end_of_input = true;
3310  parser.stmt_list = (yyvsp[-1].tree_statement_list_type);
3311  YYACCEPT;
3312  }
3313 #line 3314 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3314  break;
3315 
3316  case 4:
3317 #line 413 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3318  {
3319  (yyval.tree_type) = 0;
3320  ABORT_PARSE;
3321  }
3322 #line 3323 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3323  break;
3324 
3325  case 5:
3326 #line 420 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3327  {
3328  YYUSE ((yyvsp[0].punct_type));
3329 
3330  (yyval.tree_statement_list_type) = 0;
3331  }
3332 #line 3333 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3333  break;
3334 
3335  case 6:
3336 #line 426 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3337  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), false); }
3338 #line 3339 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3339  break;
3340 
3341  case 7:
3342 #line 430 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3343  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3344 #line 3345 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3345  break;
3346 
3347  case 8:
3348 #line 432 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3349  { (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); }
3350 #line 3351 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3351  break;
3352 
3353  case 9:
3354 #line 436 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3355  { (yyval.tree_statement_list_type) = new tree_statement_list (); }
3356 #line 3357 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3357  break;
3358 
3359  case 10:
3360 #line 438 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3361  { (yyval.tree_statement_list_type) = (yyvsp[0].tree_statement_list_type); }
3362 #line 3363 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3363  break;
3364 
3365  case 11:
3366 #line 442 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3367  { (yyval.tree_statement_list_type) = parser.set_stmt_print_flag ((yyvsp[-1].tree_statement_list_type), (yyvsp[0].punct_type), true); }
3368 #line 3369 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3369  break;
3370 
3371  case 12:
3372 #line 446 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3373  { (yyval.tree_statement_list_type) = parser.make_statement_list ((yyvsp[0].tree_statement_type)); }
3374 #line 3375 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3375  break;
3376 
3377  case 13:
3378 #line 448 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3379  { (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); }
3380 #line 3381 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3381  break;
3382 
3383  case 14:
3384 #line 452 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3385  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_expression_type)); }
3386 #line 3387 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3387  break;
3388 
3389  case 15:
3390 #line 454 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3391  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_command_type)); }
3392 #line 3393 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3393  break;
3394 
3395  case 16:
3396 #line 456 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3397  { (yyval.tree_statement_type) = parser.make_statement ((yyvsp[0].tree_index_expression_type)); }
3398 #line 3399 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3399  break;
3400 
3401  case 17:
3402 #line 468 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3403  {
3404  (yyval.tree_index_expression_type) = parser.make_index_expression ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_argument_list_type), '(');
3405  if (! (yyval.tree_index_expression_type))
3406  {
3407  // make_index_expression deleted $1 and $2.
3408  ABORT_PARSE;
3409  }
3410  }
3411 #line 3412 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3412  break;
3413 
3414  case 18:
3415 #line 479 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3416  { (yyval.tree_argument_list_type) = new tree_argument_list ((yyvsp[0].tree_constant_type)); }
3417 #line 3418 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3418  break;
3419 
3420  case 19:
3421 #line 481 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3422  {
3423  (yyvsp[-1].tree_argument_list_type)->append ((yyvsp[0].tree_constant_type));
3424  (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type);
3425  }
3426 #line 3427 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3427  break;
3428 
3429  case 20:
3430 #line 492 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3431  {
3432  symbol_table::symbol_record *sr = (yyvsp[0].tok_val)->sym_rec ();
3433  (yyval.tree_identifier_type) = new tree_identifier (*sr, (yyvsp[0].tok_val)->line (), (yyvsp[0].tok_val)->column ());
3434  }
3435 #line 3436 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3436  break;
3437 
3438  case 21:
3439 #line 500 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3440  {
3441  std::string method_nm = (yyvsp[0].tok_val)->superclass_method_name ();
3442  std::string class_nm = (yyvsp[0].tok_val)->superclass_class_name ();
3443 
3444  (yyval.tree_funcall_type) = parser.make_superclass_ref (method_nm, class_nm);
3445  }
3446 #line 3447 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3447  break;
3448 
3449  case 22:
3450 #line 509 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3451  {
3452  std::string class_nm = (yyvsp[0].tok_val)->text ();
3453 
3454  (yyval.tree_funcall_type) = parser.make_meta_class_query (class_nm);
3455  }
3456 #line 3457 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3457  break;
3458 
3459  case 23:
3460 #line 517 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3461  { (yyval.tree_constant_type) = parser.make_constant (DQ_STRING, (yyvsp[0].tok_val)); }
3462 #line 3463 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3463  break;
3464 
3465  case 24:
3466 #line 519 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3467  { (yyval.tree_constant_type) = parser.make_constant (SQ_STRING, (yyvsp[0].tok_val)); }
3468 #line 3469 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3469  break;
3470 
3471  case 25:
3472 #line 523 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3473  { (yyval.tree_constant_type) = parser.make_constant (NUM, (yyvsp[0].tok_val)); }
3474 #line 3475 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3475  break;
3476 
3477  case 26:
3478 #line 525 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3479  { (yyval.tree_constant_type) = parser.make_constant (IMAG_NUM, (yyvsp[0].tok_val)); }
3480 #line 3481 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3481  break;
3482 
3483  case 27:
3484 #line 527 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3485  { (yyval.tree_constant_type) = (yyvsp[0].tree_constant_type); }
3486 #line 3487 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3487  break;
3488 
3489  case 28:
3490 #line 531 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3491  { (yyval.tree_expression_type) = parser.finish_matrix ((yyvsp[-1].tree_matrix_type)); }
3492 #line 3493 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3493  break;
3494 
3495  case 29:
3496 #line 535 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3497  { (yyval.tree_matrix_type) = (yyvsp[0].tree_argument_list_type) ? new tree_matrix ((yyvsp[0].tree_argument_list_type)) : 0; }
3498 #line 3499 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3499  break;
3500 
3501  case 30:
3502 #line 537 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3503  {
3504  if ((yyvsp[-2].tree_matrix_type))
3505  {
3506  if ((yyvsp[0].tree_argument_list_type))
3507  (yyvsp[-2].tree_matrix_type)->append ((yyvsp[0].tree_argument_list_type));
3508 
3509  (yyval.tree_matrix_type) = (yyvsp[-2].tree_matrix_type);
3510  }
3511  else
3512  (yyval.tree_matrix_type) = (yyvsp[0].tree_argument_list_type) ? new tree_matrix ((yyvsp[0].tree_argument_list_type)) : 0;
3513  }
3514 #line 3515 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3515  break;
3516 
3517  case 31:
3518 #line 551 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3519  { (yyval.tree_expression_type) = parser.finish_cell ((yyvsp[-1].tree_cell_type)); }
3520 #line 3521 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3521  break;
3522 
3523  case 32:
3524 #line 555 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3525  { (yyval.tree_cell_type) = (yyvsp[0].tree_argument_list_type) ? new tree_cell ((yyvsp[0].tree_argument_list_type)) : 0; }
3526 #line 3527 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3527  break;
3528 
3529  case 33:
3530 #line 557 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3531  {
3532  if ((yyvsp[-2].tree_cell_type))
3533  {
3534  if ((yyvsp[0].tree_argument_list_type))
3535  (yyvsp[-2].tree_cell_type)->append ((yyvsp[0].tree_argument_list_type));
3536 
3537  (yyval.tree_cell_type) = (yyvsp[-2].tree_cell_type);
3538  }
3539  else
3540  (yyval.tree_cell_type) = (yyvsp[0].tree_argument_list_type) ? new tree_cell ((yyvsp[0].tree_argument_list_type)) : 0;
3541  }
3542 #line 3543 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3543  break;
3544 
3545  case 34:
3546 #line 575 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3547  { (yyval.tree_argument_list_type) = 0; }
3548 #line 3549 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3549  break;
3550 
3551  case 35:
3552 #line 577 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3553  { (yyval.tree_argument_list_type) = 0; }
3554 #line 3555 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3555  break;
3556 
3557  case 36:
3558 #line 579 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3559  { (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type); }
3560 #line 3561 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3561  break;
3562 
3563  case 37:
3564 #line 581 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3565  { (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type); }
3566 #line 3567 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3567  break;
3568 
3569  case 38:
3570 #line 583 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3571  { (yyval.tree_argument_list_type) = (yyvsp[0].tree_argument_list_type); }
3572 #line 3573 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3573  break;
3574 
3575  case 39:
3576 #line 585 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3577  { (yyval.tree_argument_list_type) = (yyvsp[-1].tree_argument_list_type); }
3578 #line 3579 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3579  break;
3580 
3581  case 40:
3582 #line 589 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3583  {
3584  (yyval.tree_fcn_handle_type) = parser.make_fcn_handle ((yyvsp[0].tok_val));
3585  lexer.looking_at_function_handle--;
3586  }
3587 #line 3588 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3588  break;
3589 
3590  case 41:
3591 #line 596 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3592  {
3593  (yyval.tree_anon_fcn_handle_type) = parser.make_anon_fcn_handle ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].tree_statement_type));
3594  lexer.nesting_level.remove ();
3595  }
3596 #line 3597 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3597  break;
3598 
3599  case 42:
3600 #line 603 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3601  { (yyval.tree_expression_type) = (yyvsp[0].tree_identifier_type); }
3602 #line 3603 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3603  break;
3604 
3605  case 43:
3606 #line 605 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3607  { (yyval.tree_expression_type) = (yyvsp[0].tree_constant_type); }
3608 #line 3609 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3609  break;
3610 
3611  case 44:
3612 #line 607 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3613  { (yyval.tree_expression_type) = (yyvsp[0].tree_fcn_handle_type); }
3614 #line 3615 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3615  break;
3616 
3617  case 45:
3618 #line 609 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3619  {
3620  lexer.looking_at_matrix_or_assign_lhs = false;
3621  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
3622  }
3623 #line 3624 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3624  break;
3625 
3626  case 46:
3627 #line 614 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3628  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3629 #line 3630 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3630  break;
3631 
3632  case 47:
3633 #line 616 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3634  { (yyval.tree_expression_type) = (yyvsp[0].tree_funcall_type); }
3635 #line 3636 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3636  break;
3637 
3638  case 48:
3639 #line 618 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3640  { (yyval.tree_expression_type) = (yyvsp[0].tree_funcall_type); }
3641 #line 3642 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3642  break;
3643 
3644  case 49:
3645 #line 620 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3646  { (yyval.tree_expression_type) = (yyvsp[-1].tree_expression_type)->mark_in_parens (); }
3647 #line 3648 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3648  break;
3649 
3650  case 50:
3651 #line 624 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3652  {
3653  YYUSE ((yyvsp[0].tok_val));
3654 
3656  (yyval.tree_constant_type) = new tree_constant (tmp);
3657  }
3658 #line 3659 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3659  break;
3660 
3661  case 51:
3662 #line 633 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3663  {
3664  YYUSE ((yyvsp[0].tok_val));
3665 
3666  (yyval.tree_identifier_type) = new tree_black_hole ();
3667  }
3668 #line 3669 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3669  break;
3670 
3671  case 52:
3672 #line 641 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3673  { (yyval.tree_argument_list_type) = new tree_argument_list ((yyvsp[0].tree_expression_type)); }
3674 #line 3675 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3675  break;
3676 
3677  case 53:
3678 #line 643 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3679  { (yyval.tree_argument_list_type) = new tree_argument_list ((yyvsp[0].tree_constant_type)); }
3680 #line 3681 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3681  break;
3682 
3683  case 54:
3684 #line 645 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3685  { (yyval.tree_argument_list_type) = new tree_argument_list ((yyvsp[0].tree_identifier_type)); }
3686 #line 3687 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3687  break;
3688 
3689  case 55:
3690 #line 647 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3691  {
3692  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_constant_type));
3693  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
3694  }
3695 #line 3696 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3696  break;
3697 
3698  case 56:
3699 #line 652 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3700  {
3701  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_identifier_type));
3702  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
3703  }
3704 #line 3705 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3705  break;
3706 
3707  case 57:
3708 #line 657 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3709  {
3710  (yyvsp[-2].tree_argument_list_type)->append ((yyvsp[0].tree_expression_type));
3711  (yyval.tree_argument_list_type) = (yyvsp[-2].tree_argument_list_type);
3712  }
3713 #line 3714 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3714  break;
3715 
3716  case 58:
3717 #line 664 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3718  {
3719  (yyval.dummy_type) = 0;
3720  lexer.looking_at_indirect_ref = true;
3721  }
3722 #line 3723 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3723  break;
3724 
3725  case 59:
3726 #line 671 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3727  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3728 #line 3729 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3729  break;
3730 
3731  case 60:
3732 #line 673 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3733  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3734 #line 3735 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3735  break;
3736 
3737  case 61:
3738 #line 675 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3739  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3740 #line 3741 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3741  break;
3742 
3743  case 62:
3744 #line 677 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3745  {
3746  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), 0, '(');
3747  if (! (yyval.tree_expression_type))
3748  {
3749  // make_index_expression deleted $1.
3750  ABORT_PARSE;
3751  }
3752  }
3753 #line 3754 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3754  break;
3755 
3756  case 63:
3757 #line 686 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3758  {
3759  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
3760  if (! (yyval.tree_expression_type))
3761  {
3762  // make_index_expression deleted $1 and $3.
3763  ABORT_PARSE;
3764  }
3765  }
3766 #line 3767 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3767  break;
3768 
3769  case 64:
3770 #line 695 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3771  {
3772  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), 0, '{');
3773  if (! (yyval.tree_expression_type))
3774  {
3775  // make_index_expression deleted $1.
3776  ABORT_PARSE;
3777  }
3778  }
3779 #line 3780 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3780  break;
3781 
3782  case 65:
3783 #line 704 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3784  {
3785  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
3786  if (! (yyval.tree_expression_type))
3787  {
3788  // make_index_expression deleted $1 and $3.
3789  ABORT_PARSE;
3790  }
3791  }
3792 #line 3793 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3793  break;
3794 
3795  case 66:
3796 #line 713 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3797  { (yyval.tree_expression_type) = parser.make_postfix_op (HERMITIAN, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3798 #line 3799 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3799  break;
3800 
3801  case 67:
3802 #line 715 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3803  { (yyval.tree_expression_type) = parser.make_postfix_op (TRANSPOSE, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3804 #line 3805 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3805  break;
3806 
3807  case 68:
3808 #line 717 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3809  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
3810 #line 3811 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3811  break;
3812 
3813  case 69:
3814 #line 719 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3815  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type)); }
3816 #line 3817 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3817  break;
3818 
3819  case 70:
3820 #line 721 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3821  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3822 #line 3823 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3823  break;
3824 
3825  case 71:
3826 #line 723 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3827  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3828 #line 3829 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3829  break;
3830 
3831  case 72:
3832 #line 725 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3833  { (yyval.tree_expression_type) = parser.make_prefix_op (EXPR_NOT, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3834 #line 3835 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3835  break;
3836 
3837  case 73:
3838 #line 727 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3839  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3840 #line 3841 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3841  break;
3842 
3843  case 74:
3844 #line 729 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3845  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
3846 #line 3847 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3847  break;
3848 
3849  case 75:
3850 #line 731 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3851  { (yyval.tree_expression_type) = parser.make_binary_op (POW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3852 #line 3853 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3853  break;
3854 
3855  case 76:
3856 #line 733 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3857  { (yyval.tree_expression_type) = parser.make_binary_op (EPOW, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3858 #line 3859 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3859  break;
3860 
3861  case 77:
3862 #line 735 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3863  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3864 #line 3865 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3865  break;
3866 
3867  case 78:
3868 #line 737 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3869  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3870 #line 3871 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3871  break;
3872 
3873  case 79:
3874 #line 739 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3875  { (yyval.tree_expression_type) = parser.make_binary_op ('*', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3876 #line 3877 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3877  break;
3878 
3879  case 80:
3880 #line 741 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3881  { (yyval.tree_expression_type) = parser.make_binary_op ('/', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3882 #line 3883 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3883  break;
3884 
3885  case 81:
3886 #line 743 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3887  { (yyval.tree_expression_type) = parser.make_binary_op ('+', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3888 #line 3889 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3889  break;
3890 
3891  case 82:
3892 #line 745 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3893  { (yyval.tree_expression_type) = parser.make_binary_op ('-', (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3894 #line 3895 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3895  break;
3896 
3897  case 83:
3898 #line 747 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3899  { (yyval.tree_expression_type) = parser.make_binary_op (EMUL, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3900 #line 3901 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3901  break;
3902 
3903  case 84:
3904 #line 749 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3905  { (yyval.tree_expression_type) = parser.make_binary_op (EDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3906 #line 3907 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3907  break;
3908 
3909  case 85:
3910 #line 751 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3911  { (yyval.tree_expression_type) = parser.make_binary_op (LEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3912 #line 3913 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3913  break;
3914 
3915  case 86:
3916 #line 753 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3917  { (yyval.tree_expression_type) = parser.make_binary_op (ELEFTDIV, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
3918 #line 3919 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3919  break;
3920 
3921  case 87:
3922 #line 757 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3923  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
3924 #line 3925 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3925  break;
3926 
3927  case 88:
3928 #line 759 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3929  { (yyval.tree_expression_type) = parser.make_postfix_op (PLUS_PLUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3930 #line 3931 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3931  break;
3932 
3933  case 89:
3934 #line 761 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3935  { (yyval.tree_expression_type) = parser.make_postfix_op (MINUS_MINUS, (yyvsp[-1].tree_expression_type), (yyvsp[0].tok_val)); }
3936 #line 3937 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3937  break;
3938 
3939  case 90:
3940 #line 763 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3941  {
3942  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), 0, '(');
3943  if (! (yyval.tree_expression_type))
3944  {
3945  // make_index_expression deleted $1.
3946  ABORT_PARSE;
3947  }
3948  }
3949 #line 3950 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3950  break;
3951 
3952  case 91:
3953 #line 772 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3954  {
3955  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '(');
3956  if (! (yyval.tree_expression_type))
3957  {
3958  // make_index_expression deleted $1 and $3.
3959  ABORT_PARSE;
3960  }
3961  }
3962 #line 3963 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3963  break;
3964 
3965  case 92:
3966 #line 781 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3967  {
3968  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-2].tree_expression_type), 0, '{');
3969  if (! (yyval.tree_expression_type))
3970  {
3971  // make_index_expression deleted $1.
3972  ABORT_PARSE;
3973  }
3974  }
3975 #line 3976 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3976  break;
3977 
3978  case 93:
3979 #line 790 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3980  {
3981  (yyval.tree_expression_type) = parser.make_index_expression ((yyvsp[-3].tree_expression_type), (yyvsp[-1].tree_argument_list_type), '{');
3982  if (! (yyval.tree_expression_type))
3983  {
3984  // make_index_expression deleted $1 and $3.
3985  ABORT_PARSE;
3986  }
3987  }
3988 #line 3989 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3989  break;
3990 
3991  case 94:
3992 #line 799 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3993  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-2].tree_expression_type), (yyvsp[0].tok_val)->text ()); }
3994 #line 3995 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
3995  break;
3996 
3997  case 95:
3998 #line 801 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
3999  { (yyval.tree_expression_type) = parser.make_indirect_ref ((yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_expression_type)); }
4000 #line 4001 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4001  break;
4002 
4003  case 96:
4004 #line 803 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4005  { (yyval.tree_expression_type) = parser.make_prefix_op (PLUS_PLUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4006 #line 4007 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4007  break;
4008 
4009  case 97:
4010 #line 805 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4011  { (yyval.tree_expression_type) = parser.make_prefix_op (MINUS_MINUS, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4012 #line 4013 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4013  break;
4014 
4015  case 98:
4016 #line 807 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4017  { (yyval.tree_expression_type) = parser.make_prefix_op (EXPR_NOT, (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4018 #line 4019 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4019  break;
4020 
4021  case 99:
4022 #line 809 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4023  { (yyval.tree_expression_type) = parser.make_prefix_op ('+', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4024 #line 4025 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4025  break;
4026 
4027  case 100:
4028 #line 811 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4029  { (yyval.tree_expression_type) = parser.make_prefix_op ('-', (yyvsp[0].tree_expression_type), (yyvsp[-1].tok_val)); }
4030 #line 4031 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4031  break;
4032 
4033  case 101:
4034 #line 815 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4035  { (yyval.tree_expression_type) = parser.finish_colon_expression ((yyvsp[0].tree_colon_expression_type)); }
4036 #line 4037 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4037  break;
4038 
4039  case 102:
4040 #line 819 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4041  { (yyval.tree_colon_expression_type) = new tree_colon_expression ((yyvsp[0].tree_expression_type)); }
4042 #line 4043 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4043  break;
4044 
4045  case 103:
4046 #line 821 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4047  {
4048  YYUSE ((yyvsp[-1].tok_val));
4049 
4050  if (! ((yyval.tree_colon_expression_type) = (yyvsp[-2].tree_colon_expression_type)->append ((yyvsp[0].tree_expression_type))))
4051  {
4052  delete (yyvsp[-2].tree_colon_expression_type);
4053  delete (yyvsp[0].tree_expression_type);
4054  ABORT_PARSE;
4055  }
4056  }
4057 #line 4058 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4058  break;
4059 
4060  case 104:
4061 #line 834 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4062  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4063 #line 4064 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4064  break;
4065 
4066  case 105:
4067 #line 836 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4068  { (yyval.tree_expression_type) = parser.make_binary_op (LSHIFT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4069 #line 4070 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4070  break;
4071 
4072  case 106:
4073 #line 838 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4074  { (yyval.tree_expression_type) = parser.make_binary_op (RSHIFT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4075 #line 4076 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4076  break;
4077 
4078  case 107:
4079 #line 840 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4080  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4081 #line 4082 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4082  break;
4083 
4084  case 108:
4085 #line 842 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4086  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_LE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4087 #line 4088 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4088  break;
4089 
4090  case 109:
4091 #line 844 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4092  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_EQ, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4093 #line 4094 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4094  break;
4095 
4096  case 110:
4097 #line 846 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4098  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4099 #line 4100 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4100  break;
4101 
4102  case 111:
4103 #line 848 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4104  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_GT, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4105 #line 4106 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4106  break;
4107 
4108  case 112:
4109 #line 850 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4110  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_NE, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4111 #line 4112 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4112  break;
4113 
4114  case 113:
4115 #line 852 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4116  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_AND, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4117 #line 4118 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4118  break;
4119 
4120  case 114:
4121 #line 854 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4122  { (yyval.tree_expression_type) = parser.make_binary_op (EXPR_OR, (yyvsp[-2].tree_expression_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4123 #line 4124 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4124  break;
4125 
4126  case 115:
4127 #line 856 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4128  { (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)); }
4129 #line 4130 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4130  break;
4131 
4132  case 116:
4133 #line 858 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4134  { (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)); }
4135 #line 4136 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4136  break;
4137 
4138  case 117:
4139 #line 862 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4140  {
4141  (yyval.tree_argument_list_type) = parser.validate_matrix_for_assignment ((yyvsp[0].tree_expression_type));
4142 
4143  if ((yyval.tree_argument_list_type))
4144  { lexer.looking_at_matrix_or_assign_lhs = false; }
4145  else
4146  {
4147  // validate_matrix_for_assignment deleted $1.
4148  ABORT_PARSE;
4149  }
4150  }
4151 #line 4152 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4152  break;
4153 
4154  case 118:
4155 #line 876 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4156  { (yyval.tree_expression_type) = parser.make_assign_op ('=', (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4157 #line 4158 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4158  break;
4159 
4160  case 119:
4161 #line 878 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4162  { (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)); }
4163 #line 4164 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4164  break;
4165 
4166  case 120:
4167 #line 880 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4168  { (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)); }
4169 #line 4170 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4170  break;
4171 
4172  case 121:
4173 #line 882 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4174  { (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)); }
4175 #line 4176 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4176  break;
4177 
4178  case 122:
4179 #line 884 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4180  { (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)); }
4181 #line 4182 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4182  break;
4183 
4184  case 123:
4185 #line 886 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4186  { (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)); }
4187 #line 4188 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4188  break;
4189 
4190  case 124:
4191 #line 888 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4192  { (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)); }
4193 #line 4194 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4194  break;
4195 
4196  case 125:
4197 #line 890 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4198  { (yyval.tree_expression_type) = parser.make_assign_op (LSHIFT_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4199 #line 4200 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4200  break;
4201 
4202  case 126:
4203 #line 892 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4204  { (yyval.tree_expression_type) = parser.make_assign_op (RSHIFT_EQ, (yyvsp[-2].tree_argument_list_type), (yyvsp[-1].tok_val), (yyvsp[0].tree_expression_type)); }
4205 #line 4206 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4206  break;
4207 
4208  case 127:
4209 #line 894 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4210  { (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)); }
4211 #line 4212 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4212  break;
4213 
4214  case 128:
4215 #line 896 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4216  { (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)); }
4217 #line 4218 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4218  break;
4219 
4220  case 129:
4221 #line 898 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4222  { (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)); }
4223 #line 4224 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4224  break;
4225 
4226  case 130:
4227 #line 900 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4228  { (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)); }
4229 #line 4230 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4230  break;
4231 
4232  case 131:
4233 #line 902 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4234  { (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)); }
4235 #line 4236 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4236  break;
4237 
4238  case 132:
4239 #line 904 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4240  { (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)); }
4241 #line 4242 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4242  break;
4243 
4244  case 133:
4245 #line 908 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4246  {
4247  if ((yyvsp[0].tree_expression_type) && ((yyvsp[0].tree_expression_type)->is_matrix () || (yyvsp[0].tree_expression_type)->is_cell ()))
4248  {
4249  if (parser.validate_array_list ((yyvsp[0].tree_expression_type)))
4250  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4251  else
4252  {
4253  delete (yyvsp[0].tree_expression_type);
4254  ABORT_PARSE;
4255  }
4256  }
4257  else
4258  (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type);
4259  }
4260 #line 4261 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4261  break;
4262 
4263  case 134:
4264 #line 923 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4265  { (yyval.tree_expression_type) = (yyvsp[0].tree_expression_type); }
4266 #line 4267 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4267  break;
4268 
4269  case 135:
4270 #line 925 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4271  { (yyval.tree_expression_type) = (yyvsp[0].tree_anon_fcn_handle_type); }
4272 #line 4273 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4273  break;
4274 
4275  case 136:
4276 #line 933 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4277  { (yyval.tree_command_type) = (yyvsp[0].tree_decl_command_type); }
4278 #line 4279 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4279  break;
4280 
4281  case 137:
4282 #line 935 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4283  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4284 #line 4285 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4285  break;
4286 
4287  case 138:
4288 #line 937 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4289  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4290 #line 4291 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4291  break;
4292 
4293  case 139:
4294 #line 939 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4295  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4296 #line 4297 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4297  break;
4298 
4299  case 140:
4300 #line 941 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4301  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4302 #line 4303 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4303  break;
4304 
4305  case 141:
4306 #line 943 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4307  { (yyval.tree_command_type) = (yyvsp[0].tree_function_def_type); }
4308 #line 4309 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4309  break;
4310 
4311  case 142:
4312 #line 945 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4313  { (yyval.tree_command_type) = (yyvsp[0].tree_command_type); }
4314 #line 4315 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4315  break;
4316 
4317  case 143:
4318 #line 953 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4319  {
4320  (yyval.tree_decl_command_type) = parser.make_decl_command (GLOBAL, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4321  lexer.looking_at_decl_list = false;
4322  }
4323 #line 4324 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4324  break;
4325 
4326  case 144:
4327 #line 958 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4328  {
4329  (yyval.tree_decl_command_type) = parser.make_decl_command (PERSISTENT, (yyvsp[-1].tok_val), (yyvsp[0].tree_decl_init_list_type));
4330  lexer.looking_at_decl_list = false;
4331  }
4332 #line 4333 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4333  break;
4334 
4335  case 145:
4336 #line 965 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4337  { (yyval.tree_decl_init_list_type) = new tree_decl_init_list ((yyvsp[0].tree_decl_elt_type)); }
4338 #line 4339 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4339  break;
4340 
4341  case 146:
4342 #line 967 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4343  {
4344  (yyvsp[-1].tree_decl_init_list_type)->append ((yyvsp[0].tree_decl_elt_type));
4345  (yyval.tree_decl_init_list_type) = (yyvsp[-1].tree_decl_init_list_type);
4346  }
4347 #line 4348 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4348  break;
4349 
4350  case 147:
4351 #line 974 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4352  {
4353  (yyval.dummy_type) = 0;
4354  lexer.looking_at_initializer_expression = true;
4355  }
4356 #line 4357 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4357  break;
4358 
4359  case 148:
4360 #line 980 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4361  { (yyval.tree_decl_elt_type) = new tree_decl_elt ((yyvsp[0].tree_identifier_type)); }
4362 #line 4363 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4363  break;
4364 
4365  case 149:
4366 #line 982 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4367  {
4368  YYUSE ((yyvsp[-2].tok_val));
4369 
4370  lexer.looking_at_initializer_expression = false;
4371  (yyval.tree_decl_elt_type) = new tree_decl_elt ((yyvsp[-3].tree_identifier_type), (yyvsp[0].tree_expression_type));
4372  }
4373 #line 4374 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4374  break;
4375 
4376  case 150:
4377 #line 995 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4378  { (yyval.tree_command_type) = (yyvsp[0].tree_if_command_type); }
4379 #line 4380 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4380  break;
4381 
4382  case 151:
4383 #line 997 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4384  { (yyval.tree_command_type) = (yyvsp[0].tree_switch_command_type); }
4385 #line 4386 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4386  break;
4387 
4388  case 152:
4389 #line 1005 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4390  {
4391  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))))
4392  {
4393  // finish_if_command deleted $3.
4394  ABORT_PARSE;
4395  }
4396  }
4397 #line 4398 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4398  break;
4399 
4400  case 153:
4401 #line 1015 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4402  { (yyval.tree_if_command_list_type) = (yyvsp[0].tree_if_command_list_type); }
4403 #line 4404 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4404  break;
4405 
4406  case 154:
4407 #line 1017 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4408  {
4409  (yyvsp[-1].tree_if_command_list_type)->append ((yyvsp[0].tree_if_clause_type));
4410  (yyval.tree_if_command_list_type) = (yyvsp[-1].tree_if_command_list_type);
4411  }
4412 #line 4413 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4413  break;
4414 
4415  case 155:
4416 #line 1024 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4417  {
4418  YYUSE ((yyvsp[-1].punct_type));
4419 
4420  (yyvsp[-3].tree_expression_type)->mark_braindead_shortcircuit ();
4421 
4422  (yyval.tree_if_command_list_type) = parser.start_if_command ((yyvsp[-3].tree_expression_type), (yyvsp[0].tree_statement_list_type));
4423  }
4424 #line 4425 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4425  break;
4426 
4427  case 156:
4428 #line 1032 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4429  {
4430  (yyvsp[-1].tree_if_command_list_type)->append ((yyvsp[0].tree_if_clause_type));
4431  (yyval.tree_if_command_list_type) = (yyvsp[-1].tree_if_command_list_type);
4432  }
4433 #line 4434 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4434  break;
4435 
4436  case 157:
4437 #line 1039 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4438  {
4439  YYUSE ((yyvsp[-4].punct_type));
4440  YYUSE ((yyvsp[-1].punct_type));
4441 
4442  (yyvsp[-3].tree_expression_type)->mark_braindead_shortcircuit ();
4443 
4444  (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));
4445  }
4446 #line 4447 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4447  break;
4448 
4449  case 158:
4450 #line 1050 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4451  {
4452  YYUSE ((yyvsp[-3].tok_val));
4453  YYUSE ((yyvsp[-1].punct_type));
4454 
4455  (yyval.tree_if_clause_type) = new tree_if_clause ((yyvsp[0].tree_statement_list_type), (yyvsp[-2].comment_type));
4456  }
4457 #line 4458 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4458  break;
4459 
4460  case 159:
4461 #line 1063 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4462  {
4463  YYUSE ((yyvsp[-2].punct_type));
4464 
4465  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))))
4466  {
4467  // finish_switch_command deleted $3 adn $5.
4468  ABORT_PARSE;
4469  }
4470  }
4471 #line 4472 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4472  break;
4473 
4474  case 160:
4475 #line 1075 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4476  { (yyval.tree_switch_case_list_type) = new tree_switch_case_list (); }
4477 #line 4478 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4478  break;
4479 
4480  case 161:
4481 #line 1077 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4482  { (yyval.tree_switch_case_list_type) = new tree_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4483 #line 4484 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4484  break;
4485 
4486  case 162:
4487 #line 1079 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4488  { (yyval.tree_switch_case_list_type) = (yyvsp[0].tree_switch_case_list_type); }
4489 #line 4490 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4490  break;
4491 
4492  case 163:
4493 #line 1081 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4494  {
4495  (yyvsp[-1].tree_switch_case_list_type)->append ((yyvsp[0].tree_switch_case_type));
4496  (yyval.tree_switch_case_list_type) = (yyvsp[-1].tree_switch_case_list_type);
4497  }
4498 #line 4499 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4499  break;
4500 
4501  case 164:
4502 #line 1088 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4503  { (yyval.tree_switch_case_list_type) = new tree_switch_case_list ((yyvsp[0].tree_switch_case_type)); }
4504 #line 4505 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4505  break;
4506 
4507  case 165:
4508 #line 1090 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4509  {
4510  (yyvsp[-1].tree_switch_case_list_type)->append ((yyvsp[0].tree_switch_case_type));
4511  (yyval.tree_switch_case_list_type) = (yyvsp[-1].tree_switch_case_list_type);
4512  }
4513 #line 4514 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4514  break;
4515 
4516  case 166:
4517 #line 1097 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4518  {
4519  YYUSE ((yyvsp[-4].punct_type));
4520  YYUSE ((yyvsp[-1].punct_type));
4521 
4522  (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));
4523  }
4524 #line 4525 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4525  break;
4526 
4527  case 167:
4528 #line 1106 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4529  {
4530  YYUSE ((yyvsp[-3].tok_val));
4531  YYUSE ((yyvsp[-1].punct_type));
4532 
4533  (yyval.tree_switch_case_type) = new tree_switch_case ((yyvsp[0].tree_statement_list_type), (yyvsp[-2].comment_type));
4534  }
4535 #line 4536 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4536  break;
4537 
4538  case 168:
4539 #line 1119 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4540  {
4541  YYUSE ((yyvsp[-2].punct_type));
4542 
4543  (yyvsp[-4].tree_expression_type)->mark_braindead_shortcircuit ();
4544 
4545  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))))
4546  {
4547  // make_while_command deleted $3 and $6.
4548  ABORT_PARSE;
4549  }
4550  }
4551 #line 4552 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4552  break;
4553 
4554  case 169:
4555 #line 1131 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4556  {
4557  YYUSE ((yyvsp[-5].tok_val));
4558  YYUSE ((yyvsp[-3].punct_type));
4559 
4560  (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));
4561  }
4562 #line 4563 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4563  break;
4564 
4565  case 170:
4566 #line 1138 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4567  {
4568  YYUSE ((yyvsp[-5].tok_val));
4569  YYUSE ((yyvsp[-2].punct_type));
4570 
4571  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), 0,
4572  (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4573  {
4574  // make_for_command deleted $3, $5, and $8.
4575  ABORT_PARSE;
4576  }
4577  }
4578 #line 4579 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4579  break;
4580 
4581  case 171:
4582 #line 1150 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4583  {
4584  YYUSE ((yyvsp[-5].tok_val));
4585  YYUSE ((yyvsp[-2].punct_type));
4586 
4587  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), 0,
4588  (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-8].comment_type))))
4589  {
4590  // make_for_command deleted $4, $6, and $9.
4591  ABORT_PARSE;
4592  }
4593  }
4594 #line 4595 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4595  break;
4596 
4597  case 172:
4598 #line 1162 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4599  {
4600  YYUSE ((yyvsp[-5].tok_val));
4601  YYUSE ((yyvsp[-2].punct_type));
4602 
4603  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),
4604  0, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
4605  {
4606  // make_for_command deleted $3, $5, and $8.
4607  ABORT_PARSE;
4608  }
4609  }
4610 #line 4611 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4611  break;
4612 
4613  case 173:
4614 #line 1174 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4615  {
4616  YYUSE ((yyvsp[-7].tok_val));
4617  YYUSE ((yyvsp[-2].punct_type));
4618 
4619  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),
4620  (yyvsp[-4].tree_expression_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tok_val), (yyvsp[-10].comment_type))))
4621  {
4622  // make_for_command deleted $4, $6, $8, and $11.
4623  ABORT_PARSE;
4624  }
4625  }
4626 #line 4627 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4627  break;
4628 
4629  case 174:
4630 #line 1192 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4631  { (yyval.tree_command_type) = parser.make_break_command ((yyvsp[0].tok_val)); }
4632 #line 4633 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4633  break;
4634 
4635  case 175:
4636 #line 1194 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4637  { (yyval.tree_command_type) = parser.make_continue_command ((yyvsp[0].tok_val)); }
4638 #line 4639 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4639  break;
4640 
4641  case 176:
4642 #line 1196 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4643  { (yyval.tree_command_type) = parser.make_return_command ((yyvsp[0].tok_val)); }
4644 #line 4645 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4645  break;
4646 
4647  case 177:
4648 #line 1205 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4649  {
4650  YYUSE ((yyvsp[-6].punct_type));
4651  YYUSE ((yyvsp[-4].tok_val));
4652  YYUSE ((yyvsp[-2].punct_type));
4653 
4654  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))))
4655  {
4656  // make_unwind_command deleted $4 and $8.
4657  ABORT_PARSE;
4658  }
4659  }
4660 #line 4661 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4661  break;
4662 
4663  case 178:
4664 #line 1218 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4665  {
4666  YYUSE ((yyvsp[-6].punct_type));
4667  YYUSE ((yyvsp[-4].tok_val));
4668  YYUSE ((yyvsp[-2].punct_type));
4669 
4670  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))))
4671  {
4672  // make_try_command deleted $4 and $8.
4673  ABORT_PARSE;
4674  }
4675  }
4676 #line 4677 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4677  break;
4678 
4679  case 179:
4680 #line 1230 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4681  {
4682  YYUSE ((yyvsp[-2].punct_type));
4683 
4684  if (! ((yyval.tree_command_type) = parser.make_try_command ((yyvsp[-4].tok_val), (yyvsp[-1].tree_statement_list_type), 0, 0, (yyvsp[0].tok_val), (yyvsp[-3].comment_type), 0)))
4685  {
4686  // make_try_command deleted $4.
4687  ABORT_PARSE;
4688  }
4689  }
4690 #line 4691 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4691  break;
4692 
4693  case 180:
4694 #line 1246 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4695  {
4696  (yyval.dummy_type) = 0;
4697 
4698  parser.curr_fcn_depth++;
4699 
4700  if (parser.max_fcn_depth < parser.curr_fcn_depth)
4701  parser.max_fcn_depth = parser.curr_fcn_depth;
4702 
4703  lexer.symtab_context.push (symbol_table::alloc_scope ());
4704 
4705  parser.function_scopes.push_back
4706  (lexer.symtab_context.curr_scope ());
4707 
4708  if (! lexer.reading_script_file
4709  && parser.curr_fcn_depth == 1
4710  && ! parser.parsing_subfunctions)
4711  parser.primary_fcn_scope
4712  = lexer.symtab_context.curr_scope ();
4713 
4714  if (lexer.reading_script_file
4715  && parser.curr_fcn_depth > 1)
4716  parser.bison_error ("nested functions not implemented in this context");
4717  }
4718 #line 4719 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4719  break;
4720 
4721  case 181:
4722 #line 1276 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4723  {
4724  (yyval.dummy_type) = 0;
4725  lexer.looking_at_parameter_list = true;
4726 
4727  if (lexer.looking_at_function_handle)
4728  {
4729  lexer.symtab_context.push (symbol_table::alloc_scope ());
4730  lexer.looking_at_function_handle--;
4731  lexer.looking_at_anon_fcn_args = true;
4732  }
4733  }
4734 #line 4735 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4735  break;
4736 
4737  case 182:
4738 #line 1290 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4739  {
4740  (yyval.dummy_type) = 0;
4741  lexer.looking_at_parameter_list = false;
4742  lexer.looking_for_object_index = false;
4743  }
4744 #line 4745 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4745  break;
4746 
4747  case 183:
4748 #line 1298 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4749  {
4750  if ((yyvsp[-1].tree_parameter_list_type))
4751  lexer.mark_as_variables ((yyvsp[-1].tree_parameter_list_type)->variable_names ());
4752 
4753  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
4754  }
4755 #line 4756 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4756  break;
4757 
4758  case 184:
4759 #line 1305 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4760  {
4761  parser.bison_error ("invalid parameter list");
4762  (yyval.tree_parameter_list_type) = 0;
4763  ABORT_PARSE;
4764  }
4765 #line 4766 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4766  break;
4767 
4768  case 185:
4769 #line 1313 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4770  { (yyval.tree_parameter_list_type) = 0; }
4771 #line 4772 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4772  break;
4773 
4774  case 186:
4775 #line 1315 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4776  {
4777  (yyvsp[0].tree_parameter_list_type)->mark_as_formal_parameters ();
4778  if ((yyvsp[0].tree_parameter_list_type)->validate (tree_parameter_list::in))
4779  {
4780  lexer.mark_as_variables ((yyvsp[0].tree_parameter_list_type)->variable_names ());
4781  (yyval.tree_parameter_list_type) = (yyvsp[0].tree_parameter_list_type);
4782  }
4783  else
4784  {
4785  delete (yyvsp[0].tree_parameter_list_type);
4786  ABORT_PARSE;
4787  }
4788  }
4789 #line 4790 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4790  break;
4791 
4792  case 187:
4793 #line 1331 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4794  { (yyval.tree_parameter_list_type) = new tree_parameter_list ((yyvsp[0].tree_decl_elt_type)); }
4795 #line 4796 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4796  break;
4797 
4798  case 188:
4799 #line 1333 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4800  {
4801  (yyvsp[-2].tree_parameter_list_type)->append ((yyvsp[0].tree_decl_elt_type));
4802  (yyval.tree_parameter_list_type) = (yyvsp[-2].tree_parameter_list_type);
4803  }
4804 #line 4805 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4805  break;
4806 
4807  case 189:
4808 #line 1340 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4809  { (yyval.tree_decl_elt_type) = (yyvsp[0].tree_decl_elt_type); }
4810 #line 4811 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4811  break;
4812 
4813  case 190:
4814 #line 1342 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4815  { (yyval.tree_decl_elt_type) = new tree_decl_elt ((yyvsp[0].tree_identifier_type)); }
4816 #line 4817 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4817  break;
4818 
4819  case 191:
4820 #line 1350 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4821  {
4822  lexer.looking_at_return_list = false;
4823 
4824  (yyval.tree_parameter_list_type) = new tree_parameter_list ();
4825  }
4826 #line 4827 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4827  break;
4828 
4829  case 192:
4830 #line 1356 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4831  {
4832  lexer.looking_at_return_list = false;
4833 
4834  tree_parameter_list *tmp = new tree_parameter_list ((yyvsp[0].tree_identifier_type));
4835 
4836  // Even though this parameter list can contain only
4837  // a single identifier, we still need to validate it
4838  // to check for varargin or varargout.
4839 
4841  (yyval.tree_parameter_list_type) = tmp;
4842  else
4843  {
4844  delete tmp;
4845  ABORT_PARSE;
4846  }
4847  }
4848 #line 4849 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4849  break;
4850 
4851  case 193:
4852 #line 1374 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4853  {
4854  lexer.looking_at_return_list = false;
4855 
4856  // Check for duplicate parameter names, varargin,
4857  // or varargout.
4858 
4859  if ((yyvsp[-1].tree_parameter_list_type)->validate (tree_parameter_list::out))
4860  (yyval.tree_parameter_list_type) = (yyvsp[-1].tree_parameter_list_type);
4861  else
4862  {
4863  delete (yyvsp[-1].tree_parameter_list_type);
4864  ABORT_PARSE;
4865  }
4866  }
4867 #line 4868 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4868  break;
4869 
4870  case 194:
4871 #line 1391 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4872  { (yyval.tree_parameter_list_type) = new tree_parameter_list (new tree_decl_elt ((yyvsp[0].tree_identifier_type))); }
4873 #line 4874 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4874  break;
4875 
4876  case 195:
4877 #line 1393 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4878  {
4879  (yyvsp[-2].tree_parameter_list_type)->append (new tree_decl_elt ((yyvsp[0].tree_identifier_type)));
4880  (yyval.tree_parameter_list_type) = (yyvsp[-2].tree_parameter_list_type);
4881  }
4882 #line 4883 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4883  break;
4884 
4885  case 196:
4886 #line 1404 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4887  {
4888  YYUSE ((yyvsp[-2].punct_type));
4889 
4890  if (lexer.reading_fcn_file)
4891  {
4892  // Delete the dummy statement_list we created
4893  // after parsing the function. Any function
4894  // definitions found in the file have already
4895  // been stored in the symbol table or in
4896  // octave_base_parser::primary_fcn_ptr.
4897 
4898  delete (yyvsp[-1].tree_statement_list_type);
4899  }
4900  else
4901  {
4902  tree_statement *end_of_script
4903  = parser.make_end ("endscript", true,
4904  lexer.input_line_number,
4905  lexer.current_input_column);
4906 
4907  parser.make_script ((yyvsp[-1].tree_statement_list_type), end_of_script);
4908  }
4909 
4910  (yyval.tree_command_type) = 0;
4911  }
4912 #line 4913 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4913  break;
4914 
4915  case 197:
4916 #line 1430 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4917  {
4918  YYUSE ((yyvsp[-3].punct_type));
4919  YYUSE ((yyvsp[-1].punct_type));
4920 
4921  if (lexer.reading_classdef_file)
4922  parser.classdef_object = (yyvsp[-2].tree_classdef_type);
4923 
4924  (yyval.tree_command_type) = 0;
4925  }
4926 #line 4927 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4927  break;
4928 
4929  case 198:
4930 #line 1446 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4931  {
4932  (yyval.tok_val) = (yyvsp[0].tok_val);
4933  if (lexer.reading_classdef_file
4934  || lexer.parsing_classdef)
4935  lexer.maybe_classdef_get_set_method = true;
4936  }
4937 #line 4938 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4938  break;
4939 
4940  case 199:
4941 #line 1455 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4942  {
4943  (yyval.tree_function_def_type) = parser.finish_function (0, (yyvsp[0].octave_user_function_type), (yyvsp[-1].comment_type), (yyvsp[-2].tok_val)->line (),
4944  (yyvsp[-2].tok_val)->column ());
4946  }
4947 #line 4948 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4948  break;
4949 
4950  case 200:
4951 #line 1461 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4952  {
4953  YYUSE ((yyvsp[-1].tok_val));
4954 
4955  (yyval.tree_function_def_type) = parser.finish_function ((yyvsp[-2].tree_parameter_list_type), (yyvsp[0].octave_user_function_type), (yyvsp[-3].comment_type), (yyvsp[-4].tok_val)->line (),
4956  (yyvsp[-4].tok_val)->column ());
4958  }
4959 #line 4960 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4960  break;
4961 
4962  case 201:
4963 #line 1471 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4964  {
4965  std::string id_name = (yyvsp[0].tree_identifier_type)->name ();
4966 
4967  lexer.parsed_function_name.top () = true;
4968  lexer.maybe_classdef_get_set_method = false;
4969 
4970  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
4971  }
4972 #line 4973 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4973  break;
4974 
4975  case 202:
4976 #line 1480 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4977  {
4978  YYUSE ((yyvsp[-2].tok_val));
4979 
4980  lexer.parsed_function_name.top () = true;
4981  lexer.maybe_classdef_get_set_method = false;
4982  lexer.parsing_classdef_get_method = true;
4983  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
4984  }
4985 #line 4986 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4986  break;
4987 
4988  case 203:
4989 #line 1489 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
4990  {
4991  YYUSE ((yyvsp[-2].tok_val));
4992 
4993  lexer.parsed_function_name.top () = true;
4994  lexer.maybe_classdef_get_set_method = false;
4995  lexer.parsing_classdef_set_method = true;
4996  (yyval.tree_identifier_type) = (yyvsp[0].tree_identifier_type);
4997  }
4998 #line 4999 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
4999  break;
5000 
5001  case 204:
5002 #line 1500 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5003  {
5004  std::string fname = (yyvsp[-1].tree_identifier_type)->name ();
5005 
5006  delete (yyvsp[-1].tree_identifier_type);
5007 
5008  if (lexer.parsing_classdef_get_method)
5009  fname.insert (0, "get.");
5010  else if (lexer.parsing_classdef_set_method)
5011  fname.insert (0, "set.");
5012 
5013  lexer.parsing_classdef_get_method = false;
5014  lexer.parsing_classdef_set_method = false;
5015 
5016  (yyval.octave_user_function_type) = parser.frob_function (fname, (yyvsp[0].octave_user_function_type));
5017  }
5018 #line 5019 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5019  break;
5020 
5021  case 205:
5022 #line 1518 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5023  {
5024  YYUSE ((yyvsp[-2].punct_type));
5025 
5026  (yyval.octave_user_function_type) = parser.start_function ((yyvsp[-3].tree_parameter_list_type), (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type));
5027  }
5028 #line 5029 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5029  break;
5030 
5031  case 206:
5032 #line 1524 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5033  {
5034  YYUSE ((yyvsp[-2].punct_type));
5035 
5036  (yyval.octave_user_function_type) = parser.start_function (0, (yyvsp[-1].tree_statement_list_type), (yyvsp[0].tree_statement_type));
5037  }
5038 #line 5039 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5039  break;
5040 
5041  case 207:
5042 #line 1532 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5043  {
5044  parser.endfunction_found = true;
5045  if (parser.end_token_ok ((yyvsp[0].tok_val), token::function_end))
5046  (yyval.tree_statement_type) = parser.make_end ("endfunction", false,
5047  (yyvsp[0].tok_val)->line (), (yyvsp[0].tok_val)->column ());
5048  else
5049  ABORT_PARSE;
5050  }
5051 #line 5052 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5052  break;
5053 
5054  case 208:
5055 #line 1541 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5056  {
5057 // A lot of tests are based on the assumption that this is OK
5058 // if (lexer.reading_script_file)
5059 // {
5060 // parser.bison_error ("function body open at end of script");
5061 // YYABORT;
5062 // }
5063 
5064  if (parser.endfunction_found)
5065  {
5066  parser.bison_error ("inconsistent function endings -- "
5067  "if one function is explicitly ended, "
5068  "so must all the others");
5069  YYABORT;
5070  }
5071 
5072  if (! (lexer.reading_fcn_file || lexer.reading_script_file
5073  || lexer.input_from_eval_string ()))
5074  {
5075  parser.bison_error ("function body open at end of input");
5076  YYABORT;
5077  }
5078 
5079  if (lexer.reading_classdef_file)
5080  {
5081  parser.bison_error ("classdef body open at end of input");
5082  YYABORT;
5083  }
5084 
5085  (yyval.tree_statement_type) = parser.make_end ("endfunction", true,
5086  lexer.input_line_number,
5087  lexer.current_input_column);
5088  }
5089 #line 5090 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5090  break;
5091 
5092  case 209:
5093 #line 1581 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5094  {
5095  if (! lexer.reading_classdef_file)
5096  {
5097  parser.bison_error ("classdef must appear inside a file containing only a class definition");
5098  YYABORT;
5099  }
5100 
5101  lexer.parsing_classdef = true;
5102  (yyval.tok_val) = (yyvsp[0].tok_val);
5103  }
5104 #line 5105 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5105  break;
5106 
5107  case 210:
5108 #line 1594 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5109  {
5110  YYUSE ((yyvsp[-3].punct_type));
5111  YYUSE ((yyvsp[-1].punct_type));
5112 
5113  lexer.parsing_classdef = false;
5114 
5115  if (! ((yyval.tree_classdef_type) = parser.make_classdef ((yyvsp[-8].tok_val), (yyvsp[-6].tree_classdef_attribute_list_type), (yyvsp[-5].tree_identifier_type), (yyvsp[-4].tree_classdef_superclass_list_type), (yyvsp[-2].tree_classdef_body_type), (yyvsp[0].tok_val), (yyvsp[-7].comment_type))))
5116  {
5117  // make_classdef deleted $3, $4, $5, and $7.
5118  ABORT_PARSE;
5119  }
5120  }
5121 #line 5122 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5122  break;
5123 
5124  case 211:
5125 #line 1607 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5126  {
5127  YYUSE ((yyvsp[-1].punct_type));
5128 
5129  lexer.parsing_classdef = false;
5130 
5131  if (! ((yyval.tree_classdef_type) = parser.make_classdef ((yyvsp[-6].tok_val), (yyvsp[-4].tree_classdef_attribute_list_type), (yyvsp[-3].tree_identifier_type), (yyvsp[-2].tree_classdef_superclass_list_type), 0, (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
5132  {
5133  // make_classdef deleted $3, $4, and $5.
5134  ABORT_PARSE;
5135  }
5136  }
5137 #line 5138 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5138  break;
5139 
5140  case 212:
5141 #line 1621 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5142  { (yyval.tree_classdef_attribute_list_type) = 0; }
5143 #line 5144 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5144  break;
5145 
5146  case 213:
5147 #line 1623 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5148  { (yyval.tree_classdef_attribute_list_type) = (yyvsp[-1].tree_classdef_attribute_list_type); }
5149 #line 5150 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5150  break;
5151 
5152  case 214:
5153 #line 1627 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5154  { (yyval.tree_classdef_attribute_list_type) = new tree_classdef_attribute_list ((yyvsp[0].tree_classdef_attribute_type)); }
5155 #line 5156 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5156  break;
5157 
5158  case 215:
5159 #line 1629 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5160  {
5161  (yyvsp[-2].tree_classdef_attribute_list_type)->append ((yyvsp[0].tree_classdef_attribute_type));
5162  (yyval.tree_classdef_attribute_list_type) = (yyvsp[-2].tree_classdef_attribute_list_type);
5163  }
5164 #line 5165 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5165  break;
5166 
5167  case 216:
5168 #line 1636 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5169  { (yyval.tree_classdef_attribute_type) = new tree_classdef_attribute ((yyvsp[0].tree_identifier_type)); }
5170 #line 5171 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5171  break;
5172 
5173  case 217:
5174 #line 1638 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5175  {
5176  YYUSE ((yyvsp[-2].tok_val));
5177 
5178  lexer.looking_at_initializer_expression = false;
5179  (yyval.tree_classdef_attribute_type) = new tree_classdef_attribute ((yyvsp[-3].tree_identifier_type), (yyvsp[0].tree_expression_type));
5180  }
5181 #line 5182 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5182  break;
5183 
5184  case 218:
5185 #line 1645 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5186  {
5187  YYUSE ((yyvsp[-1].tok_val));
5188 
5189  (yyval.tree_classdef_attribute_type) = new tree_classdef_attribute ((yyvsp[0].tree_identifier_type), false);
5190  }
5191 #line 5192 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5192  break;
5193 
5194  case 219:
5195 #line 1654 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5196  { (yyval.tree_classdef_superclass_list_type) = 0; }
5197 #line 5198 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5198  break;
5199 
5200  case 220:
5201 #line 1656 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5202  { (yyval.tree_classdef_superclass_list_type) = (yyvsp[0].tree_classdef_superclass_list_type); }
5203 #line 5204 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5204  break;
5205 
5206  case 221:
5207 #line 1660 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5208  {
5209  YYUSE ((yyvsp[0].tok_val));
5210 
5211  lexer.enable_fq_identifier ();
5212  }
5213 #line 5214 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5214  break;
5215 
5216  case 222:
5217 #line 1666 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5218  { (yyval.tree_classdef_superclass_list_type) = new tree_classdef_superclass_list ((yyvsp[0].tree_classdef_superclass_type)); }
5219 #line 5220 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5220  break;
5221 
5222  case 223:
5223 #line 1668 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5224  {
5225  YYUSE ((yyvsp[0].tok_val));
5226 
5227  lexer.enable_fq_identifier ();
5228  }
5229 #line 5230 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5230  break;
5231 
5232  case 224:
5233 #line 1674 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5234  {
5235  (yyvsp[-3].tree_classdef_superclass_list_type)->append ((yyvsp[0].tree_classdef_superclass_type));
5236  (yyval.tree_classdef_superclass_list_type) = (yyvsp[-3].tree_classdef_superclass_list_type);
5237  }
5238 #line 5239 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5239  break;
5240 
5241  case 225:
5242 #line 1681 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5243  { (yyval.tree_classdef_superclass_type) = new tree_classdef_superclass ((yyvsp[0].tok_val)->text ()); }
5244 #line 5245 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5245  break;
5246 
5247  case 226:
5248 #line 1685 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5249  { (yyval.tree_classdef_body_type) = new tree_classdef_body ((yyvsp[0].tree_classdef_properties_block_type)); }
5250 #line 5251 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5251  break;
5252 
5253  case 227:
5254 #line 1687 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5255  { (yyval.tree_classdef_body_type) = new tree_classdef_body ((yyvsp[0].tree_classdef_methods_block_type)); }
5256 #line 5257 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5257  break;
5258 
5259  case 228:
5260 #line 1689 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5261  { (yyval.tree_classdef_body_type) = new tree_classdef_body ((yyvsp[0].tree_classdef_events_block_type)); }
5262 #line 5263 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5263  break;
5264 
5265  case 229:
5266 #line 1691 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5267  { (yyval.tree_classdef_body_type) = new tree_classdef_body ((yyvsp[0].tree_classdef_enum_block_type)); }
5268 #line 5269 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5269  break;
5270 
5271  case 230:
5272 #line 1693 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5273  {
5274  YYUSE ((yyvsp[-1].punct_type));
5275 
5276  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_properties_block_type));
5277  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5278  }
5279 #line 5280 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5280  break;
5281 
5282  case 231:
5283 #line 1700 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5284  {
5285  YYUSE ((yyvsp[-1].punct_type));
5286 
5287  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_methods_block_type));
5288  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5289  }
5290 #line 5291 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5291  break;
5292 
5293  case 232:
5294 #line 1707 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5295  {
5296  YYUSE ((yyvsp[-1].punct_type));
5297 
5298  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_events_block_type));
5299  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5300  }
5301 #line 5302 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5302  break;
5303 
5304  case 233:
5305 #line 1714 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5306  {
5307  YYUSE ((yyvsp[-1].punct_type));
5308 
5309  (yyvsp[-2].tree_classdef_body_type)->append ((yyvsp[0].tree_classdef_enum_block_type));
5310  (yyval.tree_classdef_body_type) = (yyvsp[-2].tree_classdef_body_type);
5311  }
5312 #line 5313 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5313  break;
5314 
5315  case 234:
5316 #line 1724 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5317  {
5318  YYUSE ((yyvsp[-3].punct_type));
5319  YYUSE ((yyvsp[-1].punct_type));
5320 
5321  if (! ((yyval.tree_classdef_properties_block_type) = parser.make_classdef_properties_block
5322  ((yyvsp[-6].tok_val), (yyvsp[-4].tree_classdef_attribute_list_type), (yyvsp[-2].tree_classdef_property_list_type), (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
5323  {
5324  // make_classdef_properties_block delete $3 and $5.
5325  ABORT_PARSE;
5326  }
5327  }
5328 #line 5329 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5329  break;
5330 
5331  case 235:
5332 #line 1736 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5333  {
5334  YYUSE ((yyvsp[-1].punct_type));
5335 
5336  if (! ((yyval.tree_classdef_properties_block_type) = parser.make_classdef_properties_block
5337  ((yyvsp[-4].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), 0, (yyvsp[0].tok_val), (yyvsp[-3].comment_type))))
5338  {
5339  // make_classdef_properties_block delete $3.
5340  ABORT_PARSE;
5341  }
5342  }
5343 #line 5344 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5344  break;
5345 
5346  case 236:
5347 #line 1750 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5348  { (yyval.tree_classdef_property_list_type) = new tree_classdef_property_list ((yyvsp[0].tree_classdef_property_type)); }
5349 #line 5350 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5350  break;
5351 
5352  case 237:
5353 #line 1752 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5354  {
5355  YYUSE ((yyvsp[-1].punct_type));
5356 
5357  (yyvsp[-2].tree_classdef_property_list_type)->append ((yyvsp[0].tree_classdef_property_type));
5358  (yyval.tree_classdef_property_list_type) = (yyvsp[-2].tree_classdef_property_list_type);
5359  }
5360 #line 5361 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5361  break;
5362 
5363  case 238:
5364 #line 1761 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5365  { (yyval.tree_classdef_property_type) = new tree_classdef_property ((yyvsp[0].tree_identifier_type)); }
5366 #line 5367 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5367  break;
5368 
5369  case 239:
5370 #line 1763 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5371  {
5372  YYUSE ((yyvsp[-3].tok_val));
5373 
5374  lexer.looking_at_initializer_expression = false;
5375  (yyval.tree_classdef_property_type) = new tree_classdef_property ((yyvsp[-4].tree_identifier_type), (yyvsp[-1].tree_expression_type));
5376  }
5377 #line 5378 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5378  break;
5379 
5380  case 240:
5381 #line 1772 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5382  {
5383  YYUSE ((yyvsp[-3].punct_type));
5384  YYUSE ((yyvsp[-1].punct_type));
5385 
5386  if (! ((yyval.tree_classdef_methods_block_type) = parser.make_classdef_methods_block
5387  ((yyvsp[-6].tok_val), (yyvsp[-4].tree_classdef_attribute_list_type), (yyvsp[-2].tree_classdef_methods_list_type), (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
5388  {
5389  // make_classdef_methods_block deleted $3 and $5.
5390  ABORT_PARSE;
5391  }
5392  }
5393 #line 5394 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5394  break;
5395 
5396  case 241:
5397 #line 1784 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5398  {
5399  YYUSE ((yyvsp[-1].punct_type));
5400 
5401  if (! ((yyval.tree_classdef_methods_block_type) = parser.make_classdef_methods_block
5402  ((yyvsp[-4].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), 0, (yyvsp[0].tok_val), (yyvsp[-3].comment_type))))
5403  {
5404  // make_classdef_methods_block deleted $3.
5405  ABORT_PARSE;
5406  }
5407  }
5408 #line 5409 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5409  break;
5410 
5411  case 242:
5412 #line 1798 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5413  {
5414  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[0].tree_identifier_type), 0)))
5415  ABORT_PARSE;
5416  }
5417 #line 5418 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5418  break;
5419 
5420  case 243:
5421 #line 1803 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5422  {
5423  if (! ((yyval.octave_user_function_type) = parser.start_classdef_external_method ((yyvsp[-1].tree_identifier_type), (yyvsp[0].tree_parameter_list_type))))
5424  ABORT_PARSE;
5425  }
5426 #line 5427 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5427  break;
5428 
5429  case 244:
5430 #line 1810 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5431  { (yyval.tree_function_def_type) = parser.finish_classdef_external_method ((yyvsp[0].octave_user_function_type), 0, (yyvsp[-1].comment_type)); }
5432 #line 5433 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5433  break;
5434 
5435  case 245:
5436 #line 1812 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5437  {
5438  YYUSE ((yyvsp[0].tok_val));
5439 
5440  lexer.defining_func++;
5441  lexer.parsed_function_name.push (false);
5442  }
5443 #line 5444 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5444  break;
5445 
5446  case 246:
5447 #line 1819 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5448  {
5449  lexer.defining_func--;
5450  lexer.parsed_function_name.pop ();
5451  (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));
5452  }
5453 #line 5454 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5454  break;
5455 
5456  case 247:
5457 #line 1827 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5458  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5459 #line 5460 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5460  break;
5461 
5462  case 248:
5463 #line 1829 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5464  { (yyval.tree_function_def_type) = (yyvsp[0].tree_function_def_type); }
5465 #line 5466 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5466  break;
5467 
5468  case 249:
5469 #line 1833 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5470  {
5471  octave_value fcn;
5472  if ((yyvsp[0].tree_function_def_type))
5473  fcn = (yyvsp[0].tree_function_def_type)->function ();
5474  delete (yyvsp[0].tree_function_def_type);
5475  (yyval.tree_classdef_methods_list_type) = new tree_classdef_methods_list (fcn);
5476  }
5477 #line 5478 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5478  break;
5479 
5480  case 250:
5481 #line 1841 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5482  {
5483  YYUSE ((yyvsp[-1].punct_type));
5484 
5485  octave_value fcn;
5486  if ((yyvsp[0].tree_function_def_type))
5487  fcn = (yyvsp[0].tree_function_def_type)->function ();
5488  delete (yyvsp[0].tree_function_def_type);
5489 
5490  (yyvsp[-2].tree_classdef_methods_list_type)->append (fcn);
5491  (yyval.tree_classdef_methods_list_type) = (yyvsp[-2].tree_classdef_methods_list_type);
5492  }
5493 #line 5494 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5494  break;
5495 
5496  case 251:
5497 #line 1855 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5498  {
5499  YYUSE ((yyvsp[-3].punct_type));
5500  YYUSE ((yyvsp[-1].punct_type));
5501 
5502  if (! ((yyval.tree_classdef_events_block_type) = parser.make_classdef_events_block
5503  ((yyvsp[-6].tok_val), (yyvsp[-4].tree_classdef_attribute_list_type), (yyvsp[-2].tree_classdef_events_list_type), (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
5504  {
5505  // make_classdef_events_block deleted $3 and $5.
5506  ABORT_PARSE;
5507  }
5508  }
5509 #line 5510 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5510  break;
5511 
5512  case 252:
5513 #line 1867 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5514  {
5515  YYUSE ((yyvsp[-1].punct_type));
5516 
5517  if (! ((yyval.tree_classdef_events_block_type) = parser.make_classdef_events_block
5518  ((yyvsp[-4].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), 0, (yyvsp[0].tok_val), (yyvsp[-3].comment_type))))
5519  {
5520  // make_classdef_events_block deleted $3.
5521  ABORT_PARSE;
5522  }
5523  }
5524 #line 5525 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5525  break;
5526 
5527  case 253:
5528 #line 1880 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5529  { (yyval.tree_classdef_events_list_type) = new tree_classdef_events_list ((yyvsp[0].tree_classdef_event_type)); }
5530 #line 5531 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5531  break;
5532 
5533  case 254:
5534 #line 1882 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5535  {
5536  YYUSE ((yyvsp[-1].punct_type));
5537 
5538  (yyvsp[-2].tree_classdef_events_list_type)->append ((yyvsp[0].tree_classdef_event_type));
5539  (yyval.tree_classdef_events_list_type) = (yyvsp[-2].tree_classdef_events_list_type);
5540  }
5541 #line 5542 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5542  break;
5543 
5544  case 255:
5545 #line 1891 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5546  { (yyval.tree_classdef_event_type) = new tree_classdef_event ((yyvsp[0].tree_identifier_type)); }
5547 #line 5548 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5548  break;
5549 
5550  case 256:
5551 #line 1895 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5552  {
5553  YYUSE ((yyvsp[-3].punct_type));
5554  YYUSE ((yyvsp[-1].punct_type));
5555 
5556  if (! ((yyval.tree_classdef_enum_block_type) = parser.make_classdef_enum_block
5557  ((yyvsp[-6].tok_val), (yyvsp[-4].tree_classdef_attribute_list_type), (yyvsp[-2].tree_classdef_enum_list_type), (yyvsp[0].tok_val), (yyvsp[-5].comment_type))))
5558  {
5559  // make_classdef_enum_block deleted $3 and $5.
5560  ABORT_PARSE;
5561  }
5562  }
5563 #line 5564 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5564  break;
5565 
5566  case 257:
5567 #line 1907 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5568  {
5569  YYUSE ((yyvsp[-1].punct_type));
5570 
5571  if (! ((yyval.tree_classdef_enum_block_type) = parser.make_classdef_enum_block
5572  ((yyvsp[-4].tok_val), (yyvsp[-2].tree_classdef_attribute_list_type), 0, (yyvsp[0].tok_val), (yyvsp[-3].comment_type))))
5573  {
5574  // make_classdef_enum_block deleted $3.
5575  ABORT_PARSE;
5576  }
5577  }
5578 #line 5579 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5579  break;
5580 
5581  case 258:
5582 #line 1920 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5583  { (yyval.tree_classdef_enum_list_type) = new tree_classdef_enum_list ((yyvsp[0].tree_classdef_enum_type)); }
5584 #line 5585 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5585  break;
5586 
5587  case 259:
5588 #line 1922 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5589  {
5590  YYUSE ((yyvsp[-1].punct_type));
5591 
5592  (yyvsp[-2].tree_classdef_enum_list_type)->append ((yyvsp[0].tree_classdef_enum_type));
5593  (yyval.tree_classdef_enum_list_type) = (yyvsp[-2].tree_classdef_enum_list_type);
5594  }
5595 #line 5596 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5596  break;
5597 
5598  case 260:
5599 #line 1931 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5600  { (yyval.tree_classdef_enum_type) = new tree_classdef_enum ((yyvsp[-3].tree_identifier_type), (yyvsp[-1].tree_expression_type)); }
5601 #line 5602 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5602  break;
5603 
5604  case 261:
5605 #line 1939 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5606  {
5607  (yyval.dummy_type) = 0;
5608  lexer.at_beginning_of_statement = true;
5609  }
5610 #line 5611 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5611  break;
5612 
5613  case 262:
5614 #line 1946 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5615  { (yyval.comment_type) = lexer.get_comment (); }
5616 #line 5617 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5617  break;
5618 
5619  case 263:
5620 #line 1950 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5621  {
5622  (yyval.dummy_type) = 0;
5623  parser.bison_error ("parse error");
5624  }
5625 #line 5626 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5626  break;
5627 
5628  case 264:
5629 #line 1955 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5630  { (yyval.dummy_type) = 0; }
5631 #line 5632 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5632  break;
5633 
5634  case 265:
5635 #line 1959 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5636  { (yyval.punct_type) = ','; }
5637 #line 5638 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5638  break;
5639 
5640  case 266:
5641 #line 1961 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5642  { (yyval.punct_type) = ';'; }
5643 #line 5644 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5644  break;
5645 
5646  case 267:
5647 #line 1963 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5648  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5649 #line 5650 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5650  break;
5651 
5652  case 268:
5653 #line 1965 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5654  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5655 #line 5656 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5656  break;
5657 
5658  case 269:
5659 #line 1969 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5660  { (yyval.punct_type) = 0; }
5661 #line 5662 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5662  break;
5663 
5664  case 270:
5665 #line 1971 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5666  { (yyval.punct_type) = (yyvsp[0].punct_type); }
5667 #line 5668 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5668  break;
5669 
5670  case 271:
5671 #line 1975 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5672  { (yyval.punct_type) = 0; }
5673 #line 5674 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5674  break;
5675 
5676  case 272:
5677 #line 1977 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5678  { (yyval.punct_type) = (yyvsp[0].punct_type); }
5679 #line 5680 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5680  break;
5681 
5682  case 273:
5683 #line 1981 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5684  { (yyval.punct_type) = '\n'; }
5685 #line 5686 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5686  break;
5687 
5688  case 274:
5689 #line 1983 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5690  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5691 #line 5692 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5692  break;
5693 
5694  case 275:
5695 #line 1987 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5696  { (yyval.punct_type) = ','; }
5697 #line 5698 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5698  break;
5699 
5700  case 276:
5701 #line 1989 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5702  { (yyval.punct_type) = ';'; }
5703 #line 5704 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5704  break;
5705 
5706  case 277:
5707 #line 1991 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5708  { (yyval.punct_type) = '\n'; }
5709 #line 5710 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5710  break;
5711 
5712  case 278:
5713 #line 1993 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5714  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5715 #line 5716 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5716  break;
5717 
5718  case 279:
5719 #line 1995 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5720  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5721 #line 5722 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5722  break;
5723 
5724  case 280:
5725 #line 1997 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5726  { (yyval.punct_type) = (yyvsp[-1].punct_type); }
5727 #line 5728 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5728  break;
5729 
5730  case 281:
5731 #line 2001 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5732  { (yyval.punct_type) = 0; }
5733 #line 5734 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5734  break;
5735 
5736  case 282:
5737 #line 2003 "parse-tree/oct-parse.yy" /* yacc.c:1646 */
5738  { (yyval.punct_type) = (yyvsp[0].punct_type); }
5739 #line 5740 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5740  break;
5741 
5742 
5743 #line 5744 "parse-tree/oct-parse.cc" /* yacc.c:1646 */
5744  default: break;
5745  }
5746  /* User semantic actions sometimes alter yychar, and that requires
5747  that yytoken be updated with the new translation. We take the
5748  approach of translating immediately before every use of yytoken.
5749  One alternative is translating here after every semantic action,
5750  but that translation would be missed if the semantic action invokes
5751  YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
5752  if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
5753  incorrect destructor might then be invoked immediately. In the
5754  case of YYERROR or YYBACKUP, subsequent parser actions might lead
5755  to an incorrect destructor call or verbose syntax error message
5756  before the lookahead is translated. */
5757  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
5758 
5759  YYPOPSTACK (yylen);
5760  yylen = 0;
5761  YY_STACK_PRINT (yyss, yyssp);
5762 
5763  *++yyvsp = yyval;
5764 
5765  /* Now 'shift' the result of the reduction. Determine what state
5766  that goes to, based on the state we popped back to and the rule
5767  number reduced by. */
5768 
5769  yyn = yyr1[yyn];
5770 
5771  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
5772  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
5773  yystate = yytable[yystate];
5774  else
5775  yystate = yydefgoto[yyn - YYNTOKENS];
5776 
5777  goto yynewstate;
5778 
5779 
5780 /*--------------------------------------.
5781 | yyerrlab -- here on detecting error. |
5782 `--------------------------------------*/
5783 yyerrlab:
5784  /* Make sure we have latest lookahead translation. See comments at
5785  user semantic actions for why this is necessary. */
5786  yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
5787 
5788  /* If not already recovering from an error, report this error. */
5789  if (!yyerrstatus)
5790  {
5791  ++yynerrs;
5792 #if ! YYERROR_VERBOSE
5793  yyerror (parser, YY_("syntax error"));
5794 #else
5795 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
5796  yyssp, yytoken)
5797  {
5798  char const *yymsgp = YY_("syntax error");
5799  int yysyntax_error_status;
5800  yysyntax_error_status = YYSYNTAX_ERROR;
5801  if (yysyntax_error_status == 0)
5802  yymsgp = yymsg;
5803  else if (yysyntax_error_status == 1)
5804  {
5805  if (yymsg != yymsgbuf)
5806  YYSTACK_FREE (yymsg);
5807  yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
5808  if (!yymsg)
5809  {
5810  yymsg = yymsgbuf;
5811  yymsg_alloc = sizeof yymsgbuf;
5812  yysyntax_error_status = 2;
5813  }
5814  else
5815  {
5816  yysyntax_error_status = YYSYNTAX_ERROR;
5817  yymsgp = yymsg;
5818  }
5819  }
5820  yyerror (parser, yymsgp);
5821  if (yysyntax_error_status == 2)
5822  goto yyexhaustedlab;
5823  }
5824 # undef YYSYNTAX_ERROR
5825 #endif
5826  }
5827 
5828 
5829 
5830  if (yyerrstatus == 3)
5831  {
5832  /* If just tried and failed to reuse lookahead token after an
5833  error, discard it. */
5834 
5835  if (yychar <= YYEOF)
5836  {
5837  /* Return failure if at end of input. */
5838  if (yychar == YYEOF)
5839  YYABORT;
5840  }
5841  else
5842  {
5843  yydestruct ("Error: discarding",
5844  yytoken, &yylval, parser);
5845  yychar = YYEMPTY;
5846  }
5847  }
5848 
5849  /* Else will try to reuse lookahead token after shifting the error
5850  token. */
5851  goto yyerrlab1;
5852 
5853 
5854 /*---------------------------------------------------.
5855 | yyerrorlab -- error raised explicitly by YYERROR. |
5856 `---------------------------------------------------*/
5857 yyerrorlab:
5858 
5859  /* Pacify compilers like GCC when the user code never invokes
5860  YYERROR and the label yyerrorlab therefore never appears in user
5861  code. */
5862  if (/*CONSTCOND*/ 0)
5863  goto yyerrorlab;
5864 
5865  /* Do not reclaim the symbols of the rule whose action triggered
5866  this YYERROR. */
5867  YYPOPSTACK (yylen);
5868  yylen = 0;
5869  YY_STACK_PRINT (yyss, yyssp);
5870  yystate = *yyssp;
5871  goto yyerrlab1;
5872 
5873 
5874 /*-------------------------------------------------------------.
5875 | yyerrlab1 -- common code for both syntax error and YYERROR. |
5876 `-------------------------------------------------------------*/
5877 yyerrlab1:
5878  yyerrstatus = 3; /* Each real token shifted decrements this. */
5879 
5880  for (;;)
5881  {
5882  yyn = yypact[yystate];
5883  if (!yypact_value_is_default (yyn))
5884  {
5885  yyn += YYTERROR;
5886  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
5887  {
5888  yyn = yytable[yyn];
5889  if (0 < yyn)
5890  break;
5891  }
5892  }
5893 
5894  /* Pop the current state because it cannot handle the error token. */
5895  if (yyssp == yyss)
5896  YYABORT;
5897 
5898 
5899  yydestruct ("Error: popping",
5900  yystos[yystate], yyvsp, parser);
5901  YYPOPSTACK (1);
5902  yystate = *yyssp;
5903  YY_STACK_PRINT (yyss, yyssp);
5904  }
5905 
5907  *++yyvsp = yylval;
5909 
5910 
5911  /* Shift the error token. */
5912  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
5913 
5914  yystate = yyn;
5915  goto yynewstate;
5916 
5917 
5918 /*-------------------------------------.
5919 | yyacceptlab -- YYACCEPT comes here. |
5920 `-------------------------------------*/
5921 yyacceptlab:
5922  yyresult = 0;
5923  goto yyreturn;
5924 
5925 /*-----------------------------------.
5926 | yyabortlab -- YYABORT comes here. |
5927 `-----------------------------------*/
5928 yyabortlab:
5929  yyresult = 1;
5930  goto yyreturn;
5931 
5932 #if !defined yyoverflow || YYERROR_VERBOSE
5933 /*-------------------------------------------------.
5934 | yyexhaustedlab -- memory exhaustion comes here. |
5935 `-------------------------------------------------*/
5936 yyexhaustedlab:
5937  yyerror (parser, YY_("memory exhausted"));
5938  yyresult = 2;
5939  /* Fall through. */
5940 #endif
5941 
5942 yyreturn:
5943  if (yychar != YYEMPTY)
5944  {
5945  /* Make sure we have latest lookahead translation. See comments at
5946  user semantic actions for why this is necessary. */
5947  yytoken = YYTRANSLATE (yychar);
5948  yydestruct ("Cleanup: discarding lookahead",
5949  yytoken, &yylval, parser);
5950  }
5951  /* Do not reclaim the symbols of the rule whose action triggered
5952  this YYABORT or YYACCEPT. */
5953  YYPOPSTACK (yylen);
5954  YY_STACK_PRINT (yyss, yyssp);
5955  while (yyssp != yyss)
5956  {
5957  yydestruct ("Cleanup: popping",
5958  yystos[*yyssp], yyvsp, parser);
5959  YYPOPSTACK (1);
5960  }
5961 #ifndef yyoverflow
5962  if (yyss != yyssa)
5963  YYSTACK_FREE (yyss);
5964 #endif
5965  yyps->yynew = 1;
5966 
5967 yypushreturn:
5968 #if YYERROR_VERBOSE
5969  if (yymsg != yymsgbuf)
5970  YYSTACK_FREE (yymsg);
5971 #endif
5972  return yyresult;
5973 }
5974 #line 2006 "parse-tree/oct-parse.yy" /* yacc.c:1906 */
5975 
5976 
5977 // Generic error messages.
5978 
5979 #undef lexer
5980 
5981 static void
5982 yyerror (octave_base_parser& parser, const char *s)
5983 {
5984  parser.bison_error (s);
5985 }
5986 
5988 {
5989  delete stmt_list;
5990 
5991  delete &lexer;
5992 }
5993 
5994 void
5996 {
5997  endfunction_found = false;
5998  autoloading = false;
6000  parsing_subfunctions = false;
6001  max_fcn_depth = 0;
6002  curr_fcn_depth = 0;
6003  primary_fcn_scope = -1;
6004  curr_class_name = "";
6005  curr_package_name = "";
6006  function_scopes.clear ();
6007  primary_fcn_ptr = 0;
6008  subfunction_names.clear ();
6009 
6010  delete stmt_list;
6011  stmt_list = 0;
6012 
6013  lexer.reset ();
6014 }
6015 
6016 // Error mesages for mismatched end tokens.
6017 
6018 void
6020  int l, int c)
6021 {
6022  static const char *fmt
6023  = "'%s' command matched by '%s' near line %d column %d";
6024 
6025  switch (ettype)
6026  {
6027  case token::simple_end:
6028  error (fmt, type, "end", l, c);
6029  break;
6030 
6031  case token::classdef_end:
6032  error (fmt, type, "endclassdef", l, c);
6033  break;
6034 
6036  error (fmt, type, "endenumeration", l, c);
6037  break;
6038 
6039  case token::events_end:
6040  error (fmt, type, "endevents", l, c);
6041  break;
6042 
6043  case token::for_end:
6044  error (fmt, type, "endfor", l, c);
6045  break;
6046 
6047  case token::function_end:
6048  error (fmt, type, "endfunction", l, c);
6049  break;
6050 
6051  case token::if_end:
6052  error (fmt, type, "endif", l, c);
6053  break;
6054 
6055  case token::methods_end:
6056  error (fmt, type, "endmethods", l, c);
6057  break;
6058 
6059  case token::parfor_end:
6060  error (fmt, type, "endparfor", l, c);
6061  break;
6062 
6063  case token::properties_end:
6064  error (fmt, type, "endproperties", l, c);
6065  break;
6066 
6067  case token::switch_end:
6068  error (fmt, type, "endswitch", l, c);
6069  break;
6070 
6071  case token::try_catch_end:
6072  error (fmt, type, "end_try_catch", l, c);
6073  break;
6074 
6076  error (fmt, type, "end_unwind_protect", l, c);
6077  break;
6078 
6079  case token::while_end:
6080  error (fmt, type, "endwhile", l, c);
6081  break;
6082 
6083  default:
6084  panic_impossible ();
6085  break;
6086  }
6087 }
6088 
6089 // Check to see that end tokens are properly matched.
6090 
6091 bool
6093 {
6094  bool retval = true;
6095 
6096  token::end_tok_type ettype = tok->ettype ();
6097 
6098  if (ettype != expected && ettype != token::simple_end)
6099  {
6100  retval = false;
6101 
6102  bison_error ("parse error");
6103 
6104  int l = tok->line ();
6105  int c = tok->column ();
6106 
6107  switch (expected)
6108  {
6109  case token::classdef_end:
6110  end_error ("classdef", ettype, l, c);
6111  break;
6112 
6114  end_error ("enumeration", ettype, l, c);
6115  break;
6116 
6117  case token::events_end:
6118  end_error ("events", ettype, l, c);
6119  break;
6120 
6121  case token::for_end:
6122  end_error ("for", ettype, l, c);
6123  break;
6124 
6125  case token::function_end:
6126  end_error ("function", ettype, l, c);
6127  break;
6128 
6129  case token::if_end:
6130  end_error ("if", ettype, l, c);
6131  break;
6132 
6133  case token::methods_end:
6134  end_error ("methods", ettype, l, c);
6135  break;
6136 
6137  case token::parfor_end:
6138  end_error ("parfor", ettype, l, c);
6139  break;
6140 
6141  case token::properties_end:
6142  end_error ("properties", ettype, l, c);
6143  break;
6144 
6145  case token::switch_end:
6146  end_error ("switch", ettype, l, c);
6147  break;
6148 
6149  case token::try_catch_end:
6150  end_error ("try", ettype, l, c);
6151  break;
6152 
6154  end_error ("unwind_protect", ettype, l, c);
6155  break;
6156 
6157  case token::while_end:
6158  end_error ("while", ettype, l, c);
6159  break;
6160 
6161  default:
6162  panic_impossible ();
6163  break;
6164  }
6165  }
6166 
6167  return retval;
6168 }
6169 
6170 // Maybe print a warning if an assignment expression is used as the
6171 // test in a logical expression.
6172 
6173 void
6175 {
6176  if (expr->is_assignment_expression ()
6177  && expr->paren_count () < 2)
6178  {
6179  if (lexer.fcn_file_full_name.empty ())
6181  ("Octave:assign-as-truth-value",
6182  "suggest parenthesis around assignment used as truth value");
6183  else
6185  ("Octave:assign-as-truth-value",
6186  "suggest parenthesis around assignment used as truth value near line %d, column %d in file '%s'",
6187  expr->line (), expr->column (), lexer.fcn_file_full_name.c_str ());
6188  }
6189 }
6190 
6191 // Maybe print a warning about switch labels that aren't constants.
6192 
6193 void
6195 {
6196  if (! expr->is_constant ())
6197  {
6198  if (lexer.fcn_file_full_name.empty ())
6199  warning_with_id ("Octave:variable-switch-label",
6200  "variable switch label");
6201  else
6203  ("Octave:variable-switch-label",
6204  "variable switch label near line %d, column %d in file '%s'",
6205  expr->line (), expr->column (), lexer.fcn_file_full_name.c_str ());
6206  }
6207 }
6208 
6209 // Finish building a range.
6210 
6213 {
6214  tree_expression *retval = e;
6215 
6216  unwind_protect frame;
6217 
6218  frame.protect_var (error_state);
6219  frame.protect_var (warning_state);
6220 
6223 
6224  discard_error_messages = true;
6225  discard_warning_messages = true;
6226 
6227  tree_expression *base = e->base ();
6228  tree_expression *limit = e->limit ();
6229  tree_expression *incr = e->increment ();
6230 
6231  if (base)
6232  {
6233  if (limit)
6234  {
6235  if (base->is_constant () && limit->is_constant ()
6236  && (! incr || (incr && incr->is_constant ())))
6237  {
6238  octave_value tmp = e->rvalue1 ();
6239 
6240  if (! (error_state || warning_state))
6241  {
6242  tree_constant *tc_retval
6243  = new tree_constant (tmp, base->line (), base->column ());
6244 
6245  std::ostringstream buf;
6246 
6247  tree_print_code tpc (buf);
6248 
6249  e->accept (tpc);
6250 
6251  tc_retval->stash_original_text (buf.str ());
6252 
6253  delete e;
6254 
6255  retval = tc_retval;
6256  }
6257  }
6258  }
6259  else
6260  {
6261  e->preserve_base ();
6262  delete e;
6263 
6264  retval = base;
6265  }
6266  }
6267 
6268  return retval;
6269 }
6270 
6271 // Make a constant.
6272 
6273 tree_constant *
6275 {
6276  int l = tok_val->line ();
6277  int c = tok_val->column ();
6278 
6279  tree_constant *retval = 0;
6280 
6281  switch (op)
6282  {
6283  case NUM:
6284  {
6285  octave_value tmp (tok_val->number ());
6286  retval = new tree_constant (tmp, l, c);
6287  retval->stash_original_text (tok_val->text_rep ());
6288  }
6289  break;
6290 
6291  case IMAG_NUM:
6292  {
6293  octave_value tmp (Complex (0.0, tok_val->number ()));
6294  retval = new tree_constant (tmp, l, c);
6295  retval->stash_original_text (tok_val->text_rep ());
6296  }
6297  break;
6298 
6299  case DQ_STRING:
6300  case SQ_STRING:
6301  {
6302  std::string txt = tok_val->text ();
6303 
6304  char delim = op == DQ_STRING ? '"' : '\'';
6305  octave_value tmp (txt, delim);
6306 
6307  if (txt.empty ())
6308  {
6309  if (op == DQ_STRING)
6311  else
6313  }
6314 
6315  retval = new tree_constant (tmp, l, c);
6316 
6317  if (op == DQ_STRING)
6318  txt = undo_string_escapes (txt);
6319 
6320  // FIXME -- maybe this should also be handled by
6321  // tok_val->text_rep () for character strings?
6322  retval->stash_original_text (delim + txt + delim);
6323  }
6324  break;
6325 
6326  default:
6327  panic_impossible ();
6328  break;
6329  }
6330 
6331  return retval;
6332 }
6333 
6334 // Make a function handle.
6335 
6338 {
6339  int l = tok_val->line ();
6340  int c = tok_val->column ();
6341 
6342  tree_fcn_handle *retval = new tree_fcn_handle (tok_val->text (), l, c);
6343 
6344  return retval;
6345 }
6346 
6347 // Make an anonymous function handle.
6348 
6351  tree_statement *stmt)
6352 {
6353  // FIXME -- need to get these from the location of the @ symbol.
6354  int l = lexer.input_line_number;
6355  int c = lexer.current_input_column;
6356 
6357  tree_parameter_list *ret_list = 0;
6358 
6360 
6362 
6363  stmt->set_print_flag (false);
6364 
6365  tree_statement_list *body = new tree_statement_list (stmt);
6366 
6367  body->mark_as_anon_function_body ();
6368 
6369  tree_anon_fcn_handle *retval
6370  = new tree_anon_fcn_handle (param_list, ret_list, body, fcn_scope, l, c);
6371  // FIXME: Stash the filename. This does not work and produces
6372  // errors when executed.
6373  //retval->stash_file_name (lexer.fcn_file_name);
6374 
6375  return retval;
6376 }
6377 
6378 // Build a binary expression.
6379 
6382  token *tok_val, tree_expression *op2)
6383 {
6385 
6386  switch (op)
6387  {
6388  case POW:
6390  break;
6391 
6392  case EPOW:
6394  break;
6395 
6396  case '+':
6398  break;
6399 
6400  case '-':
6402  break;
6403 
6404  case '*':
6406  break;
6407 
6408  case '/':
6410  break;
6411 
6412  case EMUL:
6414  break;
6415 
6416  case EDIV:
6418  break;
6419 
6420  case LEFTDIV:
6422  break;
6423 
6424  case ELEFTDIV:
6426  break;
6427 
6428  case LSHIFT:
6430  break;
6431 
6432  case RSHIFT:
6434  break;
6435 
6436  case EXPR_LT:
6437  t = octave_value::op_lt;
6438  break;
6439 
6440  case EXPR_LE:
6441  t = octave_value::op_le;
6442  break;
6443 
6444  case EXPR_EQ:
6445  t = octave_value::op_eq;
6446  break;
6447 
6448  case EXPR_GE:
6449  t = octave_value::op_ge;
6450  break;
6451 
6452  case EXPR_GT:
6453  t = octave_value::op_gt;
6454  break;
6455 
6456  case EXPR_NE:
6457  t = octave_value::op_ne;
6458  break;
6459 
6460  case EXPR_AND:
6462  break;
6463 
6464  case EXPR_OR:
6466  break;
6467 
6468  default:
6469  panic_impossible ();
6470  break;
6471  }
6472 
6473  int l = tok_val->line ();
6474  int c = tok_val->column ();
6475 
6476  return maybe_compound_binary_expression (op1, op2, l, c, t);
6477 }
6478 
6479 // Build a boolean expression.
6480 
6483  token *tok_val, tree_expression *op2)
6484 {
6486 
6487  switch (op)
6488  {
6489  case EXPR_AND_AND:
6491  break;
6492 
6493  case EXPR_OR_OR:
6495  break;
6496 
6497  default:
6498  panic_impossible ();
6499  break;
6500  }
6501 
6502  int l = tok_val->line ();
6503  int c = tok_val->column ();
6504 
6505  return new tree_boolean_expression (op1, op2, l, c, t);
6506 }
6507 
6508 // Build a prefix expression.
6509 
6512  token *tok_val)
6513 {
6515 
6516  switch (op)
6517  {
6518  case EXPR_NOT:
6520  break;
6521 
6522  case '+':
6524  break;
6525 
6526  case '-':
6528  break;
6529 
6530  case PLUS_PLUS:
6532  break;
6533 
6534  case MINUS_MINUS:
6536  break;
6537 
6538  default:
6539  panic_impossible ();
6540  break;
6541  }
6542 
6543  int l = tok_val->line ();
6544  int c = tok_val->column ();
6545 
6546  return new tree_prefix_expression (op1, l, c, t);
6547 }
6548 
6549 // Build a postfix expression.
6550 
6553  token *tok_val)
6554 {
6556 
6557  switch (op)
6558  {
6559  case HERMITIAN:
6561  break;
6562 
6563  case TRANSPOSE:
6565  break;
6566 
6567  case PLUS_PLUS:
6569  break;
6570 
6571  case MINUS_MINUS:
6573  break;
6574 
6575  default:
6576  panic_impossible ();
6577  break;
6578  }
6579 
6580  int l = tok_val->line ();
6581  int c = tok_val->column ();
6582 
6583  return new tree_postfix_expression (op1, l, c, t);
6584 }
6585 
6586 // Build an unwind-protect command.
6587 
6588 tree_command *
6590  tree_statement_list *body,
6591  tree_statement_list *cleanup_stmts,
6592  token *end_tok,
6593  octave_comment_list *lc,
6594  octave_comment_list *mc)
6595 {
6596  tree_command *retval = 0;
6597 
6598  if (end_token_ok (end_tok, token::unwind_protect_end))
6599  {
6601 
6602  int l = unwind_tok->line ();
6603  int c = unwind_tok->column ();
6604 
6605  retval = new tree_unwind_protect_command (body, cleanup_stmts,
6606  lc, mc, tc, l, c);
6607  }
6608  else
6609  {
6610  delete body;
6611  delete cleanup_stmts;
6612  }
6613 
6614  return retval;
6615 }
6616 
6617 // Build a try-catch command.
6618 
6619 tree_command *
6621  tree_statement_list *body,
6622  char catch_sep,
6623  tree_statement_list *cleanup_stmts,
6624  token *end_tok,
6625  octave_comment_list *lc,
6626  octave_comment_list *mc)
6627 {
6628  tree_command *retval = 0;
6629 
6630  if (end_token_ok (end_tok, token::try_catch_end))
6631  {
6633 
6634  int l = try_tok->line ();
6635  int c = try_tok->column ();
6636 
6637  tree_identifier *id = 0;
6638 
6639  if (! catch_sep && cleanup_stmts && ! cleanup_stmts->empty ())
6640  {
6641  tree_statement *stmt = cleanup_stmts->front ();
6642 
6643  if (stmt)
6644  {
6645  tree_expression *expr = stmt->expression ();
6646 
6647  if (expr && expr->is_identifier ())
6648  {
6649  id = dynamic_cast<tree_identifier *> (expr);
6650 
6651  cleanup_stmts->pop_front ();
6652 
6653  stmt->set_expression (0);
6654  delete stmt;
6655  }
6656  }
6657  }
6658 
6659  retval = new tree_try_catch_command (body, cleanup_stmts, id,
6660  lc, mc, tc, l, c);
6661  }
6662  else
6663  {
6664  delete body;
6665  delete cleanup_stmts;
6666  }
6667 
6668  return retval;
6669 }
6670 
6671 // Build a while command.
6672 
6673 tree_command *
6675  tree_expression *expr,
6676  tree_statement_list *body,
6677  token *end_tok,
6678  octave_comment_list *lc)
6679 {
6680  tree_command *retval = 0;
6681 
6683 
6684  if (end_token_ok (end_tok, token::while_end))
6685  {
6687 
6688  lexer.looping--;
6689 
6690  int l = while_tok->line ();
6691  int c = while_tok->column ();
6692 
6693  retval = new tree_while_command (expr, body, lc, tc, l, c);
6694  }
6695  else
6696  {
6697  delete expr;
6698  delete body;
6699  }
6700 
6701  return retval;
6702 }
6703 
6704 // Build a do-until command.
6705 
6706 tree_command *
6708  tree_statement_list *body,
6709  tree_expression *expr,
6710  octave_comment_list *lc)
6711 {
6713 
6715 
6716  lexer.looping--;
6717 
6718  int l = until_tok->line ();
6719  int c = until_tok->column ();
6720 
6721  return new tree_do_until_command (expr, body, lc, tc, l, c);
6722 }
6723 
6724 // Build a for command.
6725 
6726 tree_command *
6728  tree_argument_list *lhs,
6729  tree_expression *expr,
6730  tree_expression *maxproc,
6731  tree_statement_list *body,
6732  token *end_tok,
6733  octave_comment_list *lc)
6734 {
6735  tree_command *retval = 0;
6736 
6737  bool parfor = tok_id == PARFOR;
6738 
6739  if (end_token_ok (end_tok, parfor ? token::parfor_end : token::for_end))
6740  {
6741  expr->mark_as_for_cmd_expr ();
6742 
6744 
6745  lexer.looping--;
6746 
6747  int l = for_tok->line ();
6748  int c = for_tok->column ();
6749 
6750  if (lhs->length () == 1)
6751  {
6752  tree_expression *tmp = lhs->remove_front ();
6753 
6754  retval = new tree_simple_for_command (parfor, tmp, expr, maxproc,
6755  body, lc, tc, l, c);
6756 
6757  delete lhs;
6758  }
6759  else
6760  {
6761  if (parfor)
6762  bison_error ("invalid syntax for parfor statement");
6763  else
6764  retval = new tree_complex_for_command (lhs, expr, body,
6765  lc, tc, l, c);
6766  }
6767  }
6768  else
6769  {
6770  delete lhs;
6771  delete expr;
6772  delete maxproc;
6773  delete body;
6774  }
6775 
6776  return retval;
6777 }
6778 
6779 // Build a break command.
6780 
6781 tree_command *
6783 {
6784  int l = break_tok->line ();
6785  int c = break_tok->column ();
6786 
6787  return new tree_break_command (l, c);
6788 }
6789 
6790 // Build a continue command.
6791 
6792 tree_command *
6794 {
6795  int l = continue_tok->line ();
6796  int c = continue_tok->column ();
6797 
6798  return new tree_continue_command (l, c);
6799 }
6800 
6801 // Build a return command.
6802 
6803 tree_command *
6805 {
6806  int l = return_tok->line ();
6807  int c = return_tok->column ();
6808 
6809  return new tree_return_command (l, c);
6810 }
6811 
6812 // Start an if command.
6813 
6816  tree_statement_list *list)
6817 {
6819 
6820  tree_if_clause *t = new tree_if_clause (expr, list);
6821 
6822  return new tree_if_command_list (t);
6823 }
6824 
6825 // Finish an if command.
6826 
6829  tree_if_command_list *list,
6830  token *end_tok,
6831  octave_comment_list *lc)
6832 {
6833  tree_if_command *retval = 0;
6834 
6835  if (end_token_ok (end_tok, token::if_end))
6836  {
6838 
6839  int l = if_tok->line ();
6840  int c = if_tok->column ();
6841 
6842  if (list && ! list->empty ())
6843  {
6844  tree_if_clause *elt = list->front ();
6845 
6846  if (elt)
6847  {
6848  elt->line (l);
6849  elt->column (c);
6850  }
6851  }
6852 
6853  retval = new tree_if_command (list, lc, tc, l, c);
6854  }
6855  else
6856  delete list;
6857 
6858  return retval;
6859 }
6860 
6861 // Build an elseif clause.
6862 
6865  tree_expression *expr,
6866  tree_statement_list *list,
6867  octave_comment_list *lc)
6868 {
6870 
6871  int l = elseif_tok->line ();
6872  int c = elseif_tok->column ();
6873 
6874  return new tree_if_clause (expr, list, lc, l, c);
6875 }
6876 
6877 // Finish a switch command.
6878 
6881  tree_expression *expr,
6882  tree_switch_case_list *list,
6883  token *end_tok,
6884  octave_comment_list *lc)
6885 {
6886  tree_switch_command *retval = 0;
6887 
6888  if (end_token_ok (end_tok, token::switch_end))
6889  {
6891 
6892  int l = switch_tok->line ();
6893  int c = switch_tok->column ();
6894 
6895  if (list && ! list->empty ())
6896  {
6897  tree_switch_case *elt = list->front ();
6898 
6899  if (elt)
6900  {
6901  elt->line (l);
6902  elt->column (c);
6903  }
6904  }
6905 
6906  retval = new tree_switch_command (expr, list, lc, tc, l, c);
6907  }
6908  else
6909  {
6910  delete expr;
6911  delete list;
6912  }
6913 
6914  return retval;
6915 }
6916 
6917 // Build a switch case.
6918 
6921  tree_expression *expr,
6922  tree_statement_list *list,
6923  octave_comment_list *lc)
6924 {
6926 
6927  int l = case_tok->line ();
6928  int c = case_tok->column ();
6929 
6930  return new tree_switch_case (expr, list, lc, l, c);
6931 }
6932 
6933 // Build an assignment to a variable.
6934 
6937  token *eq_tok, tree_expression *rhs)
6938 {
6939  tree_expression *retval = 0;
6940 
6942 
6943  switch (op)
6944  {
6945  case '=':
6947  break;
6948 
6949  case ADD_EQ:
6951  break;
6952 
6953  case SUB_EQ:
6955  break;
6956 
6957  case MUL_EQ:
6959  break;
6960 
6961  case DIV_EQ:
6963  break;
6964 
6965  case LEFTDIV_EQ:
6967  break;
6968 
6969  case POW_EQ:
6971  break;
6972 
6973  case LSHIFT_EQ:
6975  break;
6976 
6977  case RSHIFT_EQ:
6979  break;
6980 
6981  case EMUL_EQ:
6983  break;
6984 
6985  case EDIV_EQ:
6987  break;
6988 
6989  case ELEFTDIV_EQ:
6991  break;
6992 
6993  case EPOW_EQ:
6995  break;
6996 
6997  case AND_EQ:
6999  break;
7000 
7001  case OR_EQ:
7003  break;
7004 
7005  default:
7006  panic_impossible ();
7007  break;
7008  }
7009 
7010  int l = eq_tok->line ();
7011  int c = eq_tok->column ();
7012 
7013  if (lhs->is_simple_assign_lhs ())
7014  {
7015  tree_expression *tmp = lhs->remove_front ();
7016 
7017  retval = new tree_simple_assignment (tmp, rhs, false, l, c, t);
7018 
7019  delete lhs;
7020  }
7021  else if (t == octave_value::op_asn_eq)
7022  return new tree_multi_assignment (lhs, rhs, false, l, c);
7023  else
7024  bison_error ("computed multiple assignment not allowed");
7025 
7026  return retval;
7027 }
7028 
7029 // Define a script.
7030 
7031 void
7033  tree_statement *end_script)
7034 {
7035  if (! cmds)
7036  cmds = new tree_statement_list ();
7037 
7038  cmds->append (end_script);
7039 
7040  octave_user_script *script
7043  cmds, lexer.help_text);
7044 
7045  lexer.help_text = "";
7046 
7047  octave_time now;
7048 
7049  script->stash_fcn_file_time (now);
7050 
7051  primary_fcn_ptr = script;
7052 }
7053 
7054 // Begin defining a function.
7055 
7058  tree_statement_list *body,
7059  tree_statement *end_fcn_stmt)
7060 {
7061  // We'll fill in the return list later.
7062 
7063  if (! body)
7064  body = new tree_statement_list ();
7065 
7066  body->append (end_fcn_stmt);
7067 
7070  param_list, 0, body);
7071 
7072  if (fcn)
7073  {
7075 
7076  fcn->stash_trailing_comment (tc);
7077  fcn->stash_fcn_end_location (end_fcn_stmt->line (),
7078  end_fcn_stmt->column ());
7079  }
7080 
7081  return fcn;
7082 }
7083 
7085 octave_base_parser::make_end (const std::string& type, bool eof, int l, int c)
7086 {
7087  return make_statement (new tree_no_op_command (type, eof, l, c));
7088 }
7089 
7090 // Do most of the work for defining a function.
7091 
7093 octave_base_parser::frob_function (const std::string& fname,
7094  octave_user_function *fcn)
7095 {
7096  std::string id_name = fname;
7097 
7098  // If input is coming from a file, issue a warning if the name of
7099  // the file does not match the name of the function stated in the
7100  // file. Matlab doesn't provide a diagnostic (it ignores the stated
7101  // name).
7103  && curr_fcn_depth == 1 && ! parsing_subfunctions)
7104  {
7105  // FIXME -- should lexer.fcn_file_name already be
7106  // preprocessed when we get here? It seems to only be a
7107  // problem with relative file names.
7108 
7109  std::string nm = lexer.fcn_file_name;
7110 
7111  size_t pos = nm.find_last_of (file_ops::dir_sep_chars ());
7112 
7113  if (pos != std::string::npos)
7114  nm = lexer.fcn_file_name.substr (pos+1);
7115 
7116  if (nm != id_name)
7117  {
7119  ("Octave:function-name-clash",
7120  "function name '%s' does not agree with function file name '%s'",
7121  id_name.c_str (), lexer.fcn_file_full_name.c_str ());
7122 
7123  id_name = nm;
7124  }
7125  }
7126 
7128  {
7129  octave_time now;
7130 
7132  fcn->stash_fcn_file_time (now);
7133  fcn->mark_as_system_fcn_file ();
7134 
7136  fcn->mark_relative ();
7137 
7139  {
7141 
7142  if (curr_fcn_depth > 1)
7144  else
7146  }
7147 
7149  {
7150  if (curr_class_name == id_name)
7151  fcn->mark_as_class_constructor ();
7152  else
7153  fcn->mark_as_class_method ();
7154 
7156  }
7157 
7158  std::string nm = fcn->fcn_file_name ();
7159 
7160  file_stat fs (nm);
7161 
7162  if (fs && fs.is_newer (now))
7163  warning_with_id ("Octave:future-time-stamp",
7164  "time stamp for '%s' is in the future", nm.c_str ());
7165  }
7166  else if (! input_from_tmp_history_file
7167  && ! lexer.force_script
7169  && lexer.fcn_file_name == id_name)
7170  {
7171  warning ("function '%s' defined within script file '%s'",
7172  id_name.c_str (), lexer.fcn_file_full_name.c_str ());
7173  }
7174 
7175  fcn->stash_function_name (id_name);
7176 
7177  if (! lexer.help_text.empty () && curr_fcn_depth == 1
7178  && ! parsing_subfunctions)
7179  {
7180  fcn->document (lexer.help_text);
7181 
7182  lexer.help_text = "";
7183  }
7184 
7186  && ! parsing_subfunctions)
7187  primary_fcn_ptr = fcn;
7188 
7189  return fcn;
7190 }
7191 
7194  octave_user_function *fcn,
7195  octave_comment_list *lc,
7196  int l, int c)
7197 {
7198  tree_function_def *retval = 0;
7199 
7200  if (ret_list)
7201  ret_list->mark_as_formal_parameters ();
7202 
7203  if (fcn)
7204  {
7205  std::string nm = fcn->name ();
7206  std::string file = fcn->fcn_file_name ();
7207 
7208  std::string tmp = nm;
7209  if (! file.empty ())
7210  tmp += ": " + file;
7211 
7212  symbol_table::cache_name (fcn->scope (), tmp);
7213 
7214  if (lc)
7215  fcn->stash_leading_comment (lc);
7216 
7217  fcn->define_ret_list (ret_list);
7218 
7220  {
7221  fcn->mark_as_subfunction ();
7222  fcn->stash_fcn_location (l, c);
7223 
7224  subfunction_names.push_back (nm);
7225 
7226  if (endfunction_found && function_scopes.size () > 1)
7227  {
7228  symbol_table::scope_id pscope
7229  = function_scopes[function_scopes.size ()-2];
7230 
7232  pscope);
7233  }
7234  else
7237  }
7238 
7239  if (curr_fcn_depth == 1 && fcn)
7240  symbol_table::update_nest (fcn->scope ());
7241 
7242  if (! lexer.reading_fcn_file && curr_fcn_depth == 1)
7243  {
7244  // We are either reading a script file or defining a function
7245  // at the command line, so this definition creates a
7246  // tree_function object that is placed in the parse tree.
7247  // Otherwise, it is just inserted in the symbol table,
7248  // either as a subfunction or nested function (see above),
7249  // or as the primary function for the file, via
7250  // primary_fcn_ptr (see also load_fcn_from_file,,
7251  // parse_fcn_file, and
7252  // symbol_table::fcn_info::fcn_info_rep::find_user_function).
7253 
7254  retval = new tree_function_def (fcn);
7255  }
7256  }
7257 
7258  return retval;
7259 }
7260 
7261 void
7263 {
7265 
7267  && ! parsing_subfunctions)
7268  parsing_subfunctions = true;
7269 
7270  curr_fcn_depth--;
7271  function_scopes.pop_back ();
7272 
7273  lexer.defining_func--;
7274  lexer.parsed_function_name.pop ();
7275  lexer.looking_at_return_list = false;
7277 }
7278 
7279 tree_funcall *
7280 octave_base_parser::make_superclass_ref (const std::string& method_nm,
7281  const std::string& class_nm)
7282 {
7283  octave_value_list args;
7284 
7285  args(1) = class_nm;
7286  args(0) = method_nm;
7287 
7288  octave_value fcn
7289  = symbol_table::find_built_in_function ("__superclass_reference__");
7290 
7291  return new tree_funcall (fcn, args);
7292 }
7293 
7294 tree_funcall *
7295 octave_base_parser::make_meta_class_query (const std::string& class_nm)
7296 {
7297  octave_value_list args;
7298 
7299  args(0) = class_nm;
7300 
7301  octave_value fcn
7302  = symbol_table::find_built_in_function ("__meta_class_query__");
7303 
7304  return new tree_funcall (fcn, args);
7305 }
7306 
7307 // A CLASSDEF block defines a class that has a constructor and other
7308 // methods, but it is not an executable command. Parsing the block
7309 // makes some changes in the symbol table (inserting the constructor
7310 // and methods, and adding to the list of known objects) and creates
7311 // a parse tree containing meta information about the class.
7312 
7313 tree_classdef *
7316  tree_identifier *id,
7318  tree_classdef_body *body, token *end_tok,
7319  octave_comment_list *lc)
7320 {
7321  tree_classdef *retval = 0;
7322 
7323  std::string cls_name = id->name ();
7324 
7325  std::string nm = lexer.fcn_file_name;
7326 
7327  size_t pos = nm.find_last_of (file_ops::dir_sep_chars ());
7328 
7329  if (pos != std::string::npos)
7330  nm = lexer.fcn_file_name.substr (pos+1);
7331 
7332  if (nm != cls_name)
7333  bison_error ("invalid classdef definition, the class name must match the file name");
7334  else if (end_token_ok (end_tok, token::classdef_end))
7335  {
7337 
7338  int l = tok_val->line ();
7339  int c = tok_val->column ();
7340 
7341  if (! body)
7342  body = new tree_classdef_body ();
7343 
7344  retval = new tree_classdef (a, id, sc, body, lc, tc,
7345  curr_package_name, l, c);
7346  }
7347 
7348  if (! retval)
7349  {
7350  delete a;
7351  delete id;
7352  delete sc;
7353  delete body;
7354  }
7355 
7356  return retval;
7357 }
7358 
7363  token *end_tok,
7364  octave_comment_list *lc)
7365 {
7366  tree_classdef_properties_block *retval = 0;
7367 
7368  if (end_token_ok (end_tok, token::properties_end))
7369  {
7371 
7372  int l = tok_val->line ();
7373  int c = tok_val->column ();
7374 
7375  if (! plist)
7376  plist = new tree_classdef_property_list ();
7377 
7378  retval = new tree_classdef_properties_block (a, plist, lc, tc, l, c);
7379  }
7380  else
7381  {
7382  delete a;
7383  delete plist;
7384  }
7385 
7386  return retval;
7387 }
7388 
7393  token *end_tok,
7394  octave_comment_list *lc)
7395 {
7396  tree_classdef_methods_block *retval = 0;
7397 
7398  if (end_token_ok (end_tok, token::methods_end))
7399  {
7401 
7402  int l = tok_val->line ();
7403  int c = tok_val->column ();
7404 
7405  if (! mlist)
7406  mlist = new tree_classdef_methods_list ();
7407 
7408  retval = new tree_classdef_methods_block (a, mlist, lc, tc, l, c);
7409  }
7410  else
7411  {
7412  delete a;
7413  delete mlist;
7414  }
7415 
7416  return retval;
7417 }
7418 
7423  token *end_tok,
7424  octave_comment_list *lc)
7425 {
7426  tree_classdef_events_block *retval = 0;
7427 
7428  if (end_token_ok (end_tok, token::events_end))
7429  {
7431 
7432  int l = tok_val->line ();
7433  int c = tok_val->column ();
7434 
7435  if (! elist)
7436  elist = new tree_classdef_events_list ();
7437 
7438  retval = new tree_classdef_events_block (a, elist, lc, tc, l, c);
7439  }
7440  else
7441  {
7442  delete a;
7443  delete elist;
7444  }
7445 
7446  return retval;
7447 }
7448 
7452  tree_classdef_enum_list *elist,
7453  token *end_tok,
7454  octave_comment_list *lc)
7455 {
7456  tree_classdef_enum_block *retval = 0;
7457 
7458  if (end_token_ok (end_tok, token::enumeration_end))
7459  {
7461 
7462  int l = tok_val->line ();
7463  int c = tok_val->column ();
7464 
7465  if (! elist)
7466  elist = new tree_classdef_enum_list ();
7467 
7468  retval = new tree_classdef_enum_block (a, elist, lc, tc, l, c);
7469  }
7470  else
7471  {
7472  delete a;
7473  delete elist;
7474  }
7475 
7476  return retval;
7477 }
7478 
7481  tree_parameter_list *pl)
7482 {
7483  octave_user_function* retval = 0;
7484 
7485  // External methods are only allowed within @-folders. In this case,
7486  // curr_class_name will be non-empty.
7487 
7488  if (! curr_class_name.empty ())
7489  {
7490 
7491  std::string mname = id->name ();
7492 
7493  // Methods that cannot be declared outside the classdef file:
7494  // - methods with '.' character (e.g. property accessors)
7495  // - class constructor
7496  // - `delete'
7497 
7498  if (mname.find_first_of (".") == std::string::npos
7499  && mname != "delete"
7500  && mname != curr_class_name)
7501  {
7502  // Create a dummy function that is used until the real method
7503  // is loaded.
7504 
7505  retval = new octave_user_function (-1, pl);
7506 
7507  retval->stash_function_name (mname);
7508 
7509  int l = id->line ();
7510  int c = id->column ();
7511 
7512  retval->stash_fcn_location (l, c);
7513  }
7514  else
7515  bison_error ("invalid external method declaration, an external "
7516  "method cannot be the class constructor, `delete' "
7517  "or have a dot (.) character in its name");
7518  }
7519  else
7520  bison_error ("external methods are only allowed in @-folders");
7521 
7522  if (! retval)
7523  delete id;
7524 
7525  return retval;
7526 }
7527 
7530  tree_parameter_list *ret_list,
7531  octave_comment_list *cl)
7532 {
7533  if (ret_list)
7534  fcn->define_ret_list (ret_list);
7535 
7536  if (cl)
7537  fcn->stash_leading_comment (cl);
7538 
7539  int l = fcn->beginning_line ();
7540  int c = fcn->beginning_column ();
7541 
7542  return new tree_function_def (fcn, l, c);
7543 }
7544 
7545 // Make an index expression.
7546 
7549  tree_argument_list *args,
7550  char type)
7551 {
7552  tree_index_expression *retval = 0;
7553 
7554  if (args && args->has_magic_tilde ())
7555  {
7556  bison_error ("invalid use of empty argument (~) in index expression");
7557 
7558  delete expr;
7559  delete args;
7560 
7561  return retval;
7562  }
7563 
7564  int l = expr->line ();
7565  int c = expr->column ();
7566 
7567  if (! expr->is_postfix_indexed ())
7568  expr->set_postfix_index (type);
7569 
7570  if (expr->is_index_expression ())
7571  {
7572  tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
7573 
7574  tmp->append (args, type);
7575 
7576  retval = tmp;
7577  }
7578  else
7579  retval = new tree_index_expression (expr, args, l, c, type);
7580 
7581  return retval;
7582 }
7583 
7584 // Make an indirect reference expression.
7585 
7588  const std::string& elt)
7589 {
7590  tree_index_expression *retval = 0;
7591 
7592  int l = expr->line ();
7593  int c = expr->column ();
7594 
7595  if (! expr->is_postfix_indexed ())
7596  expr->set_postfix_index ('.');
7597 
7598  if (expr->is_index_expression ())
7599  {
7600  tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
7601 
7602  tmp->append (elt);
7603 
7604  retval = tmp;
7605  }
7606  else
7607  retval = new tree_index_expression (expr, elt, l, c);
7608 
7610 
7611  return retval;
7612 }
7613 
7614 // Make an indirect reference expression with dynamic field name.
7615 
7618  tree_expression *elt)
7619 {
7620  tree_index_expression *retval = 0;
7621 
7622  int l = expr->line ();
7623  int c = expr->column ();
7624 
7625  if (! expr->is_postfix_indexed ())
7626  expr->set_postfix_index ('.');
7627 
7628  if (expr->is_index_expression ())
7629  {
7630  tree_index_expression *tmp = static_cast<tree_index_expression *> (expr);
7631 
7632  tmp->append (elt);
7633 
7634  retval = tmp;
7635  }
7636  else
7637  retval = new tree_index_expression (expr, elt, l, c);
7638 
7640 
7641  return retval;
7642 }
7643 
7644 // Make a declaration command.
7645 
7648  tree_decl_init_list *lst)
7649 {
7650  tree_decl_command *retval = 0;
7651 
7652  int l = tok_val->line ();
7653  int c = tok_val->column ();
7654 
7655  switch (tok)
7656  {
7657  case GLOBAL:
7658  retval = new tree_global_command (lst, l, c);
7659  break;
7660 
7661  case PERSISTENT:
7662  if (curr_fcn_depth > 0)
7663  retval = new tree_persistent_command (lst, l, c);
7664  else
7665  {
7667  warning ("ignoring persistent declaration near line %d of file '%s'",
7668  l, lexer.fcn_file_full_name.c_str ());
7669  else
7670  warning ("ignoring persistent declaration near line %d", l);
7671  }
7672  break;
7673 
7674  default:
7675  panic_impossible ();
7676  break;
7677  }
7678 
7679  return retval;
7680 }
7681 
7682 bool
7684 {
7685  bool retval = true;
7686 
7687  tree_array_list *al = dynamic_cast<tree_array_list *> (e);
7688 
7689  for (tree_array_list::iterator i = al->begin (); i != al->end (); i++)
7690  {
7691  tree_argument_list *row = *i;
7692 
7693  if (row && row->has_magic_tilde ())
7694  {
7695  retval = false;
7696  if (e->is_matrix ())
7697  bison_error ("invalid use of tilde (~) in matrix expression");
7698  else
7699  bison_error ("invalid use of tilde (~) in cell expression");
7700  break;
7701  }
7702  }
7703 
7704  return retval;
7705 }
7706 
7709 {
7710  tree_argument_list *retval = 0;
7711 
7712  if (e->is_constant ())
7713  {
7714  octave_value ov = e->rvalue1 ();
7715 
7716  if (ov.is_empty ())
7717  bison_error ("invalid empty left hand side of assignment");
7718  else
7719  bison_error ("invalid constant left hand side of assignment");
7720 
7721  delete e;
7722  }
7723  else
7724  {
7725  bool is_simple_assign = true;
7726 
7727  tree_argument_list *tmp = 0;
7728 
7729  if (e->is_matrix ())
7730  {
7731  tree_matrix *mat = dynamic_cast<tree_matrix *> (e);
7732 
7733  if (mat && mat->size () == 1)
7734  {
7735  tmp = mat->front ();
7736  mat->pop_front ();
7737  delete e;
7738  is_simple_assign = false;
7739  }
7740  }
7741  else
7742  tmp = new tree_argument_list (e);
7743 
7744  if (tmp && tmp->is_valid_lvalue_list ())
7745  {
7747  retval = tmp;
7748  }
7749  else
7750  {
7751  bison_error ("invalid left hand side of assignment");
7752  delete tmp;
7753  }
7754 
7755  if (retval && is_simple_assign)
7756  retval->mark_as_simple_assign_lhs ();
7757  }
7758 
7759  return retval;
7760 }
7761 
7762 // Finish building an array_list.
7763 
7766 {
7767  tree_expression *retval = array_list;
7768 
7769  unwind_protect frame;
7770 
7771  frame.protect_var (error_state);
7772  frame.protect_var (warning_state);
7773 
7776 
7777  discard_error_messages = true;
7778  discard_warning_messages = true;
7779 
7780  if (array_list->all_elements_are_constant ())
7781  {
7782  octave_value tmp = array_list->rvalue1 ();
7783 
7784  if (! (error_state || warning_state))
7785  {
7786  tree_constant *tc_retval
7787  = new tree_constant (tmp, array_list->line (),
7788  array_list->column ());
7789 
7790  std::ostringstream buf;
7791 
7792  tree_print_code tpc (buf);
7793 
7794  array_list->accept (tpc);
7795 
7796  tc_retval->stash_original_text (buf.str ());
7797 
7798  delete array_list;
7799 
7800  retval = tc_retval;
7801  }
7802  }
7803 
7804  return retval;
7805 }
7806 
7807 // Finish building a matrix list.
7808 
7811 {
7812  return (m
7813  ? finish_array_list (m)
7815 }
7816 
7817 // Finish building a cell list.
7818 
7821 {
7822  return (c
7823  ? finish_array_list (c)
7824  : new tree_constant (octave_value (Cell ())));
7825 }
7826 
7827 void
7829 {
7830  if (curr_fcn_depth > 0)
7831  {
7832  tree_statement *tmp = t->back ();
7833 
7834  if (tmp->is_expression ())
7836  ("Octave:missing-semicolon",
7837  "missing semicolon near line %d, column %d in file '%s'",
7838  tmp->line (), tmp->column (), lexer.fcn_file_full_name.c_str ());
7839  }
7840 }
7841 
7844  char sep, bool warn_missing_semi)
7845 {
7846  tree_statement *tmp = list->back ();
7847 
7848  switch (sep)
7849  {
7850  case ';':
7851  tmp->set_print_flag (false);
7852  break;
7853 
7854  case 0:
7855  case ',':
7856  case '\n':
7857  tmp->set_print_flag (true);
7858  if (warn_missing_semi)
7859  maybe_warn_missing_semi (list);
7860  break;
7861 
7862  default:
7863  warning ("unrecognized separator type!");
7864  break;
7865  }
7866 
7867  // Even if a statement is null, we add it to the list then remove it
7868  // here so that the print flag is applied to the correct statement.
7869 
7870  if (tmp->is_null_statement ())
7871  {
7872  list->pop_back ();
7873  delete tmp;
7874  }
7875 
7876  return list;
7877 }
7878 
7879 // Finish building a statement.
7880 template <class T>
7883 {
7884  octave_comment_list *comment = lexer.get_comment ();
7885 
7886  return new tree_statement (arg, comment);
7887 }
7888 
7891 {
7892  return new tree_statement_list (stmt);
7893 }
7894 
7897  char sep, tree_statement *stmt,
7898  bool warn_missing_semi)
7899 {
7900  set_stmt_print_flag (list, sep, warn_missing_semi);
7901 
7902  list->append (stmt);
7903 
7904  return list;
7905 }
7906 
7907 void
7909 {
7910  int err_col = lexer.current_input_column - 1;
7911 
7912  std::ostringstream output_buf;
7913 
7915  output_buf << "parse error near line " << lexer.input_line_number
7916  << " of file " << lexer.fcn_file_full_name;
7917  else
7918  output_buf << "parse error:";
7919 
7920  if (s && strcmp (s, "parse error") != 0)
7921  output_buf << "\n\n " << s;
7922 
7923  output_buf << "\n\n";
7924 
7925  std::string curr_line = lexer.current_input_line;
7926 
7927  if (! curr_line.empty ())
7928  {
7929  size_t len = curr_line.length ();
7930 
7931  if (curr_line[len-1] == '\n')
7932  curr_line.resize (len-1);
7933 
7934  // Print the line, maybe with a pointer near the error token.
7935 
7936  output_buf << ">>> " << curr_line << "\n";
7937 
7938  if (err_col == 0)
7939  err_col = len;
7940 
7941  for (int i = 0; i < err_col + 3; i++)
7942  output_buf << " ";
7943 
7944  output_buf << "^";
7945  }
7946 
7947  output_buf << "\n";
7948 
7949  std::string msg = output_buf.str ();
7950 
7951  parse_error ("%s", msg.c_str ());
7952 }
7953 
7954 int
7956 {
7957  return octave_parse (*this);
7958 }
7959 
7961 {
7962  yypstate_delete (static_cast<yypstate *> (parser_state));
7963 }
7964 
7965 void
7967 {
7969 }
7970 
7971 // Parse input from INPUT. Pass TRUE for EOF if the end of INPUT should
7972 // finish the parse.
7973 
7974 int
7975 octave_push_parser::run (const std::string& input, bool eof)
7976 {
7977  int status = -1;
7978 
7979  dynamic_cast<octave_push_lexer&> (lexer).append_input (input, eof);
7980 
7981  do
7982  {
7983  YYSTYPE lval;
7984 
7985  int token = octave_lex (&lval, scanner);
7986 
7987  if (token < 0)
7988  {
7989  if (! eof && lexer.at_end_of_buffer ())
7990  {
7991  status = -1;
7992  break;
7993  }
7994  }
7995 
7996  yypstate *pstate = static_cast<yypstate *> (parser_state);
7997 
7998  status = octave_push_parse (pstate, token, &lval, *this);
7999  }
8000  while (status == YYPUSH_MORE);
8001 
8002  return status;
8003 }
8004 
8005 static void
8007 {
8008  if (f)
8009  fclose (static_cast<FILE *> (f));
8010 }
8011 
8012 static octave_function *
8013 parse_fcn_file (const std::string& full_file, const std::string& file,
8014  const std::string& dispatch_type,
8015  const std::string& package_name,
8016  bool require_file, bool force_script, bool autoload,
8017  bool relative_lookup, const std::string& warn_for)
8018 {
8019  unwind_protect frame;
8020 
8021  octave_function *fcn_ptr = 0;
8022 
8023  // Open function file and parse.
8024 
8025  FILE *in_stream = command_editor::get_input_stream ();
8026 
8027  frame.add_fcn (command_editor::set_input_stream, in_stream);
8028 
8031 
8033 
8034  FILE *ffile = 0;
8035 
8036  if (! full_file.empty ())
8037  ffile = gnulib::fopen (full_file.c_str (), "rb");
8038 
8039  if (ffile)
8040  {
8041  frame.add_fcn (safe_fclose, ffile);
8042 
8043  // octave_base_parser constructor sets this for us.
8044  frame.protect_var (LEXER);
8045 
8046  octave_parser parser (ffile);
8047 
8048  parser.curr_class_name = dispatch_type;
8049  parser.curr_package_name = package_name;
8050  parser.autoloading = autoload;
8051  parser.fcn_file_from_relative_lookup = relative_lookup;
8052 
8053  parser.lexer.force_script = force_script;
8054  parser.lexer.prep_for_file ();
8055  parser.lexer.parsing_class_method = ! dispatch_type.empty ();
8056 
8057  parser.lexer.fcn_file_name = file;
8058  parser.lexer.fcn_file_full_name = full_file;
8059 
8060  int status = parser.run ();
8061 
8062  fcn_ptr = parser.primary_fcn_ptr;
8063 
8064  if (status == 0)
8065  {
8066  if (parser.lexer.reading_classdef_file
8067  && parser.classdef_object)
8068  {
8069  // Convert parse tree for classdef object to
8070  // meta.class info (and stash it in the symbol
8071  // table?). Return pointer to constructor?
8072 
8073  if (fcn_ptr)
8074  panic_impossible ();
8075 
8076  bool is_at_folder = ! dispatch_type.empty ();
8077 
8078  fcn_ptr =
8079  parser.classdef_object->make_meta_class (is_at_folder);
8080  }
8081  else if (fcn_ptr)
8082  {
8083  fcn_ptr->maybe_relocate_end ();
8084 
8085  if (parser.parsing_subfunctions)
8086  {
8087  if (! parser.endfunction_found)
8088  parser.subfunction_names.reverse ();
8089 
8090  fcn_ptr->stash_subfunction_names (parser.subfunction_names);
8091  }
8092  }
8093  }
8094  else
8095  error ("parse error while reading file %s", full_file.c_str ());
8096  }
8097  else if (require_file)
8098  error ("no such file, '%s'", full_file.c_str ());
8099  else if (! warn_for.empty ())
8100  error ("%s: unable to open file '%s'", warn_for.c_str (),
8101  full_file.c_str ());
8102 
8103  return fcn_ptr;
8104 }
8105 
8106 std::string
8107 get_help_from_file (const std::string& nm, bool& symbol_found,
8108  std::string& full_file)
8109 {
8110  std::string retval;
8111 
8112  full_file = fcn_file_in_path (nm);
8113 
8114  std::string file = full_file;
8115 
8116  size_t file_len = file.length ();
8117 
8118  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
8119  || (file_len > 4 && file.substr (file_len-4) == ".mex")
8120  || (file_len > 2 && file.substr (file_len-2) == ".m"))
8121  {
8122  file = octave_env::base_pathname (file);
8123  file = file.substr (0, file.find_last_of ('.'));
8124 
8125  size_t pos = file.find_last_of (file_ops::dir_sep_str ());
8126  if (pos != std::string::npos)
8127  file = file.substr (pos+1);
8128  }
8129 
8130  if (! file.empty ())
8131  {
8132  symbol_found = true;
8133 
8134  octave_function *fcn
8135  = parse_fcn_file (full_file, file, "", "", true, false, false, false,
8136  "");
8137 
8138  if (fcn)
8139  {
8140  retval = fcn->doc_string ();
8141 
8142  delete fcn;
8143  }
8144  }
8145 
8146  return retval;
8147 }
8148 
8149 std::string
8150 get_help_from_file (const std::string& nm, bool& symbol_found)
8151 {
8152  std::string file;
8153  return get_help_from_file (nm, symbol_found, file);
8154 }
8155 
8156 std::string
8157 lookup_autoload (const std::string& nm)
8158 {
8159  std::string retval;
8160 
8161  typedef std::map<std::string, std::string>::const_iterator am_iter;
8162 
8163  am_iter p = autoload_map.find (nm);
8164 
8165  if (p != autoload_map.end ())
8166  retval = load_path::find_file (p->second);
8167 
8168  return retval;
8169 }
8170 
8173 {
8174  string_vector names (autoload_map.size ());
8175 
8176  octave_idx_type i = 0;
8177  typedef std::map<std::string, std::string>::const_iterator am_iter;
8178  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
8179  names[i++] = p->first;
8180 
8181  return names;
8182 }
8183 
8185 reverse_lookup_autoload (const std::string& nm)
8186 {
8188 
8189  typedef std::map<std::string, std::string>::const_iterator am_iter;
8190  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
8191  if (nm == p->second)
8192  names.append (p->first);
8193 
8194  return names;
8195 }
8196 
8198 load_fcn_from_file (const std::string& file_name, const std::string& dir_name,
8199  const std::string& dispatch_type,
8200  const std::string& package_name,
8201  const std::string& fcn_name, bool autoload)
8202 {
8203  octave_function *retval = 0;
8204 
8205  unwind_protect frame;
8206 
8207  std::string nm = file_name;
8208 
8209  size_t nm_len = nm.length ();
8210 
8211  std::string file;
8212 
8213  bool relative_lookup = false;
8214 
8215  file = nm;
8216 
8217  if ((nm_len > 4 && nm.substr (nm_len-4) == ".oct")
8218  || (nm_len > 4 && nm.substr (nm_len-4) == ".mex")
8219  || (nm_len > 2 && nm.substr (nm_len-2) == ".m"))
8220  {
8221  nm = octave_env::base_pathname (file);
8222  nm = nm.substr (0, nm.find_last_of ('.'));
8223 
8224  size_t pos = nm.find_last_of (file_ops::dir_sep_str ());
8225  if (pos != std::string::npos)
8226  nm = nm.substr (pos+1);
8227  }
8228 
8229  relative_lookup = ! octave_env::absolute_pathname (file);
8230 
8231  file = octave_env::make_absolute (file);
8232 
8233  int len = file.length ();
8234 
8235  if (len > 4 && file.substr (len-4, len-1) == ".oct")
8236  {
8237  if (autoload && ! fcn_name.empty ())
8238  nm = fcn_name;
8239 
8240  retval = octave_dynamic_loader::load_oct (nm, file, relative_lookup);
8241  }
8242  else if (len > 4 && file.substr (len-4, len-1) == ".mex")
8243  {
8244  // Temporarily load m-file version of mex-file, if it exists,
8245  // to get the help-string to use.
8246 
8247  octave_function *tmpfcn = parse_fcn_file (file.substr (0, len - 2),
8248  nm, dispatch_type,
8249  package_name, false,
8250  autoload, autoload,
8251  relative_lookup, "");
8252 
8253  retval = octave_dynamic_loader::load_mex (nm, file, relative_lookup);
8254 
8255  if (tmpfcn)
8256  retval->document (tmpfcn->doc_string ());
8257  delete tmpfcn;
8258  }
8259  else if (len > 2)
8260  {
8261  retval = parse_fcn_file (file, nm, dispatch_type, package_name, true,
8262  autoload, autoload, relative_lookup, "");
8263  }
8264 
8265  if (retval)
8266  {
8267  retval->stash_dir_name (dir_name);
8268  retval->stash_package_name (package_name);
8269 
8270  if (retval->is_user_function ())
8271  {
8272  symbol_table::scope_id id = retval->scope ();
8273 
8275  }
8276  }
8277 
8278  return retval;
8279 }
8280 
8281 DEFUN (autoload, args, ,
8282  "-*- texinfo -*-\n\
8283 @deftypefn {Built-in Function} {@var{autoload_map} =} autoload ()\n\
8284 @deftypefnx {Built-in Function} {} autoload (@var{function}, @var{file})\n\
8285 @deftypefnx {Built-in Function} {} autoload (@dots{}, \"remove\")\n\
8286 Define @var{function} to autoload from @var{file}.\n\
8287 \n\
8288 The second argument, @var{file}, should be an absolute file name or a file\n\
8289 name in the same directory as the function or script from which the autoload\n\
8290 command was run. @var{file} @emph{should not} depend on the Octave load\n\
8291 path.\n\
8292 \n\
8293 Normally, calls to @code{autoload} appear in PKG_ADD script files that are\n\
8294 evaluated when a directory is added to Octave's load path. To avoid having\n\
8295 to hardcode directory names in @var{file}, if @var{file} is in the same\n\
8296 directory as the PKG_ADD script then\n\
8297 \n\
8298 @example\n\
8299 autoload (\"foo\", \"bar.oct\");\n\
8300 @end example\n\
8301 \n\
8302 @noindent\n\
8303 will load the function @code{foo} from the file @code{bar.oct}. The above\n\
8304 usage when @code{bar.oct} is not in the same directory, or usages such as\n\
8305 \n\
8306 @example\n\
8307 autoload (\"foo\", file_in_loadpath (\"bar.oct\"))\n\
8308 @end example\n\
8309 \n\
8310 @noindent\n\
8311 are strongly discouraged, as their behavior may be unpredictable.\n\
8312 \n\
8313 With no arguments, return a structure containing the current autoload map.\n\
8314 \n\
8315 If a third argument @qcode{\"remove\"} is given, the function is cleared and\n\
8316 not loaded anymore during the current Octave session.\n\
8317 \n\
8318 @seealso{PKG_ADD}\n\
8319 @end deftypefn")
8320 {
8321  octave_value retval;
8322 
8323  int nargin = args.length ();
8324 
8325  if (nargin == 0)
8326  {
8327  Cell func_names (dim_vector (autoload_map.size (), 1));
8328  Cell file_names (dim_vector (autoload_map.size (), 1));
8329 
8330  octave_idx_type i = 0;
8331  typedef std::map<std::string, std::string>::const_iterator am_iter;
8332  for (am_iter p = autoload_map.begin (); p != autoload_map.end (); p++)
8333  {
8334  func_names(i) = p->first;
8335  file_names(i) = p->second;
8336 
8337  i++;
8338  }
8339 
8340  octave_map m;
8341 
8342  m.assign ("function", func_names);
8343  m.assign ("file", file_names);
8344 
8345  retval = m;
8346  }
8347  else if (nargin == 2 || nargin == 3)
8348  {
8349  string_vector argv = args.make_argv ("autoload");
8350 
8351  if (! error_state)
8352  {
8353  std::string nm = argv[2];
8354 
8355  if (! octave_env::absolute_pathname (nm))
8356  {
8358 
8359  bool found = false;
8360 
8361  if (fcn)
8362  {
8363  std::string fname = fcn->fcn_file_name ();
8364 
8365  if (! fname.empty ())
8366  {
8367  fname = octave_env::make_absolute (fname);
8368  fname = fname.substr (0, fname.find_last_of (file_ops::dir_sep_str ()) + 1);
8369 
8370  file_stat fs (fname + nm);
8371 
8372  if (fs.exists ())
8373  {
8374  nm = fname + nm;
8375  found = true;
8376  }
8377  }
8378  }
8379  if (! found)
8380  warning_with_id ("Octave:autoload-relative-file-name",
8381  "autoload: '%s' is not an absolute file name",
8382  nm.c_str ());
8383  }
8384  if (nargin == 2)
8385  autoload_map[argv[1]] = nm;
8386  else if (nargin == 3)
8387  {
8388  if (argv[3].compare ("remove") != 0)
8389  error_with_id ("Octave:invalid-input-arg",
8390  "autoload: third argument can only be 'remove'");
8391 
8392  // Remove function from symbol table and autoload map.
8394  autoload_map.erase (argv[1]);
8395  }
8396  }
8397  }
8398  else
8399  print_usage ();
8400 
8401  return retval;
8402 }
8403 
8404 void
8405 source_file (const std::string& file_name, const std::string& context,
8406  bool verbose, bool require_file, const std::string& warn_for)
8407 {
8408  // Map from absolute name of script file to recursion level. We
8409  // use a map instead of simply placing a limit on recursion in the
8410  // source_file function so that two mutually recursive scripts
8411  // written as
8412  //
8413  // foo1.m:
8414  // ------
8415  // foo2
8416  //
8417  // foo2.m:
8418  // ------
8419  // foo1
8420  //
8421  // and called with
8422  //
8423  // foo1
8424  //
8425  // (for example) will behave the same if they are written as
8426  //
8427  // foo1.m:
8428  // ------
8429  // source ("foo2.m")
8430  //
8431  // foo2.m:
8432  // ------
8433  // source ("foo1.m")
8434  //
8435  // and called with
8436  //
8437  // source ("foo1.m")
8438  //
8439  // (for example).
8440 
8441  static std::map<std::string, int> source_call_depth;
8442 
8443  std::string file_full_name = file_ops::tilde_expand (file_name);
8444 
8445  file_full_name = octave_env::make_absolute (file_full_name);
8446 
8447  unwind_protect frame;
8448 
8449  if (source_call_depth.find (file_full_name) == source_call_depth.end ())
8450  source_call_depth[file_full_name] = -1;
8451 
8452  frame.protect_var (source_call_depth[file_full_name]);
8453 
8454  source_call_depth[file_full_name]++;
8455 
8456  if (source_call_depth[file_full_name] >= Vmax_recursion_depth)
8457  {
8458  error ("max_recursion_depth exceeded");
8459  return;
8460  }
8461 
8462  if (! context.empty ())
8463  {
8464  if (context == "caller")
8466  else if (context == "base")
8468  else
8469  error ("source: context must be \"caller\" or \"base\"");
8470 
8471  if (! error_state)
8473  }
8474 
8475  if (! error_state)
8476  {
8477  octave_function *fcn = parse_fcn_file (file_full_name, file_name,
8478  "", "", require_file, true,
8479  false, false, warn_for);
8480 
8481  if (! error_state)
8482  {
8483  if (fcn && fcn->is_user_script ())
8484  {
8485  octave_value_list args;
8486 
8487  if (verbose)
8488  {
8489  std::cout << "executing commands from " << file_full_name << " ... ";
8491  std::cout.flush ();
8492  }
8493 
8494  fcn->do_multi_index_op (0, args);
8495 
8496  if (verbose)
8497  std::cout << "done." << std::endl;
8498 
8499  delete fcn;
8500  }
8501  }
8502  else
8503  error ("source: error sourcing file '%s'",
8504  file_full_name.c_str ());
8505  }
8506 }
8507 
8508 DEFUN (mfilename, args, ,
8509  "-*- texinfo -*-\n\
8510 @deftypefn {Built-in Function} {} mfilename ()\n\
8511 @deftypefnx {Built-in Function} {} mfilename (\"fullpath\")\n\
8512 @deftypefnx {Built-in Function} {} mfilename (\"fullpathext\")\n\
8513 Return the name of the currently executing file.\n\
8514 \n\
8515 When called from outside an m-file return the empty string.\n\
8516 \n\
8517 Given the argument @qcode{\"fullpath\"}, include the directory part of the\n\
8518 file name, but not the extension.\n\
8519 \n\
8520 Given the argument @qcode{\"fullpathext\"}, include the directory part of\n\
8521 the file name and the extension.\n\
8522 @end deftypefn")
8523 {
8524  octave_value retval;
8525 
8526  int nargin = args.length ();
8527 
8528  if (nargin > 1)
8529  {
8530  print_usage ();
8531  return retval;
8532  }
8533 
8534  std::string arg;
8535 
8536  if (nargin == 1)
8537  {
8538  arg = args(0).string_value ();
8539 
8540  if (error_state)
8541  {
8542  error ("mfilename: expecting argument to be a character string");
8543  return retval;
8544  }
8545  }
8546 
8547  std::string fname;
8548 
8550 
8551  if (fcn)
8552  {
8553  fname = fcn->fcn_file_name ();
8554 
8555  if (fname.empty ())
8556  fname = fcn->name ();
8557  }
8558 
8559  if (arg == "fullpathext")
8560  retval = fname;
8561  else
8562  {
8563  size_t dpos = fname.rfind (file_ops::dir_sep_char ());
8564  size_t epos = fname.rfind ('.');
8565 
8566  if (epos <= dpos)
8567  epos = std::string::npos;
8568 
8569  fname = (epos != std::string::npos) ? fname.substr (0, epos) : fname;
8570 
8571  if (arg == "fullpath")
8572  retval = fname;
8573  else
8574  retval = (dpos != std::string::npos) ? fname.substr (dpos+1) : fname;
8575  }
8576 
8577  return retval;
8578 }
8579 
8580 DEFUN (source, args, ,
8581  "-*- texinfo -*-\n\
8582 @deftypefn {Built-in Function} {} source (@var{file})\n\
8583 Parse and execute the contents of @var{file}.\n\
8584 \n\
8585 This is equivalent to executing commands from a script file, but without\n\
8586 requiring the file to be named @file{@var{file}.m}.\n\
8587 @seealso{run}\n\
8588 @end deftypefn")
8589 {
8590  octave_value_list retval;
8591 
8592  int nargin = args.length ();
8593 
8594  if (nargin == 1 || nargin == 2)
8595  {
8596  std::string file_name = args(0).string_value ();
8597 
8598  if (! error_state)
8599  {
8600  std::string context;
8601 
8602  if (nargin == 2)
8603  context = args(1).string_value ();
8604 
8605  if (! error_state)
8606  source_file (file_name, context);
8607  else
8608  error ("source: expecting context to be character string");
8609  }
8610  else
8611  error ("source: expecting file name as argument");
8612  }
8613  else
8614  print_usage ();
8615 
8616  return retval;
8617 }
8618 
8619 // Evaluate an Octave function (built-in or interpreted) and return
8620 // the list of result values. NAME is the name of the function to
8621 // call. ARGS are the arguments to the function. NARGOUT is the
8622 // number of output arguments expected.
8623 
8625 feval (const std::string& name, const octave_value_list& args, int nargout)
8626 {
8627  octave_value_list retval;
8628 
8629  octave_value fcn = symbol_table::find_function (name, args);
8630 
8631  if (fcn.is_defined ())
8632  retval = fcn.do_multi_index_op (nargout, args);
8633  else
8634  {
8636  if (! error_state)
8637  error ("feval: function '%s' not found", name.c_str ());
8638  }
8639 
8640  return retval;
8641 }
8642 
8644 feval (octave_function *fcn, const octave_value_list& args, int nargout)
8645 {
8646  octave_value_list retval;
8647 
8648  if (fcn)
8649  retval = fcn->do_multi_index_op (nargout, args);
8650 
8651  return retval;
8652 }
8653 
8654 static octave_value_list
8656 {
8657  return args.slice (1, args.length () - 1, true);
8658 }
8659 
8660 
8661 // Evaluate an Octave function (built-in or interpreted) and return
8662 // the list of result values. The first element of ARGS should be a
8663 // string containing the name of the function to call, then the rest
8664 // are the actual arguments to the function. NARGOUT is the number of
8665 // output arguments expected.
8666 
8668 feval (const octave_value_list& args, int nargout)
8669 {
8670  octave_value_list retval;
8671 
8672  int nargin = args.length ();
8673 
8674  if (nargin > 0)
8675  {
8676  octave_value f_arg = args(0);
8677 
8678  if (f_arg.is_string ())
8679  {
8680  std::string name = f_arg.string_value ();
8681 
8682  if (! error_state)
8683  {
8684  octave_value_list tmp_args = get_feval_args (args);
8685 
8686  retval = feval (name, tmp_args, nargout);
8687  }
8688  }
8689  else if (f_arg.is_function_handle ()
8690  || f_arg.is_anonymous_function ()
8691  || f_arg.is_inline_function ())
8692  {
8693  const octave_value_list tmp_args = get_feval_args (args);
8694 
8695  retval = f_arg.do_multi_index_op (nargout, tmp_args);
8696  }
8697  else
8698  error ("feval: first argument must be a string, inline function or a function handle");
8699  }
8700 
8701  return retval;
8702 }
8703 
8704 DEFUN (feval, args, nargout,
8705  "-*- texinfo -*-\n\
8706 @deftypefn {Built-in Function} {} feval (@var{name}, @dots{})\n\
8707 Evaluate the function named @var{name}.\n\
8708 \n\
8709 Any arguments after the first are passed as inputs to the named function.\n\
8710 For example,\n\
8711 \n\
8712 @example\n\
8713 @group\n\
8714 feval (\"acos\", -1)\n\
8715  @result{} 3.1416\n\
8716 @end group\n\
8717 @end example\n\
8718 \n\
8719 @noindent\n\
8720 calls the function @code{acos} with the argument @samp{-1}.\n\
8721 \n\
8722 The function @code{feval} can also be used with function handles of any sort\n\
8723 (@pxref{Function Handles}). Historically, @code{feval} was the only way to\n\
8724 call user-supplied functions in strings, but function handles are now\n\
8725 preferred due to the cleaner syntax they offer. For example,\n\
8726 \n\
8727 @example\n\
8728 @group\n\
8729 @var{f} = @@exp;\n\
8730 feval (@var{f}, 1)\n\
8731  @result{} 2.7183\n\
8732 @var{f} (1)\n\
8733  @result{} 2.7183\n\
8734 @end group\n\
8735 @end example\n\
8736 \n\
8737 @noindent\n\
8738 are equivalent ways to call the function referred to by @var{f}. If it\n\
8739 cannot be predicted beforehand whether @var{f} is a function handle,\n\
8740 function name in a string, or inline function then @code{feval} can be used\n\
8741 instead.\n\
8742 @end deftypefn")
8743 {
8744  octave_value_list retval;
8745 
8746  int nargin = args.length ();
8747 
8748  if (nargin > 0)
8749  retval = feval (args, nargout);
8750  else
8751  print_usage ();
8752 
8753  return retval;
8754 }
8755 
8756 DEFUN (builtin, args, nargout,
8757  "-*- texinfo -*-\n\
8758 @deftypefn {Built-in Function} {[@dots{}] =} builtin (@var{f}, @dots{})\n\
8759 Call the base function @var{f} even if @var{f} is overloaded to another\n\
8760 function for the given type signature.\n\
8761 \n\
8762 This is normally useful when doing object-oriented programming and there is\n\
8763 a requirement to call one of Octave's base functions rather than the\n\
8764 overloaded one of a new class.\n\
8765 \n\
8766 A trivial example which redefines the @code{sin} function to be the\n\
8767 @code{cos} function shows how @code{builtin} works.\n\
8768 \n\
8769 @example\n\
8770 @group\n\
8771 sin (0)\n\
8772  @result{} 0\n\
8773 function y = sin (x), y = cos (x); endfunction\n\
8774 sin (0)\n\
8775  @result{} 1\n\
8776 builtin (\"sin\", 0)\n\
8777  @result{} 0\n\
8778 @end group\n\
8779 @end example\n\
8780 @end deftypefn")
8781 {
8782  octave_value_list retval;
8783 
8784  int nargin = args.length ();
8785 
8786  if (nargin > 0)
8787  {
8788  const std::string name (args(0).string_value ());
8789 
8790  if (! error_state)
8791  {
8793 
8794  if (fcn.is_defined ())
8795  retval = feval (fcn.function_value (), args.splice (0, 1),
8796  nargout);
8797  else
8798  error ("builtin: lookup for symbol '%s' failed", name.c_str ());
8799  }
8800  else
8801  error ("builtin: function name (F) must be a string");
8802  }
8803  else
8804  print_usage ();
8805 
8806  return retval;
8807 }
8808 
8810 eval_string (const std::string& eval_str, bool silent,
8811  int& parse_status, int nargout)
8812 {
8813  octave_value_list retval;
8814 
8815  octave_parser parser (eval_str);
8816 
8817  do
8818  {
8819  parser.reset ();
8820 
8821  parse_status = parser.run ();
8822 
8823  if (parse_status == 0)
8824  {
8825  if (parser.stmt_list)
8826  {
8827  tree_statement *stmt = 0;
8828 
8829  if (parser.stmt_list->length () == 1
8830  && (stmt = parser.stmt_list->front ())
8831  && stmt->is_expression ())
8832  {
8833  tree_expression *expr = stmt->expression ();
8834 
8835  if (silent)
8836  expr->set_print_flag (false);
8837 
8838  bool do_bind_ans = false;
8839 
8840  if (expr->is_identifier ())
8841  {
8842  tree_identifier *id
8843  = dynamic_cast<tree_identifier *> (expr);
8844 
8845  do_bind_ans = (! id->is_variable ());
8846  }
8847  else
8848  do_bind_ans = (! expr->is_assignment_expression ());
8849 
8850  retval = expr->rvalue (nargout);
8851 
8852  if (do_bind_ans && ! (error_state || retval.empty ()))
8853  bind_ans (retval(0), expr->print_result ());
8854 
8855  if (nargout == 0)
8856  retval = octave_value_list ();
8857  }
8858  else if (nargout == 0)
8859  parser.stmt_list->accept (*current_evaluator);
8860  else
8861  error ("eval: invalid use of statement list");
8862 
8863  if (error_state
8867  break;
8868  }
8869  else if (parser.lexer.end_of_input)
8870  break;
8871  }
8872  }
8873  while (parse_status == 0);
8874 
8875  return retval;
8876 }
8877 
8879 eval_string (const std::string& eval_str, bool silent, int& parse_status)
8880 {
8881  octave_value retval;
8882 
8883  octave_value_list tmp = eval_string (eval_str, silent, parse_status, 1);
8884 
8885  if (! tmp.empty ())
8886  retval = tmp(0);
8887 
8888  return retval;
8889 }
8890 
8891 static octave_value_list
8892 eval_string (const octave_value& arg, bool silent, int& parse_status,
8893  int nargout)
8894 {
8895  std::string s = arg.string_value ();
8896 
8897  if (error_state)
8898  {
8899  error ("eval: expecting std::string argument");
8900  return octave_value (-1);
8901  }
8902 
8903  return eval_string (s, silent, parse_status, nargout);
8904 }
8905 
8906 void
8908 {
8909  if (*lst)
8910  {
8911  delete *lst;
8912  *lst = 0;
8913  }
8914 }
8915 
8916 DEFUN (eval, args, nargout,
8917  "-*- texinfo -*-\n\
8918 @deftypefn {Built-in Function} {} eval (@var{try})\n\
8919 @deftypefnx {Built-in Function} {} eval (@var{try}, @var{catch})\n\
8920 Parse the string @var{try} and evaluate it as if it were an Octave\n\
8921 program.\n\
8922 \n\
8923 If execution fails, evaluate the optional string @var{catch}.\n\
8924 \n\
8925 The string @var{try} is evaluated in the current context, so any results\n\
8926 remain available after @code{eval} returns.\n\
8927 \n\
8928 The following example creates the variable @var{A} with the approximate\n\
8929 value of 3.1416 in the current workspace.\n\
8930 \n\
8931 @example\n\
8932 eval (\"A = acos(-1);\");\n\
8933 @end example\n\
8934 \n\
8935 If an error occurs during the evaluation of @var{try} then the @var{catch}\n\
8936 string is evaluated, as the following example shows:\n\
8937 \n\
8938 @example\n\
8939 @group\n\
8940 eval ('error (\"This is a bad example\");',\n\
8941  'printf (\"This error occurred:\\n%s\\n\", lasterr ());');\n\
8942  @print{} This error occurred:\n\
8943  This is a bad example\n\
8944 @end group\n\
8945 @end example\n\
8946 \n\
8947 Programming Note: if you are only using @code{eval} as an error-capturing\n\
8948 mechanism, rather than for the execution of arbitrary code strings,\n\
8949 Consider using try/catch blocks or unwind_protect/unwind_protect_cleanup\n\
8950 blocks instead. These techniques have higher performance and don't introduce\n\
8951 the security considerations that the evaluation of arbitrary code does.\n\
8952 @seealso{evalin}\n\
8953 @end deftypefn")
8954 {
8955  octave_value_list retval;
8956 
8957  int nargin = args.length ();
8958 
8959  if (nargin > 0)
8960  {
8961  unwind_protect frame;
8962 
8963  if (nargin > 1)
8964  {
8967  }
8968 
8969  int parse_status = 0;
8970 
8971  octave_value_list tmp = eval_string (args(0), nargout > 0,
8972  parse_status, nargout);
8973 
8974  if (nargin > 1 && (parse_status != 0 || error_state))
8975  {
8976  error_state = 0;
8977 
8978  // Set up for letting the user print any messages from
8979  // errors that occurred in the first part of this eval().
8980 
8982 
8983  tmp = eval_string (args(1), nargout > 0, parse_status, nargout);
8984 
8985  if (nargout > 0)
8986  retval = tmp;
8987  }
8988  else if (nargout > 0)
8989  retval = tmp;
8990  }
8991  else
8992  print_usage ();
8993 
8994  return retval;
8995 }
8996 
8997 /*
8998 
8999 %!shared x
9000 %! x = 1;
9001 
9002 %!assert (eval ("x"), 1)
9003 %!assert (eval ("x;"))
9004 %!assert (eval ("x;"), 1);
9005 
9006 %!test
9007 %! y = eval ("x");
9008 %! assert (y, 1);
9009 
9010 %!test
9011 %! y = eval ("x;");
9012 %! assert (y, 1);
9013 
9014 %!test
9015 %! eval ("x = 1;")
9016 %! assert (x,1);
9017 
9018 %!test
9019 %! eval ("flipud = 2;");
9020 %! assert (flipud, 2);
9021 
9022 %!function y = __f ()
9023 %! eval ("flipud = 2;");
9024 %! y = flipud;
9025 %!endfunction
9026 %!assert (__f(), 2)
9027 
9028 % bug #35645
9029 %!test
9030 %! [a,] = gcd (1,2);
9031 %! [a,b,] = gcd (1, 2);
9032 
9033 */
9034 
9035 DEFUN (assignin, args, ,
9036  "-*- texinfo -*-\n\
9037 @deftypefn {Built-in Function} {} assignin (@var{context}, @var{varname}, @var{value})\n\
9038 Assign @var{value} to @var{varname} in context @var{context}, which\n\
9039 may be either @qcode{\"base\"} or @qcode{\"caller\"}.\n\
9040 @seealso{evalin}\n\
9041 @end deftypefn")
9042 {
9043  octave_value_list retval;
9044 
9045  int nargin = args.length ();
9046 
9047  if (nargin == 3)
9048  {
9049  std::string context = args(0).string_value ();
9050 
9051  if (! error_state)
9052  {
9053  unwind_protect frame;
9054 
9055  if (context == "caller")
9057  else if (context == "base")
9059  else
9060  error ("assignin: CONTEXT must be \"caller\" or \"base\"");
9061 
9062  if (! error_state)
9063  {
9065 
9066  std::string nm = args(1).string_value ();
9067 
9068  if (! error_state)
9069  {
9070  if (valid_identifier (nm))
9071  symbol_table::assign (nm, args(2));
9072  else
9073  error ("assignin: invalid variable name in argument VARNAME");
9074  }
9075  else
9076  error ("assignin: VARNAME must be a string");
9077  }
9078  }
9079  else
9080  error ("assignin: CONTEXT must be a string");
9081  }
9082  else
9083  print_usage ();
9084 
9085  return retval;
9086 }
9087 
9088 DEFUN (evalin, args, nargout,
9089  "-*- texinfo -*-\n\
9090 @deftypefn {Built-in Function} {} evalin (@var{context}, @var{try})\n\
9091 @deftypefnx {Built-in Function} {} evalin (@var{context}, @var{try}, @var{catch})\n\
9092 Like @code{eval}, except that the expressions are evaluated in the context\n\
9093 @var{context}, which may be either @qcode{\"caller\"} or @qcode{\"base\"}.\n\
9094 @seealso{eval, assignin}\n\
9095 @end deftypefn")
9096 {
9097  octave_value_list retval;
9098 
9099  int nargin = args.length ();
9100 
9101  if (nargin > 1)
9102  {
9103  std::string context = args(0).string_value ();
9104 
9105  if (! error_state)
9106  {
9107  unwind_protect frame;
9108 
9109  if (context == "caller")
9111  else if (context == "base")
9113  else
9114  error ("evalin: CONTEXT must be \"caller\" or \"base\"");
9115 
9116  if (! error_state)
9117  {
9119 
9120  if (nargin > 2)
9121  {
9124  }
9125 
9126  int parse_status = 0;
9127 
9128  octave_value_list tmp = eval_string (args(1), nargout > 0,
9129  parse_status, nargout);
9130 
9131  if (nargout > 0)
9132  retval = tmp;
9133 
9134  if (nargin > 2 && (parse_status != 0 || error_state))
9135  {
9136  error_state = 0;
9137 
9138  // Set up for letting the user print any messages from
9139  // errors that occurred in the first part of this eval().
9140 
9142 
9143  tmp = eval_string (args(2), nargout > 0,
9144  parse_status, nargout);
9145 
9146  retval = (nargout > 0) ? tmp : octave_value_list ();
9147  }
9148  }
9149  }
9150  else
9151  error ("evalin: CONTEXT must be a string");
9152  }
9153  else
9154  print_usage ();
9155 
9156  return retval;
9157 }
9158 
9159 DEFUN (__parser_debug_flag__, args, nargout,
9160  "-*- texinfo -*-\n\
9161 @deftypefn {Built-in Function} {@var{val} =} __parser_debug_flag__ ()\n\
9162 @deftypefnx {Built-in Function} {@var{old_val} =} __parser_debug_flag__ (@var{new_val})\n\
9163 Query or set the internal flag that determines whether Octave's parser prints\n\
9164 debug information as it processes an expression.\n\
9165 @seealso{__lexer_debug_flag__}\n\
9166 @end deftypefn")
9167 {
9168  octave_value retval;
9169 
9170  bool debug_flag = octave_debug;
9171 
9172  retval = set_internal_variable (debug_flag, args, nargout,
9173  "__parser_debug_flag__");
9174 
9175  octave_debug = debug_flag;
9176 
9177  return retval;
9178 }
9179 
9180 DEFUN (__parse_file__, args, ,
9181  "-*- texinfo -*-\n\
9182 @deftypefn {Built-in Function} {} __parse_file__ (@var{file}, @var{verbose})\n\
9183 Undocumented internal function.\n\
9184 @end deftypefn")
9185 {
9186  octave_value retval;
9187 
9188  int nargin = args.length ();
9189 
9190  if (nargin == 1 || nargin == 2)
9191  {
9192  std::string file = args(0).string_value ();
9193 
9194  std::string full_file = octave_env::make_absolute (file);
9195 
9196  size_t file_len = file.length ();
9197 
9198  if ((file_len > 4 && file.substr (file_len-4) == ".oct")
9199  || (file_len > 4 && file.substr (file_len-4) == ".mex")
9200  || (file_len > 2 && file.substr (file_len-2) == ".m"))
9201  {
9202  file = octave_env::base_pathname (file);
9203  file = file.substr (0, file.find_last_of ('.'));
9204 
9205  size_t pos = file.find_last_of (file_ops::dir_sep_str ());
9206  if (pos != std::string::npos)
9207  file = file.substr (pos+1);
9208  }
9209 
9210  if (! error_state)
9211  {
9212  if (nargin == 2)
9213  octave_stdout << "parsing " << full_file << std::endl;
9214 
9215  octave_function *fcn = parse_fcn_file (full_file, file, "", "",
9216  true, false, false,
9217  false, "__parse_file__");
9218 
9219  if (fcn)
9220  delete fcn;
9221  }
9222  else
9223  error ("__parse_file__: expecting file name as argument");
9224  }
9225  else
9226  print_usage ();
9227 
9228  return retval;
9229 }
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, octave_comment_list *lc)
Definition: oct-parse.cc:6727
static FILE * get_input_stream(void)
Definition: cmd-edit.cc:1098
#define MUL_EQ
Definition: oct-parse.cc:304
void stash_trailing_comment(octave_comment_list *tc)
Definition: ov-usr-fcn.h:230
std::list< std::string > subfunction_names
Definition: parse.h:450
#define NAME
Definition: oct-parse.cc:344
#define YYINITDEPTH
Definition: oct-parse.cc:1615
#define BREAK
Definition: oct-parse.cc:359
void accept(tree_walker &tw)
#define FCN_HANDLE
Definition: oct-parse.cc:368
tree_argument_list * validate_matrix_for_assignment(tree_expression *e)
Definition: oct-parse.cc:7708
#define ENUMERATION
Definition: oct-parse.cc:373
void warning_with_id(const char *id, const char *fmt,...)
Definition: error.cc:696
tree_statement_list * set_stmt_print_flag(tree_statement_list *, char, bool)
Definition: oct-parse.cc:7843
static const yytype_int16 yytable[]
Definition: oct-parse.cc:1015
static bool ignoring_entries(void)
Definition: cmd-hist.cc:606
#define TRY
Definition: oct-parse.cc:364
int beginning_line(void) const
Definition: ov-usr-fcn.h:210
string_vector reverse_lookup_autoload(const std::string &nm)
Definition: oct-parse.cc:8185
tree_decl_init_list * tree_decl_init_list_type
Definition: oct-parse.h:263
#define EXPR_EQ
Definition: oct-parse.cc:325
tree_expression * remove_front(void)
Definition: pt-arg-list.h:64
#define YYSIZE_T
Definition: oct-parse.cc:510
int input_line_number
Definition: lex.h:377
bool has_magic_tilde(void) const
Definition: pt-arg-list.h:61
tree_classdef_enum_block * tree_classdef_enum_block_type
Definition: oct-parse.h:285
static const octave_value instance
Definition: ov-null-mat.h:68
tree_decl_command * make_decl_command(int tok, token *tok_val, tree_decl_init_list *lst)
Definition: oct-parse.cc:7647
std::string curr_package_name
Definition: parse.h:437
static void install_subfunction(const std::string &name, const octave_value &fcn, scope_id scope)
Definition: symtab.h:1575
#define yyssa
Definition: oct-parse.cc:3044
#define YYFINAL
Definition: oct-parse.cc:689
size_t length(void) const
Definition: base-list.h:45
octave_user_function * start_classdef_external_method(tree_identifier *id, tree_parameter_list *pl)
Definition: oct-parse.cc:7480
Definition: Cell.h:35
void mark_as_variables(const std::list< std::string > &lst)
Definition: lex.cc:4768
tree_expression * tree_expression_type
Definition: oct-parse.h:244
tree_expression * make_boolean_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:6482
#define EXPR_NE
Definition: oct-parse.cc:326
void maybe_warn_assign_as_truth_value(tree_expression *expr)
Definition: oct-parse.cc:6174
#define UNTIL
Definition: oct-parse.cc:352
assign_op
Definition: ov.h:131
std::string text_rep(void)
Definition: token.cc:192
tree_switch_case_list * tree_switch_case_list_type
Definition: oct-parse.h:261
octave_function * 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:8198
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, octave_comment_list *lc)
Definition: oct-parse.cc:7314
int paren_count(void) const
Definition: pt-exp.h:88
#define SWITCH
Definition: oct-parse.cc:356
void document(const std::string &ds)
Definition: ov-fcn.h:171
virtual octave_value_list do_multi_index_op(int nargout, const octave_value_list &idx)
Definition: ov-base.cc:203
void prep_for_file(void)
Definition: lex.cc:4890
tree_classdef_superclass * tree_classdef_superclass_type
Definition: oct-parse.h:272
tree_if_command_list * tree_if_command_list_type
Definition: oct-parse.h:258
void maybe_warn_missing_semi(tree_statement_list *)
Definition: oct-parse.cc:7828
octave_value_list slice(octave_idx_type offset, octave_idx_type len, bool tags=false) const
Definition: oct-obj.h:107
tree_command * tree_command_type
Definition: oct-parse.h:255
void mark_as_simple_assign_lhs(void)
Definition: pt-arg-list.h:74
virtual void stash_subfunction_names(const std::list< std::string > &)
Definition: ov-fcn.h:150
void assign(const std::string &k, const Cell &val)
Definition: oct-map.h:348
tree_classdef_methods_list * tree_classdef_methods_list_type
Definition: oct-parse.h:278
virtual bool is_constant(void) const
Definition: pt-exp.h:53
int current_input_column
Definition: lex.h:380
#define LEXICAL_ERROR
Definition: oct-parse.cc:381
symbol_table::scope_id curr_scope(void) const
Definition: lex.h:75
tree_command * make_unwind_command(token *unwind_tok, tree_statement_list *body, tree_statement_list *cleanup, token *end_tok, octave_comment_list *lc, octave_comment_list *mc)
Definition: oct-parse.cc:6589
static const yytype_int16 yypact[]
Definition: oct-parse.cc:863
bool validate(in_or_out type)
Definition: pt-misc.cc:62
octave_value rvalue1(int nargout=1)
Definition: pt-colon.cc:84
bool looking_at_parameter_list
Definition: lex.h:322
#define EPOW
Definition: oct-parse.cc:340
int column(void) const
Definition: token.h:87
#define END
Definition: oct-parse.cc:345
void source_file(const std::string &file_name, const std::string &context, bool verbose, bool require_file, const std::string &warn_for)
Definition: oct-parse.cc:8405
unsigned short int yytype_uint16
Definition: oct-parse.cc:494
tree_statement * make_statement(T *arg)
Definition: oct-parse.cc:7882
std::string curr_class_name
Definition: parse.h:433
void preserve_base(void)
Definition: pt-colon.h:73
void octave_pstate_delete(octave_pstate *ps)
Definition: oct-parse.cc:3030
#define OR_EQ
Definition: oct-parse.cc:313
short int yytype_int16
#define YY_INITIAL_VALUE(Value)
Definition: oct-parse.cc:573
tree_classdef_property * tree_classdef_property_type
Definition: oct-parse.h:275
OCTINTERP_API void print_usage(void)
Definition: defun.cc:51
tree_classdef_events_block * make_classdef_events_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_events_list *elist, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:7420
tree_decl_command * tree_decl_command_type
Definition: oct-parse.h:264
#define YYTERROR
Definition: oct-parse.cc:1477
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition: oct-parse.cc:655
#define YYSTACK_ALLOC_MAXIMUM
Definition: oct-parse.cc:602
static int continuing
Definition: pt-jump.h:76
tree_funcall * make_meta_class_query(const std::string &class_nm)
Definition: oct-parse.cc:7295
tree_colon_expression * tree_colon_expression_type
Definition: oct-parse.h:252
octave_idx_type length(void) const
Definition: oct-obj.h:89
#define SQ_STRING
Definition: oct-parse.cc:347
#define EXPR_LE
Definition: oct-parse.cc:324
void accept(tree_walker &tw)
Definition: pt-stmt.cc:289
#define ADD_EQ
Definition: oct-parse.cc:302
tree_switch_command * finish_switch_command(token *switch_tok, tree_expression *expr, tree_switch_case_list *list, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:6880
OCTAVE_TEX_STYPE yyvs_alloc
octave_user_function * start_function(tree_parameter_list *param_list, tree_statement_list *body, tree_statement *end_function)
Definition: oct-parse.cc:7057
octave_comment_list * get_comment(void)
Definition: lex.h:593
bool is_defined(void) const
Definition: ov.h:520
#define yyvsa
Definition: oct-parse.cc:3047
static const yytype_uint8 yyr2[]
Definition: oct-parse.cc:1413
bool end_of_input
Definition: lex.h:309
tree * tree_type
Definition: oct-parse.h:241
tree_argument_list * tree_argument_list_type
Definition: oct-parse.h:253
#define EMINUS
Definition: oct-parse.cc:334
std::string doc_string(void) const
Definition: ov-fcn.h:173
static std::string find_file(const std::string &file)
Definition: load-path.h:197
static const yytype_uint16 yydefact[]
Definition: oct-parse.cc:923
void mark_relative(void)
Definition: ov-fcn.h:157
binary_op
Definition: ov.h:87
std::string text(void) const
Definition: token.cc:137
#define yynerrs
Definition: oct-parse.cc:73
#define INPUT_FILE
Definition: oct-parse.cc:382
void protect_var(T &var)
tree_expression * set_print_flag(bool print)
Definition: pt-exp.h:123
#define DEFUN(name, args_name, nargout_name, doc)
Definition: defun.h:44
void error(const char *fmt,...)
Definition: error.cc:476
symbol_table::scope_id scope(void)
Definition: ov-usr-fcn.h:248
string_vector autoloaded_functions(void)
Definition: oct-parse.cc:8172
std::string name(void) const
Definition: ov-fcn.h:161
tree_fcn_handle * make_fcn_handle(token *tok_val)
Definition: oct-parse.cc:6337
void stash_fcn_end_location(int line, int col)
Definition: ov-usr-fcn.h:213
std::stack< bool > parsed_function_name
Definition: lex.h:436
tree_expression * make_prefix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:6511
#define DO
Definition: oct-parse.cc:351
octave_value_list feval(const std::string &name, const octave_value_list &args, int nargout)
Definition: oct-parse.cc:8625
#define DQ_STRING
Definition: oct-parse.cc:346
static octave_value find_built_in_function(const std::string &name)
Definition: symtab.h:1521
static string_vector names(const map_type &lst)
Definition: help.cc:782
elt_type & back(void)
Definition: base-list.h:93
bool reading_script_file
Definition: lex.h:371
static scope_id alloc_scope(void)
Definition: symtab.h:1167
bool is_newer(const octave_time &time) const
Definition: file-stat.h:139
#define UNWIND
Definition: oct-parse.cc:362
int line(void) const
Definition: token.h:86
tree_statement_list * append_statement_list(tree_statement_list *list, char sep, tree_statement *stmt, bool warn_missing_semi)
Definition: oct-parse.cc:7896
double number(void) const
Definition: token.cc:151
int run(const std::string &input, bool eof)
Definition: oct-parse.cc:7975
tree_classdef_enum_block * make_classdef_enum_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_enum_list *elist, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:7450
tree_index_expression * tree_index_expression_type
Definition: oct-parse.h:251
#define EMUL
Definition: oct-parse.cc:330
tree_classdef_superclass_list * tree_classdef_superclass_list_type
Definition: oct-parse.h:273
#define PARFOR
Definition: oct-parse.cc:349
tree_classdef * classdef_object
Definition: parse.h:453
tree_statement_list * make_statement_list(tree_statement *stmt)
Definition: oct-parse.cc:7890
octave_value_list eval_string(const std::string &eval_str, bool silent, int &parse_status, int nargout)
Definition: oct-parse.cc:8810
static void clear_dld_function(const std::string &name)
Definition: symtab.h:1780
static octave_value_list get_feval_args(const octave_value_list &args)
Definition: oct-parse.cc:8655
tree_classdef_methods_block * tree_classdef_methods_block_type
Definition: oct-parse.h:279
yytype_int16 * yyssp
Definition: oct-parse.cc:2970
std::string get_help_from_file(const std::string &nm, bool &symbol_found, std::string &full_file)
Definition: oct-parse.cc:8107
octave_user_function * frob_function(const std::string &fname, octave_user_function *fcn)
Definition: oct-parse.cc:7093
#define YY_REDUCE_PRINT(Rule)
Definition: oct-parse.cc:1609
void bind_ans(const octave_value &val, bool print)
Definition: variables.cc:1980
tree_matrix * tree_matrix_type
Definition: oct-parse.h:242
elt_type & front(void)
Definition: base-list.h:92
static void stash_dir_name_for_subfunctions(scope_id scope, const std::string &dir_name)
Definition: symtab.cc:1395
octave_value set_internal_variable(bool &var, const octave_value_list &args, int nargout, const char *nm)
Definition: variables.cc:769
void stash_leading_comment(octave_comment_list *lc)
Definition: ov-usr-fcn.h:228
void end_error(const char *type, token::end_tok_type ettype, int l, int c)
Definition: oct-parse.cc:6019
void stash_dir_name(const std::string &dir)
Definition: ov-fcn.h:125
std::string fcn_file_in_path(const std::string &name)
Definition: utils.cc:504
static void goto_caller_frame(void)
Definition: toplev.h:283
#define END_OF_INPUT
Definition: oct-parse.cc:380
static octave_value find_function(const std::string &name, const octave_value_list &args=octave_value_list(), bool local_funcs=true)
Definition: symtab.cc:1271
size_t yystacksize
Definition: oct-parse.cc:2977
#define FCN
Definition: oct-parse.cc:379
tree_expression * make_postfix_op(int op, tree_expression *op1, token *tok_val)
Definition: oct-parse.cc:6552
tree_expression * make_binary_op(int op, tree_expression *op1, token *tok_val, tree_expression *op2)
Definition: oct-parse.cc:6381
short int yytype_int16
Definition: oct-parse.cc:500
void * parser_state
Definition: parse.h:524
bool is_function_handle(void) const
Definition: ov.h:686
void stash_fcn_location(int line, int col)
Definition: ov-usr-fcn.h:204
#define YYUSE(E)
Definition: oct-parse.cc:559
int dummy_type
Definition: oct-parse.h:231
#define YYMAXDEPTH
Definition: oct-parse.cc:1626
static void cache_name(scope_id scope, const std::string &name)
Definition: symtab.h:2196
static std::string tilde_expand(const std::string &)
Definition: file-ops.cc:286
virtual symbol_table::scope_id scope(void)
Definition: ov-fcn.h:75
static const yytype_int16 yydefgoto[]
Definition: oct-parse.cc:997
tree_statement_list * tree_statement_list_type
Definition: oct-parse.h:266
#define yyssp
Definition: oct-parse.cc:3046
symbol_table_context symtab_context
Definition: lex.h:442
tree_expression * increment(void)
Definition: pt-colon.h:89
This class gets nodes and searchs inside of 'info files'.
Definition: parser.h:49
static const yytype_uint8 yyr1[]
Definition: oct-parse.cc:1379
bool at_end_of_buffer(void) const
Definition: lex.h:559
void accept(tree_walker &tw)
Definition: pt-colon.cc:201
std::string current_input_line
Definition: lex.h:408
std::list< std::string > variable_names(void) const
Definition: pt-arg-list.cc:306
#define YYABORT
Definition: oct-parse.cc:1453
bool is_postfix_indexed(void) const
Definition: pt-exp.h:90
octave_comment_list * get_comment(void)
Definition: lex.h:518
tree_index_expression * make_indirect_ref(tree_expression *expr, const std::string &)
Definition: oct-parse.cc:7587
tree_expression * finish_matrix(tree_matrix *m)
Definition: oct-parse.cc:7810
#define SUB_EQ
Definition: oct-parse.cc:303
octave_base_lexer * LEXER
Definition: oct-parse.cc:137
void cleanup_statement_list(tree_statement_list **lst)
Definition: oct-parse.cc:8907
void bison_error(const char *s)
Definition: oct-parse.cc:7908
#define yypush_parse
Definition: oct-parse.cc:65
virtual void reset(void)
Definition: lex.cc:4863
octave_value_list do_multi_index_op(int nargout, const octave_value_list &idx)
Definition: ov.cc:1382
static int breaking
Definition: pt-jump.h:48
void make_script(tree_statement_list *cmds, tree_statement *end_script)
Definition: oct-parse.cc:7032
int octave_lex(OCTAVE_STYPE *, void *)
The main scanner function which does all the work.
Definition: lex.cc:1318
#define yylex
Definition: oct-parse.cc:70
tree_if_command * tree_if_command_type
Definition: oct-parse.h:256
static const yytype_int16 yycheck[]
Definition: oct-parse.cc:1167
static const octave_value instance
Definition: ov-null-mat.h:90
void * malloc(size_t)
tree_expression * make_assign_op(int op, tree_argument_list *lhs, token *eq_tok, tree_expression *rhs)
Definition: oct-parse.cc:6936
unsigned short int yytype_uint16
tree_cell * tree_cell_type
Definition: oct-parse.h:243
iterator end(void)
Definition: base-list.h:81
int buffer_error_messages
Definition: error.cc:115
bool print_result(void) const
Definition: pt-exp.h:97
static octave_user_code * caller_user_code(size_t nskip=0)
Definition: toplev.h:221
#define yytable_value_is_error(Yytable_value)
Definition: oct-parse.cc:858
#define yypstate_new
Definition: oct-parse.cc:67
tree_classdef_properties_block * tree_classdef_properties_block_type
Definition: oct-parse.h:277
void append(const elt_type &s)
Definition: base-list.h:105
F77_RET_T const double const double * f
#define scanner
Definition: oct-parse.cc:171
void add_fcn(void(*fcn)(void))
void recover_from_parsing_function(void)
Definition: oct-parse.cc:7262
#define YYDPRINTF(Args)
Definition: oct-parse.cc:1606
tree_switch_case * make_switch_case(token *case_tok, tree_expression *expr, tree_statement_list *list, octave_comment_list *lc)
Definition: oct-parse.cc:6920
static const octave_value instance
Definition: ov-null-mat.h:47
#define lexer
Definition: oct-parse.cc:170
bool valid_identifier(const char *s)
Definition: utils.cc:77
tree_funcall * make_superclass_ref(const std::string &method_nm, const std::string &class_nm)
Definition: oct-parse.cc:7280
#define EXPR_OR
Definition: oct-parse.cc:321
bool all_elements_are_constant(void) const
yytype_int16 yyss_alloc
#define LSHIFT_EQ
Definition: oct-parse.cc:314
static void set_input_stream(FILE *f)
Definition: cmd-edit.cc:1091
#define EDIV
Definition: oct-parse.cc:331
static llvm::LLVMContext & context
Definition: jit-typeinfo.cc:76
static octave_function * load_oct(const std::string &fcn_name, const std::string &file_name=std::string(), bool relative=false)
Definition: dynamic-ld.cc:418
#define PERSISTENT
Definition: oct-parse.cc:367
std::string string_value(bool force=false) const
Definition: ov.h:897
OCTAVE_STYPE * yyvs
Definition: oct-parse.cc:2974
#define EXPR_AND
Definition: oct-parse.cc:320
void stash_function_name(const std::string &s)
Definition: ov-usr-fcn.h:293
void mark_as_system_fcn_file(void)
Definition: ov-usr-fcn.cc:338
void error_with_id(const char *id, const char *fmt,...)
Definition: error.cc:506
int run(void)
Definition: oct-parse.cc:7955
bool empty(void) const
Definition: base-list.h:42
#define yypstate
Definition: oct-parse.cc:69
bool exists(void) const
Definition: file-stat.h:134
#define YYEMPTY
Definition: oct-parse.cc:1449
#define LEFTDIV
Definition: oct-parse.cc:329
static std::string make_absolute(const std::string &s, const std::string &dot_path=get_current_directory())
Definition: oct-env.cc:132
tree_statement * make_end(const std::string &type, bool eof, int l, int c)
Definition: oct-parse.cc:7085
#define yyvs
Definition: oct-parse.cc:3048
tree_funcall * tree_funcall_type
Definition: oct-parse.h:247
bool is_string(void) const
Definition: ov.h:562
unsigned char yytype_uint8
#define METHODS
Definition: oct-parse.cc:371
virtual bool is_index_expression(void) const
Definition: pt-exp.h:61
int octave_pull_parse(octave_pstate *ps, octave_base_parser &parser)
Definition: oct-parse.cc:2990
tree_classdef_property_list * tree_classdef_property_list_type
Definition: oct-parse.h:276
tree_command * make_break_command(token *break_tok)
Definition: oct-parse.cc:6782
int error_state
Definition: error.cc:101
end_tok_type
Definition: token.h:46
tree_if_command_list * start_if_command(tree_expression *expr, tree_statement_list *list)
Definition: oct-parse.cc:6815
#define IF
Definition: oct-parse.cc:353
bool is_inline_function(void) const
Definition: ov.h:692
#define yypull_parse
Definition: oct-parse.cc:66
string_vector & append(const std::string &s)
Definition: str-vec.cc:140
void stash_parent_fcn_scope(symbol_table::scope_id ps)
Definition: ov-usr-fcn.h:226
#define YYSTYPE
Definition: oct-parse.cc:62
tree_anon_fcn_handle * tree_anon_fcn_handle_type
Definition: oct-parse.h:249
void mark_as_class_method(void)
Definition: ov-usr-fcn.h:345
#define IMAG_NUM
Definition: oct-parse.cc:342
void stash_original_text(const std::string &s)
Definition: pt-const.h:83
tree_expression * limit(void)
Definition: pt-colon.h:87
tree_classdef_attribute_list * tree_classdef_attribute_list_type
Definition: oct-parse.h:271
char punct_type
Definition: oct-parse.h:240
void mark_as_formal_parameters(void)
Definition: pt-misc.cc:52
#define AND_EQ
Definition: oct-parse.cc:312
#define CLEANUP
Definition: oct-parse.cc:363
#define YYSTACK_FREE
Definition: oct-parse.cc:600
#define panic_impossible()
Definition: error.h:33
octave_function * primary_fcn_ptr
Definition: parse.h:445
OCTAVE_STYPE yyvs_alloc
Definition: oct-parse.cc:636
tree_switch_command * tree_switch_command_type
Definition: oct-parse.h:259
tree_constant * tree_constant_type
Definition: oct-parse.h:245
bool parsing_subfunctions
Definition: parse.h:414
#define TRANSPOSE
Definition: oct-parse.cc:336
#define YYNTOKENS
Definition: oct-parse.cc:694
bool parsing_class_method
Definition: lex.h:344
tree_classdef_body * tree_classdef_body_type
Definition: oct-parse.h:274
std::string fcn_file_name
Definition: lex.h:424
#define YY_NULLPTR
Definition: oct-parse.cc:180
#define yystacksize
Definition: oct-parse.cc:3050
#define ELEFTDIV
Definition: oct-parse.cc:332
static octave_function * load_mex(const std::string &fcn_name, const std::string &file_name=std::string(), bool relative=false)
Definition: dynamic-ld.cc:427
int octave_push_parse(octave_pstate *ps, int pushed_char, OCTAVE_STYPE const *pushed_val, octave_base_parser &parser)
Definition: oct-parse.cc:3058
static void assign(const std::string &name, const octave_value &value=octave_value(), scope_id scope=xcurrent_scope, context_id context=xdefault_context, bool force_add=false)
Definition: symtab.h:1335
#define POW_EQ
Definition: oct-parse.cc:307
#define NUM
Definition: oct-parse.cc:341
virtual bool is_user_script(void) const
Definition: ov-base.h:439
#define LSHIFT
Definition: oct-parse.cc:316
octave_idx_type length(void) const
Definition: ov.cc:1525
#define YYPOPSTACK(N)
#define ELSEIF
Definition: oct-parse.cc:354
static bool absolute_pathname(const std::string &s)
Definition: oct-env.cc:111
#define YYACCEPT
Definition: oct-parse.cc:1452
virtual bool is_user_function(void) const
Definition: ov-base.h:441
#define DIV_EQ
Definition: oct-parse.cc:305
tree_classdef_enum * tree_classdef_enum_type
Definition: oct-parse.h:283
tree_constant * make_constant(int op, token *tok_val)
Definition: oct-parse.cc:6274
static void goto_base_frame(void)
Definition: toplev.h:289
#define STRUCT_ELT
Definition: oct-parse.cc:343
bool is_valid_lvalue_list(void) const
Definition: pt-arg-list.cc:103
tree_parameter_list * tree_parameter_list_type
Definition: oct-parse.h:254
int looping
Definition: lex.h:389
void maybe_missing_function_hook(const std::string &name)
Definition: variables.cc:2683
unsigned char yytype_uint8
Definition: oct-parse.cc:482
#define EXPR_GE
Definition: oct-parse.cc:327
#define CLASSDEF
Definition: oct-parse.cc:369
std::string fcn_file_name(void) const
Definition: ov-usr-fcn.h:240
tree_function_def * tree_function_def_type
Definition: oct-parse.h:248
octave_tokentype
Definition: oct-parse.h:54
tree_evaluator * current_evaluator
Definition: pt-eval.cc:52
#define yyss
Definition: oct-parse.cc:3045
virtual void maybe_relocate_end(void)
Definition: ov-fcn.h:145
octave_pstate * octave_pstate_new(void)
Definition: oct-parse.cc:3019
virtual int line(void) const
Definition: pt.h:45
void parse_error(const char *fmt,...)
Definition: error.cc:711
iterator begin(void)
Definition: base-list.h:78
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition: oct-parse.cc:1607
tree_expression * finish_array_list(tree_array_list *a)
Definition: oct-parse.cc:7765
#define POW
Definition: oct-parse.cc:339
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition: oct-parse.cc:576
static const yytype_uint8 yytranslate[]
Definition: oct-parse.cc:712
end_tok_type ettype(void) const
Definition: token.cc:164
#define EPOW_EQ
Definition: oct-parse.cc:311
double arg(double x)
Definition: lo-mappers.h:37
#define EMUL_EQ
Definition: oct-parse.cc:308
#define yypstate_delete
Definition: oct-parse.cc:68
#define CASE
Definition: oct-parse.cc:357
tree_classdef_events_list * tree_classdef_events_list_type
Definition: oct-parse.h:281
octave_function * function_value(bool silent=false) const
Definition: ov.cc:1597
tree_classdef_events_block * tree_classdef_events_block_type
Definition: oct-parse.h:282
#define YY_(Msgid)
Definition: oct-parse.cc:526
#define FUNC_RET
Definition: oct-parse.cc:361
#define MINUS_MINUS
Definition: oct-parse.cc:338
octave_base_lexer & lexer
Definition: parse.h:459
int line(void) const
Definition: pt-stmt.cc:98
#define EXPR_LT
Definition: oct-parse.cc:323
#define EXPR_NOT
Definition: oct-parse.cc:322
tree_classdef_attribute * tree_classdef_attribute_type
Definition: oct-parse.h:270
#define yyparse
Definition: oct-parse.cc:64
void warning(const char *fmt,...)
Definition: error.cc:681
void reset(void)
Definition: oct-parse.cc:5995
static std::string dir_sep_chars(void)
Definition: file-ops.h:68
static std::string base_pathname(const std::string &s)
Definition: oct-env.cc:125
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:205
virtual octave_value rvalue1(int nargout=1)
Definition: pt-exp.cc:58
virtual std::string fcn_file_name(void) const
Definition: ov-fcn.h:62
#define PLUS_PLUS
Definition: oct-parse.cc:337
void mark_as_anon_function_body(void)
Definition: pt-stmt.h:152
tree_index_expression * make_index_expression(tree_expression *expr, tree_argument_list *args, char type)
Definition: oct-parse.cc:7548
bool is_empty(void) const
Definition: ov.h:526
#define CONTINUE
Definition: oct-parse.cc:360
bool empty(void) const
Definition: oct-obj.h:91
void set_expression(tree_expression *e)
Definition: pt-stmt.h:99
symbol_table::scope_id primary_fcn_scope
Definition: parse.h:429
#define octave_stdout
Definition: pager.h:144
bool input_from_tmp_history_file
Definition: oct-hist.cc:73
static int returning
Definition: pt-jump.h:104
std::string undo_string_escapes(const std::string &s)
Definition: utils.cc:802
#define CATCH
Definition: oct-parse.cc:365
std::string fcn_file_full_name
Definition: lex.h:427
#define PROPERTIES
Definition: oct-parse.cc:370
#define EPLUS
Definition: oct-parse.cc:333
virtual bool is_matrix(void) const
Definition: pt-exp.h:55
bool autoloading
Definition: parse.h:406
#define OTHERWISE
Definition: oct-parse.cc:358
octave_comment_list * comment_type
Definition: oct-parse.h:237
octave_function * make_meta_class(bool is_at_folder=false)
Definition: pt-classdef.cc:236
#define yystate
Definition: oct-parse.cc:3042
tree_switch_case * tree_switch_case_type
Definition: oct-parse.h:260
tree_statement * tree_statement_type
Definition: oct-parse.h:265
int Vmax_recursion_depth
Definition: pt-eval.cc:69
std::vector< symbol_table::scope_id > function_scopes
Definition: parse.h:442
#define yydebug
Definition: oct-parse.cc:72
void pop_back(void)
Definition: base-list.h:102
static void yydestruct(const char *yymsg, int yytype, OCTAVE_STYPE *yyvaluep, octave_base_parser &parser)
Definition: oct-parse.cc:1857
#define EVENTS
Definition: oct-parse.cc:372
void mark_as_for_cmd_expr(void)
Definition: pt-exp.h:107
tree_expression * expression(void)
Definition: pt-stmt.h:83
bool force_script
Definition: lex.h:365
#define METAQUERY
Definition: oct-parse.cc:374
Definition: pt.h:35
tree_expression * finish_colon_expression(tree_colon_expression *e)
Definition: oct-parse.cc:6212
std::string help_text
Definition: lex.h:414
bool endfunction_found
Definition: parse.h:403
#define yylval
tree_classdef_event * tree_classdef_event_type
Definition: oct-parse.h:280
#define ELEFTDIV_EQ
Definition: oct-parse.cc:310
tree_command * make_continue_command(token *continue_tok)
Definition: oct-parse.cc:6793
yytype_int16 * yyss
Definition: oct-parse.cc:2969
bool is_anonymous_function(void) const
Definition: ov.h:689
void stash_dispatch_class(const std::string &nm)
Definition: ov-fcn.h:99
#define UNARY
Definition: oct-parse.cc:383
tree_fcn_handle * tree_fcn_handle_type
Definition: oct-parse.h:246
#define yyerrstatus
Definition: oct-parse.cc:3043
virtual octave_value_list rvalue(int nargout)
Definition: pt-exp.cc:65
tree_statement_list * stmt_list
Definition: parse.h:456
#define YYTRANSLATE(YYX)
Definition: oct-parse.cc:707
tree_identifier * tree_identifier_type
Definition: oct-parse.h:250
tree_if_command * finish_if_command(token *if_tok, tree_if_command_list *list, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:6828
static std::map< std::string, std::string > autoload_map
Definition: oct-parse.cc:152
octave_user_function * define_ret_list(tree_parameter_list *t)
Definition: ov-usr-fcn.cc:237
tree_expression * set_postfix_index(char type)
Definition: pt-exp.h:117
void maybe_warn_variable_switch_label(tree_expression *expr)
Definition: oct-parse.cc:6194
bool fcn_file_from_relative_lookup
Definition: parse.h:410
#define RSHIFT_EQ
Definition: oct-parse.cc:315
tree_if_clause * tree_if_clause_type
Definition: oct-parse.h:257
bool end_token_ok(token *tok, token::end_tok_type expected)
Definition: oct-parse.cc:6092
OCTAVE_STYPE * yyvsp
Definition: oct-parse.cc:2975
#define yypact_value_is_default(Yystate)
Definition: oct-parse.cc:853
bool reading_classdef_file
Definition: lex.h:374
#define YYSTACK_BYTES(N)
Definition: oct-parse.cc:644
int curr_fcn_depth
Definition: parse.h:425
token * tok_val
Definition: oct-parse.h:234
virtual bool is_assignment_expression(void) const
Definition: pt-exp.h:63
static octave_value builtin_find(const std::string &name)
Definition: symtab.cc:1263
bool looking_at_return_list
Definition: lex.h:319
#define LEFTDIV_EQ
Definition: oct-parse.cc:306
#define RSHIFT
Definition: oct-parse.cc:317
#define EXPR_GT
Definition: oct-parse.cc:328
void set_print_flag(bool print_flag)
Definition: pt-stmt.cc:61
#define yyvsp
Definition: oct-parse.cc:3049
tree_classdef_methods_block * make_classdef_methods_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_methods_list *mlist, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:7390
static int input(yyscan_t yyscanner)
int defining_func
Definition: lex.h:392
#define HERMITIAN
Definition: oct-parse.cc:335
int column(void) const
Definition: pt-stmt.cc:104
void append(tree_argument_list *lst=0, char t= '(')
Definition: pt-idx.cc:77
int octave_debug
int octave_parse(octave_base_parser &parser)
Definition: oct-parse.cc:2984
bool is_expression(void) const
Definition: pt-stmt.h:66
#define EDIV_EQ
Definition: oct-parse.cc:309
static void pop(void)
Definition: toplev.h:332
tree_if_clause * make_elseif_clause(token *elseif_tok, tree_expression *expr, tree_statement_list *list, octave_comment_list *lc)
Definition: oct-parse.cc:6864
void pop_front(void)
Definition: base-list.h:101
tree_command * make_try_command(token *try_tok, tree_statement_list *body, char catch_sep, tree_statement_list *cleanup, token *end_tok, octave_comment_list *lc, octave_comment_list *mc)
Definition: oct-parse.cc:6620
void stash_fcn_file_name(const std::string &nm)
Definition: ov-usr-fcn.cc:245
tree_expression * base(void)
Definition: pt-colon.h:85
signed char yytype_int8
Definition: oct-parse.cc:488
void mark_as_subfunction(void)
Definition: ov-usr-fcn.h:295
#define FOR
Definition: oct-parse.cc:348
static std::string dir_sep_str(void)
Definition: file-ops.h:63
int beginning_column(void) const
Definition: ov-usr-fcn.h:211
std::complex< double > Complex
Definition: oct-cmplx.h:29
#define YYLAST
Definition: oct-parse.cc:691
std::string lookup_autoload(const std::string &nm)
Definition: oct-parse.cc:8157
#define GLOBAL
Definition: oct-parse.cc:366
static void install_nestfunction(const std::string &name, const octave_value &fcn, scope_id parent_scope)
Definition: symtab.cc:1233
static const yytype_uint8 yystos[]
Definition: oct-parse.cc:1321
#define SET
Definition: oct-parse.cc:378
static void update_nest(scope_id scope)
Definition: symtab.h:1601
int warning_state
Definition: error.cc:110
void stash_fcn_file_time(const octave_time &t)
Definition: ov-usr-fcn.h:234
bool looking_at_indirect_ref
Definition: lex.h:341
#define yyerror
Definition: oct-parse.cc:71
bool discard_warning_messages
Definition: error.cc:121
void stash_parent_fcn_name(const std::string &p)
Definition: ov-usr-fcn.h:224
bool is_null_statement(void) const
Definition: pt-stmt.h:87
bool discard_error_messages
Definition: error.cc:118
#define YY_STACK_PRINT(Bottom, Top)
Definition: oct-parse.cc:1608
#define SUPERCLASSREF
Definition: oct-parse.cc:375
unary_op
Definition: ov.h:74
tree_command * make_while_command(token *while_tok, tree_expression *expr, tree_statement_list *body, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:6674
octave_user_function * octave_user_function_type
Definition: oct-parse.h:267
octave_base_list< tree_argument_list * >::iterator iterator
Definition: pt-array-list.h:39
virtual int column(void) const
Definition: pt.h:47
#define GET
Definition: oct-parse.cc:377
#define EXPR_AND_AND
Definition: oct-parse.cc:318
#define WHILE
Definition: oct-parse.cc:350
tree_command * make_return_command(token *return_tok)
Definition: oct-parse.cc:6804
bool reading_fcn_file
Definition: lex.h:368
#define YYEOF
Definition: oct-parse.cc:1450
bool reading_startup_message_printed
Definition: oct-parse.cc:149
#define FQ_IDENT
Definition: oct-parse.cc:376
tree_decl_elt * tree_decl_elt_type
Definition: oct-parse.h:262
tree_classdef_enum_list * tree_classdef_enum_list_type
Definition: oct-parse.h:284
tree_command * make_do_until_command(token *until_tok, tree_statement_list *body, tree_expression *expr, octave_comment_list *lc)
Definition: oct-parse.cc:6707
virtual bool is_identifier(void) const
Definition: pt-exp.h:59
bool validate_array_list(tree_expression *e)
Definition: oct-parse.cc:7683
#define ELSE
Definition: oct-parse.cc:355
tree_classdef * tree_classdef_type
Definition: oct-parse.h:269
Definition: token.h:30
bool is_simple_assign_lhs(void)
Definition: pt-arg-list.h:76
static const yytype_int16 yypgoto[]
Definition: oct-parse.cc:981
void mark_as_class_constructor(void)
Definition: ov-usr-fcn.h:329
comment_buffer comment_buf
Definition: lex.h:636
static void ignore_entries(bool=true)
Definition: cmd-hist.cc:599
void stash_package_name(const std::string &pack)
Definition: ov-fcn.h:103
static void safe_fclose(FILE *f)
Definition: oct-parse.cc:8006
tree_classdef_properties_block * make_classdef_properties_block(token *tok_val, tree_classdef_attribute_list *a, tree_classdef_property_list *plist, token *end_tok, octave_comment_list *lc)
Definition: oct-parse.cc:7360
return octave_value(v1.char_array_value().concat(v2.char_array_value(), ra_idx),((a1.is_sq_string()||a2.is_sq_string())? '\'': '"'))
#define YYSTACK_ALLOC
Definition: oct-parse.cc:599
void stash_fcn_file_time(const octave_time &t)
Definition: ov-usr-fcn.h:114
tree_anon_fcn_handle * make_anon_fcn_handle(tree_parameter_list *param_list, tree_statement *stmt)
Definition: oct-parse.cc:6350
tree_function_def * finish_classdef_external_method(octave_user_function *fcn, tree_parameter_list *ret_list, octave_comment_list *cl)
Definition: oct-parse.cc:7529
static char dir_sep_char(void)
Definition: file-ops.h:58
void free(void *)
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition: oct-parse.cc:577
tree_function_def * finish_function(tree_parameter_list *ret_list, octave_user_function *fcn, octave_comment_list *lc, int l, int c)
Definition: oct-parse.cc:7193
#define EXPR_OR_OR
Definition: oct-parse.cc:319
size_t size(void) const
Definition: base-list.h:44
tree_expression * finish_cell(tree_cell *c)
Definition: oct-parse.cc:7820
static octave_function * parse_fcn_file(const std::string &full_file, const std::string &file, const std::string &dispatch_type, const std::string &package_name, bool require_file, bool force_script, bool autoload, bool relative_lookup, const std::string &warn_for)
Definition: oct-parse.cc:8013
#define ABORT_PARSE
Definition: oct-parse.cc:159