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