/* ex: set ro ft=c:
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 *
 * This file is generated automatically from 'compilers/imcc/imcc.y'
 * by tools/build/fixup_gen_file.pl.
 *
 * Any changes made here will be lost!
 *
 */
/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */
/* A Bison parser, made by GNU Bison 2.3.  */

/* Skeleton implementation for Bison's Yacc-like parsers in C

   Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
   Free Software Foundation, Inc.

   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2, or (at your option)
   any later version.

   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street, Fifth Floor,
   Boston, MA 02110-1301, USA.  */

/* As a special exception, you may create a larger work that contains
   part or all of the Bison parser skeleton and distribute that work
   under terms of your choice, so long as that work isn't itself a
   parser generator using the skeleton or a modified version thereof
   as a parser skeleton.  Alternatively, if you modify or redistribute
   the parser skeleton itself, you may (at your option) remove this
   special exception, which will cause the skeleton and the resulting
   Bison output files to be licensed under the GNU General Public
   License without this special exception.

   This special exception was added by the Free Software Foundation in
   version 2.2 of Bison.  */

/* C LALR(1) parser skeleton written by Richard Stallman, by
   simplifying the original so-called "semantic" parser.  */

/* All symbols defined below should begin with yy or YY, to avoid
   infringing on user name space.  This should be done even for local
   variables, as they might otherwise be expanded by user macros.
   There are some unavoidable exceptions within include files to
   define necessary library symbols; they are noted "INFRINGES ON
   USER NAME SPACE" below.  */

/* Identify Bison output.  */
#define YYBISON 1

/* Bison version.  */
#define YYBISON_VERSION "2.3"

/* Skeleton name.  */
#define YYSKELETON_NAME "yacc.c"

/* Pure parsers.  */
#define YYPURE 1

/* Using locations.  */
#define YYLSP_NEEDED 0



/* Tokens.  */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
   /* Put the tokens into the symbol table, so that GDB and other debuggers
      know about them.  */
   enum yytokentype {
     LOW_PREC = 258,
     PARAM = 259,
     HLL = 260,
     HLL_MAP = 261,
     GOTO = 262,
     ARG = 263,
     IF = 264,
     UNLESS = 265,
     PNULL = 266,
     ADV_FLAT = 267,
     ADV_SLURPY = 268,
     ADV_OPTIONAL = 269,
     ADV_OPT_FLAG = 270,
     ADV_NAMED = 271,
     ADV_ARROW = 272,
     NEW = 273,
     ADV_INVOCANT = 274,
     NAMESPACE = 275,
     ENDNAMESPACE = 276,
     DOT_METHOD = 277,
     SUB = 278,
     SYM = 279,
     LOCAL = 280,
     LEXICAL = 281,
     CONST = 282,
     INC = 283,
     DEC = 284,
     GLOBAL_CONST = 285,
     PLUS_ASSIGN = 286,
     MINUS_ASSIGN = 287,
     MUL_ASSIGN = 288,
     DIV_ASSIGN = 289,
     CONCAT_ASSIGN = 290,
     BAND_ASSIGN = 291,
     BOR_ASSIGN = 292,
     BXOR_ASSIGN = 293,
     FDIV = 294,
     FDIV_ASSIGN = 295,
     MOD_ASSIGN = 296,
     SHR_ASSIGN = 297,
     SHL_ASSIGN = 298,
     SHR_U_ASSIGN = 299,
     SHIFT_LEFT = 300,
     SHIFT_RIGHT = 301,
     INTV = 302,
     FLOATV = 303,
     STRINGV = 304,
     PMCV = 305,
     LOG_XOR = 306,
     RELOP_EQ = 307,
     RELOP_NE = 308,
     RELOP_GT = 309,
     RELOP_GTE = 310,
     RELOP_LT = 311,
     RELOP_LTE = 312,
     GLOBALOP = 313,
     RESULT = 314,
     RETURN = 315,
     TAILCALL = 316,
     YIELDT = 317,
     GET_RESULTS = 318,
     POW = 319,
     SHIFT_RIGHT_U = 320,
     LOG_AND = 321,
     LOG_OR = 322,
     COMMA = 323,
     ESUB = 324,
     DOTDOT = 325,
     PCC_BEGIN = 326,
     PCC_END = 327,
     PCC_CALL = 328,
     PCC_SUB = 329,
     PCC_BEGIN_RETURN = 330,
     PCC_END_RETURN = 331,
     PCC_BEGIN_YIELD = 332,
     PCC_END_YIELD = 333,
     NCI_CALL = 334,
     METH_CALL = 335,
     INVOCANT = 336,
     MAIN = 337,
     LOAD = 338,
     INIT = 339,
     IMMEDIATE = 340,
     POSTCOMP = 341,
     METHOD = 342,
     ANON = 343,
     OUTER = 344,
     NEED_LEX = 345,
     MULTI = 346,
     VTABLE_METHOD = 347,
     LOADLIB = 348,
     SUB_INSTANCE_OF = 349,
     SUB_LEXID = 350,
     UNIQUE_REG = 351,
     LABEL = 352,
     EMIT = 353,
     EOM = 354,
     IREG = 355,
     NREG = 356,
     SREG = 357,
     PREG = 358,
     IDENTIFIER = 359,
     REG = 360,
     MACRO = 361,
     ENDM = 362,
     STRINGC = 363,
     INTC = 364,
     FLOATC = 365,
     USTRINGC = 366,
     PARROT_OP = 367,
     VAR = 368,
     LINECOMMENT = 369,
     FILECOMMENT = 370,
     DOT = 371,
     CONCAT = 372
   };
#endif
/* Tokens.  */
#define LOW_PREC 258
#define PARAM 259
#define HLL 260
#define HLL_MAP 261
#define GOTO 262
#define ARG 263
#define IF 264
#define UNLESS 265
#define PNULL 266
#define ADV_FLAT 267
#define ADV_SLURPY 268
#define ADV_OPTIONAL 269
#define ADV_OPT_FLAG 270
#define ADV_NAMED 271
#define ADV_ARROW 272
#define NEW 273
#define ADV_INVOCANT 274
#define NAMESPACE 275
#define ENDNAMESPACE 276
#define DOT_METHOD 277
#define SUB 278
#define SYM 279
#define LOCAL 280
#define LEXICAL 281
#define CONST 282
#define INC 283
#define DEC 284
#define GLOBAL_CONST 285
#define PLUS_ASSIGN 286
#define MINUS_ASSIGN 287
#define MUL_ASSIGN 288
#define DIV_ASSIGN 289
#define CONCAT_ASSIGN 290
#define BAND_ASSIGN 291
#define BOR_ASSIGN 292
#define BXOR_ASSIGN 293
#define FDIV 294
#define FDIV_ASSIGN 295
#define MOD_ASSIGN 296
#define SHR_ASSIGN 297
#define SHL_ASSIGN 298
#define SHR_U_ASSIGN 299
#define SHIFT_LEFT 300
#define SHIFT_RIGHT 301
#define INTV 302
#define FLOATV 303
#define STRINGV 304
#define PMCV 305
#define LOG_XOR 306
#define RELOP_EQ 307
#define RELOP_NE 308
#define RELOP_GT 309
#define RELOP_GTE 310
#define RELOP_LT 311
#define RELOP_LTE 312
#define GLOBALOP 313
#define RESULT 314
#define RETURN 315
#define TAILCALL 316
#define YIELDT 317
#define GET_RESULTS 318
#define POW 319
#define SHIFT_RIGHT_U 320
#define LOG_AND 321
#define LOG_OR 322
#define COMMA 323
#define ESUB 324
#define DOTDOT 325
#define PCC_BEGIN 326
#define PCC_END 327
#define PCC_CALL 328
#define PCC_SUB 329
#define PCC_BEGIN_RETURN 330
#define PCC_END_RETURN 331
#define PCC_BEGIN_YIELD 332
#define PCC_END_YIELD 333
#define NCI_CALL 334
#define METH_CALL 335
#define INVOCANT 336
#define MAIN 337
#define LOAD 338
#define INIT 339
#define IMMEDIATE 340
#define POSTCOMP 341
#define METHOD 342
#define ANON 343
#define OUTER 344
#define NEED_LEX 345
#define MULTI 346
#define VTABLE_METHOD 347
#define LOADLIB 348
#define SUB_INSTANCE_OF 349
#define SUB_LEXID 350
#define UNIQUE_REG 351
#define LABEL 352
#define EMIT 353
#define EOM 354
#define IREG 355
#define NREG 356
#define SREG 357
#define PREG 358
#define IDENTIFIER 359
#define REG 360
#define MACRO 361
#define ENDM 362
#define STRINGC 363
#define INTC 364
#define FLOATC 365
#define USTRINGC 366
#define PARROT_OP 367
#define VAR 368
#define LINECOMMENT 369
#define FILECOMMENT 370
#define DOT 371
#define CONCAT 372




/* Copy the first part of user declarations.  */
#line 1 "compilers/imcc/imcc.y"

/*
 * imcc.y
 *
 * Intermediate Code Compiler for Parrot.
 *
 * Copyright (C) 2002 Melvin Smith <melvin.smith@mindspring.com>
 * Copyright (C) 2002-2008, The Perl Foundation.
 *
 * Grammar of the PIR language parser.
 *
 * $Id: /mirror/trunk/compilers/imcc/imcc.y 32683 2008-11-15T00:33:41.705103Z coke  $
 *
 */

#include <string.h>
#include <stdio.h>
#include <stdlib.h>

#define _PARSER
#define PARSER_MAIN
#include "imc.h"
#include "parrot/dynext.h"
#include "pbc.h"
#include "parser.h"
#include "optimizer.h"

/* prevent declarations of malloc() and free() in the generated parser. */
#define YYMALLOC
#define YYFREE

#ifndef YYENABLE_NLS
#  define YYENABLE_NLS 0
#endif

#ifndef YYLTYPE_IS_TRIVIAL
#  define YYLTYPE_IS_TRIVIAL 0
#endif

/* HEADERIZER HFILE: compilers/imcc/imc.h */

/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */

static void add_pcc_named_arg(PARROT_INTERP,
    ARGMOD(SymReg *cur_call),
    ARGIN(const char *name),
    ARGIN(SymReg *value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*cur_call);

static void add_pcc_named_param(PARROT_INTERP,
    ARGMOD(SymReg *cur_call),
    ARGIN(const char *name),
    ARGIN(SymReg *value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*cur_call);

static void add_pcc_named_result(PARROT_INTERP,
    ARGMOD(SymReg *cur_call),
    ARGIN(const char *name),
    ARGIN(SymReg *value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*cur_call);

static void add_pcc_named_return(PARROT_INTERP,
    ARGMOD(SymReg *cur_call),
    ARGIN(const char *name),
    ARGIN(SymReg *value))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        FUNC_MODIFIES(*cur_call);

static void adv_named_set(PARROT_INTERP, ARGIN(char *name))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

static void begin_return_or_yield(PARROT_INTERP, int yield)
        __attribute__nonnull__(1);

static void clear_state(PARROT_INTERP)
        __attribute__nonnull__(1);

static void do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction* func_ins(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(SymReg *lhs),
    ARGIN(const char *op),
    ARGMOD(SymReg **r),
    int n,
    int keyv,
    int emit)
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*unit)
        FUNC_MODIFIES(*r);

PARROT_CAN_RETURN_NULL
static Instruction * iINDEXFETCH(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(SymReg *r0),
    ARGIN(SymReg *r1),
    ARGIN(SymReg *r2))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*unit);

PARROT_CAN_RETURN_NULL
static Instruction * iINDEXSET(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(SymReg *r0),
    ARGIN(SymReg *r1),
    ARGIN(SymReg *r2))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*unit);

PARROT_CANNOT_RETURN_NULL
static Instruction * iLABEL(PARROT_INTERP,
    ARGMOD_NULLOK(IMC_Unit *unit),
    ARGMOD(SymReg *r0))
        __attribute__nonnull__(1)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*r0);

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static const char * inv_op(ARGIN(const char *op))
        __attribute__nonnull__(1);

PARROT_CANNOT_RETURN_NULL
static Instruction * iSUBROUTINE(PARROT_INTERP,
    ARGMOD_NULLOK(IMC_Unit *unit),
    ARGMOD(SymReg *r))
        __attribute__nonnull__(1)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*r);

PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
static Instruction * MK_I(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(const char *fmt),
    int n,
    ...)
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*unit);

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction* mk_pmc_const(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(const char *type),
    ARGMOD(SymReg *left),
    ARGIN(const char *constant))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*unit)
        FUNC_MODIFIES(*left);

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction* mk_pmc_const_named(PARROT_INTERP,
    ARGMOD(IMC_Unit *unit),
    ARGIN(const char *name),
    ARGMOD(SymReg *left),
    ARGIN(const char *constant))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        __attribute__nonnull__(4)
        __attribute__nonnull__(5)
        FUNC_MODIFIES(*unit)
        FUNC_MODIFIES(*left);

PARROT_CANNOT_RETURN_NULL
static SymReg * mk_sub_address_fromc(PARROT_INTERP, ARGIN(const char *name))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

PARROT_CANNOT_RETURN_NULL
static SymReg * mk_sub_address_u(PARROT_INTERP, ARGIN(const char *name))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2);

static void set_lexical(PARROT_INTERP,
    ARGMOD(SymReg *r),
    ARGIN(const char *name))
        __attribute__nonnull__(1)
        __attribute__nonnull__(2)
        __attribute__nonnull__(3)
        FUNC_MODIFIES(*r);

/* Don't modify between HEADERIZER BEGIN / HEADERIZER END.  Your changes will be lost. */
/* HEADERIZER END: static */


#define YYDEBUG 1
#define YYERROR_VERBOSE 1

/*
 * We use a pure parser with the interpreter as a parameter. However this still
 * doesn't make the parser reentrant, as there are too many globals around.
 */

/*
 * Choosing instructions for Parrot is pretty easy since many are
 * polymorphic.
 */


/*
 * MK_I: build and emitb instruction by INS
 *
 * fmt may contain:
 *   op %s, %s # comment
 * or just
 *   op
 *
 *
 *  NOTE: Most usage of this function is with
 *        IMCC_INFO(interp)->cur_unit, but there are some
 *        exceptions. Thus, we can't easily factorize that piece of
 *        code.
 */

PARROT_IGNORABLE_RESULT
PARROT_CAN_RETURN_NULL
static Instruction *
MK_I(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *fmt), int n, ...)
{
    char opname[64];
    char *p;
    const char *q;
    va_list ap;
    SymReg *r[IMCC_MAX_FIX_REGS];
    int i;

    for (p = opname, q = fmt; *q && *q != ' ';)
        *p++ = *q++;
    *p = 0;
    if (!*q)
        fmt = NULL;
    else
        fmt = ++q;
#ifdef OPDEBUG
    fprintf(stderr, "op '%s' format '%s' (%d)\n", opname, fmt?:"", n);
#endif
    va_start(ap, n);
    i = 0;
    for (i = 0; i < n; ++i) {
        r[i] = va_arg(ap, SymReg *);
    }
    va_end(ap);
    return INS(interp, unit, opname, fmt, r, n,
               IMCC_INFO(interp)->keyvec, 1);
}

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction*
mk_pmc_const(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(const char *type),
        ARGMOD(SymReg *left), ARGIN(const char *constant))
{
    const int type_enum = atoi(type);
    const int ascii = (*constant == '\'' || *constant == '"');
    SymReg *rhs;
    SymReg *r[2];
    char   *name;

    if (left->type == VTADDRESS) {      /* IDENTIFIER */
        if (IMCC_INFO(interp)->state->pasm_file) {
            IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                        "Ident as PMC constant",
                        " %s\n", left->name);
        }
        left->type = VTIDENTIFIER;
        left->set = 'P';
    }
    r[0] = left;
    if (ascii) {
        /* strip delimiters */
        name                   = str_dup(constant + 1);
        name[strlen(name) - 1] = '\0';
    }
    else {
        name = str_dup(constant);
    }

    switch (type_enum) {
        case enum_class_Sub:
        case enum_class_Coroutine:
            rhs = mk_const(interp, name, 'p');

            if (!ascii)
                rhs->type |= VT_ENCODED;

            rhs->usage    = U_FIXUP;
            break;
        default:
            rhs = mk_const(interp, name, 'P');
            break;
    }

    r[1]          = rhs;
    rhs->pmc_type = type_enum;

    mem_sys_free(name);

    return INS(interp, unit, "set_p_pc", "", r, 2, 0, 1);
}

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction*
mk_pmc_const_named(PARROT_INTERP, ARGMOD(IMC_Unit *unit),
    ARGIN(const char *name), ARGMOD(SymReg *left), ARGIN(const char *constant))
{
    SymReg *rhs;
    SymReg *r[2];
    char   *const_name;
    const int ascii       = (*constant == '\'' || *constant == '"');
    char   *unquoted_name = str_dup(name + 1);
    size_t  name_length   = strlen(unquoted_name) - 1;

    unquoted_name[name_length] = '\0';

    if (left->type == VTADDRESS) {      /* IDENTIFIER */
        if (IMCC_INFO(interp)->state->pasm_file) {
            IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                        "Ident as PMC constant",
                        " %s\n", left->name);
        }
        left->type = VTIDENTIFIER;
        left->set = 'P';
    }
    r[0] = left;
    if (ascii) {
        /* strip delimiters */
        const_name                         = str_dup(constant + 1);
        const_name[strlen(const_name) - 1] = '\0';
    }
    else {
        const_name = str_dup(constant);
    }

    if ((strncmp(unquoted_name, "Sub",       name_length) == 0)
    ||  (strncmp(unquoted_name, "Coroutine", name_length) == 0)) {
        rhs = mk_const(interp, const_name, 'p');

        if (!ascii)
            rhs->type |= VT_ENCODED;

        rhs->usage    = U_FIXUP;
    }
    else {
        rhs = mk_const(interp, const_name, 'P');
    }

    r[1]          = rhs;
    rhs->pmc_type = pmc_type(interp,
        string_from_cstring(interp, unquoted_name, name_length));

    mem_sys_free(unquoted_name);
    mem_sys_free(const_name);

    return INS(interp, unit, "set_p_pc", "", r, 2, 0, 1);
}

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static Instruction*
func_ins(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(SymReg *lhs), ARGIN(const char *op),
         ARGMOD(SymReg **r), int n, int keyv, int emit)
{
    int i;
    /* shift regs up by 1 */
    for (i = n - 1; i >= 0; --i)
        r[i+1] = r[i];
    r[0] = lhs;
    /* shift keyvec */
    keyv <<= 1;
    return INS(interp, unit, op, "", r, n+1, keyv, emit);
}
/*
 * special instructions
 *
 * labels and such
 */

static void
clear_state(PARROT_INTERP)
{
    IMCC_INFO(interp) -> nargs = 0;
    IMCC_INFO(interp) -> keyvec = 0;
}

PARROT_CANNOT_RETURN_NULL
Instruction *
INS_LABEL(PARROT_INTERP, ARGMOD_NULLOK(IMC_Unit *unit), ARGMOD(SymReg *r0), int emit)
{

    Instruction * const ins = _mk_instruction("", "%s:", 1, &r0, 0);
    ins->type               = ITLABEL;
    r0->first_ins           = ins;

    if (emit)
        emitb(interp, unit, ins);

    return ins;
}

PARROT_CANNOT_RETURN_NULL
static Instruction *
iLABEL(PARROT_INTERP, ARGMOD_NULLOK(IMC_Unit *unit), ARGMOD(SymReg *r0))
{
    Instruction * const i = INS_LABEL(interp, unit, r0, 1);
    i->line               = IMCC_INFO(interp)->line;

    clear_state(interp);
    return i;
}

PARROT_CANNOT_RETURN_NULL
static Instruction *
iSUBROUTINE(PARROT_INTERP, ARGMOD_NULLOK(IMC_Unit *unit), ARGMOD(SymReg *r))
{
    Instruction * const i = iLABEL(interp, unit, r);

    r->type    = (r->type & VT_ENCODED) ? VT_PCC_SUB|VT_ENCODED : VT_PCC_SUB;
    r->pcc_sub = mem_allocate_zeroed_typed(pcc_sub_t);

    IMCC_INFO(interp)->cur_call = r;
    i->line                     = IMCC_INFO(interp)->line;

    add_namespace(interp, unit);
    return i;
}

/*
 * substr or X = P[key]
 */
PARROT_CAN_RETURN_NULL
static Instruction *
iINDEXFETCH(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(SymReg *r0), ARGIN(SymReg *r1),
        ARGIN(SymReg *r2))
{
    if (r0->set == 'S' && r1->set == 'S' && r2->set == 'I') {
        SymReg * const r3 = mk_const(interp, "1", 'I');
        return MK_I(interp, unit, "substr %s, %s, %s, 1", 4, r0, r1, r2, r3);
    }

    IMCC_INFO(interp) -> keyvec |= KEY_BIT(2);
    return MK_I(interp, unit, "set %s, %s[%s]", 3, r0, r1, r2);
}

/*
 * substr or P[key] = X
 */

PARROT_CAN_RETURN_NULL
static Instruction *
iINDEXSET(PARROT_INTERP, ARGMOD(IMC_Unit *unit), ARGIN(SymReg *r0), ARGIN(SymReg *r1),
        ARGIN(SymReg *r2))
{
    if (r0->set == 'S' && r1->set == 'I' && r2->set == 'S') {
        SymReg * const r3 = mk_const(interp, "1", 'I');
        MK_I(interp, unit, "substr %s, %s, %s, %s", 4, r0, r1, r3, r2);
    }
    else if (r0->set == 'P') {
        IMCC_INFO(interp)->keyvec |= KEY_BIT(1);
        MK_I(interp, unit, "set %s[%s], %s", 3, r0, r1, r2);
    }
    else
        IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
            "unsupported indexed set op\n");

    return NULL;
}

PARROT_WARN_UNUSED_RESULT
PARROT_CAN_RETURN_NULL
static const char *
inv_op(ARGIN(const char *op))
{
    int n;
    return get_neg_op(op, &n);
}

PARROT_CANNOT_RETURN_NULL
Instruction *
IMCC_create_itcall_label(PARROT_INTERP)
{
    char         name[128];
    SymReg      *r;
    Instruction *i;

    snprintf(name, sizeof (name), "%cpcc_sub_call_%d", IMCC_INTERNAL_CHAR,
        IMCC_INFO(interp)->cnr++);

    r       = mk_pcc_sub(interp, name, 0);
    i       = iLABEL(interp, IMCC_INFO(interp)->cur_unit, r);
    i->type = ITCALL | ITPCCSUB;

    IMCC_INFO(interp)->cur_call = r;

    return i;
}

PARROT_CANNOT_RETURN_NULL
static SymReg *
mk_sub_address_fromc(PARROT_INTERP, ARGIN(const char *name))
{
    /* name is a quoted sub name */
    SymReg *r;
    char *name_copy                  = str_dup(name + 1);
    name_copy[strlen(name_copy) - 1] = '\0';

    r = mk_sub_address(interp, name_copy);
    mem_sys_free(name_copy);

    return r;
}

PARROT_CANNOT_RETURN_NULL
static SymReg *
mk_sub_address_u(PARROT_INTERP, ARGIN(const char *name))
{
    SymReg * const r = mk_sub_address(interp, name);
    r->type         |= VT_ENCODED;

    return r;
}

void
IMCC_itcall_sub(PARROT_INTERP, ARGIN(SymReg *sub))
{
    IMCC_INFO(interp)->cur_call->pcc_sub->sub = sub;
    if (IMCC_INFO(interp)->cur_obj) {
        if (IMCC_INFO(interp)->cur_obj->set != 'P')
            IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "object isn't a PMC");
        IMCC_INFO(interp)->cur_call->pcc_sub->object = IMCC_INFO(interp)->cur_obj;
        IMCC_INFO(interp)->cur_obj = NULL;
    }
    if (IMCC_INFO(interp)->cur_call->pcc_sub->sub->pmc_type == enum_class_NCI)
        IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
    if (IMCC_INFO(interp)->cur_unit->type == IMC_PCCSUB)
        IMCC_INFO(interp)->cur_unit->instructions->symregs[0]->pcc_sub->calls_a_sub |= 1;
}

static void
begin_return_or_yield(PARROT_INTERP, int yield)
{
    Instruction *i;
    Instruction * const ins = IMCC_INFO(interp)->cur_unit->instructions;
    char                name[128];

    if (!ins || !ins->symregs[0] || !(ins->symregs[0]->type & VT_PCC_SUB))
        IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                    "yield or return directive outside pcc subroutine\n");
    if (yield)
       ins->symregs[0]->pcc_sub->calls_a_sub = 1 | ITPCCYIELD;
    snprintf(name, sizeof (name), yield ? "%cpcc_sub_yield_%d" : "%cpcc_sub_ret_%d",
            IMCC_INTERNAL_CHAR, IMCC_INFO(interp)->cnr++);
    interp->imc_info->sr_return = mk_pcc_sub(interp, name, 0);
    i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, interp->imc_info->sr_return);
    i->type = yield ? ITPCCSUB | ITLABEL | ITPCCYIELD : ITPCCSUB | ITLABEL ;
    interp->imc_info->asm_state = yield ? AsmInYield : AsmInReturn;
}

static void
set_lexical(PARROT_INTERP, ARGMOD(SymReg *r), ARGIN(const char *name))
{
    SymReg * const n = mk_const(interp, name, 'S');

    r->usage |= U_LEXICAL;

    if (n == r->reg)
        IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
            "register %s already declared as lexical %s", r->name, n->name);

    /* chain all names in r->reg */
    n->reg = r->reg;
    r->reg = n;
    r->use_count++;
}

static void
add_pcc_named_arg(PARROT_INTERP, ARGMOD(SymReg *cur_call), ARGIN(const char *name),
        ARGIN(SymReg *value))
{
    SymReg * const r = mk_const(interp, name, 'S');

    r->type  |= VT_NAMED;

    add_pcc_arg(cur_call, r);
    add_pcc_arg(cur_call, value);
}

static void
add_pcc_named_result(PARROT_INTERP, ARGMOD(SymReg *cur_call), ARGIN(const char *name),
        ARGIN(SymReg *value))
{
    SymReg * const r = mk_const(interp, name, 'S');
    r->type         |= VT_NAMED;

    add_pcc_result(cur_call, r);
    add_pcc_result(cur_call, value);
}

static void
add_pcc_named_param(PARROT_INTERP, ARGMOD(SymReg *cur_call), ARGIN(const char *name),
        ARGIN(SymReg *value))
{
    SymReg * const r = mk_const(interp, name, 'S');
    r->type         |= VT_NAMED;

    add_pcc_arg(cur_call, r);
    add_pcc_arg(cur_call, value);
}

static void
add_pcc_named_return(PARROT_INTERP, ARGMOD(SymReg *cur_call), ARGIN(const char *name),
        ARGIN(SymReg *value))
{
    SymReg * const r = mk_const(interp, name, 'S');
    r->type         |= VT_NAMED;

    add_pcc_result(cur_call, r);
    add_pcc_result(cur_call, value);
}

/* XXX Can name be consted? */
static void
adv_named_set(PARROT_INTERP, ARGIN(char *name))
{
    if (IMCC_INFO(interp)->adv_named_id) {
        IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                    "Named parameter with more than one name.\n");
    }
    IMCC_INFO(interp)->adv_named_id = name;
}

static void
do_loadlib(PARROT_INTERP, ARGIN(const char *lib))
{
    STRING * const s = string_unescape_cstring(interp, lib + 1, '"', NULL);
    PMC    *ignored  = Parrot_load_lib(interp, s, NULL);
    UNUSED(ignored);
    Parrot_register_HLL_lib(interp, s);
}

/* HEADERIZER STOP */



/* Enabling traces.  */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif

/* Enabling verbose error messages.  */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif

/* Enabling the token table.  */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif

#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
#line 687 "compilers/imcc/imcc.y"
{
    IdList * idlist;
    int t;
    char * s;
    SymReg * sr;
    Instruction *i;
}
/* Line 187 of yacc.c.  */
#line 1024 "compilers/imcc/imcparser.c"
	YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif



/* Copy the second part of user declarations.  */


/* Line 216 of yacc.c.  */
#line 1037 "compilers/imcc/imcparser.c"

#ifdef short
# undef short
#endif

#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif

#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif

#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif

#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif

#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
#  define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
#  define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#  include <stddef.h> /* INFRINGES ON USER NAME SPACE */
#  define YYSIZE_T size_t
# else
#  define YYSIZE_T unsigned int
# endif
#endif

#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)

#ifndef YY_
# if YYENABLE_NLS
#  if ENABLE_NLS
#   include <libintl.h> /* INFRINGES ON USER NAME SPACE */
#   define YY_(msgid) dgettext ("bison-runtime", msgid)
#  endif
# endif
# ifndef YY_
#  define YY_(msgid) msgid
# endif
#endif

/* Suppress unused-variable warnings by "using" E.  */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif

/* Identity function, used to suppress warnings about constant conditions.  */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
#else
static int
YYID (i)
    int i;
#endif
{
  return i;
}
#endif

#if ! defined yyoverflow || YYERROR_VERBOSE

/* The parser invokes alloca or malloc; define the necessary symbols.  */

# ifdef YYSTACK_USE_ALLOCA
#  if YYSTACK_USE_ALLOCA
#   ifdef __GNUC__
#    define YYSTACK_ALLOC __builtin_alloca
#   elif defined __BUILTIN_VA_ARG_INCR
#    include <alloca.h> /* INFRINGES ON USER NAME SPACE */
#   elif defined _AIX
#    define YYSTACK_ALLOC __alloca
#   elif defined _MSC_VER
#    include <malloc.h> /* INFRINGES ON USER NAME SPACE */
#    define alloca _alloca
#   else
#    define YYSTACK_ALLOC alloca
#    if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
#     include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#     ifndef _STDLIB_H
#      define _STDLIB_H 1
#     endif
#    endif
#   endif
#  endif
# endif

# ifdef YYSTACK_ALLOC
   /* Pacify GCC's `empty if-body' warning.  */
#  define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
#  ifndef YYSTACK_ALLOC_MAXIMUM
    /* The OS might guarantee only one guard page at the bottom of the stack,
       and a page size can be as small as 4096 bytes.  So we cannot safely
       invoke alloca (N) if N exceeds 4096.  Use a slightly smaller number
       to allow for a few compiler-allocated temporary stack slots.  */
#   define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
#  endif
# else
#  define YYSTACK_ALLOC YYMALLOC
#  define YYSTACK_FREE YYFREE
#  ifndef YYSTACK_ALLOC_MAXIMUM
#   define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
#  endif
#  if (defined __cplusplus && ! defined _STDLIB_H \
       && ! ((defined YYMALLOC || defined malloc) \
	     && (defined YYFREE || defined free)))
#   include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
#   ifndef _STDLIB_H
#    define _STDLIB_H 1
#   endif
#  endif
#  ifndef YYMALLOC
#   define YYMALLOC malloc
#   if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
#  ifndef YYFREE
#   define YYFREE free
#   if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
#   endif
#  endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */


#if (! defined yyoverflow \
     && (! defined __cplusplus \
	 || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))

/* A type that is properly aligned for any stack member.  */
union yyalloc
{
  yytype_int16 yyss;
  YYSTYPE yyvs;
  };

/* The size of the maximum gap between one aligned stack and the next.  */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)

/* The size of an array large to enough to hold all stacks, each with
   N elements.  */
# define YYSTACK_BYTES(N) \
     ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
      + YYSTACK_GAP_MAXIMUM)

/* Copy COUNT objects from FROM to TO.  The source and destination do
   not overlap.  */
# ifndef YYCOPY
#  if defined __GNUC__ && 1 < __GNUC__
#   define YYCOPY(To, From, Count) \
      __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
#  else
#   define YYCOPY(To, From, Count)		\
      do					\
	{					\
	  YYSIZE_T yyi;				\
	  for (yyi = 0; yyi < (Count); yyi++)	\
	    (To)[yyi] = (From)[yyi];		\
	}					\
      while (YYID (0))
#  endif
# endif

/* Relocate STACK from its old location to the new one.  The
   local variables YYSIZE and YYSTACKSIZE give the old and new number of
   elements in the stack, and YYPTR gives the new location of the
   stack.  Advance YYPTR to a properly aligned location for the next
   stack.  */
# define YYSTACK_RELOCATE(Stack)					\
    do									\
      {									\
	YYSIZE_T yynewbytes;						\
	YYCOPY (&yyptr->Stack, Stack, yysize);				\
	Stack = &yyptr->Stack;						\
	yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
	yyptr += yynewbytes / sizeof (*yyptr);				\
      }									\
    while (YYID (0))

#endif

/* YYFINAL -- State number of the termination state.  */
#define YYFINAL  28
/* YYLAST -- Last index in YYTABLE.  */
#define YYLAST   732

/* YYNTOKENS -- Number of terminals.  */
#define YYNTOKENS  134
/* YYNNTS -- Number of nonterminals.  */
#define YYNNTS  122
/* YYNRULES -- Number of rules.  */
#define YYNRULES  340
/* YYNRULES -- Number of states.  */
#define YYNSTATES  551

/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX.  */
#define YYUNDEFTOK  2
#define YYMAXUTOK   372

#define YYTRANSLATE(YYX)						\
  ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX.  */
static const yytype_uint8 yytranslate[] =
{
       0,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       4,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,   124,     2,     2,     2,   130,   131,     2,
     122,   123,   128,   127,     2,   126,     2,   129,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,   133,
       2,   119,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,   120,     2,   121,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,   132,     2,   125,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     2,     2,     2,     2,
       2,     2,     2,     2,     2,     2,     1,     2,     3,     5,
       6,     7,     8,     9,    10,    11,    12,    13,    14,    15,
      16,    17,    18,    19,    20,    21,    22,    23,    24,    25,
      26,    27,    28,    29,    30,    31,    32,    33,    34,    35,
      36,    37,    38,    39,    40,    41,    42,    43,    44,    45,
      46,    47,    48,    49,    50,    51,    52,    53,    54,    55,
      56,    57,    58,    59,    60,    61,    62,    63,    64,    65,
      66,    67,    68,    69,    70,    71,    72,    73,    74,    75,
      76,    77,    78,    79,    80,    81,    82,    83,    84,    85,
      86,    87,    88,    89,    90,    91,    92,    93,    94,    95,
      96,    97,    98,    99,   100,   101,   102,   103,   104,   105,
     106,   107,   108,   109,   110,   111,   112,   113,   114,   115,
     116,   117,   118
};

#if YYDEBUG
/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
   YYRHS.  */
static const yytype_uint16 yyprhs[] =
{
       0,     0,     3,     5,     7,    10,    12,    14,    16,    18,
      21,    23,    25,    28,    32,    37,    40,    45,    46,    53,
      54,    61,    62,    69,    71,    73,    75,    78,    82,    85,
      87,    89,    91,    93,    95,    96,   100,   101,   106,   109,
     114,   115,   117,   118,   123,   124,   126,   130,   134,   137,
     138,   139,   140,   151,   152,   154,   158,   159,   163,   167,
     173,   178,   183,   188,   190,   195,   200,   205,   206,   210,
     212,   214,   216,   218,   220,   222,   224,   228,   229,   231,
     232,   242,   243,   246,   247,   251,   252,   254,   256,   259,
     261,   263,   265,   267,   269,   271,   273,   275,   277,   279,
     281,   283,   285,   291,   295,   299,   303,   307,   313,   319,
     320,   324,   327,   328,   332,   336,   337,   342,   343,   346,
     348,   350,   352,   354,   359,   361,   362,   368,   370,   371,
     377,   378,   381,   385,   389,   390,   396,   398,   400,   401,
     403,   407,   411,   417,   419,   422,   423,   426,   429,   431,
     433,   434,   436,   439,   441,   443,   447,   450,   452,   456,
     459,   460,   462,   464,   466,   469,   472,   473,   478,   483,
     484,   491,   493,   494,   501,   504,   507,   510,   513,   515,
     517,   519,   521,   522,   524,   526,   528,   530,   532,   536,
     541,   547,   554,   561,   568,   576,   581,   586,   591,   598,
     605,   613,   618,   623,   628,   635,   643,   647,   648,   658,
     660,   662,   664,   668,   670,   672,   674,   676,   678,   680,
     682,   684,   686,   688,   690,   692,   694,   696,   698,   700,
     702,   704,   706,   708,   710,   712,   714,   716,   718,   720,
     721,   727,   731,   733,   735,   737,   739,   741,   743,   745,
     747,   749,   751,   753,   755,   757,   762,   764,   766,   768,
     770,   774,   778,   782,   783,   789,   790,   794,   796,   802,
     806,   809,   810,   813,   815,   817,   822,   825,   829,   835,
     837,   841,   842,   844,   846,   853,   859,   864,   869,   876,
     882,   884,   886,   888,   890,   892,   894,   896,   898,   900,
     902,   903,   905,   909,   911,   913,   918,   922,   924,   926,
     928,   930,   932,   934,   936,   938,   940,   942,   944,   945,
     948,   949,   952,   954,   958,   959,   964,   966,   970,   973,
     976,   978,   980,   982,   984,   986,   988,   990,   992,   994,
     996
};

/* YYRHS -- A `-1'-separated list of the rules' RHS.  */
static const yytype_int16 yyrhs[] =
{
     135,     0,    -1,   136,    -1,   137,    -1,   136,   137,    -1,
     155,    -1,   140,    -1,   157,    -1,   152,    -1,   107,     4,
      -1,   138,    -1,     4,    -1,   139,     4,    -1,    94,   109,
       4,    -1,     6,   109,    69,   109,    -1,     6,   109,    -1,
       7,   109,   119,   109,    -1,    -1,    28,   141,   212,   105,
     119,   254,    -1,    -1,    28,   143,   110,   244,   119,   145,
      -1,    -1,    28,   144,   109,   244,   119,   145,    -1,   109,
      -1,   112,    -1,   147,    -1,   146,   147,    -1,   201,   148,
       4,    -1,   107,     4,    -1,   116,    -1,   115,    -1,   155,
      -1,   142,    -1,   138,    -1,    -1,   149,   113,   151,    -1,
      -1,    75,   150,   177,    98,    -1,    12,   245,    -1,    27,
     109,    69,   106,    -1,    -1,   238,    -1,    -1,    99,   153,
     154,   100,    -1,    -1,   146,    -1,    21,   156,     4,    -1,
     120,   246,   121,    -1,   120,   121,    -1,    -1,    -1,    -1,
      24,   158,   241,   159,   177,     4,   160,   161,   172,    70,
      -1,    -1,     4,    -1,   161,   162,     4,    -1,    -1,     5,
     163,   164,    -1,   212,   105,   186,    -1,   212,   109,    18,
     105,   186,    -1,    92,   122,   170,   123,    -1,    90,   122,
     109,   123,    -1,    90,   122,   105,   123,    -1,    93,    -1,
      93,   122,   109,   123,    -1,    95,   122,   109,   123,    -1,
      96,   122,   109,   123,    -1,    -1,   170,    69,   171,    -1,
     171,    -1,    48,    -1,    49,    -1,    51,    -1,    50,    -1,
     105,    -1,   109,    -1,   120,   246,   121,    -1,    -1,   198,
      -1,    -1,    72,     4,   174,   181,   176,   180,   175,   183,
      73,    -1,    -1,   203,     4,    -1,    -1,    82,   245,     4,
      -1,    -1,   178,    -1,   179,    -1,   178,   179,    -1,    84,
      -1,    85,    -1,    83,    -1,    86,    -1,    87,    -1,    89,
      -1,    88,    -1,    91,    -1,   165,    -1,   166,    -1,   167,
      -1,   168,    -1,   169,    -1,    74,   245,    69,   245,     4,
      -1,    74,   245,     4,    -1,    80,   245,     4,    -1,    81,
     237,     4,    -1,    81,   109,     4,    -1,    81,   237,    69,
     245,     4,    -1,    81,   109,    69,   245,     4,    -1,    -1,
     181,   182,     4,    -1,     9,   227,    -1,    -1,   183,   184,
       4,    -1,    60,   237,   186,    -1,    -1,    26,   185,   212,
     206,    -1,    -1,   186,   187,    -1,    14,    -1,    15,    -1,
      16,    -1,    17,    -1,    17,   122,   109,   123,    -1,    97,
      -1,    -1,    76,     4,   189,   192,    77,    -1,   194,    -1,
      -1,    78,     4,   191,   192,    79,    -1,    -1,   192,     4,
      -1,   192,   193,     4,    -1,    61,   245,   228,    -1,    -1,
     196,   122,   195,   197,   123,    -1,    61,    -1,    63,    -1,
      -1,   227,    -1,   109,    18,   245,    -1,   197,    69,   227,
      -1,   197,    69,   109,    18,   245,    -1,   200,    -1,   198,
     200,    -1,    -1,   199,   204,    -1,   107,     4,    -1,   116,
      -1,   115,    -1,    -1,   202,    -1,   202,   203,    -1,   203,
      -1,    98,    -1,   201,   208,     4,    -1,     1,     4,    -1,
     206,    -1,   205,    69,   206,    -1,   105,   207,    -1,    -1,
      97,    -1,   214,    -1,   232,    -1,    21,   105,    -1,    22,
     105,    -1,    -1,    26,   209,   212,   205,    -1,    27,   109,
      69,   237,    -1,    -1,    28,   210,   212,   105,   119,   254,
      -1,   142,    -1,    -1,    31,   211,   212,   105,   119,   254,
      -1,    62,   224,    -1,     8,   243,    -1,   113,   238,    -1,
      12,   245,    -1,   224,    -1,   173,    -1,   188,    -1,   190,
      -1,    -1,    48,    -1,    49,    -1,    50,    -1,    51,    -1,
     105,    -1,   237,   119,   245,    -1,   237,   119,   216,   245,
      -1,   237,   119,   245,   217,   245,    -1,   237,   119,   245,
     120,   246,   121,    -1,   237,   120,   246,   121,   119,   245,
      -1,   237,   119,    19,   213,    69,   245,    -1,   237,   119,
      19,   213,   120,   246,   121,    -1,   237,   119,    19,   213,
      -1,   237,   119,    19,   245,    -1,   237,   119,    19,   156,
      -1,   237,   119,    19,   156,    69,   245,    -1,   237,   119,
      19,   245,    69,   245,    -1,   237,   119,    19,   245,   120,
     246,   121,    -1,   237,   119,    59,   255,    -1,    59,   255,
     119,   245,    -1,    19,   237,    69,   245,    -1,    19,   237,
      69,   245,    69,   245,    -1,    19,   237,    69,   245,   120,
     246,   121,    -1,   237,   119,   224,    -1,    -1,   122,   215,
     231,   123,   119,   223,   122,   226,   123,    -1,   218,    -1,
     220,    -1,   222,    -1,   237,   119,    12,    -1,   124,    -1,
     125,    -1,   126,    -1,   126,    -1,   127,    -1,   128,    -1,
     129,    -1,   130,    -1,    40,    -1,    65,    -1,   118,    -1,
      53,    -1,    54,    -1,    55,    -1,    56,    -1,    57,    -1,
      58,    -1,    46,    -1,    47,    -1,    66,    -1,    67,    -1,
      68,    -1,    52,    -1,   131,    -1,   132,    -1,   125,    -1,
      -1,    64,   219,   122,   231,   123,    -1,   237,   221,   245,
      -1,    32,    -1,    33,    -1,    34,    -1,    35,    -1,    42,
      -1,    41,    -1,    36,    -1,    37,    -1,    38,    -1,    39,
      -1,    43,    -1,    44,    -1,    45,    -1,   237,   119,   113,
     151,    -1,   105,    -1,   109,    -1,   112,    -1,   237,    -1,
     237,   117,   242,    -1,   237,   117,   109,    -1,   237,   117,
     237,    -1,    -1,   223,   225,   122,   226,   123,    -1,    -1,
     226,    69,   227,    -1,   227,    -1,   226,    69,   109,    18,
     245,    -1,   109,    18,   245,    -1,   245,   228,    -1,    -1,
     228,   229,    -1,    13,    -1,    17,    -1,    17,   122,   109,
     123,    -1,   237,   186,    -1,   231,    69,   230,    -1,   231,
      69,   109,    18,   237,    -1,   230,    -1,   109,    18,   237,
      -1,    -1,   234,    -1,   233,    -1,    11,   245,   236,   245,
       8,   243,    -1,    11,    12,   245,     8,   243,    -1,    11,
     245,   235,   243,    -1,    10,   245,   235,   243,    -1,    10,
     245,   236,   245,     8,   243,    -1,    10,    12,   245,     8,
     243,    -1,    69,    -1,     8,    -1,    53,    -1,    54,    -1,
      55,    -1,    56,    -1,    57,    -1,    58,    -1,   114,    -1,
     253,    -1,    -1,   239,    -1,   239,    69,   240,    -1,   240,
      -1,   244,    -1,   237,   120,   246,   121,    -1,   120,   248,
     121,    -1,   242,    -1,   109,    -1,   112,    -1,   105,    -1,
     113,    -1,   105,    -1,   113,    -1,   243,    -1,   245,    -1,
     237,    -1,   254,    -1,    -1,   247,   250,    -1,    -1,   249,
     250,    -1,   252,    -1,   250,   133,   252,    -1,    -1,   250,
      69,   251,   252,    -1,   245,    -1,   245,    71,   245,    -1,
      71,   245,    -1,   245,    71,    -1,   101,    -1,   102,    -1,
     103,    -1,   104,    -1,   106,    -1,   110,    -1,   111,    -1,
     109,    -1,   112,    -1,   103,    -1,   109,    -1
};

/* YYRLINE[YYN] -- source line where rule number YYN was defined.  */
static const yytype_uint16 yyrline[] =
{
       0,   779,   779,   783,   784,   788,   789,   790,   796,   802,
     803,   804,   808,   809,   820,   838,   847,   865,   865,   874,
     874,   880,   880,   887,   888,   892,   893,   897,   898,   899,
     900,   901,   902,   903,   906,   906,   915,   914,   926,   930,
     938,   942,   946,   946,   958,   960,   964,   979,   987,   992,
     996,   999,   991,  1005,  1006,  1007,  1020,  1020,  1024,  1035,
    1050,  1054,  1060,  1069,  1075,  1084,  1092,  1102,  1105,  1110,
    1118,  1119,  1120,  1121,  1122,  1133,  1144,  1147,  1149,  1154,
    1153,  1186,  1187,  1191,  1192,  1196,  1197,  1201,  1202,  1206,
    1207,  1208,  1209,  1210,  1211,  1212,  1213,  1214,  1215,  1216,
    1217,  1218,  1222,  1227,  1231,  1236,  1240,  1244,  1249,  1258,
    1259,  1263,  1268,  1269,  1277,  1278,  1278,  1293,  1294,  1298,
    1299,  1300,  1301,  1302,  1303,  1309,  1308,  1317,  1325,  1325,
    1331,  1332,  1337,  1345,  1350,  1349,  1362,  1363,  1367,  1368,
    1378,  1382,  1392,  1400,  1401,  1413,  1417,  1419,  1420,  1421,
    1425,  1426,  1430,  1431,  1435,  1444,  1445,  1456,  1463,  1472,
    1482,  1483,  1488,  1489,  1490,  1491,  1492,  1492,  1508,  1512,
    1512,  1519,  1520,  1520,  1526,  1532,  1533,  1545,  1546,  1547,
    1548,  1549,  1550,  1554,  1555,  1556,  1557,  1561,  1574,  1576,
    1578,  1580,  1582,  1584,  1586,  1588,  1590,  1592,  1594,  1596,
    1598,  1600,  1602,  1606,  1608,  1610,  1613,  1620,  1619,  1628,
    1629,  1630,  1631,  1639,  1640,  1641,  1645,  1646,  1647,  1648,
    1649,  1650,  1651,  1652,  1653,  1654,  1655,  1656,  1657,  1658,
    1659,  1660,  1661,  1662,  1663,  1664,  1665,  1666,  1667,  1673,
    1672,  1684,  1691,  1692,  1693,  1694,  1695,  1696,  1697,  1698,
    1699,  1700,  1701,  1702,  1703,  1708,  1719,  1720,  1721,  1722,
    1728,  1740,  1746,  1752,  1751,  1760,  1761,  1771,  1781,  1787,
    1796,  1800,  1801,  1805,  1806,  1809,  1813,  1817,  1827,  1832,
    1842,  1847,  1851,  1852,  1856,  1860,  1864,  1871,  1875,  1879,
    1886,  1887,  1891,  1892,  1893,  1894,  1895,  1896,  1900,  1901,
    1905,  1906,  1910,  1911,  1915,  1916,  1923,  1930,  1931,  1932,
    1936,  1937,  1941,  1942,  1946,  1947,  1951,  1952,  1956,  1956,
    1969,  1969,  1982,  1983,  1988,  1988,  1997,  2003,  2010,  2011,
    2015,  2016,  2017,  2018,  2019,  2023,  2024,  2025,  2026,  2030,
    2031
};
#endif

#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
   First, the terminals, then, starting at YYNTOKENS, nonterminals.  */
static const char *const yytname[] =
{
  "$end", "error", "$undefined", "LOW_PREC", "'\\n'", "PARAM", "HLL",
  "HLL_MAP", "GOTO", "ARG", "IF", "UNLESS", "PNULL", "ADV_FLAT",
  "ADV_SLURPY", "ADV_OPTIONAL", "ADV_OPT_FLAG", "ADV_NAMED", "ADV_ARROW",
  "NEW", "ADV_INVOCANT", "NAMESPACE", "ENDNAMESPACE", "DOT_METHOD", "SUB",
  "SYM", "LOCAL", "LEXICAL", "CONST", "INC", "DEC", "GLOBAL_CONST",
  "PLUS_ASSIGN", "MINUS_ASSIGN", "MUL_ASSIGN", "DIV_ASSIGN",
  "CONCAT_ASSIGN", "BAND_ASSIGN", "BOR_ASSIGN", "BXOR_ASSIGN", "FDIV",
  "FDIV_ASSIGN", "MOD_ASSIGN", "SHR_ASSIGN", "SHL_ASSIGN", "SHR_U_ASSIGN",
  "SHIFT_LEFT", "SHIFT_RIGHT", "INTV", "FLOATV", "STRINGV", "PMCV",
  "LOG_XOR", "RELOP_EQ", "RELOP_NE", "RELOP_GT", "RELOP_GTE", "RELOP_LT",
  "RELOP_LTE", "GLOBALOP", "RESULT", "RETURN", "TAILCALL", "YIELDT",
  "GET_RESULTS", "POW", "SHIFT_RIGHT_U", "LOG_AND", "LOG_OR", "COMMA",
  "ESUB", "DOTDOT", "PCC_BEGIN", "PCC_END", "PCC_CALL", "PCC_SUB",
  "PCC_BEGIN_RETURN", "PCC_END_RETURN", "PCC_BEGIN_YIELD", "PCC_END_YIELD",
  "NCI_CALL", "METH_CALL", "INVOCANT", "MAIN", "LOAD", "INIT", "IMMEDIATE",
  "POSTCOMP", "METHOD", "ANON", "OUTER", "NEED_LEX", "MULTI",
  "VTABLE_METHOD", "LOADLIB", "SUB_INSTANCE_OF", "SUB_LEXID", "UNIQUE_REG",
  "LABEL", "EMIT", "EOM", "IREG", "NREG", "SREG", "PREG", "IDENTIFIER",
  "REG", "MACRO", "ENDM", "STRINGC", "INTC", "FLOATC", "USTRINGC",
  "PARROT_OP", "VAR", "LINECOMMENT", "FILECOMMENT", "DOT", "CONCAT", "'='",
  "'['", "']'", "'('", "')'", "'!'", "'~'", "'-'", "'+'", "'*'", "'/'",
  "'%'", "'&'", "'|'", "';'", "$accept", "program", "compilation_units",
  "compilation_unit", "pragma", "hll_def", "constdef", "@1", "pmc_const",
  "@2", "@3", "any_string", "pasmcode", "pasmline", "pasm_inst", "@4",
  "@5", "pasm_args", "emit", "@6", "opt_pasmcode", "class_namespace",
  "maybe_ns", "sub", "@7", "@8", "@9", "sub_params", "sub_param", "@10",
  "sub_param_type_def", "multi", "outer", "vtable", "instanceof", "lexid",
  "multi_types", "multi_type", "sub_body", "pcc_sub_call", "@11",
  "opt_label", "opt_invocant", "sub_proto", "sub_proto_list", "proto",
  "pcc_call", "pcc_args", "pcc_arg", "pcc_results", "pcc_result", "@12",
  "paramtype_list", "paramtype", "pcc_ret", "@13", "pcc_yield", "@14",
  "pcc_returns", "pcc_return", "pcc_return_many", "@15", "return_or_yield",
  "var_returns", "statements", "helper_clear_state", "statement", "labels",
  "_labels", "label", "instruction", "id_list", "id_list_id",
  "opt_unique_reg", "labeled_inst", "@16", "@17", "@18", "type",
  "classname", "assignment", "@19", "un_op", "bin_op", "get_results",
  "@20", "op_assign", "assign_op", "func_assign", "the_sub", "sub_call",
  "@21", "arglist", "arg", "argtype_list", "argtype", "result",
  "targetlist", "conditional_statement", "unless_statement",
  "if_statement", "comma_or_goto", "relop", "target", "vars", "_vars",
  "_var_or_i", "sub_label_op_c", "sub_label_op", "label_op", "var_or_i",
  "var", "keylist", "@22", "keylist_force", "@23", "_keylist", "@24",
  "key", "reg", "const", "string", 0
};
#endif

# ifdef YYPRINT
/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
   token YYLEX-NUM.  */
static const yytype_uint16 yytoknum[] =
{
       0,   256,   257,   258,    10,   259,   260,   261,   262,   263,
     264,   265,   266,   267,   268,   269,   270,   271,   272,   273,
     274,   275,   276,   277,   278,   279,   280,   281,   282,   283,
     284,   285,   286,   287,   288,   289,   290,   291,   292,   293,
     294,   295,   296,   297,   298,   299,   300,   301,   302,   303,
     304,   305,   306,   307,   308,   309,   310,   311,   312,   313,
     314,   315,   316,   317,   318,   319,   320,   321,   322,   323,
     324,   325,   326,   327,   328,   329,   330,   331,   332,   333,
     334,   335,   336,   337,   338,   339,   340,   341,   342,   343,
     344,   345,   346,   347,   348,   349,   350,   351,   352,   353,
     354,   355,   356,   357,   358,   359,   360,   361,   362,   363,
     364,   365,   366,   367,   368,   369,   370,   371,   372,    61,
      91,    93,    40,    41,    33,   126,    45,    43,    42,    47,
      37,    38,   124,    59
};
# endif

/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives.  */
static const yytype_uint8 yyr1[] =
{
       0,   134,   135,   136,   136,   137,   137,   137,   137,   137,
     137,   137,   138,   138,   139,   139,   139,   141,   140,   143,
     142,   144,   142,   145,   145,   146,   146,   147,   147,   147,
     147,   147,   147,   147,   149,   148,   150,   148,   148,   148,
     148,   151,   153,   152,   154,   154,   155,   156,   156,   158,
     159,   160,   157,   161,   161,   161,   163,   162,   164,   164,
     165,   166,   166,   167,   167,   168,   169,   170,   170,   170,
     171,   171,   171,   171,   171,   171,   171,   172,   172,   174,
     173,   175,   175,   176,   176,   177,   177,   178,   178,   179,
     179,   179,   179,   179,   179,   179,   179,   179,   179,   179,
     179,   179,   180,   180,   180,   180,   180,   180,   180,   181,
     181,   182,   183,   183,   184,   185,   184,   186,   186,   187,
     187,   187,   187,   187,   187,   189,   188,   188,   191,   190,
     192,   192,   192,   193,   195,   194,   196,   196,   197,   197,
     197,   197,   197,   198,   198,   199,   200,   200,   200,   200,
     201,   201,   202,   202,   203,   204,   204,   205,   205,   206,
     207,   207,   208,   208,   208,   208,   209,   208,   208,   210,
     208,   208,   211,   208,   208,   208,   208,   208,   208,   208,
     208,   208,   208,   212,   212,   212,   212,   213,   214,   214,
     214,   214,   214,   214,   214,   214,   214,   214,   214,   214,
     214,   214,   214,   214,   214,   214,   214,   215,   214,   214,
     214,   214,   214,   216,   216,   216,   217,   217,   217,   217,
     217,   217,   217,   217,   217,   217,   217,   217,   217,   217,
     217,   217,   217,   217,   217,   217,   217,   217,   217,   219,
     218,   220,   221,   221,   221,   221,   221,   221,   221,   221,
     221,   221,   221,   221,   221,   222,   223,   223,   223,   223,
     223,   223,   223,   225,   224,   226,   226,   226,   226,   226,
     227,   228,   228,   229,   229,   229,   230,   231,   231,   231,
     231,   231,   232,   232,   233,   233,   233,   234,   234,   234,
     235,   235,   236,   236,   236,   236,   236,   236,   237,   237,
     238,   238,   239,   239,   240,   240,   240,   241,   241,   241,
     242,   242,   243,   243,   244,   244,   245,   245,   247,   246,
     249,   248,   250,   250,   251,   250,   252,   252,   252,   252,
     253,   253,   253,   253,   253,   254,   254,   254,   254,   255,
     255
};

/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN.  */
static const yytype_uint8 yyr2[] =
{
       0,     2,     1,     1,     2,     1,     1,     1,     1,     2,
       1,     1,     2,     3,     4,     2,     4,     0,     6,     0,
       6,     0,     6,     1,     1,     1,     2,     3,     2,     1,
       1,     1,     1,     1,     0,     3,     0,     4,     2,     4,
       0,     1,     0,     4,     0,     1,     3,     3,     2,     0,
       0,     0,    10,     0,     1,     3,     0,     3,     3,     5,
       4,     4,     4,     1,     4,     4,     4,     0,     3,     1,
       1,     1,     1,     1,     1,     1,     3,     0,     1,     0,
       9,     0,     2,     0,     3,     0,     1,     1,     2,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     5,     3,     3,     3,     3,     5,     5,     0,
       3,     2,     0,     3,     3,     0,     4,     0,     2,     1,
       1,     1,     1,     4,     1,     0,     5,     1,     0,     5,
       0,     2,     3,     3,     0,     5,     1,     1,     0,     1,
       3,     3,     5,     1,     2,     0,     2,     2,     1,     1,
       0,     1,     2,     1,     1,     3,     2,     1,     3,     2,
       0,     1,     1,     1,     2,     2,     0,     4,     4,     0,
       6,     1,     0,     6,     2,     2,     2,     2,     1,     1,
       1,     1,     0,     1,     1,     1,     1,     1,     3,     4,
       5,     6,     6,     6,     7,     4,     4,     4,     6,     6,
       7,     4,     4,     4,     6,     7,     3,     0,     9,     1,
       1,     1,     3,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     0,
       5,     3,     1,     1,     1,     1,     1,     1,     1,     1,
       1,     1,     1,     1,     1,     4,     1,     1,     1,     1,
       3,     3,     3,     0,     5,     0,     3,     1,     5,     3,
       2,     0,     2,     1,     1,     4,     2,     3,     5,     1,
       3,     0,     1,     1,     6,     5,     4,     4,     6,     5,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       0,     1,     3,     1,     1,     4,     3,     1,     1,     1,
       1,     1,     1,     1,     1,     1,     1,     1,     0,     2,
       0,     2,     1,     3,     0,     4,     1,     3,     2,     2,
       1,     1,     1,     1,     1,     1,     1,     1,     1,     1,
       1
};

/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
   STATE-NUM when YYTABLE doesn't specify something else to do.  Zero
   means the default is an error.  */
static const yytype_uint16 yydefact[] =
{
       0,    11,     0,     0,     0,    49,    17,     0,    42,     0,
       0,     2,     3,    10,     0,     6,     8,     5,     7,    15,
       0,   318,     0,     0,     0,     0,   150,     9,     1,     4,
      12,     0,     0,    48,     0,     0,    46,   310,   308,   309,
     311,    50,   307,   183,   184,   185,   186,     0,    13,    19,
     154,     0,    30,    29,    33,    32,   150,    25,     0,    31,
      34,   151,   153,    14,    16,    47,     0,   330,   331,   332,
     333,   334,   337,   335,   336,   338,   298,   316,   326,   319,
     322,   299,   317,    85,     0,     0,     0,    28,    26,    43,
       0,     0,    36,     0,     0,   152,   328,   329,   324,     0,
      91,    89,    90,    92,    93,    95,    94,     0,    96,     0,
      63,     0,     0,    97,    98,    99,   100,   101,     0,    86,
      87,     0,     0,     0,    38,     0,    85,    27,   300,   327,
       0,   323,     0,    67,     0,     0,     0,    51,    88,    18,
     312,   313,   314,     0,   315,     0,     0,     0,   320,    35,
     316,    41,   301,   303,   304,   325,     0,     0,    70,    71,
      73,    72,    74,    75,   318,     0,    69,     0,     0,     0,
      53,     0,     0,    39,    37,     0,     0,   318,     0,    62,
      61,     0,     0,    60,    64,    65,    66,    54,   145,    23,
      24,    20,    22,   306,   321,     0,   302,    76,    68,    56,
       0,   149,   148,     0,     0,   145,     0,   143,   305,     0,
     147,    55,    52,   144,     0,   182,   146,    57,     0,   156,
       0,     0,     0,     0,     0,     0,     0,   166,     0,   169,
     172,     0,   136,     0,   137,   239,     0,     0,     0,   256,
     257,   258,   300,   207,   171,   179,   180,   181,   127,     0,
       0,   162,   209,   210,   211,   263,   178,   163,   283,   282,
     259,   117,     0,   175,     0,     0,     0,     0,   177,     0,
     164,   165,     0,     0,     0,     0,   339,   340,     0,   174,
     259,     0,    79,   125,   128,   176,   281,   134,   155,     0,
     242,   243,   244,   245,   248,   249,   250,   251,   247,   246,
     252,   253,   254,     0,     0,   318,     0,    58,     0,     0,
     291,   292,   293,   294,   295,   296,   297,   290,     0,     0,
       0,     0,     0,     0,     0,     0,     0,     0,     0,   281,
     109,   130,   130,     0,   279,     0,   117,   138,   265,   261,
     262,   260,   212,     0,     0,   337,   338,   300,   213,   214,
     215,     0,   206,   316,   188,     0,   241,   119,   120,   121,
     122,   124,   118,   117,     0,   287,     0,     0,   286,     0,
     203,   160,   167,   157,   168,     0,     0,   202,     0,    83,
       0,     0,     0,     0,     0,   276,   337,     0,   139,   271,
     337,     0,   267,   187,   197,   195,   196,   201,   255,   189,
     221,   230,   231,   235,   224,   225,   226,   227,   228,   229,
     222,   232,   233,   234,   223,   318,   238,   216,   217,   218,
     219,   220,   236,   237,     0,     0,     0,    59,   289,     0,
     285,     0,     0,   318,   161,   159,     0,     0,     0,   240,
       0,     0,     0,     0,   131,     0,   126,     0,   129,   280,
       0,   277,     0,     0,     0,   135,   270,     0,     0,   264,
       0,     0,   318,     0,   318,     0,   190,     0,     0,   288,
     284,   204,     0,   158,   170,   173,   111,     0,     0,     0,
       0,    81,   110,   271,   132,     0,     0,   140,   337,   141,
     273,   274,   272,   269,   337,   266,   198,   193,     0,   199,
       0,   191,   192,   123,   205,    84,     0,     0,     0,     0,
     112,     0,   133,   278,   265,     0,     0,     0,   194,   200,
     103,     0,   104,   106,     0,   105,     0,     0,    82,     0,
     142,     0,   268,     0,     0,     0,   115,     0,    80,     0,
     208,   275,   102,   108,   107,     0,   117,   113,     0,   114,
     116
};

/* YYDEFGOTO[NTERM-NUM].  */
static const yytype_int16 yydefgoto[] =
{
      -1,    10,    11,    12,    13,    14,    15,    24,    55,    85,
      86,   191,    56,    57,    93,    94,   126,   149,    16,    26,
      58,    17,    22,    18,    23,    83,   170,   188,   203,   209,
     217,   113,   114,   115,   116,   117,   165,   166,   204,   245,
     330,   510,   442,   118,   119,   120,   481,   379,   443,   527,
     539,   545,   307,   362,   246,   331,   247,   332,   380,   447,
     248,   337,   249,   387,   205,   206,   207,    60,    61,    62,
     216,   372,   373,   435,   250,   272,   274,   275,    47,   395,
     251,   286,   351,   424,   252,   281,   253,   306,   254,   255,
     256,   289,   391,   392,   456,   492,   334,   335,   257,   258,
     259,   318,   319,    77,   151,   152,   153,    41,    42,   142,
     154,   144,    34,    35,   175,   176,    79,   130,    80,    81,
      82,   278
};

/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
   STATE-NUM.  */
#define YYPACT_NINF -428
static const yytype_int16 yypact[] =
{
       6,  -428,   -39,   -30,   -67,  -428,  -428,    -7,  -428,   111,
     120,     6,  -428,  -428,   127,  -428,  -428,  -428,  -428,    94,
      49,    32,   166,    84,   176,   171,    30,  -428,  -428,  -428,
    -428,    74,    76,  -428,    69,   254,  -428,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,   101,  -428,   104,
    -428,   211,  -428,  -428,  -428,  -428,    35,  -428,   119,  -428,
      61,   124,  -428,  -428,  -428,  -428,   284,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,   157,   -41,
    -428,  -428,  -428,   566,   131,   132,   121,  -428,  -428,  -428,
     284,   134,  -428,   247,   139,  -428,  -428,   284,  -428,   254,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,   133,  -428,   146,
     150,   152,   155,  -428,  -428,  -428,  -428,  -428,   249,   566,
    -428,   123,   562,   562,  -428,   210,   566,  -428,   496,  -428,
     254,  -428,    13,    -1,   145,   174,   177,  -428,  -428,  -428,
    -428,  -428,  -428,   175,  -428,   180,   179,   192,  -428,  -428,
     184,  -428,   226,  -428,  -428,  -428,   183,   186,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,   -46,  -428,   194,   196,   201,
     296,   108,   108,  -428,  -428,   206,   254,  -428,   496,  -428,
    -428,   207,    -1,  -428,  -428,  -428,  -428,  -428,    10,  -428,
    -428,  -428,  -428,  -428,   -41,   214,  -428,  -428,  -428,  -428,
     326,  -428,  -428,   332,   267,    85,   437,  -428,  -428,   176,
    -428,  -428,  -428,  -428,   334,   270,  -428,  -428,    86,  -428,
     -59,    55,    70,   284,   391,   235,   236,  -428,   234,    34,
    -428,    31,  -428,   161,  -428,  -428,   340,   341,   343,  -428,
    -428,  -428,   496,  -428,  -428,  -428,  -428,  -428,  -428,   227,
     346,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,
     528,  -428,   333,  -428,   284,   154,   284,   154,  -428,   283,
    -428,  -428,   176,   292,   176,   176,  -428,  -428,   243,  -428,
     250,   231,  -428,  -428,  -428,  -428,   298,  -428,  -428,   248,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,
    -428,  -428,  -428,   209,   135,  -428,   284,     2,   264,   370,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,   -59,   284,
     372,   -59,   284,   284,   272,   391,   276,   286,   284,   298,
    -428,  -428,  -428,   385,  -428,   -40,  -428,   576,   590,  -428,
    -428,  -428,  -428,   516,    31,   287,   291,   496,  -428,  -428,
    -428,   284,  -428,   -78,   464,   293,  -428,  -428,  -428,  -428,
     294,  -428,  -428,  -428,   -59,  -428,   400,   -59,  -428,   407,
     -36,   320,   351,  -428,  -428,   305,   308,  -428,   -37,     5,
      20,    17,   391,   369,   310,     2,   412,   -29,  -428,  -428,
     413,   -12,  -428,  -428,   364,   -10,    -8,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,   284,   315,   327,     2,  -428,   -59,
    -428,   -59,   284,  -428,  -428,  -428,   272,   123,   123,  -428,
     284,   284,    58,   431,  -428,   284,  -428,   433,  -428,  -428,
     421,  -428,   161,   284,   604,  -428,   185,   284,   618,  -428,
     284,   284,  -428,   284,  -428,   319,  -428,   284,   323,  -428,
    -428,  -428,   321,  -428,  -428,  -428,  -428,   446,   284,   284,
     474,   124,  -428,  -428,  -428,   391,   329,  -428,   434,  -428,
    -428,   331,  -428,  -428,   436,  -428,  -428,  -428,   336,  -428,
     339,  -428,  -428,  -428,  -428,  -428,     7,   451,    21,    22,
    -428,   457,   185,  -428,   590,   284,   353,   284,  -428,  -428,
    -428,   284,  -428,  -428,   284,  -428,   284,    12,  -428,    -9,
    -428,   344,  -428,   462,   465,   470,  -428,   391,  -428,   472,
    -428,  -428,  -428,  -428,  -428,   176,  -428,  -428,   272,     2,
    -428
};

/* YYPGOTO[NTERM-NUM].  */
static const yytype_int16 yypgoto[] =
{
    -428,  -428,  -428,   466,    19,  -428,  -428,  -428,   266,  -428,
    -428,   312,  -428,   429,  -428,  -428,  -428,   140,  -428,  -428,
    -428,    45,   147,  -428,  -428,  -428,  -428,  -428,  -428,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,   306,  -428,  -428,
    -428,  -428,  -428,   376,  -428,   384,  -428,  -428,  -428,  -428,
    -428,  -428,  -328,  -428,  -428,  -428,  -428,  -428,   182,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,   301,   302,  -428,   -60,
    -428,  -428,  -427,  -428,  -428,  -428,  -428,  -428,  -206,  -428,
    -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,  -428,    60,
    -211,  -428,     9,  -331,    24,  -428,   141,   197,  -428,  -428,
    -428,   258,   260,  -126,   295,  -428,   350,  -428,   230,  -215,
      82,   -35,  -157,  -428,  -428,  -428,   358,  -428,   -56,  -428,
    -117,   200
};

/* YYTABLE[YYPACT[STATE-NUM]].  What to do in state STATE-NUM.  If
   positive, shift that token.  If negative, reduce the rule which
   number is the opposite.  If zero, do what YYDEFACT says.
   If YYTABLE_NINF, syntax error.  */
#define YYTABLE_NINF -260
static const yytype_int16 yytable[] =
{
      78,    95,   150,   218,   139,   263,   388,   181,   385,   473,
       1,   520,     2,     3,   440,   199,   357,   358,   359,   360,
     195,   444,   279,   182,   444,   523,   525,     4,    98,   383,
       5,    96,   383,   432,     6,   427,     2,     3,   536,   303,
     454,     2,     3,   131,  -259,    54,   140,   158,   159,   160,
     161,     4,   150,    21,   141,   124,     4,   458,    49,   461,
     458,   463,   129,    49,    78,   -40,   324,   264,   326,   327,
      19,    59,   537,    90,   155,    54,   521,   183,   445,    20,
     -77,   445,   266,   384,   433,   538,   439,   441,    91,   260,
     524,   526,    99,   352,   455,    78,   448,   446,   269,   361,
       7,    59,    25,   365,   162,     8,   368,   280,   163,   476,
     462,   459,   464,     9,   540,    27,   150,   200,   156,   164,
      28,   550,   157,   489,     7,   201,   202,   495,    50,     7,
     -44,    30,   478,    50,   276,   -45,    92,    51,   479,   480,
     277,    78,    51,   -21,   -19,    52,    53,   342,   355,   428,
      52,    53,   430,    33,   343,   -78,    67,    68,    69,    70,
     336,    71,   310,    31,    72,    73,    74,    75,    32,    76,
      36,    67,    68,    69,    70,    48,    71,   340,   353,    72,
      73,    74,    75,    63,    76,    64,   265,   267,   268,    37,
      65,   261,   200,    38,   344,   262,    39,    40,   490,   374,
     201,   202,   491,   336,   143,   145,    84,   311,   312,   313,
     314,   315,   316,   -21,   469,    87,   470,   189,   549,    89,
     190,   150,    50,   317,    43,    44,    45,    46,    97,   309,
     123,   320,    72,    73,    74,    75,    67,    68,    69,    70,
     239,    71,   122,   125,   345,    73,    74,   346,   347,    76,
     121,   127,   128,   137,   167,   132,   449,   336,   465,   348,
     349,   350,    67,    68,    69,    70,   239,    71,   133,   354,
     240,   356,   134,   241,   135,    76,   472,   136,   220,   146,
     221,   222,   223,   168,   366,   173,   169,   369,   370,   224,
     174,   225,   226,   377,   171,   178,   227,   228,   229,   172,
     187,   230,   389,   389,   177,   498,   179,   500,   396,   180,
      67,    68,    69,    70,    37,    71,   399,   184,   339,   185,
     474,   475,    40,    76,   186,    66,   280,   193,   197,   231,
     210,   232,   233,   234,   235,   208,   211,   212,   219,   548,
     270,   271,   236,   273,   282,   283,   237,   284,   238,   287,
     288,   308,   323,   329,   509,    67,    68,    69,    70,   513,
      71,   325,   328,    72,    73,    74,    75,   303,    76,   363,
     338,    67,    68,    69,    70,   239,    71,   371,   364,   240,
     367,   375,   241,   242,    76,    67,    68,    69,    70,   466,
      71,   376,   243,    72,    73,    74,    75,   471,    76,    67,
      68,    69,    70,   382,    71,   389,   477,   333,   429,  -257,
     483,   546,    76,  -258,   425,   431,   426,   434,   487,   389,
     436,   511,   493,   389,   437,   496,   497,   438,   499,   452,
     453,   457,   502,   460,   467,   482,   468,   484,   214,   485,
     501,  -150,   504,   506,   507,  -150,   503,  -150,  -150,  -150,
     505,   514,   515,   516,   517,   522,  -150,   518,  -150,  -150,
     519,   528,   531,  -150,  -150,  -150,   542,   541,  -150,   543,
      67,    68,    69,    70,   544,    71,   547,    29,   450,   389,
     530,   244,   532,    76,   192,    88,   533,   398,   198,   534,
     394,   535,    67,    68,    69,    70,  -150,    71,  -150,  -150,
    -150,  -150,   147,   138,   400,    76,   213,   512,   215,  -150,
     401,   402,   486,  -150,   381,  -150,   403,   404,   405,   406,
     407,   408,   409,   529,   451,   321,   378,   322,   196,   410,
     411,   412,   413,   341,   194,    50,     0,   285,  -150,  -150,
    -150,  -150,  -150,  -150,   397,     0,  -150,     0,     0,  -150,
    -150,  -150,     0,     0,     0,     0,     0,     0,     0,  -150,
     290,   291,   292,   293,   294,   295,   296,   297,     0,   298,
     299,   300,   301,   302,     0,    67,    68,    69,    70,     0,
      71,     0,   414,   508,   415,     0,     0,     0,    76,   416,
     417,   418,   419,   420,   421,   422,   423,    67,    68,    69,
      70,   140,    71,     0,     0,    72,    73,    74,    75,   141,
      76,     0,     0,     0,     0,     0,   148,    67,    68,    69,
      70,   393,    71,     0,     0,    72,    73,    74,    75,     0,
      76,     0,     0,     0,     0,     0,    21,     0,     0,     0,
       0,     0,     0,     0,     0,   303,     0,   304,   305,   100,
     101,   102,   103,   104,   105,   106,   107,   108,   109,   110,
       0,   111,   112,    67,    68,    69,    70,   140,    71,     0,
       0,    72,    73,    74,    75,   141,    76,    67,    68,    69,
      70,     0,    71,     0,     0,   386,    73,    74,    75,     0,
      76,    67,    68,    69,    70,     0,    71,     0,     0,   390,
      73,    74,    75,     0,    76,    67,    68,    69,    70,     0,
      71,     0,     0,   488,    73,    74,    75,     0,    76,    67,
      68,    69,    70,     0,    71,     0,     0,   494,    73,    74,
      75,     0,    76
};

static const yytype_int16 yycheck[] =
{
      35,    61,   128,   209,   121,   220,   337,   164,   336,   436,
       4,     4,     6,     7,     9,     5,    14,    15,    16,    17,
     177,     4,   233,    69,     4,     4,     4,    21,    69,    69,
      24,    66,    69,    69,    28,   363,     6,     7,    26,   117,
      69,     6,     7,    99,   122,    26,   105,    48,    49,    50,
      51,    21,   178,   120,   113,    90,    21,    69,    28,    69,
      69,    69,    97,    28,    99,     4,   272,    12,   274,   275,
     109,    26,    60,    12,   130,    56,    69,   123,    61,   109,
      70,    61,    12,   123,   120,    73,   123,    82,    27,   215,
      69,    69,   133,   304,   123,   130,    79,    77,   224,    97,
      94,    56,   109,   318,   105,    99,   321,   233,   109,   440,
     120,   123,   120,   107,   123,     4,   242,   107,   105,   120,
       0,   548,   109,   454,    94,   115,   116,   458,    98,    94,
     100,     4,    74,    98,   103,   100,    75,   107,    80,    81,
     109,   176,   107,   109,   110,   115,   116,    12,   305,   364,
     115,   116,   367,   121,    19,    70,   101,   102,   103,   104,
     286,   106,     8,    69,   109,   110,   111,   112,   119,   114,
       4,   101,   102,   103,   104,     4,   106,   303,   304,   109,
     110,   111,   112,   109,   114,   109,   221,   222,   223,   105,
     121,   105,   107,   109,    59,   109,   112,   113,    13,   325,
     115,   116,    17,   329,   122,   123,   105,    53,    54,    55,
      56,    57,    58,   109,   429,     4,   431,   109,   546,   100,
     112,   347,    98,    69,    48,    49,    50,    51,    71,   264,
     109,   266,   109,   110,   111,   112,   101,   102,   103,   104,
     105,   106,   110,   109,   109,   110,   111,   112,   113,   114,
     119,     4,   113,     4,   109,   122,   382,   383,   415,   124,
     125,   126,   101,   102,   103,   104,   105,   106,   122,   304,
     109,   306,   122,   112,   122,   114,   433,   122,     8,    69,
      10,    11,    12,   109,   319,   106,   109,   322,   323,    19,
      98,    21,    22,   328,   119,    69,    26,    27,    28,   119,
       4,    31,   337,   338,   120,   462,   123,   464,   343,   123,
     101,   102,   103,   104,   105,   106,   351,   123,   109,   123,
     437,   438,   113,   114,   123,    71,   452,   121,   121,    59,
       4,    61,    62,    63,    64,   121,     4,    70,     4,   545,
     105,   105,    72,   109,     4,     4,    76,     4,    78,   122,
       4,    18,    69,   122,   480,   101,   102,   103,   104,   485,
     106,    69,   119,   109,   110,   111,   112,   117,   114,   105,
     122,   101,   102,   103,   104,   105,   106,   105,     8,   109,
       8,   105,   112,   113,   114,   101,   102,   103,   104,   424,
     106,   105,   122,   109,   110,   111,   112,   432,   114,   101,
     102,   103,   104,    18,   106,   440,   441,   109,     8,   122,
     445,   537,   114,   122,   121,     8,   122,    97,   453,   454,
      69,   481,   457,   458,   119,   460,   461,   119,   463,   119,
      18,    18,   467,    69,   119,     4,   109,     4,     1,    18,
     121,     4,   121,   478,   479,     8,   123,    10,    11,    12,
       4,   122,    18,   122,    18,     4,    19,   121,    21,    22,
     121,     4,   109,    26,    27,    28,     4,   123,    31,     4,
     101,   102,   103,   104,     4,   106,     4,    11,   109,   514,
     515,   215,   517,   114,   172,    56,   521,   347,   182,   524,
     343,   526,   101,   102,   103,   104,    59,   106,    61,    62,
      63,    64,   126,   119,    40,   114,   205,   483,   206,    72,
      46,    47,   452,    76,   332,    78,    52,    53,    54,    55,
      56,    57,    58,   514,   383,   267,   329,   267,   178,    65,
      66,    67,    68,   303,   176,    98,    -1,   242,   101,   102,
     103,   104,   105,   106,   344,    -1,   109,    -1,    -1,   112,
     113,   114,    -1,    -1,    -1,    -1,    -1,    -1,    -1,   122,
      32,    33,    34,    35,    36,    37,    38,    39,    -1,    41,
      42,    43,    44,    45,    -1,   101,   102,   103,   104,    -1,
     106,    -1,   118,   109,   120,    -1,    -1,    -1,   114,   125,
     126,   127,   128,   129,   130,   131,   132,   101,   102,   103,
     104,   105,   106,    -1,    -1,   109,   110,   111,   112,   113,
     114,    -1,    -1,    -1,    -1,    -1,   120,   101,   102,   103,
     104,   105,   106,    -1,    -1,   109,   110,   111,   112,    -1,
     114,    -1,    -1,    -1,    -1,    -1,   120,    -1,    -1,    -1,
      -1,    -1,    -1,    -1,    -1,   117,    -1,   119,   120,    83,
      84,    85,    86,    87,    88,    89,    90,    91,    92,    93,
      -1,    95,    96,   101,   102,   103,   104,   105,   106,    -1,
      -1,   109,   110,   111,   112,   113,   114,   101,   102,   103,
     104,    -1,   106,    -1,    -1,   109,   110,   111,   112,    -1,
     114,   101,   102,   103,   104,    -1,   106,    -1,    -1,   109,
     110,   111,   112,    -1,   114,   101,   102,   103,   104,    -1,
     106,    -1,    -1,   109,   110,   111,   112,    -1,   114,   101,
     102,   103,   104,    -1,   106,    -1,    -1,   109,   110,   111,
     112,    -1,   114
};

/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
   symbol of state STATE-NUM.  */
static const yytype_uint8 yystos[] =
{
       0,     4,     6,     7,    21,    24,    28,    94,    99,   107,
     135,   136,   137,   138,   139,   140,   152,   155,   157,   109,
     109,   120,   156,   158,   141,   109,   153,     4,     0,   137,
       4,    69,   119,   121,   246,   247,     4,   105,   109,   112,
     113,   241,   242,    48,    49,    50,    51,   212,     4,    28,
      98,   107,   115,   116,   138,   142,   146,   147,   154,   155,
     201,   202,   203,   109,   109,   121,    71,   101,   102,   103,
     104,   106,   109,   110,   111,   112,   114,   237,   245,   250,
     252,   253,   254,   159,   105,   143,   144,     4,   147,   100,
      12,    27,    75,   148,   149,   203,   245,    71,    69,   133,
      83,    84,    85,    86,    87,    88,    89,    90,    91,    92,
      93,    95,    96,   165,   166,   167,   168,   169,   177,   178,
     179,   119,   110,   109,   245,   109,   150,     4,   113,   245,
     251,   252,   122,   122,   122,   122,   122,     4,   179,   254,
     105,   113,   243,   244,   245,   244,    69,   177,   120,   151,
     237,   238,   239,   240,   244,   252,   105,   109,    48,    49,
      50,    51,   105,   109,   120,   170,   171,   109,   109,   109,
     160,   119,   119,   106,    98,   248,   249,   120,    69,   123,
     123,   246,    69,   123,   123,   123,   123,     4,   161,   109,
     112,   145,   145,   121,   250,   246,   240,   121,   171,     5,
     107,   115,   116,   162,   172,   198,   199,   200,   121,   163,
       4,     4,    70,   200,     1,   201,   204,   164,   212,     4,
       8,    10,    11,    12,    19,    21,    22,    26,    27,    28,
      31,    59,    61,    62,    63,    64,    72,    76,    78,   105,
     109,   112,   113,   122,   142,   173,   188,   190,   194,   196,
     208,   214,   218,   220,   222,   223,   224,   232,   233,   234,
     237,   105,   109,   243,    12,   245,    12,   245,   245,   237,
     105,   105,   209,   109,   210,   211,   103,   109,   255,   224,
     237,   219,     4,     4,     4,   238,   215,   122,     4,   225,
      32,    33,    34,    35,    36,    37,    38,    39,    41,    42,
      43,    44,    45,   117,   119,   120,   221,   186,    18,   245,
       8,    53,    54,    55,    56,    57,    58,    69,   235,   236,
     245,   235,   236,    69,   212,    69,   212,   212,   119,   122,
     174,   189,   191,   109,   230,   231,   237,   195,   122,   109,
     237,   242,    12,    19,    59,   109,   112,   113,   124,   125,
     126,   216,   224,   237,   245,   246,   245,    14,    15,    16,
      17,    97,   187,   105,     8,   243,   245,     8,   243,   245,
     245,   105,   205,   206,   237,   105,   105,   245,   231,   181,
     192,   192,    18,    69,   123,   186,   109,   197,   227,   245,
     109,   226,   227,   105,   156,   213,   245,   255,   151,   245,
      40,    46,    47,    52,    53,    54,    55,    56,    57,    58,
      65,    66,    67,    68,   118,   120,   125,   126,   127,   128,
     129,   130,   131,   132,   217,   121,   122,   186,   243,     8,
     243,     8,    69,   120,    97,   207,    69,   119,   119,   123,
       9,    82,   176,   182,     4,    61,    77,   193,    79,   237,
     109,   230,   119,    18,    69,   123,   228,    18,    69,   123,
      69,    69,   120,    69,   120,   246,   245,   119,   109,   243,
     243,   245,   246,   206,   254,   254,   227,   245,    74,    80,
      81,   180,     4,   245,     4,    18,   223,   245,   109,   227,
      13,    17,   229,   245,   109,   227,   245,   245,   246,   245,
     246,   121,   245,   123,   121,     4,   245,   245,   109,   237,
     175,   203,   228,   237,   122,    18,   122,    18,   121,   121,
       4,    69,     4,     4,    69,     4,    69,   183,     4,   226,
     245,   109,   245,   245,   245,   245,    26,    60,    73,   184,
     123,   123,     4,     4,     4,   185,   237,     4,   212,   186,
     206
};

#define yyerrok		(yyerrstatus = 0)
#define yyclearin	(yychar = YYEMPTY)
#define YYEMPTY		(-2)
#define YYEOF		0

#define YYACCEPT	goto yyacceptlab
#define YYABORT		goto yyabortlab
#define YYERROR		goto yyerrorlab


/* Like YYERROR except do call yyerror.  This remains here temporarily
   to ease the transition to the new meaning of YYERROR, for GCC.
   Once GCC version 2 has supplanted version 1, this can go.  */

#define YYFAIL		goto yyerrlab

#define YYRECOVERING()  (!!yyerrstatus)

#define YYBACKUP(Token, Value)					\
do								\
  if (yychar == YYEMPTY && yylen == 1)				\
    {								\
      yychar = (Token);						\
      yylval = (Value);						\
      yytoken = YYTRANSLATE (yychar);				\
      YYPOPSTACK (1);						\
      goto yybackup;						\
    }								\
  else								\
    {								\
      yyerror (yyscanner, interp, YY_("syntax error: cannot back up")); \
      YYERROR;							\
    }								\
while (YYID (0))


#define YYTERROR	1
#define YYERRCODE	256


/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
   If N is 0, then set CURRENT to the empty location which ends
   the previous symbol: RHS[0] (always defined).  */

#define YYRHSLOC(Rhs, K) ((Rhs)[K])
#ifndef YYLLOC_DEFAULT
# define YYLLOC_DEFAULT(Current, Rhs, N)				\
    do									\
      if (YYID (N))                                                    \
	{								\
	  (Current).first_line   = YYRHSLOC (Rhs, 1).first_line;	\
	  (Current).first_column = YYRHSLOC (Rhs, 1).first_column;	\
	  (Current).last_line    = YYRHSLOC (Rhs, N).last_line;		\
	  (Current).last_column  = YYRHSLOC (Rhs, N).last_column;	\
	}								\
      else								\
	{								\
	  (Current).first_line   = (Current).last_line   =		\
	    YYRHSLOC (Rhs, 0).last_line;				\
	  (Current).first_column = (Current).last_column =		\
	    YYRHSLOC (Rhs, 0).last_column;				\
	}								\
    while (YYID (0))
#endif


/* YY_LOCATION_PRINT -- Print the location on the stream.
   This macro was not mandated originally: define only if we know
   we won't break user code: when these are the locations we know.  */

#ifndef YY_LOCATION_PRINT
# if YYLTYPE_IS_TRIVIAL
#  define YY_LOCATION_PRINT(File, Loc)			\
     fprintf (File, "%d.%d-%d.%d",			\
	      (Loc).first_line, (Loc).first_column,	\
	      (Loc).last_line,  (Loc).last_column)
# else
#  define YY_LOCATION_PRINT(File, Loc) ((void) 0)
# endif
#endif


/* YYLEX -- calling `yylex' with the right arguments.  */

#ifdef YYLEX_PARAM
# define YYLEX yylex (&yylval, YYLEX_PARAM)
#else
# define YYLEX yylex (&yylval, yyscanner, interp)
#endif

/* Enable debugging if requested.  */
#if YYDEBUG

# ifndef YYFPRINTF
#  include <stdio.h> /* INFRINGES ON USER NAME SPACE */
#  define YYFPRINTF fprintf
# endif

# define YYDPRINTF(Args)			\
do {						\
  if (yydebug)					\
    YYFPRINTF Args;				\
} while (YYID (0))

# define YY_SYMBOL_PRINT(Title, Type, Value, Location)			  \
do {									  \
  if (yydebug)								  \
    {									  \
      YYFPRINTF (stderr, "%s ", Title);					  \
      yy_symbol_print (stderr,						  \
		  Type, Value, yyscanner, interp); \
      YYFPRINTF (stderr, "\n");						  \
    }									  \
} while (YYID (0))


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *yyscanner, Parrot_Interp interp)
#else
static void
yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner, interp)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
    void *yyscanner;
    Parrot_Interp interp;
#endif
{
  if (!yyvaluep)
    return;
  YYUSE (yyscanner);
  YYUSE (interp);
# ifdef YYPRINT
  if (yytype < YYNTOKENS)
    YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
# else
  YYUSE (yyoutput);
# endif
  switch (yytype)
    {
      default:
	break;
    }
}


/*--------------------------------.
| Print this symbol on YYOUTPUT.  |
`--------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, void *yyscanner, Parrot_Interp interp)
#else
static void
yy_symbol_print (yyoutput, yytype, yyvaluep, yyscanner, interp)
    FILE *yyoutput;
    int yytype;
    YYSTYPE const * const yyvaluep;
    void *yyscanner;
    Parrot_Interp interp;
#endif
{
  if (yytype < YYNTOKENS)
    YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
  else
    YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);

  yy_symbol_value_print (yyoutput, yytype, yyvaluep, yyscanner, interp);
  YYFPRINTF (yyoutput, ")");
}

/*------------------------------------------------------------------.
| yy_stack_print -- Print the state stack from its BOTTOM up to its |
| TOP (included).                                                   |
`------------------------------------------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
#else
static void
yy_stack_print (bottom, top)
    yytype_int16 *bottom;
    yytype_int16 *top;
#endif
{
  YYFPRINTF (stderr, "Stack now");
  for (; bottom <= top; ++bottom)
    YYFPRINTF (stderr, " %d", *bottom);
  YYFPRINTF (stderr, "\n");
}

# define YY_STACK_PRINT(Bottom, Top)				\
do {								\
  if (yydebug)							\
    yy_stack_print ((Bottom), (Top));				\
} while (YYID (0))


/*------------------------------------------------.
| Report that the YYRULE is going to be reduced.  |
`------------------------------------------------*/

#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yy_reduce_print (YYSTYPE *yyvsp, int yyrule, void *yyscanner, Parrot_Interp interp)
#else
static void
yy_reduce_print (yyvsp, yyrule, yyscanner, interp)
    YYSTYPE *yyvsp;
    int yyrule;
    void *yyscanner;
    Parrot_Interp interp;
#endif
{
  int yynrhs = yyr2[yyrule];
  int yyi;
  unsigned long int yylno = yyrline[yyrule];
  YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
	     yyrule - 1, yylno);
  /* The symbols being reduced.  */
  for (yyi = 0; yyi < yynrhs; yyi++)
    {
      fprintf (stderr, "   $%d = ", yyi + 1);
      yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
		       &(yyvsp[(yyi + 1) - (yynrhs)])
		       		       , yyscanner, interp);
      fprintf (stderr, "\n");
    }
}

# define YY_REDUCE_PRINT(Rule)		\
do {					\
  if (yydebug)				\
    yy_reduce_print (yyvsp, Rule, yyscanner, interp); \
} while (YYID (0))

/* Nonzero means print parse trace.  It is left uninitialized so that
   multiple parsers can coexist.  */
int yydebug;
#else /* !YYDEBUG */
# define YYDPRINTF(Args)
# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
# define YY_STACK_PRINT(Bottom, Top)
# define YY_REDUCE_PRINT(Rule)
#endif /* !YYDEBUG */


/* YYINITDEPTH -- initial size of the parser's stacks.  */
#ifndef	YYINITDEPTH
# define YYINITDEPTH 200
#endif

/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
   if the built-in stack extension method is used).

   Do not make this value too large; the results are undefined if
   YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
   evaluated with infinite-precision integer arithmetic.  */

#ifndef YYMAXDEPTH
# define YYMAXDEPTH 10000
#endif



#if YYERROR_VERBOSE

# ifndef yystrlen
#  if defined __GLIBC__ && defined _STRING_H
#   define yystrlen strlen
#  else
/* Return the length of YYSTR.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static YYSIZE_T
yystrlen (const char *yystr)
#else
static YYSIZE_T
yystrlen (yystr)
    const char *yystr;
#endif
{
  YYSIZE_T yylen;
  for (yylen = 0; yystr[yylen]; yylen++)
    continue;
  return yylen;
}
#  endif
# endif

# ifndef yystpcpy
#  if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
#   define yystpcpy stpcpy
#  else
/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
   YYDEST.  */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static char *
yystpcpy (char *yydest, const char *yysrc)
#else
static char *
yystpcpy (yydest, yysrc)
    char *yydest;
    const char *yysrc;
#endif
{
  char *yyd = yydest;
  const char *yys = yysrc;

  while ((*yyd++ = *yys++) != '\0')
    continue;

  return yyd - 1;
}
#  endif
# endif

# ifndef yytnamerr
/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
   quotes and backslashes, so that it's suitable for yyerror.  The
   heuristic is that double-quoting is unnecessary unless the string
   contains an apostrophe, a comma, or backslash (other than
   backslash-backslash).  YYSTR is taken from yytname.  If YYRES is
   null, do not copy; instead, return the length of what the result
   would have been.  */
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
	switch (*++yyp)
	  {
	  case '\'':
	  case ',':
	    goto do_not_strip_quotes;

	  case '\\':
	    if (*++yyp != '\\')
	      goto do_not_strip_quotes;
	    /* Fall through.  */
	  default:
	    if (yyres)
	      yyres[yyn] = *yyp;
	    yyn++;
	    break;

	  case '"':
	    if (yyres)
	      yyres[yyn] = '\0';
	    return yyn;
	  }
    do_not_strip_quotes: ;
    }

  if (! yyres)
    return yystrlen (yystr);

  return yystpcpy (yyres, yystr) - yyres;
}
# endif

/* Copy into YYRESULT an error message about the unexpected token
   YYCHAR while in state YYSTATE.  Return the number of bytes copied,
   including the terminating null byte.  If YYRESULT is null, do not
   copy anything; just return the number of bytes that would be
   copied.  As a special case, return 0 if an ordinary "syntax error"
   message will do.  Return YYSIZE_MAXIMUM if overflow occurs during
   size calculation.  */
static YYSIZE_T
yysyntax_error (char *yyresult, int yystate, int yychar)
{
  int yyn = yypact[yystate];

  if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
    return 0;
  else
    {
      int yytype = YYTRANSLATE (yychar);
      YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
      YYSIZE_T yysize = yysize0;
      YYSIZE_T yysize1;
      int yysize_overflow = 0;
      enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
      char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
      int yyx;

# if 0
      /* This is so xgettext sees the translatable formats that are
	 constructed on the fly.  */
      YY_("syntax error, unexpected %s");
      YY_("syntax error, unexpected %s, expecting %s");
      YY_("syntax error, unexpected %s, expecting %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s");
      YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
# endif
      char *yyfmt;
      char const *yyf;
      static char const yyunexpected[] = "syntax error, unexpected %s";
      static char const yyexpecting[] = ", expecting %s";
      static char const yyor[] = " or %s";
      char yyformat[sizeof yyunexpected
		    + sizeof yyexpecting - 1
		    + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
		       * (sizeof yyor - 1))];
      char const *yyprefix = yyexpecting;

      /* Start YYX at -YYN if negative to avoid negative indexes in
	 YYCHECK.  */
      int yyxbegin = yyn < 0 ? -yyn : 0;

      /* Stay within bounds of both yycheck and yytname.  */
      int yychecklim = YYLAST - yyn + 1;
      int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
      int yycount = 1;

      yyarg[0] = yytname[yytype];
      yyfmt = yystpcpy (yyformat, yyunexpected);

      for (yyx = yyxbegin; yyx < yyxend; ++yyx)
	if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
	  {
	    if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
	      {
		yycount = 1;
		yysize = yysize0;
		yyformat[sizeof yyunexpected - 1] = '\0';
		break;
	      }
	    yyarg[yycount++] = yytname[yyx];
	    yysize1 = yysize + yytnamerr (0, yytname[yyx]);
	    yysize_overflow |= (yysize1 < yysize);
	    yysize = yysize1;
	    yyfmt = yystpcpy (yyfmt, yyprefix);
	    yyprefix = yyor;
	  }

      yyf = YY_(yyformat);
      yysize1 = yysize + yystrlen (yyf);
      yysize_overflow |= (yysize1 < yysize);
      yysize = yysize1;

      if (yysize_overflow)
	return YYSIZE_MAXIMUM;

      if (yyresult)
	{
	  /* Avoid sprintf, as that infringes on the user's name space.
	     Don't have undefined behavior even if the translation
	     produced a string with the wrong number of "%s"s.  */
	  char *yyp = yyresult;
	  int yyi = 0;
	  while ((*yyp = *yyf) != '\0')
	    {
	      if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
		{
		  yyp += yytnamerr (yyp, yyarg[yyi++]);
		  yyf += 2;
		}
	      else
		{
		  yyp++;
		  yyf++;
		}
	    }
	}
      return yysize;
    }
}
#endif /* YYERROR_VERBOSE */


/*-----------------------------------------------.
| Release the memory associated to this symbol.  |
`-----------------------------------------------*/

/*ARGSUSED*/
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
static void
yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, void *yyscanner, Parrot_Interp interp)
#else
static void
yydestruct (yymsg, yytype, yyvaluep, yyscanner, interp)
    const char *yymsg;
    int yytype;
    YYSTYPE *yyvaluep;
    void *yyscanner;
    Parrot_Interp interp;
#endif
{
  YYUSE (yyvaluep);
  YYUSE (yyscanner);
  YYUSE (interp);

  if (!yymsg)
    yymsg = "Deleting";
  YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);

  switch (yytype)
    {

      default:
	break;
    }
}


/* Prevent warnings from -Wmissing-prototypes.  */

#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int yyparse (void *YYPARSE_PARAM);
#else
int yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int yyparse (void *yyscanner, Parrot_Interp interp);
#else
int yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */






/*----------.
| yyparse.  |
`----------*/

#ifdef YYPARSE_PARAM
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *YYPARSE_PARAM)
#else
int
yyparse (YYPARSE_PARAM)
    void *YYPARSE_PARAM;
#endif
#else /* ! YYPARSE_PARAM */
#if (defined __STDC__ || defined __C99__FUNC__ \
     || defined __cplusplus || defined _MSC_VER)
int
yyparse (void *yyscanner, Parrot_Interp interp)
#else
int
yyparse (yyscanner, interp)
    void *yyscanner;
    Parrot_Interp interp;
#endif
#endif
{
  /* The look-ahead symbol.  */
int yychar;

/* The semantic value of the look-ahead symbol.  */
YYSTYPE yylval;

/* Number of syntax errors so far.  */
int yynerrs;

  int yystate;
  int yyn;
  int yyresult;
  /* Number of tokens to shift before error messages enabled.  */
  int yyerrstatus;
  /* Look-ahead token as an internal (translated) token number.  */
  int yytoken = 0;
#if YYERROR_VERBOSE
  /* Buffer for error messages, and its allocated size.  */
  char yymsgbuf[128];
  char *yymsg = yymsgbuf;
  YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
#endif

  /* Three stacks and their tools:
     `yyss': related to states,
     `yyvs': related to semantic values,
     `yyls': related to locations.

     Refer to the stacks thru separate pointers, to allow yyoverflow
     to reallocate them elsewhere.  */

  /* The state stack.  */
  yytype_int16 yyssa[YYINITDEPTH];
  yytype_int16 *yyss = yyssa;
  yytype_int16 *yyssp;

  /* The semantic value stack.  */
  YYSTYPE yyvsa[YYINITDEPTH];
  YYSTYPE *yyvs = yyvsa;
  YYSTYPE *yyvsp;



#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))

  YYSIZE_T yystacksize = YYINITDEPTH;

  /* The variables used to return semantic value and location from the
     action routines.  */
  YYSTYPE yyval;


  /* The number of symbols on the RHS of the reduced rule.
     Keep to zero when no symbol should be popped.  */
  int yylen = 0;

  YYDPRINTF ((stderr, "Starting parse\n"));

  yystate = 0;
  yyerrstatus = 0;
  yynerrs = 0;
  yychar = YYEMPTY;		/* Cause a token to be read.  */

  /* Initialize stack pointers.
     Waste one element of value and location stack
     so that they stay on the same level as the state stack.
     The wasted elements are never initialized.  */

  yyssp = yyss;
  yyvsp = yyvs;

  goto yysetstate;

/*------------------------------------------------------------.
| yynewstate -- Push a new state, which is found in yystate.  |
`------------------------------------------------------------*/
 yynewstate:
  /* In all cases, when you get here, the value and location stacks
     have just been pushed.  So pushing a state here evens the stacks.  */
  yyssp++;

 yysetstate:
  *yyssp = yystate;

  if (yyss + yystacksize - 1 <= yyssp)
    {
      /* Get the current used size of the three stacks, in elements.  */
      YYSIZE_T yysize = yyssp - yyss + 1;

#ifdef yyoverflow
      {
	/* Give user a chance to reallocate the stack.  Use copies of
	   these so that the &'s don't force the real ones into
	   memory.  */
	YYSTYPE *yyvs1 = yyvs;
	yytype_int16 *yyss1 = yyss;


	/* Each stack pointer address is followed by the size of the
	   data in use in that stack, in bytes.  This used to be a
	   conditional around just the two extra args, but that might
	   be undefined if yyoverflow is a macro.  */
	yyoverflow (YY_("memory exhausted"),
		    &yyss1, yysize * sizeof (*yyssp),
		    &yyvs1, yysize * sizeof (*yyvsp),

		    &yystacksize);

	yyss = yyss1;
	yyvs = yyvs1;
      }
#else /* no yyoverflow */
# ifndef YYSTACK_RELOCATE
      goto yyexhaustedlab;
# else
      /* Extend the stack our own way.  */
      if (YYMAXDEPTH <= yystacksize)
	goto yyexhaustedlab;
      yystacksize *= 2;
      if (YYMAXDEPTH < yystacksize)
	yystacksize = YYMAXDEPTH;

      {
	yytype_int16 *yyss1 = yyss;
	union yyalloc *yyptr =
	  (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
	if (! yyptr)
	  goto yyexhaustedlab;
	YYSTACK_RELOCATE (yyss);
	YYSTACK_RELOCATE (yyvs);

#  undef YYSTACK_RELOCATE
	if (yyss1 != yyssa)
	  YYSTACK_FREE (yyss1);
      }
# endif
#endif /* no yyoverflow */

      yyssp = yyss + yysize - 1;
      yyvsp = yyvs + yysize - 1;


      YYDPRINTF ((stderr, "Stack size increased to %lu\n",
		  (unsigned long int) yystacksize));

      if (yyss + yystacksize - 1 <= yyssp)
	YYABORT;
    }

  YYDPRINTF ((stderr, "Entering state %d\n", yystate));

  goto yybackup;

/*-----------.
| yybackup.  |
`-----------*/
yybackup:

  /* Do appropriate processing given the current state.  Read a
     look-ahead token if we need one and don't already have one.  */

  /* First try to decide what to do without reference to look-ahead token.  */
  yyn = yypact[yystate];
  if (yyn == YYPACT_NINF)
    goto yydefault;

  /* Not known => get a look-ahead token if don't already have one.  */

  /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol.  */
  if (yychar == YYEMPTY)
    {
      YYDPRINTF ((stderr, "Reading a token: "));
      yychar = YYLEX;
    }

  if (yychar <= YYEOF)
    {
      yychar = yytoken = YYEOF;
      YYDPRINTF ((stderr, "Now at end of input.\n"));
    }
  else
    {
      yytoken = YYTRANSLATE (yychar);
      YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
    }

  /* If the proper action on seeing token YYTOKEN is to reduce or to
     detect an error, take that action.  */
  yyn += yytoken;
  if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
    goto yydefault;
  yyn = yytable[yyn];
  if (yyn <= 0)
    {
      if (yyn == 0 || yyn == YYTABLE_NINF)
	goto yyerrlab;
      yyn = -yyn;
      goto yyreduce;
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  /* Count tokens shifted since error; after three, turn off error
     status.  */
  if (yyerrstatus)
    yyerrstatus--;

  /* Shift the look-ahead token.  */
  YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);

  /* Discard the shifted token unless it is eof.  */
  if (yychar != YYEOF)
    yychar = YYEMPTY;

  yystate = yyn;
  *++yyvsp = yylval;

  goto yynewstate;


/*-----------------------------------------------------------.
| yydefault -- do the default action for the current state.  |
`-----------------------------------------------------------*/
yydefault:
  yyn = yydefact[yystate];
  if (yyn == 0)
    goto yyerrlab;
  goto yyreduce;


/*-----------------------------.
| yyreduce -- Do a reduction.  |
`-----------------------------*/
yyreduce:
  /* yyn is the number of a rule to reduce with.  */
  yylen = yyr2[yyn];

  /* If YYLEN is nonzero, implement the default value of the action:
     `$$ = $1'.

     Otherwise, the following line sets YYVAL to garbage.
     This behavior is undocumented and Bison
     users should not rely upon it.  Assigning to YYVAL
     unconditionally makes the parser a bit smaller, and it avoids a
     GCC warning that YYVAL may be used uninitialized.  */
  yyval = yyvsp[1-yylen];


  YY_REDUCE_PRINT (yyn);
  switch (yyn)
    {
        case 2:
#line 779 "compilers/imcc/imcc.y"
    { if (yynerrs) YYABORT; (yyval.i) = 0; }
    break;

  case 5:
#line 788 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(1) - (1)].i); }
    break;

  case 6:
#line 789 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(1) - (1)].i); }
    break;

  case 7:
#line 791 "compilers/imcc/imcc.y"
    {
           (yyval.i) = (yyvsp[(1) - (1)].i);
           imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
           IMCC_INFO(interp)->cur_unit = 0;
         }
    break;

  case 8:
#line 797 "compilers/imcc/imcc.y"
    {
           (yyval.i) = (yyvsp[(1) - (1)].i);
           imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
           IMCC_INFO(interp)->cur_unit = 0;
         }
    break;

  case 9:
#line 802 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 10:
#line 803 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 11:
#line 804 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 12:
#line 808 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 13:
#line 810 "compilers/imcc/imcc.y"
    {
           (yyval.i) = 0;
           do_loadlib(interp, (yyvsp[(2) - (3)].s));
           mem_sys_free((yyvsp[(2) - (3)].s));
         }
    break;

  case 14:
#line 821 "compilers/imcc/imcc.y"
    {
            STRING * const hll_name = string_unescape_cstring(interp, (yyvsp[(2) - (4)].s) + 1, '"', NULL);
            CONTEXT(interp)->current_HLL =
                Parrot_register_HLL(interp, hll_name);

            /* don't bother loading the library for an empty string */
            if (strlen((yyvsp[(4) - (4)].s)) > 2) {
                STRING * const hll_lib =
                    string_unescape_cstring(interp, (yyvsp[(4) - (4)].s) + 1, '"', NULL);
                PMC    *ignored        = Parrot_load_lib(interp, hll_lib, NULL);
                UNUSED(ignored);
                Parrot_register_HLL_lib(interp, hll_lib);
            }

            IMCC_INFO(interp)->cur_namespace = NULL;
            (yyval.t) = 0;
         }
    break;

  case 15:
#line 839 "compilers/imcc/imcc.y"
    {
            STRING * const hll_name = string_unescape_cstring(interp, (yyvsp[(2) - (2)].s) + 1, '"', NULL);
            CONTEXT(interp)->current_HLL =
                Parrot_register_HLL(interp, hll_name);

            IMCC_INFO(interp)->cur_namespace = NULL;
            (yyval.t) = 0;
         }
    break;

  case 16:
#line 848 "compilers/imcc/imcc.y"
    {
            Parrot_Context *ctx           = CONTEXT(interp);
            STRING * const  built_in_name =
                string_unescape_cstring(interp, (yyvsp[(2) - (4)].s) + 1, '"', NULL);
            STRING * const language_name  =
                string_unescape_cstring(interp, (yyvsp[(4) - (4)].s) + 1, '"', NULL);

            int             built_in_type = pmc_type(interp, built_in_name);
            int             language_type = pmc_type(interp, language_name);

            Parrot_register_HLL_type(interp, ctx->current_HLL,
                built_in_type, language_type);
            (yyval.t) = 0;
         }
    break;

  case 17:
#line 865 "compilers/imcc/imcc.y"
    { is_def = 1; }
    break;

  case 18:
#line 866 "compilers/imcc/imcc.y"
    {
             mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
             mem_sys_free((yyvsp[(4) - (6)].s));
             is_def = 0;
         }
    break;

  case 19:
#line 874 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 20:
#line 875 "compilers/imcc/imcc.y"
    {
           (yyval.i) = mk_pmc_const(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
           is_def = 0;
         }
    break;

  case 21:
#line 880 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 22:
#line 881 "compilers/imcc/imcc.y"
    {
           (yyval.i) = mk_pmc_const_named(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].s));
           is_def = 0;
         }
    break;

  case 27:
#line 897 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;  }
    break;

  case 28:
#line 898 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;  }
    break;

  case 29:
#line 899 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;  }
    break;

  case 30:
#line 900 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;  }
    break;

  case 31:
#line 901 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(1) - (1)].i); }
    break;

  case 34:
#line 906 "compilers/imcc/imcc.y"
    { clear_state(interp); }
    break;

  case 35:
#line 908 "compilers/imcc/imcc.y"
    {
           (yyval.i) = INS(interp, IMCC_INFO(interp)->cur_unit,
                    (yyvsp[(2) - (3)].s), 0, IMCC_INFO(interp)->regs,
                    IMCC_INFO(interp)->nargs, IMCC_INFO(interp) -> keyvec, 1);
           /* XXX: can't seem to mem_sys_free($1) here */
         }
    break;

  case 36:
#line 915 "compilers/imcc/imcc.y"
    {
           imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
           IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
         }
    break;

  case 37:
#line 920 "compilers/imcc/imcc.y"
    {
           (yyval.i) = iSUBROUTINE(interp,
                    IMCC_INFO(interp)->cur_unit,
                    mk_sub_label(interp, (yyvsp[(4) - (4)].s)));
           IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(3) - (4)].t);
         }
    break;

  case 38:
#line 927 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr));
         }
    break;

  case 39:
#line 931 "compilers/imcc/imcc.y"
    {
           SymReg *r = mk_pasm_reg(interp, (yyvsp[(4) - (4)].s));
           set_lexical(interp, r, (yyvsp[(2) - (4)].s));
           (yyval.i) = 0;
           mem_sys_free((yyvsp[(2) - (4)].s));
           mem_sys_free((yyvsp[(4) - (4)].s));
         }
    break;

  case 40:
#line 938 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;}
    break;

  case 42:
#line 946 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM); }
    break;

  case 43:
#line 949 "compilers/imcc/imcc.y"
    {
           /* if (optimizer_level & OPT_PASM)
                         imc_compile_unit(interp, IMCC_INFO(interp)->cur_unit);
                         emit_flush(interp);
           */
           (yyval.i) = 0;
         }
    break;

  case 46:
#line 965 "compilers/imcc/imcc.y"
    {
           int re_open = 0;
           (yyval.i) = 0;
           if (IMCC_INFO(interp)->state->pasm_file && IMCC_INFO(interp)->cur_namespace) {
               imc_close_unit(interp, IMCC_INFO(interp)->cur_unit);
               re_open = 1;
           }
           IMCC_INFO(interp)->cur_namespace = (yyvsp[(2) - (3)].sr);
           if (re_open)
               IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PASM);
         }
    break;

  case 47:
#line 980 "compilers/imcc/imcc.y"
    {
            if (IMCC_INFO(interp)->in_slice)
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                    "Slice not allowed in namespace.");

            (yyval.sr) = (yyvsp[(2) - (3)].sr);
        }
    break;

  case 48:
#line 987 "compilers/imcc/imcc.y"
    { (yyval.sr) = NULL; }
    break;

  case 49:
#line 992 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->cur_unit = imc_open_unit(interp, IMC_PCCSUB);
         }
    break;

  case 50:
#line 996 "compilers/imcc/imcc.y"
    {
           iSUBROUTINE(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (3)].sr));
         }
    break;

  case 51:
#line 999 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->cur_call->pcc_sub->pragma = (yyvsp[(5) - (6)].t); }
    break;

  case 52:
#line 1001 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
    break;

  case 53:
#line 1005 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 54:
#line 1006 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 55:
#line 1008 "compilers/imcc/imcc.y"
    {
           if (IMCC_INFO(interp)->adv_named_id) {
                 add_pcc_named_param(interp, IMCC_INFO(interp)->cur_call,
                                     IMCC_INFO(interp)->adv_named_id, (yyvsp[(2) - (3)].sr));
                 IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
         }
    break;

  case 56:
#line 1020 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 57:
#line 1020 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(3) - (3)].sr); is_def=0; }
    break;

  case 58:
#line 1025 "compilers/imcc/imcc.y"
    {
           if ((yyvsp[(3) - (3)].t) & VT_UNIQUE_REG)
               (yyval.sr) = mk_ident_ur(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
           else
               (yyval.sr) = mk_ident(interp, (yyvsp[(2) - (3)].s), (yyvsp[(1) - (3)].t));
           (yyval.sr)->type |= (yyvsp[(3) - (3)].t);
           mem_sys_free((yyvsp[(2) - (3)].s));
          }
    break;

  case 59:
#line 1036 "compilers/imcc/imcc.y"
    {
            if ((yyvsp[(5) - (5)].t) & VT_UNIQUE_REG)
                (yyval.sr) = mk_ident_ur(interp, (yyvsp[(4) - (5)].s), (yyvsp[(1) - (5)].t));
            else
                (yyval.sr) = mk_ident(interp, (yyvsp[(4) - (5)].s), (yyvsp[(1) - (5)].t));
            (yyval.sr)->type |= (yyvsp[(5) - (5)].t);
            adv_named_set(interp, (yyvsp[(2) - (5)].s));
            mem_sys_free((yyvsp[(4) - (5)].s));
          }
    break;

  case 60:
#line 1050 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 61:
#line 1055 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->outer = mk_sub_address_fromc(interp, (yyvsp[(3) - (4)].s));
           mem_sys_free((yyvsp[(3) - (4)].s));
         }
    break;

  case 62:
#line 1061 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->outer = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
           mem_sys_free((yyvsp[(3) - (4)].s));
         }
    break;

  case 63:
#line 1070 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->vtable_name = NULL;
           IMCC_INFO(interp)->cur_unit->is_vtable_method = 1;
         }
    break;

  case 64:
#line 1076 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->vtable_name = (yyvsp[(3) - (4)].s);
           IMCC_INFO(interp)->cur_unit->is_vtable_method = 1;
         }
    break;

  case 65:
#line 1085 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->instance_of = (yyvsp[(3) - (4)].s);
         }
    break;

  case 66:
#line 1093 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           IMCC_INFO(interp)->cur_unit->lexid = mk_const(interp, (yyvsp[(3) - (4)].s), 'S');
           mem_sys_free((yyvsp[(3) - (4)].s));
         }
    break;

  case 67:
#line 1102 "compilers/imcc/imcc.y"
    {
           add_pcc_multi(IMCC_INFO(interp)->cur_call, NULL);
         }
    break;

  case 68:
#line 1106 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
         }
    break;

  case 69:
#line 1111 "compilers/imcc/imcc.y"
    {
           (yyval.t) = 0;
           add_pcc_multi(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
         }
    break;

  case 70:
#line 1118 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, "INTVAL",   'S'); }
    break;

  case 71:
#line 1119 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, "FLOATVAL", 'S'); }
    break;

  case 72:
#line 1120 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, "PMC",      'S'); }
    break;

  case 73:
#line 1121 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, "STRING",   'S'); }
    break;

  case 74:
#line 1123 "compilers/imcc/imcc.y"
    {
           SymReg *r;
           if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
               r = mk_const(interp, (yyvsp[(1) - (1)].s), 'S');
           else {
               r = mk_const(interp, "PMC", 'S');
           }
           mem_sys_free((yyvsp[(1) - (1)].s));
           (yyval.sr) = r;
         }
    break;

  case 75:
#line 1134 "compilers/imcc/imcc.y"
    {
           SymReg *r;
           if (strcmp((yyvsp[(1) - (1)].s), "_") != 0)
               r = mk_const(interp, (yyvsp[(1) - (1)].s), 'S');
           else {
               r = mk_const(interp, "PMC", 'S');
           }
           mem_sys_free((yyvsp[(1) - (1)].s));
           (yyval.sr) = r;
         }
    break;

  case 76:
#line 1144 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(2) - (3)].sr); }
    break;

  case 79:
#line 1154 "compilers/imcc/imcc.y"
    {
           char name[128];
           SymReg *r, *r1;
           Instruction *i;

           snprintf(name, sizeof (name), "%cpcc_sub_call_%d",
                   IMCC_INTERNAL_CHAR, IMCC_INFO(interp)->cnr++);
           (yyval.sr) = r = mk_pcc_sub(interp, name, 0);
           /* this mid rule action has the semantic value of the
            * sub SymReg.
            * This is used below to append args & results
            */
           i = iLABEL(interp, IMCC_INFO(interp)->cur_unit, r);
           IMCC_INFO(interp)->cur_call = r;
           i->type = ITPCCSUB;
           /*
            * if we are inside a pcc_sub mark the sub as doing a
            * sub call; the sub is in r[0] of the first ins
            */
           r1 = IMCC_INFO(interp)->cur_unit->instructions->symregs[0];
           if (r1 && r1->pcc_sub)
               r1->pcc_sub->calls_a_sub |= 1;
         }
    break;

  case 80:
#line 1182 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
    break;

  case 81:
#line 1186 "compilers/imcc/imcc.y"
    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 0; }
    break;

  case 82:
#line 1187 "compilers/imcc/imcc.y"
    { (yyval.i) = NULL; IMCC_INFO(interp)->cur_call->pcc_sub->label = 1; }
    break;

  case 83:
#line 1191 "compilers/imcc/imcc.y"
    { (yyval.i) = NULL; }
    break;

  case 84:
#line 1192 "compilers/imcc/imcc.y"
    { (yyval.i) = NULL;  IMCC_INFO(interp)->cur_call->pcc_sub->object = (yyvsp[(2) - (3)].sr); }
    break;

  case 85:
#line 1196 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 87:
#line 1201 "compilers/imcc/imcc.y"
    { (yyval.t) = (yyvsp[(1) - (1)].t); }
    break;

  case 88:
#line 1202 "compilers/imcc/imcc.y"
    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
    break;

  case 89:
#line 1206 "compilers/imcc/imcc.y"
    { (yyval.t) = P_LOAD; }
    break;

  case 90:
#line 1207 "compilers/imcc/imcc.y"
    { (yyval.t) = P_INIT; }
    break;

  case 91:
#line 1208 "compilers/imcc/imcc.y"
    { (yyval.t) = P_MAIN; }
    break;

  case 92:
#line 1209 "compilers/imcc/imcc.y"
    { (yyval.t) = P_IMMEDIATE; }
    break;

  case 93:
#line 1210 "compilers/imcc/imcc.y"
    { (yyval.t) = P_POSTCOMP; }
    break;

  case 94:
#line 1211 "compilers/imcc/imcc.y"
    { (yyval.t) = P_ANON; }
    break;

  case 95:
#line 1212 "compilers/imcc/imcc.y"
    { (yyval.t) = P_METHOD; }
    break;

  case 96:
#line 1213 "compilers/imcc/imcc.y"
    { (yyval.t) = P_NEED_LEX; }
    break;

  case 102:
#line 1223 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
           add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
         }
    break;

  case 103:
#line 1228 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
         }
    break;

  case 104:
#line 1232 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
           IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isNCI;
         }
    break;

  case 105:
#line 1237 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
         }
    break;

  case 106:
#line 1241 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (3)].s), 'S'));
         }
    break;

  case 107:
#line 1245 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (5)].sr));
           add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
         }
    break;

  case 108:
#line 1250 "compilers/imcc/imcc.y"
    {
           add_pcc_sub(IMCC_INFO(interp)->cur_call, mk_const(interp, (yyvsp[(2) - (5)].s), 'S'));
           add_pcc_cc(IMCC_INFO(interp)->cur_call, (yyvsp[(4) - (5)].sr));
         }
    break;

  case 109:
#line 1258 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 110:
#line 1259 "compilers/imcc/imcc.y"
    { add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr)); }
    break;

  case 111:
#line 1263 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(2) - (2)].sr); }
    break;

  case 112:
#line 1268 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 113:
#line 1270 "compilers/imcc/imcc.y"
    {
           if ((yyvsp[(2) - (3)].sr))
               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(2) - (3)].sr));
         }
    break;

  case 114:
#line 1277 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
    break;

  case 115:
#line 1278 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 116:
#line 1279 "compilers/imcc/imcc.y"
    {
           IdList *l = (yyvsp[(4) - (4)].idlist);
           SymReg *ignored;
           if (l->unique_reg)
               ignored = mk_ident_ur(interp, l->id, (yyvsp[(3) - (4)].t));
           else
               ignored = mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
           UNUSED(ignored);
           is_def=0;
           (yyval.sr)=0;
         }
    break;

  case 117:
#line 1293 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 118:
#line 1294 "compilers/imcc/imcc.y"
    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
    break;

  case 119:
#line 1298 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_FLAT;   }
    break;

  case 120:
#line 1299 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_OPTIONAL; }
    break;

  case 121:
#line 1300 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_OPT_FLAG; }
    break;

  case 122:
#line 1301 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_NAMED; }
    break;

  case 123:
#line 1302 "compilers/imcc/imcc.y"
    { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
    break;

  case 124:
#line 1303 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_UNIQUE_REG; }
    break;

  case 125:
#line 1309 "compilers/imcc/imcc.y"
    {
           begin_return_or_yield(interp, 0);
         }
    break;

  case 126:
#line 1313 "compilers/imcc/imcc.y"
    {
           (yyval.i) = 0;
           IMCC_INFO(interp)->asm_state = AsmDefault;
         }
    break;

  case 127:
#line 1318 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->asm_state = AsmDefault;
           (yyval.i) = 0;
         }
    break;

  case 128:
#line 1325 "compilers/imcc/imcc.y"
    { begin_return_or_yield(interp, 1); }
    break;

  case 129:
#line 1327 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; IMCC_INFO(interp)->asm_state = AsmDefault; }
    break;

  case 130:
#line 1331 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 131:
#line 1333 "compilers/imcc/imcc.y"
    {
           if ((yyvsp[(1) - (2)].sr))
               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (2)].sr));
         }
    break;

  case 132:
#line 1338 "compilers/imcc/imcc.y"
    {
           if ((yyvsp[(2) - (3)].sr))
               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(2) - (3)].sr));
         }
    break;

  case 133:
#line 1345 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(2) - (3)].sr); (yyval.sr)->type |= (yyvsp[(3) - (3)].t); }
    break;

  case 134:
#line 1350 "compilers/imcc/imcc.y"
    {
          if (IMCC_INFO(interp)->asm_state == AsmDefault)
              begin_return_or_yield(interp, (yyvsp[(1) - (2)].t));
        }
    break;

  case 135:
#line 1355 "compilers/imcc/imcc.y"
    {
          IMCC_INFO(interp)->asm_state = AsmDefault;
          (yyval.t) = 0;
        }
    break;

  case 136:
#line 1362 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 137:
#line 1363 "compilers/imcc/imcc.y"
    { (yyval.t) = 1; }
    break;

  case 138:
#line 1367 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 139:
#line 1369 "compilers/imcc/imcc.y"
    {
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                    IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (1)].sr));
         }
    break;

  case 140:
#line 1379 "compilers/imcc/imcc.y"
    {
           add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].sr));
         }
    break;

  case 141:
#line 1383 "compilers/imcc/imcc.y"
    {
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return,
                                    IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
             }
             else
                 add_pcc_result(IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (3)].sr));
         }
    break;

  case 142:
#line 1393 "compilers/imcc/imcc.y"
    {
           add_pcc_named_return(interp, IMCC_INFO(interp)->sr_return, (yyvsp[(3) - (5)].s), (yyvsp[(5) - (5)].sr));
         }
    break;

  case 145:
#line 1413 "compilers/imcc/imcc.y"
    { clear_state(interp); }
    break;

  case 146:
#line 1418 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(2) - (2)].i); }
    break;

  case 147:
#line 1419 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 148:
#line 1420 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 149:
#line 1421 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 150:
#line 1425 "compilers/imcc/imcc.y"
    { (yyval.i) = NULL; }
    break;

  case 154:
#line 1436 "compilers/imcc/imcc.y"
    {
           (yyval.i) = iLABEL(interp, IMCC_INFO(interp)->cur_unit, mk_local_label(interp, (yyvsp[(1) - (1)].s)));
         }
    break;

  case 155:
#line 1444 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(2) - (3)].i); }
    break;

  case 156:
#line 1446 "compilers/imcc/imcc.y"
    {
           if (yynerrs >= PARROT_MAX_RECOVER_ERRORS) {
               IMCC_warning(interp, "Too many errors. Correct some first.\n");
               YYABORT;
           }
           yyerrok;
         }
    break;

  case 157:
#line 1457 "compilers/imcc/imcc.y"
    {
           IdList* l = (yyvsp[(1) - (1)].idlist);
           l->next = NULL;
           (yyval.idlist) = l;
         }
    break;

  case 158:
#line 1464 "compilers/imcc/imcc.y"
    {
           IdList* l = (yyvsp[(3) - (3)].idlist);
           l->next = (yyvsp[(1) - (3)].idlist);
           (yyval.idlist) = l;
         }
    break;

  case 159:
#line 1473 "compilers/imcc/imcc.y"
    {
           IdList* const l = mem_allocate_n_zeroed_typed(1, IdList);
           l->id           = (yyvsp[(1) - (2)].s);
           l->unique_reg   = (yyvsp[(2) - (2)].t);
           (yyval.idlist) = l;
         }
    break;

  case 160:
#line 1482 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 161:
#line 1483 "compilers/imcc/imcc.y"
    { (yyval.t) = 1; }
    break;

  case 164:
#line 1490 "compilers/imcc/imcc.y"
    { push_namespace(interp, (yyvsp[(2) - (2)].s)); mem_sys_free((yyvsp[(2) - (2)].s)); }
    break;

  case 165:
#line 1491 "compilers/imcc/imcc.y"
    { pop_namespace(interp, (yyvsp[(2) - (2)].s)); mem_sys_free((yyvsp[(2) - (2)].s)); }
    break;

  case 166:
#line 1492 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 167:
#line 1493 "compilers/imcc/imcc.y"
    {
           IdList *l = (yyvsp[(4) - (4)].idlist);
           while (l) {
               IdList *l1;
               if (l->unique_reg)
                   mk_ident_ur(interp, l->id, (yyvsp[(3) - (4)].t));
               else
                   mk_ident(interp, l->id, (yyvsp[(3) - (4)].t));
               l1 = l;
               l  = l->next;
               mem_sys_free(l1->id);
               mem_sys_free(l1);
           }
           is_def=0; (yyval.i)=0;
         }
    break;

  case 168:
#line 1509 "compilers/imcc/imcc.y"
    {
           set_lexical(interp, (yyvsp[(4) - (4)].sr), (yyvsp[(2) - (4)].s)); (yyval.i) = 0;
         }
    break;

  case 169:
#line 1512 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 170:
#line 1513 "compilers/imcc/imcc.y"
    {
           mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 0);
           is_def=0;
           mem_sys_free((yyvsp[(4) - (6)].s));
         }
    break;

  case 172:
#line 1520 "compilers/imcc/imcc.y"
    { is_def=1; }
    break;

  case 173:
#line 1521 "compilers/imcc/imcc.y"
    {
           mk_const_ident(interp, (yyvsp[(4) - (6)].s), (yyvsp[(3) - (6)].t), (yyvsp[(6) - (6)].sr), 1);
           is_def=0;
           mem_sys_free((yyvsp[(4) - (6)].s));
         }
    break;

  case 174:
#line 1527 "compilers/imcc/imcc.y"
    {
           (yyval.i) = NULL;
           IMCC_INFO(interp)->cur_call->pcc_sub->flags |= isTAIL_CALL;
           IMCC_INFO(interp)->cur_call = NULL;
         }
    break;

  case 175:
#line 1532 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "branch", 1, (yyvsp[(2) - (2)].sr)); }
    break;

  case 176:
#line 1534 "compilers/imcc/imcc.y"
    {
           (yyval.i) = INS(interp,
                    IMCC_INFO(interp)->cur_unit,
                    (yyvsp[(1) - (2)].s),
                    0,
                    IMCC_INFO(interp)->regs,
                    IMCC_INFO(interp)->nargs,
                    IMCC_INFO(interp)->keyvec,
                    1);
           mem_sys_free((yyvsp[(1) - (2)].s));
         }
    break;

  case 177:
#line 1545 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(2) - (2)].sr)); }
    break;

  case 178:
#line 1546 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; IMCC_INFO(interp)->cur_call = NULL; }
    break;

  case 179:
#line 1547 "compilers/imcc/imcc.y"
    { (yyval.i) = 0; }
    break;

  case 182:
#line 1550 "compilers/imcc/imcc.y"
    { (yyval.i) = 0;}
    break;

  case 183:
#line 1554 "compilers/imcc/imcc.y"
    { (yyval.t) = 'I'; }
    break;

  case 184:
#line 1555 "compilers/imcc/imcc.y"
    { (yyval.t) = 'N'; }
    break;

  case 185:
#line 1556 "compilers/imcc/imcc.y"
    { (yyval.t) = 'S'; }
    break;

  case 186:
#line 1557 "compilers/imcc/imcc.y"
    { (yyval.t) = 'P'; }
    break;

  case 187:
#line 1562 "compilers/imcc/imcc.y"
    {
           /* there'd normally be a str_dup() here, but the lexer already
            * copied the string, so it's safe to use directly */
           if ((IMCC_INFO(interp)->cur_pmc_type = pmc_type(interp,
               string_from_cstring(interp, (yyvsp[(1) - (1)].s), 0))) <= 0) {
               IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                    "Unknown PMC type '%s'\n", (yyvsp[(1) - (1)].s));
           }
         }
    break;

  case 188:
#line 1575 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "set", 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));  }
    break;

  case 189:
#line 1577 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (4)].s), 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr));  }
    break;

  case 190:
#line 1579 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(4) - (5)].s), 3, (yyvsp[(1) - (5)].sr), (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));  }
    break;

  case 191:
#line 1581 "compilers/imcc/imcc.y"
    { (yyval.i) = iINDEXFETCH(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(5) - (6)].sr)); }
    break;

  case 192:
#line 1583 "compilers/imcc/imcc.y"
    { (yyval.i) = iINDEXSET(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(3) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
    break;

  case 193:
#line 1585 "compilers/imcc/imcc.y"
    { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].s), (yyvsp[(6) - (6)].sr), 1); }
    break;

  case 194:
#line 1587 "compilers/imcc/imcc.y"
    { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].s), (yyvsp[(6) - (7)].sr), 1); }
    break;

  case 195:
#line 1589 "compilers/imcc/imcc.y"
    { (yyval.i) = iNEW(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].s), NULL, 1); }
    break;

  case 196:
#line 1591 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
    break;

  case 197:
#line 1593 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
    break;

  case 198:
#line 1595 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
    break;

  case 199:
#line 1597 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
    break;

  case 200:
#line 1599 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(1) - (7)].sr), (yyvsp[(4) - (7)].sr), (yyvsp[(6) - (7)].sr)); }
    break;

  case 201:
#line 1601 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "find_global", 2, (yyvsp[(1) - (4)].sr), (yyvsp[(4) - (4)].sr));}
    break;

  case 202:
#line 1603 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "store_global", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
    break;

  case 203:
#line 1607 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr)); }
    break;

  case 204:
#line 1609 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr)); }
    break;

  case 205:
#line 1611 "compilers/imcc/imcc.y"
    { (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "new", 3, (yyvsp[(2) - (7)].sr), (yyvsp[(4) - (7)].sr), (yyvsp[(6) - (7)].sr)); }
    break;

  case 206:
#line 1614 "compilers/imcc/imcc.y"
    {
           add_pcc_result((yyvsp[(3) - (3)].i)->symregs[0], (yyvsp[(1) - (3)].sr));
           IMCC_INFO(interp)->cur_call = NULL;
           (yyval.i) = 0;
         }
    break;

  case 207:
#line 1620 "compilers/imcc/imcc.y"
    {
           (yyval.i) = IMCC_create_itcall_label(interp);
         }
    break;

  case 208:
#line 1624 "compilers/imcc/imcc.y"
    {
           IMCC_itcall_sub(interp, (yyvsp[(6) - (9)].sr));
           IMCC_INFO(interp)->cur_call = NULL;
         }
    break;

  case 212:
#line 1632 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "null", 1, (yyvsp[(1) - (3)].sr));
         }
    break;

  case 213:
#line 1639 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"not"; }
    break;

  case 214:
#line 1640 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"bnot"; }
    break;

  case 215:
#line 1641 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"neg"; }
    break;

  case 216:
#line 1645 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"sub"; }
    break;

  case 217:
#line 1646 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"add"; }
    break;

  case 218:
#line 1647 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"mul"; }
    break;

  case 219:
#line 1648 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"div"; }
    break;

  case 220:
#line 1649 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"mod"; }
    break;

  case 221:
#line 1650 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"fdiv"; }
    break;

  case 222:
#line 1651 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"pow"; }
    break;

  case 223:
#line 1652 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"concat"; }
    break;

  case 224:
#line 1653 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"iseq"; }
    break;

  case 225:
#line 1654 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"isne"; }
    break;

  case 226:
#line 1655 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"isgt"; }
    break;

  case 227:
#line 1656 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"isge"; }
    break;

  case 228:
#line 1657 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"islt"; }
    break;

  case 229:
#line 1658 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"isle"; }
    break;

  case 230:
#line 1659 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"shl"; }
    break;

  case 231:
#line 1660 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"shr"; }
    break;

  case 232:
#line 1661 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"lsr"; }
    break;

  case 233:
#line 1662 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"and"; }
    break;

  case 234:
#line 1663 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"or"; }
    break;

  case 235:
#line 1664 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"xor"; }
    break;

  case 236:
#line 1665 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"band"; }
    break;

  case 237:
#line 1666 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"bor"; }
    break;

  case 238:
#line 1667 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"bxor"; }
    break;

  case 239:
#line 1673 "compilers/imcc/imcc.y"
    {
           (yyval.i) = IMCC_create_itcall_label(interp);
           (yyval.i)->type &= ~ITCALL;
           (yyval.i)->type |= ITRESULT;
         }
    break;

  case 240:
#line 1678 "compilers/imcc/imcc.y"
    {  (yyval.i) = 0; }
    break;

  case 241:
#line 1685 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(2) - (3)].s), 2, (yyvsp[(1) - (3)].sr), (yyvsp[(3) - (3)].sr));
         }
    break;

  case 242:
#line 1691 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"add"; }
    break;

  case 243:
#line 1692 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"sub"; }
    break;

  case 244:
#line 1693 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"mul"; }
    break;

  case 245:
#line 1694 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"div"; }
    break;

  case 246:
#line 1695 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"mod"; }
    break;

  case 247:
#line 1696 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"fdiv"; }
    break;

  case 248:
#line 1697 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"concat"; }
    break;

  case 249:
#line 1698 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"band"; }
    break;

  case 250:
#line 1699 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"bor"; }
    break;

  case 251:
#line 1700 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"bxor"; }
    break;

  case 252:
#line 1701 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"shr"; }
    break;

  case 253:
#line 1702 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"shl"; }
    break;

  case 254:
#line 1703 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"lsr"; }
    break;

  case 255:
#line 1709 "compilers/imcc/imcc.y"
    {
        (yyval.i) = func_ins(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(1) - (4)].sr), (yyvsp[(3) - (4)].s),
                      IMCC_INFO(interp) -> regs,
                      IMCC_INFO(interp) -> nargs,
                      IMCC_INFO(interp) -> keyvec, 1);
         mem_sys_free((yyvsp[(3) - (4)].s));
       }
    break;

  case 256:
#line 1719 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 257:
#line 1720 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 258:
#line 1721 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 259:
#line 1723 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = (yyvsp[(1) - (1)].sr);
           if ((yyvsp[(1) - (1)].sr)->set != 'P')
               IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, "Sub isn't a PMC");
         }
    break;

  case 260:
#line 1729 "compilers/imcc/imcc.y"
    {
            /* disallow bareword method names; SREG name constants are fine */
            char *name = (yyvsp[(3) - (3)].sr)->name;
            if (!((yyvsp[(3) - (3)].sr)->type & VTREG) && (*name != '\'' || *name != '\"')) {
                IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR,
                    "Bareword method name '%s' not allowed in PIR", (yyvsp[(3) - (3)].sr)->name);
            }

            IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
            (yyval.sr)                         = (yyvsp[(3) - (3)].sr);
        }
    break;

  case 261:
#line 1741 "compilers/imcc/imcc.y"
    {
            IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr);
            (yyval.sr)                         = mk_const(interp, (yyvsp[(3) - (3)].s), 'S');
            mem_sys_free((yyvsp[(3) - (3)].s));
         }
    break;

  case 262:
#line 1746 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->cur_obj = (yyvsp[(1) - (3)].sr); (yyval.sr) = (yyvsp[(3) - (3)].sr); }
    break;

  case 263:
#line 1752 "compilers/imcc/imcc.y"
    {
           (yyval.i) = IMCC_create_itcall_label(interp);
           IMCC_itcall_sub(interp, (yyvsp[(1) - (1)].sr));
         }
    break;

  case 264:
#line 1756 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(2) - (5)].i); }
    break;

  case 265:
#line 1760 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 266:
#line 1762 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
         }
    break;

  case 267:
#line 1772 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_arg(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
         }
    break;

  case 268:
#line 1782 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (5)].s), (yyvsp[(5) - (5)].sr));
           mem_sys_free((yyvsp[(3) - (5)].s));
         }
    break;

  case 269:
#line 1788 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           add_pcc_named_arg(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].sr));
           mem_sys_free((yyvsp[(1) - (3)].s));
         }
    break;

  case 270:
#line 1796 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
    break;

  case 271:
#line 1800 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 272:
#line 1801 "compilers/imcc/imcc.y"
    { (yyval.t) = (yyvsp[(1) - (2)].t) | (yyvsp[(2) - (2)].t); }
    break;

  case 273:
#line 1805 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_FLAT; }
    break;

  case 274:
#line 1806 "compilers/imcc/imcc.y"
    { (yyval.t) = VT_NAMED; }
    break;

  case 275:
#line 1809 "compilers/imcc/imcc.y"
    { adv_named_set(interp, (yyvsp[(3) - (4)].s)); (yyval.t) = 0; }
    break;

  case 276:
#line 1813 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(1) - (2)].sr); (yyval.sr)->type |= (yyvsp[(2) - (2)].t); }
    break;

  case 277:
#line 1818 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(3) - (3)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (3)].sr));
         }
    break;

  case 278:
#line 1828 "compilers/imcc/imcc.y"
    {
           add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(3) - (5)].s), (yyvsp[(5) - (5)].sr));
           mem_sys_free((yyvsp[(3) - (5)].s));
         }
    break;

  case 279:
#line 1833 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = 0;
           if (IMCC_INFO(interp)->adv_named_id) {
               add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, IMCC_INFO(interp)->adv_named_id, (yyvsp[(1) - (1)].sr));
               IMCC_INFO(interp)->adv_named_id = NULL;
           }
           else
               add_pcc_result(IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (1)].sr));
         }
    break;

  case 280:
#line 1843 "compilers/imcc/imcc.y"
    {
           add_pcc_named_result(interp, IMCC_INFO(interp)->cur_call, (yyvsp[(1) - (3)].s), (yyvsp[(3) - (3)].sr));
           mem_sys_free((yyvsp[(1) - (3)].s));
         }
    break;

  case 281:
#line 1847 "compilers/imcc/imcc.y"
    { (yyval.sr) = 0; }
    break;

  case 282:
#line 1851 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(1) - (1)].i); }
    break;

  case 283:
#line 1852 "compilers/imcc/imcc.y"
    { (yyval.i) = (yyvsp[(1) - (1)].i); }
    break;

  case 284:
#line 1857 "compilers/imcc/imcc.y"
    {
           (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, inv_op((yyvsp[(3) - (6)].s)), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
         }
    break;

  case 285:
#line 1861 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
         }
    break;

  case 286:
#line 1865 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "unless", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
         }
    break;

  case 287:
#line 1872 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if", 2, (yyvsp[(2) - (4)].sr), (yyvsp[(4) - (4)].sr));
         }
    break;

  case 288:
#line 1876 "compilers/imcc/imcc.y"
    {
           (yyval.i) =MK_I(interp, IMCC_INFO(interp)->cur_unit, (yyvsp[(3) - (6)].s), 3, (yyvsp[(2) - (6)].sr), (yyvsp[(4) - (6)].sr), (yyvsp[(6) - (6)].sr));
         }
    break;

  case 289:
#line 1880 "compilers/imcc/imcc.y"
    {
           (yyval.i) = MK_I(interp, IMCC_INFO(interp)->cur_unit, "if_null", 2, (yyvsp[(3) - (5)].sr), (yyvsp[(5) - (5)].sr));
         }
    break;

  case 290:
#line 1886 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 291:
#line 1887 "compilers/imcc/imcc.y"
    { (yyval.t) = 0; }
    break;

  case 292:
#line 1891 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"eq"; }
    break;

  case 293:
#line 1892 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"ne"; }
    break;

  case 294:
#line 1893 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"gt"; }
    break;

  case 295:
#line 1894 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"ge"; }
    break;

  case 296:
#line 1895 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"lt"; }
    break;

  case 297:
#line 1896 "compilers/imcc/imcc.y"
    { (yyval.s) = (char *)"le"; }
    break;

  case 300:
#line 1905 "compilers/imcc/imcc.y"
    { (yyval.sr) = NULL; }
    break;

  case 301:
#line 1906 "compilers/imcc/imcc.y"
    { (yyval.sr) = (yyvsp[(1) - (1)].sr); }
    break;

  case 302:
#line 1910 "compilers/imcc/imcc.y"
    { (yyval.sr) = IMCC_INFO(interp)->regs[0]; }
    break;

  case 304:
#line 1915 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (1)].sr); }
    break;

  case 305:
#line 1917 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(1) - (4)].sr);
           IMCC_INFO(interp) -> keyvec |= KEY_BIT(IMCC_INFO(interp)->nargs);
           IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(3) - (4)].sr);
           (yyval.sr) = (yyvsp[(1) - (4)].sr);
         }
    break;

  case 306:
#line 1924 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp) -> regs[IMCC_INFO(interp)->nargs++] = (yyvsp[(2) - (3)].sr);
           (yyval.sr) = (yyvsp[(2) - (3)].sr);
         }
    break;

  case 308:
#line 1931 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address_fromc(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 309:
#line 1932 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address_u(interp, (yyvsp[(1) - (1)].s));  mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 310:
#line 1936 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 311:
#line 1937 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_sub_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 312:
#line 1941 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 313:
#line 1942 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_label_address(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 318:
#line 1956 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->nkeys    = 0;
           IMCC_INFO(interp)->in_slice = 0;
         }
    break;

  case 319:
#line 1961 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = link_keys(interp,
                          IMCC_INFO(interp)->nkeys,
                          IMCC_INFO(interp)->keys, 0);
         }
    break;

  case 320:
#line 1969 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->nkeys = 0;
           IMCC_INFO(interp)->in_slice = 0;
         }
    break;

  case 321:
#line 1974 "compilers/imcc/imcc.y"
    {
           (yyval.sr) = link_keys(interp,
                          IMCC_INFO(interp)->nkeys,
                          IMCC_INFO(interp)->keys, 1);
         }
    break;

  case 322:
#line 1982 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (1)].sr); }
    break;

  case 323:
#line 1984 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(3) - (3)].sr);
           (yyval.sr) = IMCC_INFO(interp)->keys[0];
         }
    break;

  case 324:
#line 1988 "compilers/imcc/imcc.y"
    { IMCC_INFO(interp)->in_slice = 1; }
    break;

  case 325:
#line 1990 "compilers/imcc/imcc.y"
    {
           IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(4) - (4)].sr);
           (yyval.sr) = IMCC_INFO(interp)->keys[0];
         }
    break;

  case 326:
#line 1998 "compilers/imcc/imcc.y"
    {
           if (IMCC_INFO(interp)->in_slice)
               (yyvsp[(1) - (1)].sr)->type |= VT_START_SLICE | VT_END_SLICE;
           (yyval.sr) = (yyvsp[(1) - (1)].sr);
         }
    break;

  case 327:
#line 2004 "compilers/imcc/imcc.y"
    {
           (yyvsp[(1) - (3)].sr)->type |= VT_START_SLICE;
           (yyvsp[(3) - (3)].sr)->type |= VT_END_SLICE;
           IMCC_INFO(interp)->keys[IMCC_INFO(interp)->nkeys++] = (yyvsp[(1) - (3)].sr);
           (yyval.sr) = (yyvsp[(3) - (3)].sr);
         }
    break;

  case 328:
#line 2010 "compilers/imcc/imcc.y"
    { (yyvsp[(2) - (2)].sr)->type |= VT_START_ZERO | VT_END_SLICE; (yyval.sr) = (yyvsp[(2) - (2)].sr); }
    break;

  case 329:
#line 2011 "compilers/imcc/imcc.y"
    { (yyvsp[(1) - (2)].sr)->type |= VT_START_SLICE | VT_END_INF; (yyval.sr) = (yyvsp[(1) - (2)].sr); }
    break;

  case 330:
#line 2015 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'I'); }
    break;

  case 331:
#line 2016 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'N'); }
    break;

  case 332:
#line 2017 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); }
    break;

  case 333:
#line 2018 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'P'); }
    break;

  case 334:
#line 2019 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_pasm_reg(interp, (yyvsp[(1) - (1)].s)); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 335:
#line 2023 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'I'); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 336:
#line 2024 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'N'); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 337:
#line 2025 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 338:
#line 2026 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'U'); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 339:
#line 2030 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_symreg(interp, (yyvsp[(1) - (1)].s), 'S'); mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;

  case 340:
#line 2031 "compilers/imcc/imcc.y"
    { (yyval.sr) = mk_const(interp, (yyvsp[(1) - (1)].s), 'S');  mem_sys_free((yyvsp[(1) - (1)].s)); }
    break;


/* Line 1267 of yacc.c.  */
#line 4836 "compilers/imcc/imcparser.c"
      default: break;
    }
  YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);

  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);

  *++yyvsp = yyval;


  /* Now `shift' the result of the reduction.  Determine what state
     that goes to, based on the state we popped back to and the rule
     number reduced by.  */

  yyn = yyr1[yyn];

  yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
  if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
    yystate = yytable[yystate];
  else
    yystate = yydefgoto[yyn - YYNTOKENS];

  goto yynewstate;


/*------------------------------------.
| yyerrlab -- here on detecting error |
`------------------------------------*/
yyerrlab:
  /* If not already recovering from an error, report this error.  */
  if (!yyerrstatus)
    {
      ++yynerrs;
#if ! YYERROR_VERBOSE
      yyerror (yyscanner, interp, YY_("syntax error"));
#else
      {
	YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
	if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
	  {
	    YYSIZE_T yyalloc = 2 * yysize;
	    if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
	      yyalloc = YYSTACK_ALLOC_MAXIMUM;
	    if (yymsg != yymsgbuf)
	      YYSTACK_FREE (yymsg);
	    yymsg = (char *) YYSTACK_ALLOC (yyalloc);
	    if (yymsg)
	      yymsg_alloc = yyalloc;
	    else
	      {
		yymsg = yymsgbuf;
		yymsg_alloc = sizeof yymsgbuf;
	      }
	  }

	if (0 < yysize && yysize <= yymsg_alloc)
	  {
	    (void) yysyntax_error (yymsg, yystate, yychar);
	    yyerror (yyscanner, interp, yymsg);
	  }
	else
	  {
	    yyerror (yyscanner, interp, YY_("syntax error"));
	    if (yysize != 0)
	      goto yyexhaustedlab;
	  }
      }
#endif
    }



  if (yyerrstatus == 3)
    {
      /* If just tried and failed to reuse look-ahead token after an
	 error, discard it.  */

      if (yychar <= YYEOF)
	{
	  /* Return failure if at end of input.  */
	  if (yychar == YYEOF)
	    YYABORT;
	}
      else
	{
	  yydestruct ("Error: discarding",
		      yytoken, &yylval, yyscanner, interp);
	  yychar = YYEMPTY;
	}
    }

  /* Else will try to reuse look-ahead token after shifting the error
     token.  */
  goto yyerrlab1;


/*---------------------------------------------------.
| yyerrorlab -- error raised explicitly by YYERROR.  |
`---------------------------------------------------*/
yyerrorlab:

  /* Pacify compilers like GCC when the user code never invokes
     YYERROR and the label yyerrorlab therefore never appears in user
     code.  */
  if (/*CONSTCOND*/ 0)
     goto yyerrorlab;

  /* Do not reclaim the symbols of the rule which action triggered
     this YYERROR.  */
  YYPOPSTACK (yylen);
  yylen = 0;
  YY_STACK_PRINT (yyss, yyssp);
  yystate = *yyssp;
  goto yyerrlab1;


/*-------------------------------------------------------------.
| yyerrlab1 -- common code for both syntax error and YYERROR.  |
`-------------------------------------------------------------*/
yyerrlab1:
  yyerrstatus = 3;	/* Each real token shifted decrements this.  */

  for (;;)
    {
      yyn = yypact[yystate];
      if (yyn != YYPACT_NINF)
	{
	  yyn += YYTERROR;
	  if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
	    {
	      yyn = yytable[yyn];
	      if (0 < yyn)
		break;
	    }
	}

      /* Pop the current state because it cannot handle the error token.  */
      if (yyssp == yyss)
	YYABORT;


      yydestruct ("Error: popping",
		  yystos[yystate], yyvsp, yyscanner, interp);
      YYPOPSTACK (1);
      yystate = *yyssp;
      YY_STACK_PRINT (yyss, yyssp);
    }

  if (yyn == YYFINAL)
    YYACCEPT;

  *++yyvsp = yylval;


  /* Shift the error token.  */
  YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);

  yystate = yyn;
  goto yynewstate;


/*-------------------------------------.
| yyacceptlab -- YYACCEPT comes here.  |
`-------------------------------------*/
yyacceptlab:
  yyresult = 0;
  goto yyreturn;

/*-----------------------------------.
| yyabortlab -- YYABORT comes here.  |
`-----------------------------------*/
yyabortlab:
  yyresult = 1;
  goto yyreturn;

#ifndef yyoverflow
/*-------------------------------------------------.
| yyexhaustedlab -- memory exhaustion comes here.  |
`-------------------------------------------------*/
yyexhaustedlab:
  yyerror (yyscanner, interp, YY_("memory exhausted"));
  yyresult = 2;
  /* Fall through.  */
#endif

yyreturn:
  if (yychar != YYEOF && yychar != YYEMPTY)
     yydestruct ("Cleanup: discarding lookahead",
		 yytoken, &yylval, yyscanner, interp);
  /* Do not reclaim the symbols of the rule which action triggered
     this YYABORT or YYACCEPT.  */
  YYPOPSTACK (yylen);
  YY_STACK_PRINT (yyss, yyssp);
  while (yyssp != yyss)
    {
      yydestruct ("Cleanup: popping",
		  yystos[*yyssp], yyvsp, yyscanner, interp);
      YYPOPSTACK (1);
    }
#ifndef yyoverflow
  if (yyss != yyssa)
    YYSTACK_FREE (yyss);
#endif
#if YYERROR_VERBOSE
  if (yymsg != yymsgbuf)
    YYSTACK_FREE (yymsg);
#endif
  /* Make sure YYID is used.  */
  return YYID (yyresult);
}


#line 2036 "compilers/imcc/imcc.y"


/* I need this prototype somewhere... */
char *yyget_text(yyscan_t yyscanner);

/* I do not like this function, but, atm, it is the only way I can
 * make the code in yyerror work without segfault on some specific
 * cases.
 */
/* int yyholds_char(yyscan_t yyscanner); */

int yyerror(void *yyscanner, PARROT_INTERP, const char *s)
{
    /* If the error occurr in the end of the buffer (I mean, the last
     * token was already read), yyget_text will return a pointer
     * outside the bison buffer, and thus, not "accessible" by
     * us. This means it may segfault. */
    const char * const chr = yyget_text((yyscan_t)yyscanner);

    /* IMCC_fataly(interp, EXCEPTION_SYNTAX_ERROR, s); */
    /* --- This was called before, not sure if I should call some
           similar function that does not die like this one. */

    /* Basically, if current token is a newline, it mean the error was
     * before the newline, and thus, line is the line *after* the
     * error. Instead of duplicating code for both cases (the 'newline' and
     * non-newline case, do the test twice; efficiency is not important when
     * we have an error anyway.
     */
    if (!at_eof(yyscanner)) {
        if (*chr == '\n') {
            IMCC_INFO(interp)->line--;
        }

        IMCC_warning(interp, "error:imcc:%s", s);
        /* don't print the current token if it is a newline */
        if (*chr != '\n') {
            IMCC_warning(interp, " ('%s')", chr);
        }
        IMCC_print_inc(interp);

        if (*chr == '\n') {
            IMCC_INFO(interp)->line++;
        }

    }
    else { /* scanner is at end of file; just to be sure, do not print "current" token. */
        IMCC_warning(interp, "error:imcc:%s", s);
        IMCC_print_inc(interp);
    }

    return 0;
}

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */

