Tizen 2.1 base
[external/mawk.git] / parse.c
1
2 /* A Bison parser, made by GNU Bison 2.4.1.  */
3
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
5    
6       Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7    Free Software Foundation, Inc.
8    
9    This program is free software: you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation, either version 3 of the License, or
12    (at your option) any later version.
13    
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18    
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
21
22 /* As a special exception, you may create a larger work that contains
23    part or all of the Bison parser skeleton and distribute that work
24    under terms of your choice, so long as that work isn't itself a
25    parser generator using the skeleton or a modified version thereof
26    as a parser skeleton.  Alternatively, if you modify or redistribute
27    the parser skeleton itself, you may (at your option) remove this
28    special exception, which will cause the skeleton and the resulting
29    Bison output files to be licensed under the GNU General Public
30    License without this special exception.
31    
32    This special exception was added by the Free Software Foundation in
33    version 2.2 of Bison.  */
34
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36    simplifying the original so-called "semantic" parser.  */
37
38 /* All symbols defined below should begin with yy or YY, to avoid
39    infringing on user name space.  This should be done even for local
40    variables, as they might otherwise be expanded by user macros.
41    There are some unavoidable exceptions within include files to
42    define necessary library symbols; they are noted "INFRINGES ON
43    USER NAME SPACE" below.  */
44
45 /* Identify Bison output.  */
46 #define YYBISON 1
47
48 /* Bison version.  */
49 #define YYBISON_VERSION "2.4.1"
50
51 /* Skeleton name.  */
52 #define YYSKELETON_NAME "yacc.c"
53
54 /* Pure parsers.  */
55 #define YYPURE 0
56
57 /* Push parsers.  */
58 #define YYPUSH 0
59
60 /* Pull parsers.  */
61 #define YYPULL 1
62
63 /* Using locations.  */
64 #define YYLSP_NEEDED 0
65
66
67
68 /* Copy the first part of user declarations.  */
69
70 /* Line 189 of yacc.c  */
71 #line 79 "parse.y"
72
73 #include <stdio.h>
74 #include "mawk.h"
75 #include "symtype.h"
76 #include "code.h"
77 #include "memory.h"
78 #include "bi_funct.h"
79 #include "bi_vars.h"
80 #include "jmp.h"
81 #include "field.h"
82 #include "files.h"
83
84
85 #define  YYMAXDEPTH     200
86
87
88 extern void  PROTO( eat_nl, (void) ) ;
89 static void  PROTO( resize_fblock, (FBLOCK *) ) ;
90 static void  PROTO( switch_code_to_main, (void)) ;
91 static void  PROTO( code_array, (SYMTAB *) ) ;
92 static void  PROTO( code_call_id, (CA_REC *, SYMTAB *) ) ;
93 static void  PROTO( field_A2I, (void)) ;
94 static void  PROTO( check_var, (SYMTAB *) ) ;
95 static void  PROTO( check_array, (SYMTAB *) ) ;
96 static void  PROTO( RE_as_arg, (void)) ;
97
98 static int scope ;
99 static FBLOCK *active_funct ;
100       /* when scope is SCOPE_FUNCT  */
101
102 #define  code_address(x)  if( is_local(x) ) \
103                              code2op(L_PUSHA, (x)->offset) ;\
104                           else  code2(_PUSHA, (x)->stval.cp) 
105
106 #define  CDP(x)  (code_base+(x))
107 /* WARNING: These CDP() calculations become invalid after calls
108    that might change code_base.  Which are:  code2(), code2op(),
109    code_jmp() and code_pop().
110 */
111
112 /* this nonsense caters to MSDOS large model */
113 #define  CODE_FE_PUSHA()  code_ptr->ptr = (PTR) 0 ; code1(FE_PUSHA)
114
115
116
117 /* Line 189 of yacc.c  */
118 #line 119 "y.tab.c"
119
120 /* Enabling traces.  */
121 #ifndef YYDEBUG
122 # define YYDEBUG 0
123 #endif
124
125 /* Enabling verbose error messages.  */
126 #ifdef YYERROR_VERBOSE
127 # undef YYERROR_VERBOSE
128 # define YYERROR_VERBOSE 1
129 #else
130 # define YYERROR_VERBOSE 0
131 #endif
132
133 /* Enabling the token table.  */
134 #ifndef YYTOKEN_TABLE
135 # define YYTOKEN_TABLE 0
136 #endif
137
138
139 /* Tokens.  */
140 #ifndef YYTOKENTYPE
141 # define YYTOKENTYPE
142    /* Put the tokens into the symbol table, so that GDB and other debuggers
143       know about them.  */
144    enum yytokentype {
145      UNEXPECTED = 258,
146      BAD_DECIMAL = 259,
147      NL = 260,
148      SEMI_COLON = 261,
149      LBRACE = 262,
150      RBRACE = 263,
151      LBOX = 264,
152      RBOX = 265,
153      COMMA = 266,
154      IO_OUT = 267,
155      POW_ASG = 268,
156      MOD_ASG = 269,
157      DIV_ASG = 270,
158      MUL_ASG = 271,
159      SUB_ASG = 272,
160      ADD_ASG = 273,
161      ASSIGN = 274,
162      COLON = 275,
163      QMARK = 276,
164      OR = 277,
165      AND = 278,
166      IN = 279,
167      MATCH = 280,
168      GTE = 281,
169      GT = 282,
170      LTE = 283,
171      LT = 284,
172      NEQ = 285,
173      EQ = 286,
174      CAT = 287,
175      GETLINE = 288,
176      MINUS = 289,
177      PLUS = 290,
178      MOD = 291,
179      DIV = 292,
180      MUL = 293,
181      UMINUS = 294,
182      NOT = 295,
183      PIPE = 296,
184      IO_IN = 297,
185      POW = 298,
186      INC_or_DEC = 299,
187      FIELD = 300,
188      DOLLAR = 301,
189      RPAREN = 302,
190      LPAREN = 303,
191      DOUBLE = 304,
192      STRING_ = 305,
193      RE = 306,
194      ID = 307,
195      D_ID = 308,
196      FUNCT_ID = 309,
197      BUILTIN = 310,
198      LENGTH = 311,
199      PRINT = 312,
200      PRINTF = 313,
201      SPLIT = 314,
202      MATCH_FUNC = 315,
203      SUB = 316,
204      GSUB = 317,
205      DO = 318,
206      WHILE = 319,
207      FOR = 320,
208      BREAK = 321,
209      CONTINUE = 322,
210      IF = 323,
211      ELSE = 324,
212      DELETE = 325,
213      BEGIN = 326,
214      END = 327,
215      EXIT = 328,
216      NEXT = 329,
217      RETURN = 330,
218      FUNCTION = 331
219    };
220 #endif
221 /* Tokens.  */
222 #define UNEXPECTED 258
223 #define BAD_DECIMAL 259
224 #define NL 260
225 #define SEMI_COLON 261
226 #define LBRACE 262
227 #define RBRACE 263
228 #define LBOX 264
229 #define RBOX 265
230 #define COMMA 266
231 #define IO_OUT 267
232 #define POW_ASG 268
233 #define MOD_ASG 269
234 #define DIV_ASG 270
235 #define MUL_ASG 271
236 #define SUB_ASG 272
237 #define ADD_ASG 273
238 #define ASSIGN 274
239 #define COLON 275
240 #define QMARK 276
241 #define OR 277
242 #define AND 278
243 #define IN 279
244 #define MATCH 280
245 #define GTE 281
246 #define GT 282
247 #define LTE 283
248 #define LT 284
249 #define NEQ 285
250 #define EQ 286
251 #define CAT 287
252 #define GETLINE 288
253 #define MINUS 289
254 #define PLUS 290
255 #define MOD 291
256 #define DIV 292
257 #define MUL 293
258 #define UMINUS 294
259 #define NOT 295
260 #define PIPE 296
261 #define IO_IN 297
262 #define POW 298
263 #define INC_or_DEC 299
264 #define FIELD 300
265 #define DOLLAR 301
266 #define RPAREN 302
267 #define LPAREN 303
268 #define DOUBLE 304
269 #define STRING_ 305
270 #define RE 306
271 #define ID 307
272 #define D_ID 308
273 #define FUNCT_ID 309
274 #define BUILTIN 310
275 #define LENGTH 311
276 #define PRINT 312
277 #define PRINTF 313
278 #define SPLIT 314
279 #define MATCH_FUNC 315
280 #define SUB 316
281 #define GSUB 317
282 #define DO 318
283 #define WHILE 319
284 #define FOR 320
285 #define BREAK 321
286 #define CONTINUE 322
287 #define IF 323
288 #define ELSE 324
289 #define DELETE 325
290 #define BEGIN 326
291 #define END 327
292 #define EXIT 328
293 #define NEXT 329
294 #define RETURN 330
295 #define FUNCTION 331
296
297
298
299
300 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
301 typedef union YYSTYPE
302 {
303
304 /* Line 214 of yacc.c  */
305 #line 124 "parse.y"
306
307 CELL *cp ;
308 SYMTAB *stp ;
309 int  start ; /* code starting address as offset from code_base */
310 PF_CP  fp ;  /* ptr to a (print/printf) or (sub/gsub) function */
311 BI_REC *bip ; /* ptr to info about a builtin */
312 FBLOCK  *fbp  ; /* ptr to a function block */
313 ARG2_REC *arg2p ;
314 CA_REC   *ca_p  ;
315 int   ival ;
316 PTR   ptr ;
317
318
319
320 /* Line 214 of yacc.c  */
321 #line 322 "y.tab.c"
322 } YYSTYPE;
323 # define YYSTYPE_IS_TRIVIAL 1
324 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
325 # define YYSTYPE_IS_DECLARED 1
326 #endif
327
328
329 /* Copy the second part of user declarations.  */
330
331
332 /* Line 264 of yacc.c  */
333 #line 334 "y.tab.c"
334
335 #ifdef short
336 # undef short
337 #endif
338
339 #ifdef YYTYPE_UINT8
340 typedef YYTYPE_UINT8 yytype_uint8;
341 #else
342 typedef unsigned char yytype_uint8;
343 #endif
344
345 #ifdef YYTYPE_INT8
346 typedef YYTYPE_INT8 yytype_int8;
347 #elif (defined __STDC__ || defined __C99__FUNC__ \
348      || defined __cplusplus || defined _MSC_VER)
349 typedef signed char yytype_int8;
350 #else
351 typedef short int yytype_int8;
352 #endif
353
354 #ifdef YYTYPE_UINT16
355 typedef YYTYPE_UINT16 yytype_uint16;
356 #else
357 typedef unsigned short int yytype_uint16;
358 #endif
359
360 #ifdef YYTYPE_INT16
361 typedef YYTYPE_INT16 yytype_int16;
362 #else
363 typedef short int yytype_int16;
364 #endif
365
366 #ifndef YYSIZE_T
367 # ifdef __SIZE_TYPE__
368 #  define YYSIZE_T __SIZE_TYPE__
369 # elif defined size_t
370 #  define YYSIZE_T size_t
371 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
372      || defined __cplusplus || defined _MSC_VER)
373 #  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
374 #  define YYSIZE_T size_t
375 # else
376 #  define YYSIZE_T unsigned int
377 # endif
378 #endif
379
380 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
381
382 #ifndef YY_
383 # if YYENABLE_NLS
384 #  if ENABLE_NLS
385 #   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
386 #   define YY_(msgid) dgettext ("bison-runtime", msgid)
387 #  endif
388 # endif
389 # ifndef YY_
390 #  define YY_(msgid) msgid
391 # endif
392 #endif
393
394 /* Suppress unused-variable warnings by "using" E.  */
395 #if ! defined lint || defined __GNUC__
396 # define YYUSE(e) ((void) (e))
397 #else
398 # define YYUSE(e) /* empty */
399 #endif
400
401 /* Identity function, used to suppress warnings about constant conditions.  */
402 #ifndef lint
403 # define YYID(n) (n)
404 #else
405 #if (defined __STDC__ || defined __C99__FUNC__ \
406      || defined __cplusplus || defined _MSC_VER)
407 static int
408 YYID (int yyi)
409 #else
410 static int
411 YYID (yyi)
412     int yyi;
413 #endif
414 {
415   return yyi;
416 }
417 #endif
418
419 #if ! defined yyoverflow || YYERROR_VERBOSE
420
421 /* The parser invokes alloca or malloc; define the necessary symbols.  */
422
423 # ifdef YYSTACK_USE_ALLOCA
424 #  if YYSTACK_USE_ALLOCA
425 #   ifdef __GNUC__
426 #    define YYSTACK_ALLOC __builtin_alloca
427 #   elif defined __BUILTIN_VA_ARG_INCR
428 #    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
429 #   elif defined _AIX
430 #    define YYSTACK_ALLOC __alloca
431 #   elif defined _MSC_VER
432 #    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
433 #    define alloca _alloca
434 #   else
435 #    define YYSTACK_ALLOC alloca
436 #    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
437      || defined __cplusplus || defined _MSC_VER)
438 #     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
439 #     ifndef _STDLIB_H
440 #      define _STDLIB_H 1
441 #     endif
442 #    endif
443 #   endif
444 #  endif
445 # endif
446
447 # ifdef YYSTACK_ALLOC
448    /* Pacify GCC's `empty if-body' warning.  */
449 #  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
450 #  ifndef YYSTACK_ALLOC_MAXIMUM
451     /* The OS might guarantee only one guard page at the bottom of the stack,
452        and a page size can be as small as 4096 bytes.  So we cannot safely
453        invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
454        to allow for a few compiler-allocated temporary stack slots.  */
455 #   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
456 #  endif
457 # else
458 #  define YYSTACK_ALLOC YYMALLOC
459 #  define YYSTACK_FREE YYFREE
460 #  ifndef YYSTACK_ALLOC_MAXIMUM
461 #   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
462 #  endif
463 #  if (defined __cplusplus && ! defined _STDLIB_H \
464        && ! ((defined YYMALLOC || defined malloc) \
465              && (defined YYFREE || defined free)))
466 #   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
467 #   ifndef _STDLIB_H
468 #    define _STDLIB_H 1
469 #   endif
470 #  endif
471 #  ifndef YYMALLOC
472 #   define YYMALLOC malloc
473 #   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
474      || defined __cplusplus || defined _MSC_VER)
475 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
476 #   endif
477 #  endif
478 #  ifndef YYFREE
479 #   define YYFREE free
480 #   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
481      || defined __cplusplus || defined _MSC_VER)
482 void free (void *); /* INFRINGES ON USER NAME SPACE */
483 #   endif
484 #  endif
485 # endif
486 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
487
488
489 #if (! defined yyoverflow \
490      && (! defined __cplusplus \
491          || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
492
493 /* A type that is properly aligned for any stack member.  */
494 union yyalloc
495 {
496   yytype_int16 yyss_alloc;
497   YYSTYPE yyvs_alloc;
498 };
499
500 /* The size of the maximum gap between one aligned stack and the next.  */
501 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
502
503 /* The size of an array large to enough to hold all stacks, each with
504    N elements.  */
505 # define YYSTACK_BYTES(N) \
506      ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
507       + YYSTACK_GAP_MAXIMUM)
508
509 /* Copy COUNT objects from FROM to TO.  The source and destination do
510    not overlap.  */
511 # ifndef YYCOPY
512 #  if defined __GNUC__ && 1 < __GNUC__
513 #   define YYCOPY(To, From, Count) \
514       __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
515 #  else
516 #   define YYCOPY(To, From, Count)              \
517       do                                        \
518         {                                       \
519           YYSIZE_T yyi;                         \
520           for (yyi = 0; yyi < (Count); yyi++)   \
521             (To)[yyi] = (From)[yyi];            \
522         }                                       \
523       while (YYID (0))
524 #  endif
525 # endif
526
527 /* Relocate STACK from its old location to the new one.  The
528    local variables YYSIZE and YYSTACKSIZE give the old and new number of
529    elements in the stack, and YYPTR gives the new location of the
530    stack.  Advance YYPTR to a properly aligned location for the next
531    stack.  */
532 # define YYSTACK_RELOCATE(Stack_alloc, Stack)                           \
533     do                                                                  \
534       {                                                                 \
535         YYSIZE_T yynewbytes;                                            \
536         YYCOPY (&yyptr->Stack_alloc, Stack, yysize);                    \
537         Stack = &yyptr->Stack_alloc;                                    \
538         yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
539         yyptr += yynewbytes / sizeof (*yyptr);                          \
540       }                                                                 \
541     while (YYID (0))
542
543 #endif
544
545 /* YYFINAL -- State number of the termination state.  */
546 #define YYFINAL  95
547 /* YYLAST -- Last index in YYTABLE.  */
548 #define YYLAST   1173
549
550 /* YYNTOKENS -- Number of terminals.  */
551 #define YYNTOKENS  77
552 /* YYNNTS -- Number of nonterminals.  */
553 #define YYNNTS  57
554 /* YYNRULES -- Number of rules.  */
555 #define YYNRULES  172
556 /* YYNRULES -- Number of states.  */
557 #define YYNSTATES  331
558
559 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
560 #define YYUNDEFTOK  2
561 #define YYMAXUTOK   331
562
563 #define YYTRANSLATE(YYX)                                                \
564   ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
565
566 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
567 static const yytype_uint8 yytranslate[] =
568 {
569        0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
570        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
571        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
572        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
573        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
574        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
575        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
576        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
577        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
578        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
579        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
580        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
581        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
582        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
583        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
584        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
585        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
586        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
587        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
588        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
589        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
590        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
591        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
592        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
593        2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
594        2,     2,     2,     2,     2,     2,     1,     2,     3,     4,
595        5,     6,     7,     8,     9,    10,    11,    12,    13,    14,
596       15,    16,    17,    18,    19,    20,    21,    22,    23,    24,
597       25,    26,    27,    28,    29,    30,    31,    32,    33,    34,
598       35,    36,    37,    38,    39,    40,    41,    42,    43,    44,
599       45,    46,    47,    48,    49,    50,    51,    52,    53,    54,
600       55,    56,    57,    58,    59,    60,    61,    62,    63,    64,
601       65,    66,    67,    68,    69,    70,    71,    72,    73,    74,
602       75,    76
603 };
604
605 #if YYDEBUG
606 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
607    YYRHS.  */
608 static const yytype_uint16 yyprhs[] =
609 {
610        0,     0,     3,     5,     8,    10,    12,    15,    17,    18,
611       22,    23,    27,    28,    32,    33,    34,    41,    45,    49,
612       51,    53,    55,    58,    60,    63,    65,    68,    71,    74,
613       76,    79,    81,    83,    85,    89,    93,    97,   101,   105,
614      109,   113,   117,   121,   125,   129,   133,   137,   141,   142,
615      147,   148,   153,   154,   155,   163,   165,   168,   170,   172,
616      174,   178,   180,   184,   188,   192,   196,   200,   204,   207,
617      210,   213,   215,   218,   221,   224,   227,   229,   230,   232,
618      234,   238,   244,   246,   247,   253,   255,   257,   259,   263,
619      266,   270,   274,   275,   278,   283,   286,   288,   293,   295,
620      303,   308,   311,   316,   320,   325,   327,   330,   332,   335,
621      339,   345,   351,   357,   364,   372,   376,   383,   386,   388,
622      391,   398,   401,   405,   407,   411,   415,   419,   423,   427,
623      431,   435,   438,   444,   446,   450,   457,   459,   462,   466,
624      469,   473,   475,   478,   481,   485,   490,   492,   494,   496,
625      499,   503,   510,   512,   514,   516,   520,   523,   528,   531,
626      534,   535,   537,   539,   543,   545,   549,   552,   555,   557,
627      561,   565,   568
628 };
629
630 /* YYRHS -- A `-1'-separated list of the rules' RHS.  */
631 static const yytype_int16 yyrhs[] =
632 {
633       78,     0,    -1,    79,    -1,    78,    79,    -1,    80,    -1,
634      125,    -1,   130,    86,    -1,    86,    -1,    -1,    71,    81,
635       86,    -1,    -1,    72,    82,    86,    -1,    -1,    91,    83,
636       87,    -1,    -1,    -1,    91,    11,    84,    91,    85,    87,
637       -1,     7,    88,     8,    -1,     7,     1,     8,    -1,    86,
638       -1,    90,    -1,    89,    -1,    88,    89,    -1,    86,    -1,
639       91,    90,    -1,    90,    -1,     1,    90,    -1,    66,    90,
640       -1,    67,    90,    -1,   119,    -1,    74,    90,    -1,     5,
641       -1,     6,    -1,    96,    -1,    98,    19,    91,    -1,    98,
642       18,    91,    -1,    98,    17,    91,    -1,    98,    16,    91,
643       -1,    98,    15,    91,    -1,    98,    14,    91,    -1,    98,
644       13,    91,    -1,    91,    31,    91,    -1,    91,    30,    91,
645       -1,    91,    29,    91,    -1,    91,    28,    91,    -1,    91,
646       27,    91,    -1,    91,    26,    91,    -1,    91,    25,    91,
647       -1,    -1,    91,    22,    92,    91,    -1,    -1,    91,    23,
648       93,    91,    -1,    -1,    -1,    91,    21,    94,    91,    20,
649       95,    91,    -1,    97,    -1,    96,    97,    -1,    49,    -1,
650       50,    -1,    52,    -1,    48,    91,    47,    -1,    51,    -1,
651       97,    35,    97,    -1,    97,    34,    97,    -1,    97,    38,
652       97,    -1,    97,    37,    97,    -1,    97,    36,    97,    -1,
653       97,    43,    97,    -1,    40,    97,    -1,    35,    97,    -1,
654       34,    97,    -1,   101,    -1,    52,    44,    -1,    44,    98,
655       -1,   115,    44,    -1,    44,   115,    -1,    52,    -1,    -1,
656      100,    -1,    91,    -1,   100,    11,    91,    -1,    55,   102,
657       48,    99,    47,    -1,    56,    -1,    -1,   103,   102,   104,
658      106,    90,    -1,    57,    -1,    58,    -1,    99,    -1,    48,
659      105,    47,    -1,    48,    47,    -1,    91,    11,    91,    -1,
660      105,    11,    91,    -1,    -1,    12,    91,    -1,    68,    48,
661       91,    47,    -1,   107,    89,    -1,    69,    -1,   107,    89,
662      108,    89,    -1,    63,    -1,   109,    89,    64,    48,    91,
663       47,    90,    -1,    64,    48,    91,    47,    -1,   110,    89,
664       -1,   111,   112,   113,    89,    -1,    65,    48,     6,    -1,
665       65,    48,    91,     6,    -1,     6,    -1,    91,     6,    -1,
666       47,    -1,    91,    47,    -1,    91,    24,    52,    -1,    48,
667      105,    47,    24,    52,    -1,    52,   102,     9,   100,    10,
668       -1,    52,   102,     9,   100,    10,    -1,    52,   102,     9,
669      100,    10,    44,    -1,    70,    52,   102,     9,   100,    10,
670       90,    -1,    70,    52,    90,    -1,    65,    48,    52,    24,
671       52,    47,    -1,   114,    89,    -1,    45,    -1,    46,    53,
672       -1,    46,    53,   102,     9,   100,    10,    -1,    46,    97,
673       -1,    48,   115,    47,    -1,   115,    -1,   115,    19,    91,
674       -1,   115,    18,    91,    -1,   115,    17,    91,    -1,   115,
675       16,    91,    -1,   115,    15,    91,    -1,   115,    14,    91,
676       -1,   115,    13,    91,    -1,   116,   117,    -1,    59,    48,
677       91,    11,    52,    -1,    47,    -1,    11,    91,    47,    -1,
678       60,    48,    91,    11,   118,    47,    -1,    91,    -1,    73,
679       90,    -1,    73,    91,    90,    -1,    75,    90,    -1,    75,
680       91,    90,    -1,   120,    -1,   120,   121,    -1,   122,    97,
681       -1,    97,    41,    33,    -1,    97,    41,    33,   121,    -1,
682       33,    -1,    98,    -1,   115,    -1,   120,    42,    -1,   120,
683      121,    42,    -1,   123,    48,   118,    11,    91,   124,    -1,
684       61,    -1,    62,    -1,    47,    -1,    11,   121,    47,    -1,
685      126,    86,    -1,   127,    48,   128,    47,    -1,    76,    52,
686       -1,    76,    54,    -1,    -1,   129,    -1,    52,    -1,   129,
687       11,    52,    -1,     1,    -1,    54,   102,   131,    -1,    48,
688       47,    -1,   132,   133,    -1,    48,    -1,   132,    91,    11,
689       -1,   132,    52,    11,    -1,    91,    47,    -1,    52,    47,
690       -1
691 };
692
693 /* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
694 static const yytype_uint16 yyrline[] =
695 {
696        0,   200,   200,   201,   204,   205,   206,   209,   215,   214,
697      221,   220,   227,   226,   234,   250,   233,   263,   265,   271,
698      272,   279,   280,   284,   285,   287,   289,   295,   298,   301,
699      305,   313,   313,   316,   317,   318,   319,   320,   321,   322,
700      323,   324,   325,   326,   327,   328,   329,   331,   359,   358,
701      366,   365,   372,   373,   372,   378,   379,   383,   385,   387,
702      395,   399,   403,   404,   405,   406,   407,   408,   409,   411,
703      413,   415,   418,   426,   433,   437,   444,   453,   454,   457,
704      459,   464,   475,   485,   489,   498,   499,   502,   503,   507,
705      511,   516,   520,   521,   528,   533,   537,   541,   550,   555,
706      561,   581,   607,   631,   632,   636,   637,   654,   658,   671,
707      676,   687,   700,   712,   729,   737,   748,   762,   779,   781,
708      790,   804,   806,   810,   814,   815,   816,   817,   818,   819,
709      820,   826,   830,   837,   839,   863,   870,   893,   896,   900,
710      903,   909,   916,   922,   927,   932,   939,   941,   941,   943,
711      947,   955,   974,   975,   979,   984,   992,  1001,  1020,  1043,
712     1050,  1051,  1054,  1060,  1073,  1086,  1098,  1100,  1115,  1117,
713     1124,  1133,  1139
714 };
715 #endif
716
717 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
718 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
719    First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
720 static const char *const yytname[] =
721 {
722   "$end", "error", "$undefined", "UNEXPECTED", "BAD_DECIMAL", "NL",
723   "SEMI_COLON", "LBRACE", "RBRACE", "LBOX", "RBOX", "COMMA", "IO_OUT",
724   "POW_ASG", "MOD_ASG", "DIV_ASG", "MUL_ASG", "SUB_ASG", "ADD_ASG",
725   "ASSIGN", "COLON", "QMARK", "OR", "AND", "IN", "MATCH", "GTE", "GT",
726   "LTE", "LT", "NEQ", "EQ", "CAT", "GETLINE", "MINUS", "PLUS", "MOD",
727   "DIV", "MUL", "UMINUS", "NOT", "PIPE", "IO_IN", "POW", "INC_or_DEC",
728   "FIELD", "DOLLAR", "RPAREN", "LPAREN", "DOUBLE", "STRING_", "RE", "ID",
729   "D_ID", "FUNCT_ID", "BUILTIN", "LENGTH", "PRINT", "PRINTF", "SPLIT",
730   "MATCH_FUNC", "SUB", "GSUB", "DO", "WHILE", "FOR", "BREAK", "CONTINUE",
731   "IF", "ELSE", "DELETE", "BEGIN", "END", "EXIT", "NEXT", "RETURN",
732   "FUNCTION", "$accept", "program", "program_block", "PA_block", "$@1",
733   "$@2", "$@3", "$@4", "$@5", "block", "block_or_separator",
734   "statement_list", "statement", "separator", "expr", "$@6", "$@7", "$@8",
735   "$@9", "cat_expr", "p_expr", "lvalue", "arglist", "args", "builtin",
736   "mark", "print", "pr_args", "arg2", "pr_direction", "if_front", "else",
737   "do", "while_front", "for1", "for2", "for3", "array_loop_front", "field",
738   "split_front", "split_back", "re_arg", "return_statement", "getline",
739   "fvalue", "getline_file", "sub_or_gsub", "sub_back", "function_def",
740   "funct_start", "funct_head", "f_arglist", "f_args", "outside_error",
741   "call_args", "ca_front", "ca_back", 0
742 };
743 #endif
744
745 # ifdef YYPRINT
746 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
747    token YYLEX-NUM.  */
748 static const yytype_uint16 yytoknum[] =
749 {
750        0,   256,   257,   258,   259,   260,   261,   262,   263,   264,
751      265,   266,   267,   268,   269,   270,   271,   272,   273,   274,
752      275,   276,   277,   278,   279,   280,   281,   282,   283,   284,
753      285,   286,   287,   288,   289,   290,   291,   292,   293,   294,
754      295,   296,   297,   298,   299,   300,   301,   302,   303,   304,
755      305,   306,   307,   308,   309,   310,   311,   312,   313,   314,
756      315,   316,   317,   318,   319,   320,   321,   322,   323,   324,
757      325,   326,   327,   328,   329,   330,   331
758 };
759 # endif
760
761 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
762 static const yytype_uint8 yyr1[] =
763 {
764        0,    77,    78,    78,    79,    79,    79,    80,    81,    80,
765       82,    80,    83,    80,    84,    85,    80,    86,    86,    87,
766       87,    88,    88,    89,    89,    89,    89,    89,    89,    89,
767       89,    90,    90,    91,    91,    91,    91,    91,    91,    91,
768       91,    91,    91,    91,    91,    91,    91,    91,    92,    91,
769       93,    91,    94,    95,    91,    96,    96,    97,    97,    97,
770       97,    97,    97,    97,    97,    97,    97,    97,    97,    97,
771       97,    97,    97,    97,    97,    97,    98,    99,    99,   100,
772      100,   101,   101,   102,    89,   103,   103,   104,   104,   104,
773      105,   105,   106,   106,   107,    89,   108,    89,   109,    89,
774      110,    89,    89,   111,   111,   112,   112,   113,   113,    91,
775       91,    98,    97,    97,    89,    89,   114,    89,   115,   115,
776      115,   115,   115,    97,    91,    91,    91,    91,    91,    91,
777       91,    97,   116,   117,   117,    97,   118,    89,    89,   119,
778      119,    97,    97,    97,    97,    97,   120,   121,   121,   122,
779      122,    97,   123,   123,   124,   124,   125,   126,   127,   127,
780      128,   128,   129,   129,   130,    97,   131,   131,   132,   132,
781      132,   133,   133
782 };
783
784 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
785 static const yytype_uint8 yyr2[] =
786 {
787        0,     2,     1,     2,     1,     1,     2,     1,     0,     3,
788        0,     3,     0,     3,     0,     0,     6,     3,     3,     1,
789        1,     1,     2,     1,     2,     1,     2,     2,     2,     1,
790        2,     1,     1,     1,     3,     3,     3,     3,     3,     3,
791        3,     3,     3,     3,     3,     3,     3,     3,     0,     4,
792        0,     4,     0,     0,     7,     1,     2,     1,     1,     1,
793        3,     1,     3,     3,     3,     3,     3,     3,     2,     2,
794        2,     1,     2,     2,     2,     2,     1,     0,     1,     1,
795        3,     5,     1,     0,     5,     1,     1,     1,     3,     2,
796        3,     3,     0,     2,     4,     2,     1,     4,     1,     7,
797        4,     2,     4,     3,     4,     1,     2,     1,     2,     3,
798        5,     5,     5,     6,     7,     3,     6,     2,     1,     2,
799        6,     2,     3,     1,     3,     3,     3,     3,     3,     3,
800        3,     2,     5,     1,     3,     6,     1,     2,     3,     2,
801        3,     1,     2,     2,     3,     4,     1,     1,     1,     2,
802        3,     6,     1,     1,     1,     3,     2,     4,     2,     2,
803        0,     1,     1,     3,     1,     3,     2,     2,     1,     3,
804        3,     2,     2
805 };
806
807 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
808    STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
809    means the default is an error.  */
810 static const yytype_uint8 yydefact[] =
811 {
812        0,   164,     0,   146,     0,     0,     0,     0,   118,     0,
813        0,    57,    58,    61,    59,    83,    83,    82,     0,     0,
814      152,   153,     8,    10,     0,     0,     2,     4,     7,    12,
815       33,    55,     0,    71,   123,     0,   141,     0,     0,     5,
816        0,     0,     0,     0,    31,    32,    85,    86,    98,     0,
817        0,     0,     0,     0,     0,     0,     0,     0,    23,     0,
818       21,    25,     0,    83,     0,     0,     0,     0,     0,    29,
819        0,    59,    70,   123,    69,    68,     0,    76,    73,    75,
820      119,   121,     0,     0,   123,    72,     0,     0,     0,     0,
821        0,     0,     0,   158,   159,     1,     3,    14,    52,    48,
822       50,     0,     0,     0,     0,     0,     0,     0,     0,     0,
823       56,     0,     0,     0,     0,     0,     0,     0,     0,     0,
824        0,     0,     0,     0,     0,     0,     0,     0,     0,     0,
825        0,     0,    74,     0,   133,   131,   149,   147,   148,   142,
826      143,     0,   156,   160,     6,    18,    26,     0,     0,    27,
827       28,     0,    83,   137,     0,    30,   139,     0,     0,    17,
828       22,    24,    77,    95,     0,   101,   105,     0,     0,   117,
829        0,     0,     0,     0,     0,     0,    60,     0,     0,   122,
830        0,   168,   165,     0,    77,     0,     0,     9,    11,     0,
831        0,     0,     0,   109,    47,    46,    45,    44,    43,    42,
832       41,    19,    13,    20,    63,    62,    66,    65,    64,   144,
833       67,    40,    39,    38,    37,    36,    35,    34,   130,   129,
834      128,   127,   126,   125,   124,     0,   150,   136,     0,   162,
835        0,   161,     0,   103,    59,     0,     0,   115,     0,   138,
836      140,     0,    79,    87,    78,    92,    96,     0,     0,   106,
837      107,     0,     0,     0,     0,     0,    90,    91,     0,     0,
838      166,    59,     0,   167,     0,     0,     0,    15,     0,    49,
839       51,   145,   134,     0,   157,     0,   100,     0,   104,    94,
840        0,    89,     0,     0,     0,     0,    97,     0,   108,   102,
841        0,     0,     0,   110,   112,   170,   172,   169,   171,    81,
842      132,     0,     0,    53,     0,   163,     0,     0,    88,    80,
843       93,    84,     0,   112,   111,   120,   113,   135,    16,     0,
844        0,   154,   151,   116,     0,     0,    54,     0,   114,    99,
845      155
846 };
847
848 /* YYDEFGOTO[NTERM-NUM].  */
849 static const yytype_int16 yydefgoto[] =
850 {
851       -1,    25,    26,    27,    91,    92,   109,   189,   302,    58,
852      202,    59,    60,    61,    62,   191,   192,   190,   319,    30,
853       31,    32,   243,   244,    33,    86,    63,   245,    83,   285,
854       64,   247,    65,    66,    67,   168,   252,    68,    34,    35,
855      135,   228,    69,    36,   139,    37,    38,   322,    39,    40,
856       41,   230,   231,    42,   182,   183,   263
857 };
858
859 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
860    STATE-NUM.  */
861 #define YYPACT_NINF -189
862 static const yytype_int16 yypact[] =
863 {
864      324,  -189,   457,  -189,   799,   799,   799,     1,  -189,   709,
865      829,  -189,  -189,  -189,   389,  -189,  -189,  -189,   -39,   -26,
866     -189,  -189,  -189,  -189,    39,   289,  -189,  -189,  -189,  1077,
867      799,   129,   966,  -189,   466,     3,    35,   799,   -21,  -189,
868       29,    -3,    29,    18,  -189,  -189,  -189,  -189,  -189,    40,
869       69,    34,    34,    86,    -1,   594,    34,   594,  -189,   386,
870     -189,  -189,   706,  -189,   528,   528,   528,   624,   528,  -189,
871      829,    10,    51,    14,    51,    51,    30,   128,  -189,  -189,
872      128,  -189,   446,     5,   704,  -189,   130,    94,   104,   829,
873      829,    29,    29,  -189,  -189,  -189,  -189,  -189,  -189,  -189,
874     -189,   105,   829,   829,   829,   829,   829,   829,   829,    26,
875      129,   799,   799,   799,   799,   799,   136,   799,   829,   829,
876      829,   829,   829,   829,   829,   829,   829,   829,   829,   829,
877      829,   829,  -189,   829,  -189,  -189,  -189,  -189,  -189,   119,
878       73,   829,  -189,   121,  -189,  -189,  -189,   829,   654,  -189,
879     -189,   829,    34,  -189,   706,  -189,  -189,   706,    34,  -189,
880     -189,  -189,   859,   102,   110,  -189,  -189,  1045,   739,  -189,
881      931,   167,   131,   170,   172,   829,  -189,   829,   158,  -189,
882      829,   140,  -189,   889,   829,  1098,  1119,  -189,  -189,   829,
883      829,   829,   829,  -189,    70,  -189,  -189,  -189,  -189,  -189,
884     -189,  -189,  -189,  -189,    23,    23,    51,    51,    51,     1,
885      143,  1142,  1142,  1142,  1142,  1142,  1142,  1142,  1142,  1142,
886     1142,  1142,  1142,  1142,  1142,   942,  -189,  1142,   177,  -189,
887      146,   187,   969,  -189,   216,  1056,   980,  -189,   192,  -189,
888     -189,   769,  1142,  -189,   193,   190,  -189,   528,   157,  -189,
889     -189,  1007,   528,   829,   829,   829,  1142,  1142,   154,    52,
890     -189,   199,   517,  -189,   162,   159,   829,  1142,  1131,   387,
891      595,  -189,  -189,   829,  -189,   168,  -189,   171,  -189,  -189,
892      829,  -189,     9,   829,   829,    34,  -189,   829,  -189,  -189,
893       61,   135,   139,  -189,   537,  -189,  -189,  -189,  -189,  -189,
894     -189,   175,    26,  -189,   586,  -189,   179,   145,   158,  1142,
895     1142,  -189,  1018,   180,  -189,  -189,  -189,  -189,  -189,   829,
896        1,  -189,  -189,  -189,    34,    34,  1142,   189,  -189,  -189,
897     -189
898 };
899
900 /* YYPGOTO[NTERM-NUM].  */
901 static const yytype_int16 yypgoto[] =
902 {
903     -189,  -189,   194,  -189,  -189,  -189,  -189,  -189,  -189,    44,
904      -75,  -189,   -53,   -14,     0,  -189,  -189,  -189,  -189,  -189,
905      191,    -6,    53,   -95,  -189,     2,  -189,  -189,     4,  -189,
906     -189,  -189,  -189,  -189,  -189,  -189,  -189,  -189,    -2,  -189,
907     -189,   -28,  -189,  -189,  -188,  -189,  -189,  -189,  -189,  -189,
908     -189,  -189,  -189,  -189,  -189,  -189,  -189
909 };
910
911 /* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
912    positive, shift that token.  If negative, reduce the rule which
913    number is the opposite.  If zero, do what YYDEFACT says.
914    If YYTABLE_NINF, syntax error.  */
915 #define YYTABLE_NINF -112
916 static const yytype_int16 yytable[] =
917 {
918       29,    78,    73,    73,    73,    79,   160,    73,    84,    89,
919       82,   163,   164,   165,   133,   169,   177,    87,    88,   -83,
920      177,   271,    90,    44,    45,    29,   145,   141,    73,   146,
921      137,    44,    45,     2,   138,    73,     2,   149,   150,    44,
922       45,   153,   155,   156,    28,   143,     8,     9,   161,    76,
923      134,   152,   178,    77,    85,   154,   308,   157,   132,   113,
924      114,   115,   294,   283,   116,   162,   117,   167,    84,    28,
925      170,   313,   283,   171,   172,     8,     9,   136,    76,   173,
926        8,     9,   174,    76,   142,   259,   144,    77,   147,   185,
927      186,    93,   116,    94,   117,   203,   103,   104,   105,   106,
928      107,   108,   194,   195,   196,   197,   198,   199,   200,    73,
929       73,    73,    73,    73,  -112,    73,   117,   148,   211,   212,
930      213,   214,   215,   216,   217,   218,   219,   220,   221,   222,
931      223,   224,   327,   225,   151,   187,   188,   -83,   237,   180,
932      239,   227,   181,   240,   146,   314,   283,   232,   235,   315,
933      283,   236,   184,   201,   238,   324,   283,   193,   290,   291,
934      292,   226,   242,   111,   112,   113,   114,   115,   251,   209,
935      116,   246,   117,   229,   248,   256,   253,   257,   179,   254,
936      242,   255,   258,   262,   242,   307,   117,   260,   273,   267,
937      268,   269,   270,   274,   286,    72,    74,    75,   275,   289,
938       81,   280,   284,   137,   283,   287,   293,   138,   -83,   299,
939      295,   300,   -76,   -76,   -76,   -76,   -76,   -76,   -76,    96,
940      305,   110,   317,   306,   316,   -83,   323,   318,   140,   -76,
941      -76,   -76,   -76,   -76,   -76,   -76,   330,   264,   301,    84,
942      277,    82,     0,    85,     0,   282,   296,     0,     0,     0,
943        0,     0,     0,   242,   242,   242,     0,     0,     0,     0,
944       85,     0,     0,     0,     0,     0,   227,     0,     0,     0,
945        0,   311,     0,   304,     0,     0,     0,     0,     0,     0,
946      242,     0,     0,   309,   310,     0,     0,   312,   203,    95,
947        1,     0,     0,     0,     0,     0,     2,     0,     0,     0,
948        0,     0,   204,   205,   206,   207,   208,     0,   210,     0,
949      328,   329,     0,     0,   137,     0,     0,     0,   138,   326,
950        0,     0,     3,     4,     5,     1,     0,     0,     0,     6,
951        0,     2,     0,     7,     8,     9,     0,    10,    11,    12,
952       13,    14,     0,    15,    16,    17,   201,     0,    18,    19,
953       20,    21,     0,     0,     0,     0,     0,     3,     4,     5,
954       22,    23,     0,     0,     6,    24,     0,     0,     7,     8,
955        9,     0,    10,    11,    12,    13,    14,     0,    15,    16,
956       17,     0,     0,    18,    19,    20,    21,   158,     0,     0,
957        0,    44,    45,     2,   159,    22,    23,     0,   -83,     0,
958       24,     0,   -76,   -76,   -76,   -76,   -76,   -76,   -76,     0,
959      100,   101,   102,   103,   104,   105,   106,   107,   108,     3,
960        4,     5,     0,     0,     0,     0,     6,     0,     0,     0,
961        7,     8,     9,    85,    10,    11,    12,    13,    14,     0,
962       15,    16,    17,    46,    47,    18,    19,    20,    21,    48,
963       49,    50,    51,    52,    53,     0,    54,   175,    43,    55,
964       56,    57,    44,    45,     2,     0,     0,    98,    99,   100,
965      101,   102,   103,   104,   105,   106,   107,   108,     0,   125,
966      126,   127,   128,   129,   130,   131,     0,     0,     0,     0,
967        3,     4,     5,   176,     0,     0,     0,     6,     0,     0,
968        0,     7,     8,     9,     0,    10,    11,    12,    13,    14,
969      132,    15,    16,    17,    46,    47,    18,    19,    20,    21,
970       48,    49,    50,    51,    52,    53,     0,    54,   297,   158,
971       55,    56,    57,    44,    45,     2,     0,     0,    98,    99,
972      100,   101,   102,   103,   104,   105,   106,   107,   108,     0,
973     -111,  -111,  -111,  -111,  -111,  -111,  -111,     0,     0,     0,
974        0,     3,     4,     5,   298,     0,     0,     0,     6,     0,
975        0,     0,     7,     8,     9,     0,    10,    11,    12,    13,
976       14,   316,    15,    16,    17,    46,    47,    18,    19,    20,
977       21,    48,    49,    50,    51,    52,    53,   320,    54,    44,
978       45,    55,    56,    57,     0,     0,     0,    98,    99,   100,
979      101,   102,   103,   104,   105,   106,   107,   108,     0,   101,
980      102,   103,   104,   105,   106,   107,   108,     3,     4,     5,
981      166,     0,     0,   321,     6,     0,     0,     0,     7,     8,
982        9,     0,    10,    11,    12,    13,    14,     0,    15,    16,
983       17,     0,     0,    18,    19,    20,    21,     3,     4,     5,
984      233,     0,     0,     0,     6,     0,     0,     0,     7,     8,
985        9,     0,    10,    11,    12,    13,    14,     0,    15,    16,
986       17,     0,     0,    18,    19,    20,    21,     3,     4,     5,
987        0,     0,     0,     0,     6,     0,     0,     0,     7,     8,
988        9,     0,    10,    11,    12,    13,   234,     0,    15,    16,
989       17,    44,    45,    18,    19,    20,    21,   125,   126,   127,
990      128,   129,   130,   131,     0,     0,     0,    98,    99,   100,
991      101,   102,   103,   104,   105,   106,   107,   108,     0,     0,
992        0,     0,     3,     4,     5,     0,     0,     0,   132,     6,
993        0,   179,     0,     7,     8,     9,     0,    70,    11,    12,
994       13,    71,    80,    15,    16,    17,     0,     0,    18,    19,
995       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
996        0,     0,     0,     7,     8,     9,   250,    10,    11,    12,
997       13,    14,     0,    15,    16,    17,     0,     0,    18,    19,
998       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
999        0,     0,     0,     7,     8,     9,   281,    10,    11,    12,
1000       13,    14,     0,    15,    16,    17,     0,     0,    18,    19,
1001       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
1002        0,     0,     0,     7,     8,     9,     0,    70,    11,    12,
1003       13,    71,     0,    15,    16,    17,     0,     0,    18,    19,
1004       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
1005        0,     0,     0,     7,     8,     9,     0,    10,    11,    12,
1006       13,    14,     0,    15,    16,    17,     0,     0,    18,    19,
1007       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
1008        0,     0,     0,     7,     8,     9,     0,   241,    11,    12,
1009       13,    14,     0,    15,    16,    17,     0,     0,    18,    19,
1010       20,    21,     3,     4,     5,     0,     0,     0,     0,     6,
1011        0,     0,     0,     7,     8,     9,     0,    10,    11,    12,
1012       13,   261,     0,    15,    16,    17,     0,     0,    18,    19,
1013       20,    21,    98,    99,   100,   101,   102,   103,   104,   105,
1014      106,   107,   108,    98,    99,   100,   101,   102,   103,   104,
1015      105,   106,   107,   108,     0,     0,     0,     0,   176,   118,
1016      119,   120,   121,   122,   123,   124,     0,     0,     0,   272,
1017       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
1018      108,    98,    99,   100,   101,   102,   103,   104,   105,   106,
1019      107,   108,     0,     0,     0,     0,   276,     0,     0,     0,
1020        0,     0,     0,     0,     0,     0,     0,   279,    98,    99,
1021      100,   101,   102,   103,   104,   105,   106,   107,   108,    98,
1022       99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
1023        0,   249,     0,     0,   288,     0,     0,     0,     0,     0,
1024        0,     0,   278,     0,     0,   325,    98,    99,   100,   101,
1025      102,   103,   104,   105,   106,   107,   108,    98,    99,   100,
1026      101,   102,   103,   104,   105,   106,   107,   108,    97,     0,
1027        0,     0,     0,     0,     0,     0,     0,     0,    98,    99,
1028      100,   101,   102,   103,   104,   105,   106,   107,   108,   265,
1029        0,     0,     0,     0,     0,     0,     0,     0,     0,    98,
1030       99,   100,   101,   102,   103,   104,   105,   106,   107,   108,
1031      266,     0,     0,     0,     0,     0,     0,     0,     0,     0,
1032       98,    99,   100,   101,   102,   103,   104,   105,   106,   107,
1033      108,   303,    98,    99,   100,   101,   102,   103,   104,   105,
1034      106,   107,   108,    98,    99,   100,   101,   102,   103,   104,
1035      105,   106,   107,   108
1036 };
1037
1038 static const yytype_int16 yycheck[] =
1039 {
1040        0,     7,     4,     5,     6,     7,    59,     9,    10,    48,
1041       10,    64,    65,    66,    11,    68,    11,    15,    16,     9,
1042       11,   209,    48,     5,     6,    25,     8,    48,    30,    43,
1043       36,     5,     6,     7,    36,    37,     7,    51,    52,     5,
1044        6,    55,    56,    57,     0,    48,    45,    46,    62,    48,
1045       47,    52,    47,    52,    44,    55,    47,    57,    44,    36,
1046       37,    38,    10,    11,    41,    63,    43,    67,    70,    25,
1047       70,    10,    11,    71,    76,    45,    46,    42,    48,    77,
1048       45,    46,    80,    48,    40,   180,    42,    52,    48,    89,
1049       90,    52,    41,    54,    43,   109,    26,    27,    28,    29,
1050       30,    31,   102,   103,   104,   105,   106,   107,   108,   111,
1051      112,   113,   114,   115,    41,   117,    43,    48,   118,   119,
1052      120,   121,   122,   123,   124,   125,   126,   127,   128,   129,
1053      130,   131,   320,   133,    48,    91,    92,     9,   152,     9,
1054      154,   141,    48,   157,   158,    10,    11,   147,   148,    10,
1055       11,   151,    48,   109,   152,    10,    11,    52,   253,   254,
1056      255,    42,   162,    34,    35,    36,    37,    38,   168,    33,
1057       41,    69,    43,    52,    64,   175,     9,   177,    47,     9,
1058      180,     9,    24,   183,   184,   280,    43,    47,    11,   189,
1059      190,   191,   192,    47,   247,     4,     5,     6,    11,   252,
1060        9,     9,    12,   209,    11,    48,    52,   209,     9,    47,
1061       11,    52,    13,    14,    15,    16,    17,    18,    19,    25,
1062       52,    30,    47,    52,    44,     9,    47,   302,    37,    13,
1063       14,    15,    16,    17,    18,    19,    47,   184,   266,   241,
1064       24,   241,    -1,    44,    -1,   241,    47,    -1,    -1,    -1,
1065       -1,    -1,    -1,   253,   254,   255,    -1,    -1,    -1,    -1,
1066       44,    -1,    -1,    -1,    -1,    -1,   266,    -1,    -1,    -1,
1067       -1,   285,    -1,   273,    -1,    -1,    -1,    -1,    -1,    -1,
1068      280,    -1,    -1,   283,   284,    -1,    -1,   287,   302,     0,
1069        1,    -1,    -1,    -1,    -1,    -1,     7,    -1,    -1,    -1,
1070       -1,    -1,   111,   112,   113,   114,   115,    -1,   117,    -1,
1071      324,   325,    -1,    -1,   320,    -1,    -1,    -1,   320,   319,
1072       -1,    -1,    33,    34,    35,     1,    -1,    -1,    -1,    40,
1073       -1,     7,    -1,    44,    45,    46,    -1,    48,    49,    50,
1074       51,    52,    -1,    54,    55,    56,   302,    -1,    59,    60,
1075       61,    62,    -1,    -1,    -1,    -1,    -1,    33,    34,    35,
1076       71,    72,    -1,    -1,    40,    76,    -1,    -1,    44,    45,
1077       46,    -1,    48,    49,    50,    51,    52,    -1,    54,    55,
1078       56,    -1,    -1,    59,    60,    61,    62,     1,    -1,    -1,
1079       -1,     5,     6,     7,     8,    71,    72,    -1,     9,    -1,
1080       76,    -1,    13,    14,    15,    16,    17,    18,    19,    -1,
1081       23,    24,    25,    26,    27,    28,    29,    30,    31,    33,
1082       34,    35,    -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,
1083       44,    45,    46,    44,    48,    49,    50,    51,    52,    -1,
1084       54,    55,    56,    57,    58,    59,    60,    61,    62,    63,
1085       64,    65,    66,    67,    68,    -1,    70,    11,     1,    73,
1086       74,    75,     5,     6,     7,    -1,    -1,    21,    22,    23,
1087       24,    25,    26,    27,    28,    29,    30,    31,    -1,    13,
1088       14,    15,    16,    17,    18,    19,    -1,    -1,    -1,    -1,
1089       33,    34,    35,    47,    -1,    -1,    -1,    40,    -1,    -1,
1090       -1,    44,    45,    46,    -1,    48,    49,    50,    51,    52,
1091       44,    54,    55,    56,    57,    58,    59,    60,    61,    62,
1092       63,    64,    65,    66,    67,    68,    -1,    70,    11,     1,
1093       73,    74,    75,     5,     6,     7,    -1,    -1,    21,    22,
1094       23,    24,    25,    26,    27,    28,    29,    30,    31,    -1,
1095       13,    14,    15,    16,    17,    18,    19,    -1,    -1,    -1,
1096       -1,    33,    34,    35,    47,    -1,    -1,    -1,    40,    -1,
1097       -1,    -1,    44,    45,    46,    -1,    48,    49,    50,    51,
1098       52,    44,    54,    55,    56,    57,    58,    59,    60,    61,
1099       62,    63,    64,    65,    66,    67,    68,    11,    70,     5,
1100        6,    73,    74,    75,    -1,    -1,    -1,    21,    22,    23,
1101       24,    25,    26,    27,    28,    29,    30,    31,    -1,    24,
1102       25,    26,    27,    28,    29,    30,    31,    33,    34,    35,
1103        6,    -1,    -1,    47,    40,    -1,    -1,    -1,    44,    45,
1104       46,    -1,    48,    49,    50,    51,    52,    -1,    54,    55,
1105       56,    -1,    -1,    59,    60,    61,    62,    33,    34,    35,
1106        6,    -1,    -1,    -1,    40,    -1,    -1,    -1,    44,    45,
1107       46,    -1,    48,    49,    50,    51,    52,    -1,    54,    55,
1108       56,    -1,    -1,    59,    60,    61,    62,    33,    34,    35,
1109       -1,    -1,    -1,    -1,    40,    -1,    -1,    -1,    44,    45,
1110       46,    -1,    48,    49,    50,    51,    52,    -1,    54,    55,
1111       56,     5,     6,    59,    60,    61,    62,    13,    14,    15,
1112       16,    17,    18,    19,    -1,    -1,    -1,    21,    22,    23,
1113       24,    25,    26,    27,    28,    29,    30,    31,    -1,    -1,
1114       -1,    -1,    33,    34,    35,    -1,    -1,    -1,    44,    40,
1115       -1,    47,    -1,    44,    45,    46,    -1,    48,    49,    50,
1116       51,    52,    53,    54,    55,    56,    -1,    -1,    59,    60,
1117       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1118       -1,    -1,    -1,    44,    45,    46,    47,    48,    49,    50,
1119       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1120       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1121       -1,    -1,    -1,    44,    45,    46,    47,    48,    49,    50,
1122       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1123       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1124       -1,    -1,    -1,    44,    45,    46,    -1,    48,    49,    50,
1125       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1126       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1127       -1,    -1,    -1,    44,    45,    46,    -1,    48,    49,    50,
1128       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1129       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1130       -1,    -1,    -1,    44,    45,    46,    -1,    48,    49,    50,
1131       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1132       61,    62,    33,    34,    35,    -1,    -1,    -1,    -1,    40,
1133       -1,    -1,    -1,    44,    45,    46,    -1,    48,    49,    50,
1134       51,    52,    -1,    54,    55,    56,    -1,    -1,    59,    60,
1135       61,    62,    21,    22,    23,    24,    25,    26,    27,    28,
1136       29,    30,    31,    21,    22,    23,    24,    25,    26,    27,
1137       28,    29,    30,    31,    -1,    -1,    -1,    -1,    47,    13,
1138       14,    15,    16,    17,    18,    19,    -1,    -1,    -1,    47,
1139       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
1140       31,    21,    22,    23,    24,    25,    26,    27,    28,    29,
1141       30,    31,    -1,    -1,    -1,    -1,    47,    -1,    -1,    -1,
1142       -1,    -1,    -1,    -1,    -1,    -1,    -1,    47,    21,    22,
1143       23,    24,    25,    26,    27,    28,    29,    30,    31,    21,
1144       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
1145       -1,     6,    -1,    -1,    47,    -1,    -1,    -1,    -1,    -1,
1146       -1,    -1,     6,    -1,    -1,    47,    21,    22,    23,    24,
1147       25,    26,    27,    28,    29,    30,    31,    21,    22,    23,
1148       24,    25,    26,    27,    28,    29,    30,    31,    11,    -1,
1149       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,    22,
1150       23,    24,    25,    26,    27,    28,    29,    30,    31,    11,
1151       -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    21,
1152       22,    23,    24,    25,    26,    27,    28,    29,    30,    31,
1153       11,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,    -1,
1154       21,    22,    23,    24,    25,    26,    27,    28,    29,    30,
1155       31,    20,    21,    22,    23,    24,    25,    26,    27,    28,
1156       29,    30,    31,    21,    22,    23,    24,    25,    26,    27,
1157       28,    29,    30,    31
1158 };
1159
1160 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1161    symbol of state STATE-NUM.  */
1162 static const yytype_uint8 yystos[] =
1163 {
1164        0,     1,     7,    33,    34,    35,    40,    44,    45,    46,
1165       48,    49,    50,    51,    52,    54,    55,    56,    59,    60,
1166       61,    62,    71,    72,    76,    78,    79,    80,    86,    91,
1167       96,    97,    98,   101,   115,   116,   120,   122,   123,   125,
1168      126,   127,   130,     1,     5,     6,    57,    58,    63,    64,
1169       65,    66,    67,    68,    70,    73,    74,    75,    86,    88,
1170       89,    90,    91,   103,   107,   109,   110,   111,   114,   119,
1171       48,    52,    97,   115,    97,    97,    48,    52,    98,   115,
1172       53,    97,    91,   105,   115,    44,   102,   102,   102,    48,
1173       48,    81,    82,    52,    54,     0,    79,    11,    21,    22,
1174       23,    24,    25,    26,    27,    28,    29,    30,    31,    83,
1175       97,    34,    35,    36,    37,    38,    41,    43,    13,    14,
1176       15,    16,    17,    18,    19,    13,    14,    15,    16,    17,
1177       18,    19,    44,    11,    47,   117,    42,    98,   115,   121,
1178       97,    48,    86,    48,    86,     8,    90,    48,    48,    90,
1179       90,    48,    52,    90,    91,    90,    90,    91,     1,     8,
1180       89,    90,   102,    89,    89,    89,     6,    91,   112,    89,
1181       91,   102,   115,   102,   102,    11,    47,    11,    47,    47,
1182        9,    48,   131,   132,    48,    91,    91,    86,    86,    84,
1183       94,    92,    93,    52,    91,    91,    91,    91,    91,    91,
1184       91,    86,    87,    90,    97,    97,    97,    97,    97,    33,
1185       97,    91,    91,    91,    91,    91,    91,    91,    91,    91,
1186       91,    91,    91,    91,    91,    91,    42,    91,   118,    52,
1187      128,   129,    91,     6,    52,    91,    91,    90,   102,    90,
1188       90,    48,    91,    99,   100,   104,    69,   108,    64,     6,
1189       47,    91,   113,     9,     9,     9,    91,    91,    24,   100,
1190       47,    52,    91,   133,    99,    11,    11,    91,    91,    91,
1191       91,   121,    47,    11,    47,    11,    47,    24,     6,    47,
1192        9,    47,   105,    11,    12,   106,    89,    48,    47,    89,
1193      100,   100,   100,    52,    10,    11,    47,    11,    47,    47,
1194       52,   118,    85,    20,    91,    52,    52,   100,    47,    91,
1195       91,    90,    91,    10,    10,    10,    44,    47,    87,    95,
1196       11,    47,   124,    47,    10,    47,    91,   121,    90,    90,
1197       47
1198 };
1199
1200 #define yyerrok         (yyerrstatus = 0)
1201 #define yyclearin       (yychar = YYEMPTY)
1202 #define YYEMPTY         (-2)
1203 #define YYEOF           0
1204
1205 #define YYACCEPT        goto yyacceptlab
1206 #define YYABORT         goto yyabortlab
1207 #define YYERROR         goto yyerrorlab
1208
1209
1210 /* Like YYERROR except do call yyerror.  This remains here temporarily
1211    to ease the transition to the new meaning of YYERROR, for GCC.
1212    Once GCC version 2 has supplanted version 1, this can go.  */
1213
1214 #define YYFAIL          goto yyerrlab
1215
1216 #define YYRECOVERING()  (!!yyerrstatus)
1217
1218 #define YYBACKUP(Token, Value)                                  \
1219 do                                                              \
1220   if (yychar == YYEMPTY && yylen == 1)                          \
1221     {                                                           \
1222       yychar = (Token);                                         \
1223       yylval = (Value);                                         \
1224       yytoken = YYTRANSLATE (yychar);                           \
1225       YYPOPSTACK (1);                                           \
1226       goto yybackup;                                            \
1227     }                                                           \
1228   else                                                          \
1229     {                                                           \
1230       yyerror (YY_("syntax error: cannot back up")); \
1231       YYERROR;                                                  \
1232     }                                                           \
1233 while (YYID (0))
1234
1235
1236 #define YYTERROR        1
1237 #define YYERRCODE       256
1238
1239
1240 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
1241    If N is 0, then set CURRENT to the empty location which ends
1242    the previous symbol: RHS[0] (always defined).  */
1243
1244 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
1245 #ifndef YYLLOC_DEFAULT
1246 # define YYLLOC_DEFAULT(Current, Rhs, N)                                \
1247     do                                                                  \
1248       if (YYID (N))                                                    \
1249         {                                                               \
1250           (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;        \
1251           (Current).first_column = YYRHSLOC (Rhs, 1).first_column;      \
1252           (Current).last_line    = YYRHSLOC (Rhs, N).last_line;         \
1253           (Current).last_column  = YYRHSLOC (Rhs, N).last_column;       \
1254         }                                                               \
1255       else                                                              \
1256         {                                                               \
1257           (Current).first_line   = (Current).last_line   =              \
1258             YYRHSLOC (Rhs, 0).last_line;                                \
1259           (Current).first_column = (Current).last_column =              \
1260             YYRHSLOC (Rhs, 0).last_column;                              \
1261         }                                                               \
1262     while (YYID (0))
1263 #endif
1264
1265
1266 /* YY_LOCATION_PRINT -- Print the location on the stream.
1267    This macro was not mandated originally: define only if we know
1268    we won't break user code: when these are the locations we know.  */
1269
1270 #ifndef YY_LOCATION_PRINT
1271 # if YYLTYPE_IS_TRIVIAL
1272 #  define YY_LOCATION_PRINT(File, Loc)                  \
1273      fprintf (File, "%d.%d-%d.%d",                      \
1274               (Loc).first_line, (Loc).first_column,     \
1275               (Loc).last_line,  (Loc).last_column)
1276 # else
1277 #  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1278 # endif
1279 #endif
1280
1281
1282 /* YYLEX -- calling `yylex' with the right arguments.  */
1283
1284 #ifdef YYLEX_PARAM
1285 # define YYLEX yylex (YYLEX_PARAM)
1286 #else
1287 # define YYLEX yylex ()
1288 #endif
1289
1290 /* Enable debugging if requested.  */
1291 #if YYDEBUG
1292
1293 # ifndef YYFPRINTF
1294 #  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1295 #  define YYFPRINTF fprintf
1296 # endif
1297
1298 # define YYDPRINTF(Args)                        \
1299 do {                                            \
1300   if (yydebug)                                  \
1301     YYFPRINTF Args;                             \
1302 } while (YYID (0))
1303
1304 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)                    \
1305 do {                                                                      \
1306   if (yydebug)                                                            \
1307     {                                                                     \
1308       YYFPRINTF (stderr, "%s ", Title);                                   \
1309       yy_symbol_print (stderr,                                            \
1310                   Type, Value); \
1311       YYFPRINTF (stderr, "\n");                                           \
1312     }                                                                     \
1313 } while (YYID (0))
1314
1315
1316 /*--------------------------------.
1317 | Print this symbol on YYOUTPUT.  |
1318 `--------------------------------*/
1319
1320 /*ARGSUSED*/
1321 #if (defined __STDC__ || defined __C99__FUNC__ \
1322      || defined __cplusplus || defined _MSC_VER)
1323 static void
1324 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1325 #else
1326 static void
1327 yy_symbol_value_print (yyoutput, yytype, yyvaluep)
1328     FILE *yyoutput;
1329     int yytype;
1330     YYSTYPE const * const yyvaluep;
1331 #endif
1332 {
1333   if (!yyvaluep)
1334     return;
1335 # ifdef YYPRINT
1336   if (yytype < YYNTOKENS)
1337     YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1338 # else
1339   YYUSE (yyoutput);
1340 # endif
1341   switch (yytype)
1342     {
1343       default:
1344         break;
1345     }
1346 }
1347
1348
1349 /*--------------------------------.
1350 | Print this symbol on YYOUTPUT.  |
1351 `--------------------------------*/
1352
1353 #if (defined __STDC__ || defined __C99__FUNC__ \
1354      || defined __cplusplus || defined _MSC_VER)
1355 static void
1356 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
1357 #else
1358 static void
1359 yy_symbol_print (yyoutput, yytype, yyvaluep)
1360     FILE *yyoutput;
1361     int yytype;
1362     YYSTYPE const * const yyvaluep;
1363 #endif
1364 {
1365   if (yytype < YYNTOKENS)
1366     YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1367   else
1368     YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1369
1370   yy_symbol_value_print (yyoutput, yytype, yyvaluep);
1371   YYFPRINTF (yyoutput, ")");
1372 }
1373
1374 /*------------------------------------------------------------------.
1375 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1376 | TOP (included).                                                   |
1377 `------------------------------------------------------------------*/
1378
1379 #if (defined __STDC__ || defined __C99__FUNC__ \
1380      || defined __cplusplus || defined _MSC_VER)
1381 static void
1382 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1383 #else
1384 static void
1385 yy_stack_print (yybottom, yytop)
1386     yytype_int16 *yybottom;
1387     yytype_int16 *yytop;
1388 #endif
1389 {
1390   YYFPRINTF (stderr, "Stack now");
1391   for (; yybottom <= yytop; yybottom++)
1392     {
1393       int yybot = *yybottom;
1394       YYFPRINTF (stderr, " %d", yybot);
1395     }
1396   YYFPRINTF (stderr, "\n");
1397 }
1398
1399 # define YY_STACK_PRINT(Bottom, Top)                            \
1400 do {                                                            \
1401   if (yydebug)                                                  \
1402     yy_stack_print ((Bottom), (Top));                           \
1403 } while (YYID (0))
1404
1405
1406 /*------------------------------------------------.
1407 | Report that the YYRULE is going to be reduced.  |
1408 `------------------------------------------------*/
1409
1410 #if (defined __STDC__ || defined __C99__FUNC__ \
1411      || defined __cplusplus || defined _MSC_VER)
1412 static void
1413 yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
1414 #else
1415 static void
1416 yy_reduce_print (yyvsp, yyrule)
1417     YYSTYPE *yyvsp;
1418     int yyrule;
1419 #endif
1420 {
1421   int yynrhs = yyr2[yyrule];
1422   int yyi;
1423   unsigned long int yylno = yyrline[yyrule];
1424   YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1425              yyrule - 1, yylno);
1426   /* The symbols being reduced.  */
1427   for (yyi = 0; yyi < yynrhs; yyi++)
1428     {
1429       YYFPRINTF (stderr, "   $%d = ", yyi + 1);
1430       yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1431                        &(yyvsp[(yyi + 1) - (yynrhs)])
1432                                        );
1433       YYFPRINTF (stderr, "\n");
1434     }
1435 }
1436
1437 # define YY_REDUCE_PRINT(Rule)          \
1438 do {                                    \
1439   if (yydebug)                          \
1440     yy_reduce_print (yyvsp, Rule); \
1441 } while (YYID (0))
1442
1443 /* Nonzero means print parse trace.  It is left uninitialized so that
1444    multiple parsers can coexist.  */
1445 int yydebug;
1446 #else /* !YYDEBUG */
1447 # define YYDPRINTF(Args)
1448 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1449 # define YY_STACK_PRINT(Bottom, Top)
1450 # define YY_REDUCE_PRINT(Rule)
1451 #endif /* !YYDEBUG */
1452
1453
1454 /* YYINITDEPTH -- initial size of the parser's stacks.  */
1455 #ifndef YYINITDEPTH
1456 # define YYINITDEPTH 200
1457 #endif
1458
1459 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1460    if the built-in stack extension method is used).
1461
1462    Do not make this value too large; the results are undefined if
1463    YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1464    evaluated with infinite-precision integer arithmetic.  */
1465
1466 #ifndef YYMAXDEPTH
1467 # define YYMAXDEPTH 10000
1468 #endif
1469
1470 \f
1471
1472 #if YYERROR_VERBOSE
1473
1474 # ifndef yystrlen
1475 #  if defined __GLIBC__ && defined _STRING_H
1476 #   define yystrlen strlen
1477 #  else
1478 /* Return the length of YYSTR.  */
1479 #if (defined __STDC__ || defined __C99__FUNC__ \
1480      || defined __cplusplus || defined _MSC_VER)
1481 static YYSIZE_T
1482 yystrlen (const char *yystr)
1483 #else
1484 static YYSIZE_T
1485 yystrlen (yystr)
1486     const char *yystr;
1487 #endif
1488 {
1489   YYSIZE_T yylen;
1490   for (yylen = 0; yystr[yylen]; yylen++)
1491     continue;
1492   return yylen;
1493 }
1494 #  endif
1495 # endif
1496
1497 # ifndef yystpcpy
1498 #  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1499 #   define yystpcpy stpcpy
1500 #  else
1501 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1502    YYDEST.  */
1503 #if (defined __STDC__ || defined __C99__FUNC__ \
1504      || defined __cplusplus || defined _MSC_VER)
1505 static char *
1506 yystpcpy (char *yydest, const char *yysrc)
1507 #else
1508 static char *
1509 yystpcpy (yydest, yysrc)
1510     char *yydest;
1511     const char *yysrc;
1512 #endif
1513 {
1514   char *yyd = yydest;
1515   const char *yys = yysrc;
1516
1517   while ((*yyd++ = *yys++) != '\0')
1518     continue;
1519
1520   return yyd - 1;
1521 }
1522 #  endif
1523 # endif
1524
1525 # ifndef yytnamerr
1526 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1527    quotes and backslashes, so that it's suitable for yyerror.  The
1528    heuristic is that double-quoting is unnecessary unless the string
1529    contains an apostrophe, a comma, or backslash (other than
1530    backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
1531    null, do not copy; instead, return the length of what the result
1532    would have been.  */
1533 static YYSIZE_T
1534 yytnamerr (char *yyres, const char *yystr)
1535 {
1536   if (*yystr == '"')
1537     {
1538       YYSIZE_T yyn = 0;
1539       char const *yyp = yystr;
1540
1541       for (;;)
1542         switch (*++yyp)
1543           {
1544           case '\'':
1545           case ',':
1546             goto do_not_strip_quotes;
1547
1548           case '\\':
1549             if (*++yyp != '\\')
1550               goto do_not_strip_quotes;
1551             /* Fall through.  */
1552           default:
1553             if (yyres)
1554               yyres[yyn] = *yyp;
1555             yyn++;
1556             break;
1557
1558           case '"':
1559             if (yyres)
1560               yyres[yyn] = '\0';
1561             return yyn;
1562           }
1563     do_not_strip_quotes: ;
1564     }
1565
1566   if (! yyres)
1567     return yystrlen (yystr);
1568
1569   return yystpcpy (yyres, yystr) - yyres;
1570 }
1571 # endif
1572
1573 /* Copy into YYRESULT an error message about the unexpected token
1574    YYCHAR while in state YYSTATE.  Return the number of bytes copied,
1575    including the terminating null byte.  If YYRESULT is null, do not
1576    copy anything; just return the number of bytes that would be
1577    copied.  As a special case, return 0 if an ordinary "syntax error"
1578    message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
1579    size calculation.  */
1580 static YYSIZE_T
1581 yysyntax_error (char *yyresult, int yystate, int yychar)
1582 {
1583   int yyn = yypact[yystate];
1584
1585   if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1586     return 0;
1587   else
1588     {
1589       int yytype = YYTRANSLATE (yychar);
1590       YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1591       YYSIZE_T yysize = yysize0;
1592       YYSIZE_T yysize1;
1593       int yysize_overflow = 0;
1594       enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1595       char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1596       int yyx;
1597
1598 # if 0
1599       /* This is so xgettext sees the translatable formats that are
1600          constructed on the fly.  */
1601       YY_("syntax error, unexpected %s");
1602       YY_("syntax error, unexpected %s, expecting %s");
1603       YY_("syntax error, unexpected %s, expecting %s or %s");
1604       YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1605       YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1606 # endif
1607       char *yyfmt;
1608       char const *yyf;
1609       static char const yyunexpected[] = "syntax error, unexpected %s";
1610       static char const yyexpecting[] = ", expecting %s";
1611       static char const yyor[] = " or %s";
1612       char yyformat[sizeof yyunexpected
1613                     + sizeof yyexpecting - 1
1614                     + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1615                        * (sizeof yyor - 1))];
1616       char const *yyprefix = yyexpecting;
1617
1618       /* Start YYX at -YYN if negative to avoid negative indexes in
1619          YYCHECK.  */
1620       int yyxbegin = yyn < 0 ? -yyn : 0;
1621
1622       /* Stay within bounds of both yycheck and yytname.  */
1623       int yychecklim = YYLAST - yyn + 1;
1624       int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1625       int yycount = 1;
1626
1627       yyarg[0] = yytname[yytype];
1628       yyfmt = yystpcpy (yyformat, yyunexpected);
1629
1630       for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1631         if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1632           {
1633             if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1634               {
1635                 yycount = 1;
1636                 yysize = yysize0;
1637                 yyformat[sizeof yyunexpected - 1] = '\0';
1638                 break;
1639               }
1640             yyarg[yycount++] = yytname[yyx];
1641             yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1642             yysize_overflow |= (yysize1 < yysize);
1643             yysize = yysize1;
1644             yyfmt = yystpcpy (yyfmt, yyprefix);
1645             yyprefix = yyor;
1646           }
1647
1648       yyf = YY_(yyformat);
1649       yysize1 = yysize + yystrlen (yyf);
1650       yysize_overflow |= (yysize1 < yysize);
1651       yysize = yysize1;
1652
1653       if (yysize_overflow)
1654         return YYSIZE_MAXIMUM;
1655
1656       if (yyresult)
1657         {
1658           /* Avoid sprintf, as that infringes on the user's name space.
1659              Don't have undefined behavior even if the translation
1660              produced a string with the wrong number of "%s"s.  */
1661           char *yyp = yyresult;
1662           int yyi = 0;
1663           while ((*yyp = *yyf) != '\0')
1664             {
1665               if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1666                 {
1667                   yyp += yytnamerr (yyp, yyarg[yyi++]);
1668                   yyf += 2;
1669                 }
1670               else
1671                 {
1672                   yyp++;
1673                   yyf++;
1674                 }
1675             }
1676         }
1677       return yysize;
1678     }
1679 }
1680 #endif /* YYERROR_VERBOSE */
1681 \f
1682
1683 /*-----------------------------------------------.
1684 | Release the memory associated to this symbol.  |
1685 `-----------------------------------------------*/
1686
1687 /*ARGSUSED*/
1688 #if (defined __STDC__ || defined __C99__FUNC__ \
1689      || defined __cplusplus || defined _MSC_VER)
1690 static void
1691 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1692 #else
1693 static void
1694 yydestruct (yymsg, yytype, yyvaluep)
1695     const char *yymsg;
1696     int yytype;
1697     YYSTYPE *yyvaluep;
1698 #endif
1699 {
1700   YYUSE (yyvaluep);
1701
1702   if (!yymsg)
1703     yymsg = "Deleting";
1704   YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1705
1706   switch (yytype)
1707     {
1708
1709       default:
1710         break;
1711     }
1712 }
1713
1714 /* Prevent warnings from -Wmissing-prototypes.  */
1715 #ifdef YYPARSE_PARAM
1716 #if defined __STDC__ || defined __cplusplus
1717 int yyparse (void *YYPARSE_PARAM);
1718 #else
1719 int yyparse ();
1720 #endif
1721 #else /* ! YYPARSE_PARAM */
1722 #if defined __STDC__ || defined __cplusplus
1723 int yyparse (void);
1724 #else
1725 int yyparse ();
1726 #endif
1727 #endif /* ! YYPARSE_PARAM */
1728
1729
1730 /* The lookahead symbol.  */
1731 int yychar;
1732
1733 /* The semantic value of the lookahead symbol.  */
1734 YYSTYPE yylval;
1735
1736 /* Number of syntax errors so far.  */
1737 int yynerrs;
1738
1739
1740
1741 /*-------------------------.
1742 | yyparse or yypush_parse.  |
1743 `-------------------------*/
1744
1745 #ifdef YYPARSE_PARAM
1746 #if (defined __STDC__ || defined __C99__FUNC__ \
1747      || defined __cplusplus || defined _MSC_VER)
1748 int
1749 yyparse (void *YYPARSE_PARAM)
1750 #else
1751 int
1752 yyparse (YYPARSE_PARAM)
1753     void *YYPARSE_PARAM;
1754 #endif
1755 #else /* ! YYPARSE_PARAM */
1756 #if (defined __STDC__ || defined __C99__FUNC__ \
1757      || defined __cplusplus || defined _MSC_VER)
1758 int
1759 yyparse (void)
1760 #else
1761 int
1762 yyparse ()
1763
1764 #endif
1765 #endif
1766 {
1767
1768
1769     int yystate;
1770     /* Number of tokens to shift before error messages enabled.  */
1771     int yyerrstatus;
1772
1773     /* The stacks and their tools:
1774        `yyss': related to states.
1775        `yyvs': related to semantic values.
1776
1777        Refer to the stacks thru separate pointers, to allow yyoverflow
1778        to reallocate them elsewhere.  */
1779
1780     /* The state stack.  */
1781     yytype_int16 yyssa[YYINITDEPTH];
1782     yytype_int16 *yyss;
1783     yytype_int16 *yyssp;
1784
1785     /* The semantic value stack.  */
1786     YYSTYPE yyvsa[YYINITDEPTH];
1787     YYSTYPE *yyvs;
1788     YYSTYPE *yyvsp;
1789
1790     YYSIZE_T yystacksize;
1791
1792   int yyn;
1793   int yyresult;
1794   /* Lookahead token as an internal (translated) token number.  */
1795   int yytoken;
1796   /* The variables used to return semantic value and location from the
1797      action routines.  */
1798   YYSTYPE yyval;
1799
1800 #if YYERROR_VERBOSE
1801   /* Buffer for error messages, and its allocated size.  */
1802   char yymsgbuf[128];
1803   char *yymsg = yymsgbuf;
1804   YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1805 #endif
1806
1807 #define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
1808
1809   /* The number of symbols on the RHS of the reduced rule.
1810      Keep to zero when no symbol should be popped.  */
1811   int yylen = 0;
1812
1813   yytoken = 0;
1814   yyss = yyssa;
1815   yyvs = yyvsa;
1816   yystacksize = YYINITDEPTH;
1817
1818   YYDPRINTF ((stderr, "Starting parse\n"));
1819
1820   yystate = 0;
1821   yyerrstatus = 0;
1822   yynerrs = 0;
1823   yychar = YYEMPTY; /* Cause a token to be read.  */
1824
1825   /* Initialize stack pointers.
1826      Waste one element of value and location stack
1827      so that they stay on the same level as the state stack.
1828      The wasted elements are never initialized.  */
1829   yyssp = yyss;
1830   yyvsp = yyvs;
1831
1832   goto yysetstate;
1833
1834 /*------------------------------------------------------------.
1835 | yynewstate -- Push a new state, which is found in yystate.  |
1836 `------------------------------------------------------------*/
1837  yynewstate:
1838   /* In all cases, when you get here, the value and location stacks
1839      have just been pushed.  So pushing a state here evens the stacks.  */
1840   yyssp++;
1841
1842  yysetstate:
1843   *yyssp = yystate;
1844
1845   if (yyss + yystacksize - 1 <= yyssp)
1846     {
1847       /* Get the current used size of the three stacks, in elements.  */
1848       YYSIZE_T yysize = yyssp - yyss + 1;
1849
1850 #ifdef yyoverflow
1851       {
1852         /* Give user a chance to reallocate the stack.  Use copies of
1853            these so that the &'s don't force the real ones into
1854            memory.  */
1855         YYSTYPE *yyvs1 = yyvs;
1856         yytype_int16 *yyss1 = yyss;
1857
1858         /* Each stack pointer address is followed by the size of the
1859            data in use in that stack, in bytes.  This used to be a
1860            conditional around just the two extra args, but that might
1861            be undefined if yyoverflow is a macro.  */
1862         yyoverflow (YY_("memory exhausted"),
1863                     &yyss1, yysize * sizeof (*yyssp),
1864                     &yyvs1, yysize * sizeof (*yyvsp),
1865                     &yystacksize);
1866
1867         yyss = yyss1;
1868         yyvs = yyvs1;
1869       }
1870 #else /* no yyoverflow */
1871 # ifndef YYSTACK_RELOCATE
1872       goto yyexhaustedlab;
1873 # else
1874       /* Extend the stack our own way.  */
1875       if (YYMAXDEPTH <= yystacksize)
1876         goto yyexhaustedlab;
1877       yystacksize *= 2;
1878       if (YYMAXDEPTH < yystacksize)
1879         yystacksize = YYMAXDEPTH;
1880
1881       {
1882         yytype_int16 *yyss1 = yyss;
1883         union yyalloc *yyptr =
1884           (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
1885         if (! yyptr)
1886           goto yyexhaustedlab;
1887         YYSTACK_RELOCATE (yyss_alloc, yyss);
1888         YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1889 #  undef YYSTACK_RELOCATE
1890         if (yyss1 != yyssa)
1891           YYSTACK_FREE (yyss1);
1892       }
1893 # endif
1894 #endif /* no yyoverflow */
1895
1896       yyssp = yyss + yysize - 1;
1897       yyvsp = yyvs + yysize - 1;
1898
1899       YYDPRINTF ((stderr, "Stack size increased to %lu\n",
1900                   (unsigned long int) yystacksize));
1901
1902       if (yyss + yystacksize - 1 <= yyssp)
1903         YYABORT;
1904     }
1905
1906   YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1907
1908   if (yystate == YYFINAL)
1909     YYACCEPT;
1910
1911   goto yybackup;
1912
1913 /*-----------.
1914 | yybackup.  |
1915 `-----------*/
1916 yybackup:
1917
1918   /* Do appropriate processing given the current state.  Read a
1919      lookahead token if we need one and don't already have one.  */
1920
1921   /* First try to decide what to do without reference to lookahead token.  */
1922   yyn = yypact[yystate];
1923   if (yyn == YYPACT_NINF)
1924     goto yydefault;
1925
1926   /* Not known => get a lookahead token if don't already have one.  */
1927
1928   /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol.  */
1929   if (yychar == YYEMPTY)
1930     {
1931       YYDPRINTF ((stderr, "Reading a token: "));
1932       yychar = YYLEX;
1933     }
1934
1935   if (yychar <= YYEOF)
1936     {
1937       yychar = yytoken = YYEOF;
1938       YYDPRINTF ((stderr, "Now at end of input.\n"));
1939     }
1940   else
1941     {
1942       yytoken = YYTRANSLATE (yychar);
1943       YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1944     }
1945
1946   /* If the proper action on seeing token YYTOKEN is to reduce or to
1947      detect an error, take that action.  */
1948   yyn += yytoken;
1949   if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1950     goto yydefault;
1951   yyn = yytable[yyn];
1952   if (yyn <= 0)
1953     {
1954       if (yyn == 0 || yyn == YYTABLE_NINF)
1955         goto yyerrlab;
1956       yyn = -yyn;
1957       goto yyreduce;
1958     }
1959
1960   /* Count tokens shifted since error; after three, turn off error
1961      status.  */
1962   if (yyerrstatus)
1963     yyerrstatus--;
1964
1965   /* Shift the lookahead token.  */
1966   YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1967
1968   /* Discard the shifted token.  */
1969   yychar = YYEMPTY;
1970
1971   yystate = yyn;
1972   *++yyvsp = yylval;
1973
1974   goto yynewstate;
1975
1976
1977 /*-----------------------------------------------------------.
1978 | yydefault -- do the default action for the current state.  |
1979 `-----------------------------------------------------------*/
1980 yydefault:
1981   yyn = yydefact[yystate];
1982   if (yyn == 0)
1983     goto yyerrlab;
1984   goto yyreduce;
1985
1986
1987 /*-----------------------------.
1988 | yyreduce -- Do a reduction.  |
1989 `-----------------------------*/
1990 yyreduce:
1991   /* yyn is the number of a rule to reduce with.  */
1992   yylen = yyr2[yyn];
1993
1994   /* If YYLEN is nonzero, implement the default value of the action:
1995      `$$ = $1'.
1996
1997      Otherwise, the following line sets YYVAL to garbage.
1998      This behavior is undocumented and Bison
1999      users should not rely upon it.  Assigning to YYVAL
2000      unconditionally makes the parser a bit smaller, and it avoids a
2001      GCC warning that YYVAL may be used uninitialized.  */
2002   yyval = yyvsp[1-yylen];
2003
2004
2005   YY_REDUCE_PRINT (yyn);
2006   switch (yyn)
2007     {
2008         case 7:
2009
2010 /* Line 1455 of yacc.c  */
2011 #line 210 "parse.y"
2012     { /* this do nothing action removes a vacuous warning
2013                   from Bison */
2014              }
2015     break;
2016
2017   case 8:
2018
2019 /* Line 1455 of yacc.c  */
2020 #line 215 "parse.y"
2021     { be_setup(scope = SCOPE_BEGIN) ; }
2022     break;
2023
2024   case 9:
2025
2026 /* Line 1455 of yacc.c  */
2027 #line 218 "parse.y"
2028     { switch_code_to_main() ; }
2029     break;
2030
2031   case 10:
2032
2033 /* Line 1455 of yacc.c  */
2034 #line 221 "parse.y"
2035     { be_setup(scope = SCOPE_END) ; }
2036     break;
2037
2038   case 11:
2039
2040 /* Line 1455 of yacc.c  */
2041 #line 224 "parse.y"
2042     { switch_code_to_main() ; }
2043     break;
2044
2045   case 12:
2046
2047 /* Line 1455 of yacc.c  */
2048 #line 227 "parse.y"
2049     { code_jmp(_JZ, (INST*)0) ; }
2050     break;
2051
2052   case 13:
2053
2054 /* Line 1455 of yacc.c  */
2055 #line 230 "parse.y"
2056     { patch_jmp( code_ptr ) ; }
2057     break;
2058
2059   case 14:
2060
2061 /* Line 1455 of yacc.c  */
2062 #line 234 "parse.y"
2063     { 
2064                INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2065              int len ;
2066
2067                code_push(p1, code_ptr - p1, scope, active_funct) ;
2068                code_ptr = p1 ;
2069
2070                code2op(_RANGE, 1) ;
2071                code_ptr += 3 ;
2072                len = code_pop(code_ptr) ;
2073              code_ptr += len ;
2074                code1(_STOP) ;
2075              p1 = CDP((yyvsp[(1) - (2)].start)) ;
2076                p1[2].op = code_ptr - (p1+1) ;
2077              }
2078     break;
2079
2080   case 15:
2081
2082 /* Line 1455 of yacc.c  */
2083 #line 250 "parse.y"
2084     { code1(_STOP) ; }
2085     break;
2086
2087   case 16:
2088
2089 /* Line 1455 of yacc.c  */
2090 #line 253 "parse.y"
2091     { 
2092                INST *p1 = CDP((yyvsp[(1) - (6)].start)) ;
2093                
2094                p1[3].op = CDP((yyvsp[(6) - (6)].start)) - (p1+1) ;
2095                p1[4].op = code_ptr - (p1+1) ;
2096              }
2097     break;
2098
2099   case 17:
2100
2101 /* Line 1455 of yacc.c  */
2102 #line 264 "parse.y"
2103     { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
2104     break;
2105
2106   case 18:
2107
2108 /* Line 1455 of yacc.c  */
2109 #line 266 "parse.y"
2110     { (yyval.start) = code_offset ; /* does nothing won't be executed */
2111               print_flag = getline_flag = paren_cnt = 0 ;
2112               yyerrok ; }
2113     break;
2114
2115   case 20:
2116
2117 /* Line 1455 of yacc.c  */
2118 #line 273 "parse.y"
2119     { (yyval.start) = code_offset ;
2120                        code1(_PUSHINT) ; code1(0) ;
2121                        code2(_PRINT, bi_print) ;
2122                      }
2123     break;
2124
2125   case 24:
2126
2127 /* Line 1455 of yacc.c  */
2128 #line 286 "parse.y"
2129     { code1(_POP) ; }
2130     break;
2131
2132   case 25:
2133
2134 /* Line 1455 of yacc.c  */
2135 #line 288 "parse.y"
2136     { (yyval.start) = code_offset ; }
2137     break;
2138
2139   case 26:
2140
2141 /* Line 1455 of yacc.c  */
2142 #line 290 "parse.y"
2143     { (yyval.start) = code_offset ;
2144                 print_flag = getline_flag = 0 ;
2145                 paren_cnt = 0 ;
2146                 yyerrok ;
2147               }
2148     break;
2149
2150   case 27:
2151
2152 /* Line 1455 of yacc.c  */
2153 #line 296 "parse.y"
2154     { (yyval.start) = code_offset ; BC_insert('B', code_ptr+1) ;
2155                code2(_JMP, 0) /* don't use code_jmp ! */ ; }
2156     break;
2157
2158   case 28:
2159
2160 /* Line 1455 of yacc.c  */
2161 #line 299 "parse.y"
2162     { (yyval.start) = code_offset ; BC_insert('C', code_ptr+1) ;
2163                code2(_JMP, 0) ; }
2164     break;
2165
2166   case 29:
2167
2168 /* Line 1455 of yacc.c  */
2169 #line 302 "parse.y"
2170     { if ( scope != SCOPE_FUNCT )
2171                      compile_error("return outside function body") ;
2172              }
2173     break;
2174
2175   case 30:
2176
2177 /* Line 1455 of yacc.c  */
2178 #line 306 "parse.y"
2179     { if ( scope != SCOPE_MAIN )
2180                    compile_error( "improper use of next" ) ;
2181                 (yyval.start) = code_offset ; 
2182                 code1(_NEXT) ;
2183               }
2184     break;
2185
2186   case 34:
2187
2188 /* Line 1455 of yacc.c  */
2189 #line 317 "parse.y"
2190     { code1(_ASSIGN) ; }
2191     break;
2192
2193   case 35:
2194
2195 /* Line 1455 of yacc.c  */
2196 #line 318 "parse.y"
2197     { code1(_ADD_ASG) ; }
2198     break;
2199
2200   case 36:
2201
2202 /* Line 1455 of yacc.c  */
2203 #line 319 "parse.y"
2204     { code1(_SUB_ASG) ; }
2205     break;
2206
2207   case 37:
2208
2209 /* Line 1455 of yacc.c  */
2210 #line 320 "parse.y"
2211     { code1(_MUL_ASG) ; }
2212     break;
2213
2214   case 38:
2215
2216 /* Line 1455 of yacc.c  */
2217 #line 321 "parse.y"
2218     { code1(_DIV_ASG) ; }
2219     break;
2220
2221   case 39:
2222
2223 /* Line 1455 of yacc.c  */
2224 #line 322 "parse.y"
2225     { code1(_MOD_ASG) ; }
2226     break;
2227
2228   case 40:
2229
2230 /* Line 1455 of yacc.c  */
2231 #line 323 "parse.y"
2232     { code1(_POW_ASG) ; }
2233     break;
2234
2235   case 41:
2236
2237 /* Line 1455 of yacc.c  */
2238 #line 324 "parse.y"
2239     { code1(_EQ) ; }
2240     break;
2241
2242   case 42:
2243
2244 /* Line 1455 of yacc.c  */
2245 #line 325 "parse.y"
2246     { code1(_NEQ) ; }
2247     break;
2248
2249   case 43:
2250
2251 /* Line 1455 of yacc.c  */
2252 #line 326 "parse.y"
2253     { code1(_LT) ; }
2254     break;
2255
2256   case 44:
2257
2258 /* Line 1455 of yacc.c  */
2259 #line 327 "parse.y"
2260     { code1(_LTE) ; }
2261     break;
2262
2263   case 45:
2264
2265 /* Line 1455 of yacc.c  */
2266 #line 328 "parse.y"
2267     { code1(_GT) ; }
2268     break;
2269
2270   case 46:
2271
2272 /* Line 1455 of yacc.c  */
2273 #line 329 "parse.y"
2274     { code1(_GTE) ; }
2275     break;
2276
2277   case 47:
2278
2279 /* Line 1455 of yacc.c  */
2280 #line 332 "parse.y"
2281     {
2282             INST *p3 = CDP((yyvsp[(3) - (3)].start)) ;
2283
2284             if ( p3 == code_ptr - 2 )
2285             {
2286                if ( p3->op == _MATCH0 )  p3->op = _MATCH1 ;
2287
2288                else /* check for string */
2289                if ( p3->op == _PUSHS )
2290                { CELL *cp = ZMALLOC(CELL) ;
2291
2292                  cp->type = C_STRING ; 
2293                  cp->ptr = p3[1].ptr ;
2294                  cast_to_RE(cp) ;
2295                  code_ptr -= 2 ;
2296                  code2(_MATCH1, cp->ptr) ;
2297                  ZFREE(cp) ;
2298                }
2299                else  code1(_MATCH2) ;
2300             }
2301             else code1(_MATCH2) ;
2302
2303             if ( !(yyvsp[(2) - (3)].ival) ) code1(_NOT) ;
2304           }
2305     break;
2306
2307   case 48:
2308
2309 /* Line 1455 of yacc.c  */
2310 #line 359 "parse.y"
2311     { code1(_TEST) ;
2312                 code_jmp(_LJNZ, (INST*)0) ;
2313               }
2314     break;
2315
2316   case 49:
2317
2318 /* Line 1455 of yacc.c  */
2319 #line 363 "parse.y"
2320     { code1(_TEST) ; patch_jmp(code_ptr) ; }
2321     break;
2322
2323   case 50:
2324
2325 /* Line 1455 of yacc.c  */
2326 #line 366 "parse.y"
2327     { code1(_TEST) ; 
2328                 code_jmp(_LJZ, (INST*)0) ;
2329               }
2330     break;
2331
2332   case 51:
2333
2334 /* Line 1455 of yacc.c  */
2335 #line 370 "parse.y"
2336     { code1(_TEST) ; patch_jmp(code_ptr) ; }
2337     break;
2338
2339   case 52:
2340
2341 /* Line 1455 of yacc.c  */
2342 #line 372 "parse.y"
2343     { code_jmp(_JZ, (INST*)0) ; }
2344     break;
2345
2346   case 53:
2347
2348 /* Line 1455 of yacc.c  */
2349 #line 373 "parse.y"
2350     { code_jmp(_JMP, (INST*)0) ; }
2351     break;
2352
2353   case 54:
2354
2355 /* Line 1455 of yacc.c  */
2356 #line 375 "parse.y"
2357     { patch_jmp(code_ptr) ; patch_jmp(CDP((yyvsp[(7) - (7)].start))) ; }
2358     break;
2359
2360   case 56:
2361
2362 /* Line 1455 of yacc.c  */
2363 #line 380 "parse.y"
2364     { code1(_CAT) ; }
2365     break;
2366
2367   case 57:
2368
2369 /* Line 1455 of yacc.c  */
2370 #line 384 "parse.y"
2371     {  (yyval.start) = code_offset ; code2(_PUSHD, (yyvsp[(1) - (1)].ptr)) ; }
2372     break;
2373
2374   case 58:
2375
2376 /* Line 1455 of yacc.c  */
2377 #line 386 "parse.y"
2378     { (yyval.start) = code_offset ; code2(_PUSHS, (yyvsp[(1) - (1)].ptr)) ; }
2379     break;
2380
2381   case 59:
2382
2383 /* Line 1455 of yacc.c  */
2384 #line 388 "parse.y"
2385     { check_var((yyvsp[(1) - (1)].stp)) ;
2386             (yyval.start) = code_offset ;
2387             if ( is_local((yyvsp[(1) - (1)].stp)) )
2388             { code2op(L_PUSHI, (yyvsp[(1) - (1)].stp)->offset) ; }
2389             else code2(_PUSHI, (yyvsp[(1) - (1)].stp)->stval.cp) ;
2390           }
2391     break;
2392
2393   case 60:
2394
2395 /* Line 1455 of yacc.c  */
2396 #line 396 "parse.y"
2397     { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
2398     break;
2399
2400   case 61:
2401
2402 /* Line 1455 of yacc.c  */
2403 #line 400 "parse.y"
2404     { (yyval.start) = code_offset ; code2(_MATCH0, (yyvsp[(1) - (1)].ptr)) ; }
2405     break;
2406
2407   case 62:
2408
2409 /* Line 1455 of yacc.c  */
2410 #line 403 "parse.y"
2411     { code1(_ADD) ; }
2412     break;
2413
2414   case 63:
2415
2416 /* Line 1455 of yacc.c  */
2417 #line 404 "parse.y"
2418     { code1(_SUB) ; }
2419     break;
2420
2421   case 64:
2422
2423 /* Line 1455 of yacc.c  */
2424 #line 405 "parse.y"
2425     { code1(_MUL) ; }
2426     break;
2427
2428   case 65:
2429
2430 /* Line 1455 of yacc.c  */
2431 #line 406 "parse.y"
2432     { code1(_DIV) ; }
2433     break;
2434
2435   case 66:
2436
2437 /* Line 1455 of yacc.c  */
2438 #line 407 "parse.y"
2439     { code1(_MOD) ; }
2440     break;
2441
2442   case 67:
2443
2444 /* Line 1455 of yacc.c  */
2445 #line 408 "parse.y"
2446     { code1(_POW) ; }
2447     break;
2448
2449   case 68:
2450
2451 /* Line 1455 of yacc.c  */
2452 #line 410 "parse.y"
2453     { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_NOT) ; }
2454     break;
2455
2456   case 69:
2457
2458 /* Line 1455 of yacc.c  */
2459 #line 412 "parse.y"
2460     { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_UPLUS) ; }
2461     break;
2462
2463   case 70:
2464
2465 /* Line 1455 of yacc.c  */
2466 #line 414 "parse.y"
2467     { (yyval.start) = (yyvsp[(2) - (2)].start) ; code1(_UMINUS) ; }
2468     break;
2469
2470   case 72:
2471
2472 /* Line 1455 of yacc.c  */
2473 #line 419 "parse.y"
2474     { check_var((yyvsp[(1) - (2)].stp)) ;
2475              (yyval.start) = code_offset ;
2476              code_address((yyvsp[(1) - (2)].stp)) ;
2477
2478              if ( (yyvsp[(2) - (2)].ival) == '+' )  code1(_POST_INC) ;
2479              else  code1(_POST_DEC) ;
2480            }
2481     break;
2482
2483   case 73:
2484
2485 /* Line 1455 of yacc.c  */
2486 #line 427 "parse.y"
2487     { (yyval.start) = (yyvsp[(2) - (2)].start) ; 
2488               if ( (yyvsp[(1) - (2)].ival) == '+' ) code1(_PRE_INC) ;
2489               else  code1(_PRE_DEC) ;
2490             }
2491     break;
2492
2493   case 74:
2494
2495 /* Line 1455 of yacc.c  */
2496 #line 434 "parse.y"
2497     { if ((yyvsp[(2) - (2)].ival) == '+' ) code1(F_POST_INC ) ; 
2498              else  code1(F_POST_DEC) ;
2499            }
2500     break;
2501
2502   case 75:
2503
2504 /* Line 1455 of yacc.c  */
2505 #line 438 "parse.y"
2506     { (yyval.start) = (yyvsp[(2) - (2)].start) ; 
2507              if ( (yyvsp[(1) - (2)].ival) == '+' ) code1(F_PRE_INC) ;
2508              else  code1( F_PRE_DEC) ; 
2509            }
2510     break;
2511
2512   case 76:
2513
2514 /* Line 1455 of yacc.c  */
2515 #line 445 "parse.y"
2516     { (yyval.start) = code_offset ; 
2517           check_var((yyvsp[(1) - (1)].stp)) ;
2518           code_address((yyvsp[(1) - (1)].stp)) ;
2519         }
2520     break;
2521
2522   case 77:
2523
2524 /* Line 1455 of yacc.c  */
2525 #line 453 "parse.y"
2526     { (yyval.ival) = 0 ; }
2527     break;
2528
2529   case 79:
2530
2531 /* Line 1455 of yacc.c  */
2532 #line 458 "parse.y"
2533     { (yyval.ival) = 1 ; }
2534     break;
2535
2536   case 80:
2537
2538 /* Line 1455 of yacc.c  */
2539 #line 460 "parse.y"
2540     { (yyval.ival) = (yyvsp[(1) - (3)].ival) + 1 ; }
2541     break;
2542
2543   case 81:
2544
2545 /* Line 1455 of yacc.c  */
2546 #line 465 "parse.y"
2547     { BI_REC *p = (yyvsp[(1) - (5)].bip) ;
2548           (yyval.start) = (yyvsp[(2) - (5)].start) ;
2549           if ( (int)p->min_args > (yyvsp[(4) - (5)].ival) || (int)p->max_args < (yyvsp[(4) - (5)].ival) )
2550             compile_error(
2551             "wrong number of arguments in call to %s" ,
2552             p->name ) ;
2553           if ( p->min_args != p->max_args ) /* variable args */
2554               { code1(_PUSHINT) ;  code1((yyvsp[(4) - (5)].ival)) ; }
2555           code2(_BUILTIN , p->fp) ;
2556         }
2557     break;
2558
2559   case 82:
2560
2561 /* Line 1455 of yacc.c  */
2562 #line 476 "parse.y"
2563     {
2564             (yyval.start) = code_offset ;
2565             code1(_PUSHINT) ; code1(0) ;
2566             code2(_BUILTIN, (yyvsp[(1) - (1)].bip)->fp) ;
2567           }
2568     break;
2569
2570   case 83:
2571
2572 /* Line 1455 of yacc.c  */
2573 #line 485 "parse.y"
2574     { (yyval.start) = code_offset ; }
2575     break;
2576
2577   case 84:
2578
2579 /* Line 1455 of yacc.c  */
2580 #line 490 "parse.y"
2581     { code2(_PRINT, (yyvsp[(1) - (5)].fp)) ; 
2582               if ( (yyvsp[(1) - (5)].fp) == bi_printf && (yyvsp[(3) - (5)].ival) == 0 )
2583                     compile_error("no arguments in call to printf") ;
2584               print_flag = 0 ;
2585               (yyval.start) = (yyvsp[(2) - (5)].start) ;
2586             }
2587     break;
2588
2589   case 85:
2590
2591 /* Line 1455 of yacc.c  */
2592 #line 498 "parse.y"
2593     { (yyval.fp) = bi_print ; print_flag = 1 ;}
2594     break;
2595
2596   case 86:
2597
2598 /* Line 1455 of yacc.c  */
2599 #line 499 "parse.y"
2600     { (yyval.fp) = bi_printf ; print_flag = 1 ; }
2601     break;
2602
2603   case 87:
2604
2605 /* Line 1455 of yacc.c  */
2606 #line 502 "parse.y"
2607     { code2op(_PUSHINT, (yyvsp[(1) - (1)].ival)) ; }
2608     break;
2609
2610   case 88:
2611
2612 /* Line 1455 of yacc.c  */
2613 #line 504 "parse.y"
2614     { (yyval.ival) = (yyvsp[(2) - (3)].arg2p)->cnt ; zfree((yyvsp[(2) - (3)].arg2p),sizeof(ARG2_REC)) ; 
2615              code2op(_PUSHINT, (yyval.ival)) ; 
2616            }
2617     break;
2618
2619   case 89:
2620
2621 /* Line 1455 of yacc.c  */
2622 #line 508 "parse.y"
2623     { (yyval.ival)=0 ; code2op(_PUSHINT, 0) ; }
2624     break;
2625
2626   case 90:
2627
2628 /* Line 1455 of yacc.c  */
2629 #line 512 "parse.y"
2630     { (yyval.arg2p) = (ARG2_REC*) zmalloc(sizeof(ARG2_REC)) ;
2631              (yyval.arg2p)->start = (yyvsp[(1) - (3)].start) ;
2632              (yyval.arg2p)->cnt = 2 ;
2633            }
2634     break;
2635
2636   case 91:
2637
2638 /* Line 1455 of yacc.c  */
2639 #line 517 "parse.y"
2640     { (yyval.arg2p) = (yyvsp[(1) - (3)].arg2p) ; (yyval.arg2p)->cnt++ ; }
2641     break;
2642
2643   case 93:
2644
2645 /* Line 1455 of yacc.c  */
2646 #line 522 "parse.y"
2647     { code2op(_PUSHINT, (yyvsp[(1) - (2)].ival)) ; }
2648     break;
2649
2650   case 94:
2651
2652 /* Line 1455 of yacc.c  */
2653 #line 529 "parse.y"
2654     {  (yyval.start) = (yyvsp[(3) - (4)].start) ; eat_nl() ; code_jmp(_JZ, (INST*)0) ; }
2655     break;
2656
2657   case 95:
2658
2659 /* Line 1455 of yacc.c  */
2660 #line 534 "parse.y"
2661     { patch_jmp( code_ptr ) ;  }
2662     break;
2663
2664   case 96:
2665
2666 /* Line 1455 of yacc.c  */
2667 #line 537 "parse.y"
2668     { eat_nl() ; code_jmp(_JMP, (INST*)0) ; }
2669     break;
2670
2671   case 97:
2672
2673 /* Line 1455 of yacc.c  */
2674 #line 542 "parse.y"
2675     { patch_jmp(code_ptr) ; 
2676                   patch_jmp(CDP((yyvsp[(4) - (4)].start))) ; 
2677                 }
2678     break;
2679
2680   case 98:
2681
2682 /* Line 1455 of yacc.c  */
2683 #line 551 "parse.y"
2684     { eat_nl() ; BC_new() ; }
2685     break;
2686
2687   case 99:
2688
2689 /* Line 1455 of yacc.c  */
2690 #line 556 "parse.y"
2691     { (yyval.start) = (yyvsp[(2) - (7)].start) ;
2692           code_jmp(_JNZ, CDP((yyvsp[(2) - (7)].start))) ; 
2693           BC_clear(code_ptr, CDP((yyvsp[(5) - (7)].start))) ; }
2694     break;
2695
2696   case 100:
2697
2698 /* Line 1455 of yacc.c  */
2699 #line 562 "parse.y"
2700     { eat_nl() ; BC_new() ;
2701                   (yyval.start) = (yyvsp[(3) - (4)].start) ;
2702
2703                   /* check if const expression */
2704                   if ( code_ptr - 2 == CDP((yyvsp[(3) - (4)].start)) &&
2705                        code_ptr[-2].op == _PUSHD &&
2706                        *(double*)code_ptr[-1].ptr != 0.0 
2707                      )
2708                      code_ptr -= 2 ;
2709                   else
2710                   { INST *p3 = CDP((yyvsp[(3) - (4)].start)) ;
2711                     code_push(p3, code_ptr-p3, scope, active_funct) ;
2712                     code_ptr = p3 ;
2713                     code2(_JMP, (INST*)0) ; /* code2() not code_jmp() */
2714                   }
2715                 }
2716     break;
2717
2718   case 101:
2719
2720 /* Line 1455 of yacc.c  */
2721 #line 582 "parse.y"
2722     { 
2723                   int  saved_offset ;
2724                   int len ;
2725                   INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2726                   INST *p2 = CDP((yyvsp[(2) - (2)].start)) ;
2727
2728                   if ( p1 != p2 )  /* real test in loop */
2729                   {
2730                     p1[1].op = code_ptr-(p1+1) ;
2731                     saved_offset = code_offset ;
2732                     len = code_pop(code_ptr) ;
2733                     code_ptr += len ;
2734                     code_jmp(_JNZ, CDP((yyvsp[(2) - (2)].start))) ;
2735                     BC_clear(code_ptr, CDP(saved_offset)) ;
2736                   }
2737                   else /* while(1) */
2738                   {
2739                     code_jmp(_JMP, p1) ;
2740                     BC_clear(code_ptr, CDP((yyvsp[(2) - (2)].start))) ;
2741                   }
2742                 }
2743     break;
2744
2745   case 102:
2746
2747 /* Line 1455 of yacc.c  */
2748 #line 608 "parse.y"
2749     { 
2750                   int cont_offset = code_offset ;
2751                   unsigned len = code_pop(code_ptr) ;
2752                   INST *p2 = CDP((yyvsp[(2) - (4)].start)) ;
2753                   INST *p4 = CDP((yyvsp[(4) - (4)].start)) ;
2754
2755                   code_ptr += len ;
2756
2757                   if ( p2 != p4 )  /* real test in for2 */
2758                   {
2759                     p4[-1].op = code_ptr - p4 + 1 ;
2760                     len = code_pop(code_ptr) ;
2761                     code_ptr += len ;
2762                     code_jmp(_JNZ, CDP((yyvsp[(4) - (4)].start))) ;
2763                   }
2764                   else /*  for(;;) */
2765                   code_jmp(_JMP, p4) ;
2766
2767                   BC_clear(code_ptr, CDP(cont_offset)) ;
2768
2769                 }
2770     break;
2771
2772   case 103:
2773
2774 /* Line 1455 of yacc.c  */
2775 #line 631 "parse.y"
2776     { (yyval.start) = code_offset ; }
2777     break;
2778
2779   case 104:
2780
2781 /* Line 1455 of yacc.c  */
2782 #line 633 "parse.y"
2783     { (yyval.start) = (yyvsp[(3) - (4)].start) ; code1(_POP) ; }
2784     break;
2785
2786   case 105:
2787
2788 /* Line 1455 of yacc.c  */
2789 #line 636 "parse.y"
2790     { (yyval.start) = code_offset ; }
2791     break;
2792
2793   case 106:
2794
2795 /* Line 1455 of yacc.c  */
2796 #line 638 "parse.y"
2797     { 
2798              if ( code_ptr - 2 == CDP((yyvsp[(1) - (2)].start)) &&
2799                   code_ptr[-2].op == _PUSHD &&
2800                   * (double*) code_ptr[-1].ptr != 0.0
2801                 )
2802                     code_ptr -= 2 ;
2803              else   
2804              {
2805                INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2806                code_push(p1, code_ptr-p1, scope, active_funct) ;
2807                code_ptr = p1 ;
2808                code2(_JMP, (INST*)0) ;
2809              }
2810            }
2811     break;
2812
2813   case 107:
2814
2815 /* Line 1455 of yacc.c  */
2816 #line 655 "parse.y"
2817     { eat_nl() ; BC_new() ;
2818              code_push((INST*)0,0, scope, active_funct) ;
2819            }
2820     break;
2821
2822   case 108:
2823
2824 /* Line 1455 of yacc.c  */
2825 #line 659 "parse.y"
2826     { INST *p1 = CDP((yyvsp[(1) - (2)].start)) ;
2827            
2828              eat_nl() ; BC_new() ; 
2829              code1(_POP) ;
2830              code_push(p1, code_ptr - p1, scope, active_funct) ;
2831              code_ptr -= code_ptr - p1 ;
2832            }
2833     break;
2834
2835   case 109:
2836
2837 /* Line 1455 of yacc.c  */
2838 #line 672 "parse.y"
2839     { check_array((yyvsp[(3) - (3)].stp)) ;
2840              code_array((yyvsp[(3) - (3)].stp)) ; 
2841              code1(A_TEST) ; 
2842             }
2843     break;
2844
2845   case 110:
2846
2847 /* Line 1455 of yacc.c  */
2848 #line 677 "parse.y"
2849     { (yyval.start) = (yyvsp[(2) - (5)].arg2p)->start ;
2850              code2op(A_CAT, (yyvsp[(2) - (5)].arg2p)->cnt) ;
2851              zfree((yyvsp[(2) - (5)].arg2p), sizeof(ARG2_REC)) ;
2852
2853              check_array((yyvsp[(5) - (5)].stp)) ;
2854              code_array((yyvsp[(5) - (5)].stp)) ;
2855              code1(A_TEST) ;
2856            }
2857     break;
2858
2859   case 111:
2860
2861 /* Line 1455 of yacc.c  */
2862 #line 688 "parse.y"
2863     { 
2864              if ( (yyvsp[(4) - (5)].ival) > 1 )
2865              { code2op(A_CAT, (yyvsp[(4) - (5)].ival)) ; }
2866
2867              check_array((yyvsp[(1) - (5)].stp)) ;
2868              if( is_local((yyvsp[(1) - (5)].stp)) )
2869              { code2op(LAE_PUSHA, (yyvsp[(1) - (5)].stp)->offset) ; }
2870              else code2(AE_PUSHA, (yyvsp[(1) - (5)].stp)->stval.array) ;
2871              (yyval.start) = (yyvsp[(2) - (5)].start) ;
2872            }
2873     break;
2874
2875   case 112:
2876
2877 /* Line 1455 of yacc.c  */
2878 #line 701 "parse.y"
2879     { 
2880              if ( (yyvsp[(4) - (5)].ival) > 1 )
2881              { code2op(A_CAT, (yyvsp[(4) - (5)].ival)) ; }
2882
2883              check_array((yyvsp[(1) - (5)].stp)) ;
2884              if( is_local((yyvsp[(1) - (5)].stp)) )
2885              { code2op(LAE_PUSHI, (yyvsp[(1) - (5)].stp)->offset) ; }
2886              else code2(AE_PUSHI, (yyvsp[(1) - (5)].stp)->stval.array) ;
2887              (yyval.start) = (yyvsp[(2) - (5)].start) ;
2888            }
2889     break;
2890
2891   case 113:
2892
2893 /* Line 1455 of yacc.c  */
2894 #line 713 "parse.y"
2895     { 
2896              if ( (yyvsp[(4) - (6)].ival) > 1 )
2897              { code2op(A_CAT,(yyvsp[(4) - (6)].ival)) ; }
2898
2899              check_array((yyvsp[(1) - (6)].stp)) ;
2900              if( is_local((yyvsp[(1) - (6)].stp)) )
2901              { code2op(LAE_PUSHA, (yyvsp[(1) - (6)].stp)->offset) ; }
2902              else code2(AE_PUSHA, (yyvsp[(1) - (6)].stp)->stval.array) ;
2903              if ( (yyvsp[(6) - (6)].ival) == '+' )  code1(_POST_INC) ;
2904              else  code1(_POST_DEC) ;
2905
2906              (yyval.start) = (yyvsp[(2) - (6)].start) ;
2907            }
2908     break;
2909
2910   case 114:
2911
2912 /* Line 1455 of yacc.c  */
2913 #line 730 "parse.y"
2914     { 
2915                (yyval.start) = (yyvsp[(3) - (7)].start) ;
2916                if ( (yyvsp[(5) - (7)].ival) > 1 ) { code2op(A_CAT, (yyvsp[(5) - (7)].ival)) ; }
2917                check_array((yyvsp[(2) - (7)].stp)) ;
2918                code_array((yyvsp[(2) - (7)].stp)) ;
2919                code1(A_DEL) ;
2920              }
2921     break;
2922
2923   case 115:
2924
2925 /* Line 1455 of yacc.c  */
2926 #line 738 "parse.y"
2927     {
2928                 (yyval.start) = code_offset ;
2929                 check_array((yyvsp[(2) - (3)].stp)) ;
2930                 code_array((yyvsp[(2) - (3)].stp)) ;
2931                 code1(DEL_A) ;
2932              }
2933     break;
2934
2935   case 116:
2936
2937 /* Line 1455 of yacc.c  */
2938 #line 749 "parse.y"
2939     { eat_nl() ; BC_new() ;
2940                       (yyval.start) = code_offset ;
2941
2942                       check_var((yyvsp[(3) - (6)].stp)) ;
2943                       code_address((yyvsp[(3) - (6)].stp)) ;
2944                       check_array((yyvsp[(5) - (6)].stp)) ;
2945                       code_array((yyvsp[(5) - (6)].stp)) ;
2946
2947                       code2(SET_ALOOP, (INST*)0) ;
2948                     }
2949     break;
2950
2951   case 117:
2952
2953 /* Line 1455 of yacc.c  */
2954 #line 763 "parse.y"
2955     { 
2956                 INST *p2 = CDP((yyvsp[(2) - (2)].start)) ;
2957
2958                 p2[-1].op = code_ptr - p2 + 1 ;
2959                 BC_clear( code_ptr+2 , code_ptr) ;
2960                 code_jmp(ALOOP, p2) ;
2961                 code1(POP_AL) ;
2962               }
2963     break;
2964
2965   case 118:
2966
2967 /* Line 1455 of yacc.c  */
2968 #line 780 "parse.y"
2969     { (yyval.start) = code_offset ; code2(F_PUSHA, (yyvsp[(1) - (1)].cp)) ; }
2970     break;
2971
2972   case 119:
2973
2974 /* Line 1455 of yacc.c  */
2975 #line 782 "parse.y"
2976     { check_var((yyvsp[(2) - (2)].stp)) ;
2977              (yyval.start) = code_offset ;
2978              if ( is_local((yyvsp[(2) - (2)].stp)) )
2979              { code2op(L_PUSHI, (yyvsp[(2) - (2)].stp)->offset) ; }
2980              else code2(_PUSHI, (yyvsp[(2) - (2)].stp)->stval.cp) ;
2981
2982              CODE_FE_PUSHA() ;
2983            }
2984     break;
2985
2986   case 120:
2987
2988 /* Line 1455 of yacc.c  */
2989 #line 791 "parse.y"
2990     { 
2991              if ( (yyvsp[(5) - (6)].ival) > 1 )
2992              { code2op(A_CAT, (yyvsp[(5) - (6)].ival)) ; }
2993
2994              check_array((yyvsp[(2) - (6)].stp)) ;
2995              if( is_local((yyvsp[(2) - (6)].stp)) )
2996              { code2op(LAE_PUSHI, (yyvsp[(2) - (6)].stp)->offset) ; }
2997              else code2(AE_PUSHI, (yyvsp[(2) - (6)].stp)->stval.array) ;
2998
2999              CODE_FE_PUSHA()  ;
3000
3001              (yyval.start) = (yyvsp[(3) - (6)].start) ;
3002            }
3003     break;
3004
3005   case 121:
3006
3007 /* Line 1455 of yacc.c  */
3008 #line 805 "parse.y"
3009     { (yyval.start) = (yyvsp[(2) - (2)].start) ;  CODE_FE_PUSHA() ; }
3010     break;
3011
3012   case 122:
3013
3014 /* Line 1455 of yacc.c  */
3015 #line 807 "parse.y"
3016     { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3017     break;
3018
3019   case 123:
3020
3021 /* Line 1455 of yacc.c  */
3022 #line 811 "parse.y"
3023     { field_A2I() ; }
3024     break;
3025
3026   case 124:
3027
3028 /* Line 1455 of yacc.c  */
3029 #line 814 "parse.y"
3030     { code1(F_ASSIGN) ; }
3031     break;
3032
3033   case 125:
3034
3035 /* Line 1455 of yacc.c  */
3036 #line 815 "parse.y"
3037     { code1(F_ADD_ASG) ; }
3038     break;
3039
3040   case 126:
3041
3042 /* Line 1455 of yacc.c  */
3043 #line 816 "parse.y"
3044     { code1(F_SUB_ASG) ; }
3045     break;
3046
3047   case 127:
3048
3049 /* Line 1455 of yacc.c  */
3050 #line 817 "parse.y"
3051     { code1(F_MUL_ASG) ; }
3052     break;
3053
3054   case 128:
3055
3056 /* Line 1455 of yacc.c  */
3057 #line 818 "parse.y"
3058     { code1(F_DIV_ASG) ; }
3059     break;
3060
3061   case 129:
3062
3063 /* Line 1455 of yacc.c  */
3064 #line 819 "parse.y"
3065     { code1(F_MOD_ASG) ; }
3066     break;
3067
3068   case 130:
3069
3070 /* Line 1455 of yacc.c  */
3071 #line 820 "parse.y"
3072     { code1(F_POW_ASG) ; }
3073     break;
3074
3075   case 131:
3076
3077 /* Line 1455 of yacc.c  */
3078 #line 827 "parse.y"
3079     { code2(_BUILTIN, bi_split) ; }
3080     break;
3081
3082   case 132:
3083
3084 /* Line 1455 of yacc.c  */
3085 #line 831 "parse.y"
3086     { (yyval.start) = (yyvsp[(3) - (5)].start) ;
3087               check_array((yyvsp[(5) - (5)].stp)) ;
3088               code_array((yyvsp[(5) - (5)].stp))  ;
3089             }
3090     break;
3091
3092   case 133:
3093
3094 /* Line 1455 of yacc.c  */
3095 #line 838 "parse.y"
3096     { code2(_PUSHI, &fs_shadow) ; }
3097     break;
3098
3099   case 134:
3100
3101 /* Line 1455 of yacc.c  */
3102 #line 840 "parse.y"
3103     { 
3104                   if ( CDP((yyvsp[(2) - (3)].start)) == code_ptr - 2 )
3105                   {
3106                     if ( code_ptr[-2].op == _MATCH0 )
3107                         RE_as_arg() ;
3108                     else
3109                     if ( code_ptr[-2].op == _PUSHS )
3110                     { CELL *cp = ZMALLOC(CELL) ;
3111
3112                       cp->type = C_STRING ;
3113                       cp->ptr = code_ptr[-1].ptr ;
3114                       cast_for_split(cp) ;
3115                       code_ptr[-2].op = _PUSHC ;
3116                       code_ptr[-1].ptr = (PTR) cp ;
3117                     }
3118                   }
3119                 }
3120     break;
3121
3122   case 135:
3123
3124 /* Line 1455 of yacc.c  */
3125 #line 864 "parse.y"
3126     { (yyval.start) = (yyvsp[(3) - (6)].start) ; 
3127           code2(_BUILTIN, bi_match) ;
3128         }
3129     break;
3130
3131   case 136:
3132
3133 /* Line 1455 of yacc.c  */
3134 #line 871 "parse.y"
3135     {
3136                INST *p1 = CDP((yyvsp[(1) - (1)].start)) ;
3137
3138                if ( p1 == code_ptr - 2 ) 
3139                {
3140                  if ( p1->op == _MATCH0 ) RE_as_arg() ;
3141                  else
3142                  if ( p1->op == _PUSHS )
3143                  { CELL *cp = ZMALLOC(CELL) ;
3144
3145                    cp->type = C_STRING ;
3146                    cp->ptr = p1[1].ptr ;
3147                    cast_to_RE(cp) ;
3148                    p1->op = _PUSHC ;
3149                    p1[1].ptr = (PTR) cp ;
3150                  } 
3151                }
3152              }
3153     break;
3154
3155   case 137:
3156
3157 /* Line 1455 of yacc.c  */
3158 #line 894 "parse.y"
3159     { (yyval.start) = code_offset ;
3160                       code1(_EXIT0) ; }
3161     break;
3162
3163   case 138:
3164
3165 /* Line 1455 of yacc.c  */
3166 #line 897 "parse.y"
3167     { (yyval.start) = (yyvsp[(2) - (3)].start) ; code1(_EXIT) ; }
3168     break;
3169
3170   case 139:
3171
3172 /* Line 1455 of yacc.c  */
3173 #line 901 "parse.y"
3174     { (yyval.start) = code_offset ;
3175                       code1(_RET0) ; }
3176     break;
3177
3178   case 140:
3179
3180 /* Line 1455 of yacc.c  */
3181 #line 904 "parse.y"
3182     { (yyval.start) = (yyvsp[(2) - (3)].start) ; code1(_RET) ; }
3183     break;
3184
3185   case 141:
3186
3187 /* Line 1455 of yacc.c  */
3188 #line 910 "parse.y"
3189     { (yyval.start) = code_offset ;
3190             code2(F_PUSHA, &field[0]) ;
3191             code1(_PUSHINT) ; code1(0) ; 
3192             code2(_BUILTIN, bi_getline) ;
3193             getline_flag = 0 ;
3194           }
3195     break;
3196
3197   case 142:
3198
3199 /* Line 1455 of yacc.c  */
3200 #line 917 "parse.y"
3201     { (yyval.start) = (yyvsp[(2) - (2)].start) ;
3202             code1(_PUSHINT) ; code1(0) ;
3203             code2(_BUILTIN, bi_getline) ;
3204             getline_flag = 0 ;
3205           }
3206     break;
3207
3208   case 143:
3209
3210 /* Line 1455 of yacc.c  */
3211 #line 923 "parse.y"
3212     { code1(_PUSHINT) ; code1(F_IN) ;
3213             code2(_BUILTIN, bi_getline) ;
3214             /* getline_flag already off in yylex() */
3215           }
3216     break;
3217
3218   case 144:
3219
3220 /* Line 1455 of yacc.c  */
3221 #line 928 "parse.y"
3222     { code2(F_PUSHA, &field[0]) ;
3223             code1(_PUSHINT) ; code1(PIPE_IN) ;
3224             code2(_BUILTIN, bi_getline) ;
3225           }
3226     break;
3227
3228   case 145:
3229
3230 /* Line 1455 of yacc.c  */
3231 #line 933 "parse.y"
3232     { 
3233             code1(_PUSHINT) ; code1(PIPE_IN) ;
3234             code2(_BUILTIN, bi_getline) ;
3235           }
3236     break;
3237
3238   case 146:
3239
3240 /* Line 1455 of yacc.c  */
3241 #line 939 "parse.y"
3242     { getline_flag = 1 ; }
3243     break;
3244
3245   case 149:
3246
3247 /* Line 1455 of yacc.c  */
3248 #line 944 "parse.y"
3249     { (yyval.start) = code_offset ;
3250                    code2(F_PUSHA, field+0) ;
3251                  }
3252     break;
3253
3254   case 150:
3255
3256 /* Line 1455 of yacc.c  */
3257 #line 948 "parse.y"
3258     { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3259     break;
3260
3261   case 151:
3262
3263 /* Line 1455 of yacc.c  */
3264 #line 956 "parse.y"
3265     {
3266              INST *p5 = CDP((yyvsp[(5) - (6)].start)) ;
3267              INST *p6 = CDP((yyvsp[(6) - (6)].start)) ;
3268
3269              if ( p6 - p5 == 2 && p5->op == _PUSHS  )
3270              { /* cast from STRING to REPL at compile time */
3271                CELL *cp = ZMALLOC(CELL) ;
3272                cp->type = C_STRING ;
3273                cp->ptr = p5[1].ptr ;
3274                cast_to_REPL(cp) ;
3275                p5->op = _PUSHC ;
3276                p5[1].ptr = (PTR) cp ;
3277              }
3278              code2(_BUILTIN, (yyvsp[(1) - (6)].fp)) ;
3279              (yyval.start) = (yyvsp[(3) - (6)].start) ;
3280            }
3281     break;
3282
3283   case 152:
3284
3285 /* Line 1455 of yacc.c  */
3286 #line 974 "parse.y"
3287     { (yyval.fp) = bi_sub ; }
3288     break;
3289
3290   case 153:
3291
3292 /* Line 1455 of yacc.c  */
3293 #line 975 "parse.y"
3294     { (yyval.fp) = bi_gsub ; }
3295     break;
3296
3297   case 154:
3298
3299 /* Line 1455 of yacc.c  */
3300 #line 980 "parse.y"
3301     { (yyval.start) = code_offset ;
3302                   code2(F_PUSHA, &field[0]) ; 
3303                 }
3304     break;
3305
3306   case 155:
3307
3308 /* Line 1455 of yacc.c  */
3309 #line 985 "parse.y"
3310     { (yyval.start) = (yyvsp[(2) - (3)].start) ; }
3311     break;
3312
3313   case 156:
3314
3315 /* Line 1455 of yacc.c  */
3316 #line 993 "parse.y"
3317     { 
3318                    resize_fblock((yyvsp[(1) - (2)].fbp)) ;
3319                    restore_ids() ;
3320                    switch_code_to_main() ;
3321                  }
3322     break;
3323
3324   case 157:
3325
3326 /* Line 1455 of yacc.c  */
3327 #line 1002 "parse.y"
3328     { eat_nl() ;
3329                    scope = SCOPE_FUNCT ;
3330                    active_funct = (yyvsp[(1) - (4)].fbp) ;
3331                    *main_code_p = active_code ;
3332
3333                    (yyvsp[(1) - (4)].fbp)->nargs = (yyvsp[(3) - (4)].ival) ;
3334                    if ( (yyvsp[(3) - (4)].ival) )
3335                         (yyvsp[(1) - (4)].fbp)->typev = (char *)
3336                         memset( zmalloc((yyvsp[(3) - (4)].ival)), ST_LOCAL_NONE, (yyvsp[(3) - (4)].ival)) ;
3337                    else (yyvsp[(1) - (4)].fbp)->typev = (char *) 0 ;
3338
3339                    code_ptr = code_base =
3340                        (INST *) zmalloc(INST_BYTES(PAGESZ));
3341                    code_limit = code_base + PAGESZ ;
3342                    code_warn = code_limit - CODEWARN ;
3343                  }
3344     break;
3345
3346   case 158:
3347
3348 /* Line 1455 of yacc.c  */
3349 #line 1021 "parse.y"
3350     { FBLOCK  *fbp ;
3351
3352                    if ( (yyvsp[(2) - (2)].stp)->type == ST_NONE )
3353                    {
3354                          (yyvsp[(2) - (2)].stp)->type = ST_FUNCT ;
3355                          fbp = (yyvsp[(2) - (2)].stp)->stval.fbp = 
3356                              (FBLOCK *) zmalloc(sizeof(FBLOCK)) ;
3357                          fbp->name = (yyvsp[(2) - (2)].stp)->name ;
3358                          fbp->code = (INST*) 0 ;
3359                    }
3360                    else
3361                    {
3362                          type_error( (yyvsp[(2) - (2)].stp) ) ;
3363
3364                          /* this FBLOCK will not be put in
3365                             the symbol table */
3366                          fbp = (FBLOCK*) zmalloc(sizeof(FBLOCK)) ;
3367                          fbp->name = "" ;
3368                    }
3369                    (yyval.fbp) = fbp ;
3370                  }
3371     break;
3372
3373   case 159:
3374
3375 /* Line 1455 of yacc.c  */
3376 #line 1044 "parse.y"
3377     { (yyval.fbp) = (yyvsp[(2) - (2)].fbp) ; 
3378                    if ( (yyvsp[(2) - (2)].fbp)->code ) 
3379                        compile_error("redefinition of %s" , (yyvsp[(2) - (2)].fbp)->name) ;
3380                  }
3381     break;
3382
3383   case 160:
3384
3385 /* Line 1455 of yacc.c  */
3386 #line 1050 "parse.y"
3387     { (yyval.ival) = 0 ; }
3388     break;
3389
3390   case 162:
3391
3392 /* Line 1455 of yacc.c  */
3393 #line 1055 "parse.y"
3394     { (yyvsp[(1) - (1)].stp) = save_id((yyvsp[(1) - (1)].stp)->name) ;
3395                 (yyvsp[(1) - (1)].stp)->type = ST_LOCAL_NONE ;
3396                 (yyvsp[(1) - (1)].stp)->offset = 0 ;
3397                 (yyval.ival) = 1 ;
3398               }
3399     break;
3400
3401   case 163:
3402
3403 /* Line 1455 of yacc.c  */
3404 #line 1061 "parse.y"
3405     { if ( is_local((yyvsp[(3) - (3)].stp)) ) 
3406                   compile_error("%s is duplicated in argument list",
3407                     (yyvsp[(3) - (3)].stp)->name) ;
3408                 else
3409                 { (yyvsp[(3) - (3)].stp) = save_id((yyvsp[(3) - (3)].stp)->name) ;
3410                   (yyvsp[(3) - (3)].stp)->type = ST_LOCAL_NONE ;
3411                   (yyvsp[(3) - (3)].stp)->offset = (yyvsp[(1) - (3)].ival) ;
3412                   (yyval.ival) = (yyvsp[(1) - (3)].ival) + 1 ;
3413                 }
3414               }
3415     break;
3416
3417   case 164:
3418
3419 /* Line 1455 of yacc.c  */
3420 #line 1074 "parse.y"
3421     {  /* we may have to recover from a bungled function
3422                        definition */
3423                    /* can have local ids, before code scope
3424                       changes  */
3425                     restore_ids() ;
3426
3427                     switch_code_to_main() ;
3428                  }
3429     break;
3430
3431   case 165:
3432
3433 /* Line 1455 of yacc.c  */
3434 #line 1087 "parse.y"
3435     { (yyval.start) = (yyvsp[(2) - (3)].start) ;
3436              code2(_CALL, (yyvsp[(1) - (3)].fbp)) ;
3437
3438              if ( (yyvsp[(3) - (3)].ca_p) )  code1((yyvsp[(3) - (3)].ca_p)->arg_num+1) ;
3439              else  code1(0) ;
3440                
3441              check_fcall((yyvsp[(1) - (3)].fbp), scope, code_move_level, active_funct, 
3442                          (yyvsp[(3) - (3)].ca_p), token_lineno) ;
3443            }
3444     break;
3445
3446   case 166:
3447
3448 /* Line 1455 of yacc.c  */
3449 #line 1099 "parse.y"
3450     { (yyval.ca_p) = (CA_REC *) 0 ; }
3451     break;
3452
3453   case 167:
3454
3455 /* Line 1455 of yacc.c  */
3456 #line 1101 "parse.y"
3457     { (yyval.ca_p) = (yyvsp[(2) - (2)].ca_p) ;
3458                  (yyval.ca_p)->link = (yyvsp[(1) - (2)].ca_p) ;
3459                  (yyval.ca_p)->arg_num = (yyvsp[(1) - (2)].ca_p) ? (yyvsp[(1) - (2)].ca_p)->arg_num+1 : 0 ;
3460                }
3461     break;
3462
3463   case 168:
3464
3465 /* Line 1455 of yacc.c  */
3466 #line 1116 "parse.y"
3467     { (yyval.ca_p) = (CA_REC *) 0 ; }
3468     break;
3469
3470   case 169:
3471
3472 /* Line 1455 of yacc.c  */
3473 #line 1118 "parse.y"
3474     { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3475                 (yyval.ca_p)->link = (yyvsp[(1) - (3)].ca_p) ;
3476                 (yyval.ca_p)->type = CA_EXPR  ;
3477                 (yyval.ca_p)->arg_num = (yyvsp[(1) - (3)].ca_p) ? (yyvsp[(1) - (3)].ca_p)->arg_num+1 : 0 ;
3478                 (yyval.ca_p)->call_offset = code_offset ;
3479               }
3480     break;
3481
3482   case 170:
3483
3484 /* Line 1455 of yacc.c  */
3485 #line 1125 "parse.y"
3486     { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3487                 (yyval.ca_p)->link = (yyvsp[(1) - (3)].ca_p) ;
3488                 (yyval.ca_p)->arg_num = (yyvsp[(1) - (3)].ca_p) ? (yyvsp[(1) - (3)].ca_p)->arg_num+1 : 0 ;
3489
3490                 code_call_id((yyval.ca_p), (yyvsp[(2) - (3)].stp)) ;
3491               }
3492     break;
3493
3494   case 171:
3495
3496 /* Line 1455 of yacc.c  */
3497 #line 1134 "parse.y"
3498     { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3499                 (yyval.ca_p)->type = CA_EXPR ;
3500                 (yyval.ca_p)->call_offset = code_offset ;
3501               }
3502     break;
3503
3504   case 172:
3505
3506 /* Line 1455 of yacc.c  */
3507 #line 1140 "parse.y"
3508     { (yyval.ca_p) = ZMALLOC(CA_REC) ;
3509                 code_call_id((yyval.ca_p), (yyvsp[(1) - (2)].stp)) ;
3510               }
3511     break;
3512
3513
3514
3515 /* Line 1455 of yacc.c  */
3516 #line 3517 "y.tab.c"
3517       default: break;
3518     }
3519   YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3520
3521   YYPOPSTACK (yylen);
3522   yylen = 0;
3523   YY_STACK_PRINT (yyss, yyssp);
3524
3525   *++yyvsp = yyval;
3526
3527   /* Now `shift' the result of the reduction.  Determine what state
3528      that goes to, based on the state we popped back to and the rule
3529      number reduced by.  */
3530
3531   yyn = yyr1[yyn];
3532
3533   yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3534   if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3535     yystate = yytable[yystate];
3536   else
3537     yystate = yydefgoto[yyn - YYNTOKENS];
3538
3539   goto yynewstate;
3540
3541
3542 /*------------------------------------.
3543 | yyerrlab -- here on detecting error |
3544 `------------------------------------*/
3545 yyerrlab:
3546   /* If not already recovering from an error, report this error.  */
3547   if (!yyerrstatus)
3548     {
3549       ++yynerrs;
3550 #if ! YYERROR_VERBOSE
3551       yyerror (YY_("syntax error"));
3552 #else
3553       {
3554         YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3555         if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3556           {
3557             YYSIZE_T yyalloc = 2 * yysize;
3558             if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3559               yyalloc = YYSTACK_ALLOC_MAXIMUM;
3560             if (yymsg != yymsgbuf)
3561               YYSTACK_FREE (yymsg);
3562             yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3563             if (yymsg)
3564               yymsg_alloc = yyalloc;
3565             else
3566               {
3567                 yymsg = yymsgbuf;
3568                 yymsg_alloc = sizeof yymsgbuf;
3569               }
3570           }
3571
3572         if (0 < yysize && yysize <= yymsg_alloc)
3573           {
3574             (void) yysyntax_error (yymsg, yystate, yychar);
3575             yyerror (yymsg);
3576           }
3577         else
3578           {
3579             yyerror (YY_("syntax error"));
3580             if (yysize != 0)
3581               goto yyexhaustedlab;
3582           }
3583       }
3584 #endif
3585     }
3586
3587
3588
3589   if (yyerrstatus == 3)
3590     {
3591       /* If just tried and failed to reuse lookahead token after an
3592          error, discard it.  */
3593
3594       if (yychar <= YYEOF)
3595         {
3596           /* Return failure if at end of input.  */
3597           if (yychar == YYEOF)
3598             YYABORT;
3599         }
3600       else
3601         {
3602           yydestruct ("Error: discarding",
3603                       yytoken, &yylval);
3604           yychar = YYEMPTY;
3605         }
3606     }
3607
3608   /* Else will try to reuse lookahead token after shifting the error
3609      token.  */
3610   goto yyerrlab1;
3611
3612
3613 /*---------------------------------------------------.
3614 | yyerrorlab -- error raised explicitly by YYERROR.  |
3615 `---------------------------------------------------*/
3616 yyerrorlab:
3617
3618   /* Pacify compilers like GCC when the user code never invokes
3619      YYERROR and the label yyerrorlab therefore never appears in user
3620      code.  */
3621   if (/*CONSTCOND*/ 0)
3622      goto yyerrorlab;
3623
3624   /* Do not reclaim the symbols of the rule which action triggered
3625      this YYERROR.  */
3626   YYPOPSTACK (yylen);
3627   yylen = 0;
3628   YY_STACK_PRINT (yyss, yyssp);
3629   yystate = *yyssp;
3630   goto yyerrlab1;
3631
3632
3633 /*-------------------------------------------------------------.
3634 | yyerrlab1 -- common code for both syntax error and YYERROR.  |
3635 `-------------------------------------------------------------*/
3636 yyerrlab1:
3637   yyerrstatus = 3;      /* Each real token shifted decrements this.  */
3638
3639   for (;;)
3640     {
3641       yyn = yypact[yystate];
3642       if (yyn != YYPACT_NINF)
3643         {
3644           yyn += YYTERROR;
3645           if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3646             {
3647               yyn = yytable[yyn];
3648               if (0 < yyn)
3649                 break;
3650             }
3651         }
3652
3653       /* Pop the current state because it cannot handle the error token.  */
3654       if (yyssp == yyss)
3655         YYABORT;
3656
3657
3658       yydestruct ("Error: popping",
3659                   yystos[yystate], yyvsp);
3660       YYPOPSTACK (1);
3661       yystate = *yyssp;
3662       YY_STACK_PRINT (yyss, yyssp);
3663     }
3664
3665   *++yyvsp = yylval;
3666
3667
3668   /* Shift the error token.  */
3669   YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3670
3671   yystate = yyn;
3672   goto yynewstate;
3673
3674
3675 /*-------------------------------------.
3676 | yyacceptlab -- YYACCEPT comes here.  |
3677 `-------------------------------------*/
3678 yyacceptlab:
3679   yyresult = 0;
3680   goto yyreturn;
3681
3682 /*-----------------------------------.
3683 | yyabortlab -- YYABORT comes here.  |
3684 `-----------------------------------*/
3685 yyabortlab:
3686   yyresult = 1;
3687   goto yyreturn;
3688
3689 #if !defined(yyoverflow) || YYERROR_VERBOSE
3690 /*-------------------------------------------------.
3691 | yyexhaustedlab -- memory exhaustion comes here.  |
3692 `-------------------------------------------------*/
3693 yyexhaustedlab:
3694   yyerror (YY_("memory exhausted"));
3695   yyresult = 2;
3696   /* Fall through.  */
3697 #endif
3698
3699 yyreturn:
3700   if (yychar != YYEMPTY)
3701      yydestruct ("Cleanup: discarding lookahead",
3702                  yytoken, &yylval);
3703   /* Do not reclaim the symbols of the rule which action triggered
3704      this YYABORT or YYACCEPT.  */
3705   YYPOPSTACK (yylen);
3706   YY_STACK_PRINT (yyss, yyssp);
3707   while (yyssp != yyss)
3708     {
3709       yydestruct ("Cleanup: popping",
3710                   yystos[*yyssp], yyvsp);
3711       YYPOPSTACK (1);
3712     }
3713 #ifndef yyoverflow
3714   if (yyss != yyssa)
3715     YYSTACK_FREE (yyss);
3716 #endif
3717 #if YYERROR_VERBOSE
3718   if (yymsg != yymsgbuf)
3719     YYSTACK_FREE (yymsg);
3720 #endif
3721   /* Make sure YYID is used.  */
3722   return YYID (yyresult);
3723 }
3724
3725
3726
3727 /* Line 1675 of yacc.c  */
3728 #line 1148 "parse.y"
3729
3730
3731 /* resize the code for a user function */
3732
3733 static void  resize_fblock( fbp )
3734   FBLOCK *fbp ;
3735
3736   CODEBLOCK *p = ZMALLOC(CODEBLOCK) ;
3737   unsigned dummy ;
3738
3739   code2op(_RET0, _HALT) ;
3740         /* make sure there is always a return */
3741
3742   *p = active_code ;
3743   fbp->code = code_shrink(p, &dummy) ;
3744       /* code_shrink() zfrees p */
3745
3746   if ( dump_code_flag ) add_to_fdump_list(fbp) ;
3747 }
3748
3749
3750 /* convert FE_PUSHA  to  FE_PUSHI
3751    or F_PUSH to F_PUSHI
3752 */
3753
3754 static void  field_A2I()
3755 { CELL *cp ;
3756
3757   if ( code_ptr[-1].op == FE_PUSHA &&
3758        code_ptr[-1].ptr == (PTR) 0)
3759   /* On most architectures, the two tests are the same; a good
3760      compiler might eliminate one.  On LM_DOS, and possibly other
3761      segmented architectures, they are not */
3762   { code_ptr[-1].op = FE_PUSHI ; }
3763   else
3764   {
3765     cp = (CELL *) code_ptr[-1].ptr ;
3766
3767     if ( cp == field  ||
3768
3769 #ifdef  MSDOS
3770          SAMESEG(cp,field) &&
3771 #endif
3772          cp > NF && cp <= LAST_PFIELD )
3773     {
3774          code_ptr[-2].op = _PUSHI  ;
3775     }
3776     else if ( cp == NF )
3777     { code_ptr[-2].op = NF_PUSHI ; code_ptr-- ; }
3778
3779     else
3780     { 
3781       code_ptr[-2].op = F_PUSHI ;
3782       code_ptr -> op = field_addr_to_index( code_ptr[-1].ptr ) ;
3783       code_ptr++ ;
3784     }
3785   }
3786 }
3787
3788 /* we've seen an ID in a context where it should be a VAR,
3789    check that's consistent with previous usage */
3790
3791 static void check_var( p )
3792   register SYMTAB *p ;
3793 {
3794       switch(p->type)
3795       {
3796         case ST_NONE : /* new id */
3797             p->type = ST_VAR ;
3798             p->stval.cp = ZMALLOC(CELL) ;
3799             p->stval.cp->type = C_NOINIT ;
3800             break ;
3801
3802         case ST_LOCAL_NONE :
3803             p->type = ST_LOCAL_VAR ;
3804             active_funct->typev[p->offset] = ST_LOCAL_VAR ;
3805             break ;
3806
3807         case ST_VAR :
3808         case ST_LOCAL_VAR :  break ;
3809
3810         default :
3811             type_error(p) ;
3812             break ;
3813       }
3814 }
3815
3816 /* we've seen an ID in a context where it should be an ARRAY,
3817    check that's consistent with previous usage */
3818 static  void  check_array(p)
3819   register SYMTAB *p ;
3820 {
3821       switch(p->type)
3822       {
3823         case ST_NONE :  /* a new array */
3824             p->type = ST_ARRAY ;
3825             p->stval.array = new_ARRAY() ;
3826             break ;
3827
3828         case  ST_ARRAY :
3829         case  ST_LOCAL_ARRAY :
3830             break ;
3831
3832         case  ST_LOCAL_NONE  :
3833             p->type = ST_LOCAL_ARRAY ;
3834             active_funct->typev[p->offset] = ST_LOCAL_ARRAY ;
3835             break ;
3836
3837         default : type_error(p) ; break ;
3838       }
3839 }
3840
3841 static void code_array(p)
3842   register SYMTAB *p ;
3843
3844   if ( is_local(p) ) code2op(LA_PUSHA, p->offset) ; 
3845   else  code2(A_PUSHA, p->stval.array) ;
3846 }
3847
3848
3849 /* we've seen an ID as an argument to a user defined function */
3850
3851 static void  code_call_id( p, ip )
3852   register CA_REC *p ;
3853   register SYMTAB *ip ;
3854 { static CELL dummy ;
3855
3856   p->call_offset = code_offset ;
3857      /* This always get set now.  So that fcall:relocate_arglist
3858         works. */
3859
3860   switch( ip->type )
3861   {
3862     case  ST_VAR  :
3863             p->type = CA_EXPR ;
3864             code2(_PUSHI, ip->stval.cp) ;
3865             break ;
3866
3867     case  ST_LOCAL_VAR  :
3868             p->type = CA_EXPR ;
3869             code2op(L_PUSHI, ip->offset) ;
3870             break ;
3871
3872     case  ST_ARRAY  :
3873             p->type = CA_ARRAY ;
3874             code2(A_PUSHA, ip->stval.array) ;
3875             break ;
3876
3877     case  ST_LOCAL_ARRAY :
3878             p->type = CA_ARRAY ;
3879             code2op(LA_PUSHA, ip->offset) ;
3880             break ;
3881
3882     /* not enough info to code it now; it will have to
3883        be patched later */
3884
3885     case  ST_NONE :
3886             p->type = ST_NONE ;
3887             p->sym_p = ip ;
3888             code2(_PUSHI, &dummy) ;
3889             break ;
3890
3891     case  ST_LOCAL_NONE :
3892             p->type = ST_LOCAL_NONE ;
3893             p->type_p = & active_funct->typev[ip->offset] ;
3894             code2op(L_PUSHI, ip->offset) ;
3895             break ;
3896
3897   
3898 #ifdef   DEBUG
3899     default :
3900             bozo("code_call_id") ;
3901 #endif
3902
3903   }
3904 }
3905
3906 /* an RE by itself was coded as _MATCH0 , change to
3907    push as an expression */
3908
3909 static void RE_as_arg()
3910 { CELL *cp = ZMALLOC(CELL) ;
3911
3912   code_ptr -= 2 ;
3913   cp->type = C_RE ;
3914   cp->ptr = code_ptr[1].ptr ;
3915   code2(_PUSHC, cp) ;
3916 }
3917
3918 /* reset the active_code back to the MAIN block */
3919 static void
3920 switch_code_to_main()
3921 {
3922    switch(scope)
3923    {
3924      case SCOPE_BEGIN :
3925         *begin_code_p = active_code ;
3926         active_code = *main_code_p ;
3927         break ;
3928
3929      case SCOPE_END :
3930         *end_code_p = active_code ;
3931         active_code = *main_code_p ;
3932         break ;
3933
3934      case SCOPE_FUNCT :
3935         active_code = *main_code_p ;
3936         break ;
3937
3938      case SCOPE_MAIN :
3939         break ;
3940    }
3941    active_funct = (FBLOCK*) 0 ;
3942    scope = SCOPE_MAIN ;
3943 }
3944
3945
3946 void
3947 parse()
3948
3949    if ( yyparse() || compile_error_count != 0 ) mawk_exit(2) ;
3950
3951    scan_cleanup() ;
3952    set_code() ; 
3953    /* code must be set before call to resolve_fcalls() */
3954    if ( resolve_list )  resolve_fcalls() ;
3955
3956    if ( compile_error_count != 0 ) mawk_exit(2) ;
3957    if ( dump_code_flag ) { dump_code() ; mawk_exit(0) ; }
3958 }
3959
3960