/*
** 2000-05-29
**
** The author disclaims copyright to this source code.  In place of
** a legal notice, here is a blessing:
**
**    May you do good and not evil.
**    May you find forgiveness for yourself and forgive others.
**    May you share freely, never taking more than you give.
**
*************************************************************************
** Driver template for the LEMON parser generator.
**
** The "lemon" program processes an LALR(1) input grammar file, then uses
** this template to construct a parser.  The "lemon" program inserts text
** at each "%%" line.  Also, any "P-a-r-s-e" identifer prefix (without the
** interstitial "-" characters) contained in this template is changed into
** the value of the %name directive from the grammar.  Otherwise, the content
** of this template is copied straight through into the generate parser
** source file.
**
** The following is the concatenation of all %include directives from the
** input grammar file:
*/
#include <stdio.h>
/************ Begin %include sections from the grammar ************************/
#line 24 "../src/CFCParseHeader.y"

#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include "CFC.h"
#include "CFCLexHeader.h"
#ifndef true
  #define true 1
  #define false 0
#endif

static CFCClass*
S_start_class(CFCParser *state, CFCDocuComment *docucomment, char *exposure,
              char *modifiers, char *class_name, char *class_nickname,
              char *inheritance) {
    CFCFileSpec *file_spec = CFCParser_get_file_spec(state);
    int is_final = false;
    int is_inert = false;
    int is_abstract = false;
    if (modifiers) {
        if (strstr(modifiers, "inline")) {
            CFCUtil_die("Illegal class modifiers: '%s'", modifiers);
        }
        is_final = !!strstr(modifiers, "final");
        is_inert = !!strstr(modifiers, "inert");
        is_abstract = !!strstr(modifiers, "abstract");
    }
    CFCParser_set_class_name(state, class_name);
    CFCParser_set_class_final(state, is_final);
    CFCClass *klass = CFCClass_create(CFCParser_get_parcel(state), exposure,
                                      class_name, class_nickname, docucomment,
                                      file_spec, inheritance, is_final,
                                      is_inert, is_abstract);
    CFCBase_decref((CFCBase*)docucomment);
    return klass;
}

static CFCVariable*
S_new_var(char *exposure, char *modifiers, CFCType *type, char *name) {
    int inert = false;
    if (modifiers) {
        if (strcmp(modifiers, "inert") != 0) {
            CFCUtil_die("Illegal variable modifiers: '%s'", modifiers);
        }
        inert = true;
    }

    CFCVariable *var = CFCVariable_new(exposure, name, type, inert);

    /* Consume tokens. */
    CFCBase_decref((CFCBase*)type);

    return var;
}

static CFCBase*
S_new_sub(CFCParser *state, CFCDocuComment *docucomment, 
          char *exposure, char *modifiers, CFCType *type, char *name,
          CFCParamList *param_list) {
    /* Find modifiers by scanning the list. */
    int is_abstract = false;
    int is_final    = false;
    int is_inline   = false;
    int is_inert    = false;
    if (modifiers) {
        is_abstract = !!strstr(modifiers, "abstract");
        is_final    = !!strstr(modifiers, "final");
        is_inline   = !!strstr(modifiers, "inline");
        is_inert    = !!strstr(modifiers, "inert");
    }
    if (CFCParser_get_class_final(state) && !is_inert) {
        is_final = true;
    }

    /* If "inert", it's a function, otherwise it's a method. */
    CFCBase *sub;
    if (is_inert) {
        if (is_abstract) {
            CFCUtil_die("Inert functions must not be abstract");
        }
        if (is_final) {
            CFCUtil_die("Inert functions must not be final");
        }
        sub = (CFCBase*)CFCFunction_new(exposure, name, type, param_list,
                                        docucomment, is_inline);
    }
    else {
        if (is_inline) {
            CFCUtil_die("Methods must not be inline");
        }
        const char *class_name = CFCParser_get_class_name(state);
        sub = (CFCBase*)CFCMethod_new(exposure, name, type, param_list,
                                      docucomment, class_name, is_final,
                                      is_abstract);
    }

    /* Consume tokens. */
    CFCBase_decref((CFCBase*)docucomment);
    CFCBase_decref((CFCBase*)type);
    CFCBase_decref((CFCBase*)param_list);

    return sub;
}

static CFCType*
S_new_type(CFCParser *state, int flags, char *type_name,
           char *asterisk_postfix, char *array_postfix) {
    (void)state; /* unused */
    CFCType *type = NULL;
    size_t type_name_len = strlen(type_name);
    int indirection = asterisk_postfix ? (int)strlen(asterisk_postfix) : 0;

    /* Apply "nullable" to outermost pointer, but "const", etc to innermost
     * type. This is an ugly kludge and the Clownfish header language needs to
     * be fixed, either to support C's terrible pointer type syntax, or to do
     * something better. */
    int composite_flags = 0;
    if (indirection) {
        composite_flags = flags & CFCTYPE_NULLABLE;
        flags &= ~CFCTYPE_NULLABLE;
    }

    if (!strcmp(type_name, "int8_t")
        || !strcmp(type_name, "int16_t")
        || !strcmp(type_name, "int32_t")
        || !strcmp(type_name, "int64_t")
        || !strcmp(type_name, "uint8_t")
        || !strcmp(type_name, "uint16_t")
        || !strcmp(type_name, "uint32_t")
        || !strcmp(type_name, "uint64_t")
        || !strcmp(type_name, "char")
        || !strcmp(type_name, "short")
        || !strcmp(type_name, "int")
        || !strcmp(type_name, "long")
        || !strcmp(type_name, "size_t")
        || !strcmp(type_name, "bool")
       ) {
        type = CFCType_new_integer(flags, type_name);
    }
    else if (!strcmp(type_name, "float")
             || !strcmp(type_name, "double")
            ) {
        type = CFCType_new_float(flags, type_name);
    }
    else if (!strcmp(type_name, "void")) {
        type = CFCType_new_void(!!(flags & CFCTYPE_CONST));
    }
    else if (!strcmp(type_name, "va_list")) {
        type = CFCType_new_va_list();
    }
    else if (type_name_len > 2
             && !strcmp(type_name + type_name_len - 2, "_t")
            ) {
        type = CFCType_new_arbitrary(CFCParser_get_parcel(state), type_name);
    }
    else if (indirection > 0) {
        /* The only remaining possibility is an object type, and we can let
         * the constructor perform the complex validation of the type name. */
        indirection--;
        if (indirection == 0) {
            flags |= composite_flags;
            composite_flags = 0;
        }
        type = CFCType_new_object(flags, CFCParser_get_parcel(state), type_name, 1);
    }
    else {
        CFCUtil_die("Invalid type specification at/near '%s'", type_name);
    }

    if (indirection) {
        CFCType *composite = CFCType_new_composite(composite_flags, type,
                                                   indirection, NULL);
        CFCBase_decref((CFCBase*)type);
        type = composite;
    }
    else if (array_postfix) {
        CFCType *composite = CFCType_new_composite(composite_flags, type,
                                                   0, array_postfix);
        CFCBase_decref((CFCBase*)type);
        type = composite;
    }

    return type;
}

#line 215 "../src/CFCParseHeader.c"
/**************** End of %include directives **********************************/
/* These constants specify the various numeric values for terminal symbols
** in a format understandable to "makeheaders".  This section is blank unless
** "lemon" is run with the "-m" command-line option.
***************** Begin makeheaders token definitions *************************/
/**************** End makeheaders token definitions ***************************/

/* The next sections is a series of control #defines.
** various aspects of the generated parser.
**    YYCODETYPE         is the data type used to store the integer codes
**                       that represent terminal and non-terminal symbols.
**                       "unsigned char" is used if there are fewer than
**                       256 symbols.  Larger types otherwise.
**    YYNOCODE           is a number of type YYCODETYPE that is not used for
**                       any terminal or nonterminal symbol.
**    YYFALLBACK         If defined, this indicates that one or more tokens
**                       (also known as: "terminal symbols") have fall-back
**                       values which should be used if the original symbol
**                       would not parse.  This permits keywords to sometimes
**                       be used as identifiers, for example.
**    YYACTIONTYPE       is the data type used for "action codes" - numbers
**                       that indicate what to do in response to the next
**                       token.
**    CFCParseHeaderTOKENTYPE     is the data type used for minor type for terminal
**                       symbols.  Background: A "minor type" is a semantic
**                       value associated with a terminal or non-terminal
**                       symbols.  For example, for an "ID" terminal symbol,
**                       the minor type might be the name of the identifier.
**                       Each non-terminal can have a different minor type.
**                       Terminal symbols all have the same minor type, though.
**                       This macros defines the minor type for terminal 
**                       symbols.
**    YYMINORTYPE        is the data type used for all minor types.
**                       This is typically a union of many types, one of
**                       which is CFCParseHeaderTOKENTYPE.  The entry in the union
**                       for terminal symbols is called "yy0".
**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
**                       zero the stack is dynamically sized using realloc()
**    CFCParseHeaderARG_SDECL     A static variable declaration for the %extra_argument
**    CFCParseHeaderARG_PDECL     A parameter declaration for the %extra_argument
**    CFCParseHeaderARG_STORE     Code to store %extra_argument into yypParser
**    CFCParseHeaderARG_FETCH     Code to extract %extra_argument from yypParser
**    YYERRORSYMBOL      is the code number of the error symbol.  If not
**                       defined, then do no error processing.
**    YYNSTATE           the combined number of states.
**    YYNRULE            the number of rules in the grammar
**    YY_MAX_SHIFT       Maximum value for shift actions
**    YY_MIN_SHIFTREDUCE Minimum value for shift-reduce actions
**    YY_MAX_SHIFTREDUCE Maximum value for shift-reduce actions
**    YY_MIN_REDUCE      Maximum value for reduce actions
**    YY_ERROR_ACTION    The yy_action[] code for syntax error
**    YY_ACCEPT_ACTION   The yy_action[] code for accept
**    YY_NO_ACTION       The yy_action[] code for no-op
*/
#ifndef INTERFACE
# define INTERFACE 1
#endif
/************* Begin control #defines *****************************************/
#define YYCODETYPE unsigned char
#define YYNOCODE 75
#define YYACTIONTYPE unsigned short int
#define CFCParseHeaderTOKENTYPE char*
typedef union {
  int yyinit;
  CFCParseHeaderTOKENTYPE yy0;
  int yy8;
  CFCParcel* yy14;
  CFCType* yy41;
  CFCFile* yy51;
  CFCVariable* yy57;
  CFCDocuComment* yy73;
  CFCBase* yy82;
  CFCParamList* yy96;
  CFCCBlock* yy117;
  CFCClass* yy141;
} YYMINORTYPE;
#ifndef YYSTACKDEPTH
#define YYSTACKDEPTH 100
#endif
#define CFCParseHeaderARG_SDECL  CFCParser *state ;
#define CFCParseHeaderARG_PDECL , CFCParser *state 
#define CFCParseHeaderARG_FETCH  CFCParser *state  = yypParser->state 
#define CFCParseHeaderARG_STORE yypParser->state  = state 
#define YYNSTATE             191
#define YYNRULE              117
#define YY_MAX_SHIFT         190
#define YY_MIN_SHIFTREDUCE   191
#define YY_MAX_SHIFTREDUCE   307
#define YY_MIN_REDUCE        308
#define YY_MAX_REDUCE        424
#define YY_ERROR_ACTION      425
#define YY_ACCEPT_ACTION     426
#define YY_NO_ACTION         427
/************* End control #defines *******************************************/

/* Define the yytestcase() macro to be a no-op if is not already defined
** otherwise.
**
** Applications can choose to define yytestcase() in the %include section
** to a macro that can assist in verifying code coverage.  For production
** code the yytestcase() macro should be turned off.  But it is useful
** for testing.
*/
#ifndef yytestcase
# define yytestcase(X)
#endif


/* Next are the tables used to determine what action to take based on the
** current state and lookahead token.  These tables are used to implement
** functions that take a state number and lookahead value and return an
** action integer.  
**
** Suppose the action integer is N.  Then the action is determined as
** follows
**
**   0 <= N <= YY_MAX_SHIFT             Shift N.  That is, push the lookahead
**                                      token onto the stack and goto state N.
**
**   N between YY_MIN_SHIFTREDUCE       Shift to an arbitrary state then
**     and YY_MAX_SHIFTREDUCE           reduce by rule N-YY_MIN_SHIFTREDUCE.
**
**   N between YY_MIN_REDUCE            Reduce by rule N-YY_MIN_REDUCE
**     and YY_MAX_REDUCE

**   N == YY_ERROR_ACTION               A syntax error has occurred.
**
**   N == YY_ACCEPT_ACTION              The parser accepts its input.
**
**   N == YY_NO_ACTION                  No such action.  Denotes unused
**                                      slots in the yy_action[] table.
**
** The action table is constructed as a single large table named yy_action[].
** Given state S and lookahead X, the action is computed as
**
**      yy_action[ yy_shift_ofst[S] + X ]
**
** If the index value yy_shift_ofst[S]+X is out of range or if the value
** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
** and that yy_default[S] should be used instead.  
**
** The formula above is for computing the action when the lookahead is
** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
** a reduce action) then the yy_reduce_ofst[] array is used in place of
** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
** YY_SHIFT_USE_DFLT.
**
** The following are the tables generated in this section:
**
**  yy_action[]        A single table containing all actions.
**  yy_lookahead[]     A table containing the lookahead for each entry in
**                     yy_action.  Used to detect hash collisions.
**  yy_shift_ofst[]    For each state, the offset into yy_action for
**                     shifting terminals.
**  yy_reduce_ofst[]   For each state, the offset into yy_action for
**                     shifting non-terminals after a reduce.
**  yy_default[]       Default action for each state.
**
*********** Begin parsing tables **********************************************/
#define YY_ACTTAB_COUNT (1190)
static const YYACTIONTYPE yy_action[] = {
 /*     0 */    56,   55,  355,   82,   57,  141,  123,  122,  121,  120,
 /*    10 */   119,   95,  115,  114,  113,  112,  101,  100,   99,   98,
 /*    20 */   123,  122,  121,  120,  119,  111,  115,  114,  113,  112,
 /*    30 */     9,    9,  184,   20,   77,  182,   92,  426,    2,   42,
 /*    40 */   171,  167,  155,    1,  169,  168,   54,  186,  187,  142,
 /*    50 */     3,  170,  110,   22,   97,    5,   10,  365,   43,  156,
 /*    60 */    21,  365,  130,   96,  365,  365,  365,  365,  365,  365,
 /*    70 */   365,  365,  365,  365,  365,  365,  365,  365,  123,  122,
 /*    80 */   121,  120,  119,   95,  115,  114,  113,  112,  101,  100,
 /*    90 */    99,   98,   24,   37,  365,  364,  190,   44,  158,  364,
 /*   100 */    96,  102,  364,  364,  364,  364,  364,  364,  364,  364,
 /*   110 */   364,  364,  364,  364,  364,  364,   59,  138,  123,  122,
 /*   120 */   121,  120,  119,  347,  115,  114,  113,  112,  101,  100,
 /*   130 */    99,   98,  364,  361,  184,  127,   39,  361,  128,  157,
 /*   140 */   361,  361,  361,  361,  361,  361,  361,  361,  361,  361,
 /*   150 */   361,  361,  361,  361,   74,   77,  123,  122,  121,  120,
 /*   160 */   119,  343,  115,  114,  113,  112,  101,  100,   99,   98,
 /*   170 */   361,  363,  159,  134,   40,  363,  128,  161,  363,  363,
 /*   180 */   363,  363,  363,  363,  363,  363,  363,  363,  363,  363,
 /*   190 */   363,  363,   58,   77,  123,  122,  121,  120,  119,  345,
 /*   200 */   115,  114,  113,  112,  101,  100,   99,   98,  363,  360,
 /*   210 */   163,  414,  414,  360,   33,  165,  360,  360,  360,  360,
 /*   220 */   360,  360,  360,  360,  360,  360,  360,  360,  360,  360,
 /*   230 */    60,   77,  123,  122,  121,  120,  119,  341,  115,  114,
 /*   240 */   113,  112,  101,  100,   99,   98,  360,  366,  174,  412,
 /*   250 */   412,  366,   34,  166,  366,  366,  366,  366,  366,  366,
 /*   260 */   366,  366,  366,  366,  366,  366,  366,  366,   71,   77,
 /*   270 */   123,  122,  121,  120,  119,  346,  115,  114,  113,  112,
 /*   280 */   101,  100,   99,   98,  366,  367,  177,  408,  408,  367,
 /*   290 */   408,  180,  367,  367,  367,  367,  367,  367,  367,  367,
 /*   300 */   367,  367,  367,  367,  367,  367,   78,   77,  123,  122,
 /*   310 */   121,  120,  119,  342,  115,  114,  113,  112,  101,  100,
 /*   320 */    99,   98,  367,  369,   45,  160,  185,  369,   46,  162,
 /*   330 */   369,  369,  369,  369,  369,  369,  369,  369,  369,  369,
 /*   340 */   369,  369,  369,  369,  381,   77,  381,  381,  381,  381,
 /*   350 */   381,  344,  381,  381,  381,  381,  381,  381,  381,  381,
 /*   360 */   369,  368,   50,  173,  118,  368,   51,  176,  368,  368,
 /*   370 */   368,  368,  368,  368,  368,  368,  368,  368,  368,  368,
 /*   380 */   368,  368,  392,   77,  392,  392,  392,  392,  392,  340,
 /*   390 */   392,  392,  392,  392,  392,  392,  392,  392,  368,  362,
 /*   400 */    52,  179,  135,  362,   53,  183,  362,  362,  362,  362,
 /*   410 */   362,  362,  362,  362,  362,  362,  362,  362,  362,  362,
 /*   420 */   393,   77,  393,  393,  393,  393,  393,  420,  393,  393,
 /*   430 */   393,  393,  393,  393,  393,  393,  362,  359,  104,  136,
 /*   440 */    41,  359,  423,  423,  359,  359,  359,  359,  359,  359,
 /*   450 */   359,  359,  359,  359,  359,  359,  359,  359,  391,  420,
 /*   460 */   391,  391,  391,  391,  391,  308,  391,  391,  391,  391,
 /*   470 */   391,  391,  391,  391,  359,   84,  116,  424,  424,  106,
 /*   480 */   105,  137,  123,  122,  121,  120,  119,   95,  115,  114,
 /*   490 */   113,  112,  101,  100,   99,   98,  390,   55,  390,  390,
 /*   500 */   390,  390,  390,    9,  390,  390,  390,  390,  390,  390,
 /*   510 */   390,  390,   92,  311,  415,  415,  413,  413,   68,   25,
 /*   520 */   123,  122,  121,  120,  119,   95,  115,  114,  113,  112,
 /*   530 */   101,  100,   99,   98,  356,  406,  406,  356,  356,  356,
 /*   540 */   356,  356,  356,  356,  356,  356,  356,  356,  356,  356,
 /*   550 */   356,  389,  103,  389,  389,  389,  389,  389,   26,  389,
 /*   560 */   389,  389,  389,  389,  389,  389,  389,  356,  418,  405,
 /*   570 */   405,  404,  404,  418,    9,  418,  418,  418,  418,  418,
 /*   580 */   418,  418,  418,  418,  418,  418,  418,  418,  418,  358,
 /*   590 */   403,  403,  358,  358,  358,  358,  358,  358,  358,  358,
 /*   600 */   358,  358,  358,  358,  358,  358,  388,   61,  388,  388,
 /*   610 */   388,  388,  388,   27,  388,  388,  388,  388,  388,  388,
 /*   620 */   388,  388,  358,  402,  402,  401,  401,  357,  132,  189,
 /*   630 */   357,  357,  357,  357,  357,  357,  357,  357,  357,  357,
 /*   640 */   357,  357,  357,  357,  123,  122,  121,  120,  119,   28,
 /*   650 */   115,  114,  113,  112,  101,  100,   99,   98,   36,   38,
 /*   660 */   357,   94,   93,   65,  375,   96,   96,    4,  164,  110,
 /*   670 */    22,  408,    8,   17,   90,  375,  417,   21,  116,  417,
 /*   680 */    96,  123,  122,  121,  120,  119,  154,  115,  114,  113,
 /*   690 */   112,  123,  122,  121,  120,  119,  317,  115,  114,  113,
 /*   700 */   112,   57,    9,  172,   90,  419,  153,  411,   95,  417,
 /*   710 */   411,  417,  417,  101,  100,   99,   98,   47,  188,  147,
 /*   720 */   149,  148,  146,  145,  144,  143,   48,  109,   49,  108,
 /*   730 */   155,    1,    9,   92,   66,  184,   42,  322,   19,  107,
 /*   740 */   151,   18,  322,   23,   35,  400,  400,  410,   29,  322,
 /*   750 */   410,   96,  175,  178,  322,  322,  322,  322,   69,  386,
 /*   760 */   386,  386,  386,  386,   30,  386,  386,  386,  386,  181,
 /*   770 */    72,   31,   67,  409,  322,  318,  409,  322,  110,   22,
 /*   780 */   318,    6,   12,   75,   68,  140,   21,  318,   32,   96,
 /*   790 */    91,   95,  318,  318,  318,  318,  101,  100,   99,   98,
 /*   800 */   387,  387,  387,  387,  387,  126,  387,  387,  387,  387,
 /*   810 */    67,  339,  318,  422,  331,  318,  110,   22,  422,    7,
 /*   820 */    15,  335,   79,  125,   21,  422,  327,   96,  110,   22,
 /*   830 */   422,  422,  422,  422,  351,  337,   21,   80,  385,  385,
 /*   840 */   385,  385,  385,  329,  385,  385,  385,  385,   62,  333,
 /*   850 */   422,  421,  325,  422,  110,   22,  421,   81,   11,   83,
 /*   860 */    59,  316,   21,  421,  184,   96,   77,  182,  421,  421,
 /*   870 */   421,  421,  101,  100,   99,   98,  384,  384,  384,  384,
 /*   880 */   384,  315,  384,  384,  384,  384,   73,  314,  421,  323,
 /*   890 */   313,  421,  110,   22,  323,  312,   13,   85,   74,  139,
 /*   900 */    21,  323,  338,   96,  330,   86,  323,  323,  323,  323,
 /*   910 */   101,  100,   99,   98,  383,  383,  383,  383,  383,  334,
 /*   920 */   383,  383,  383,  383,   73,  326,  323,  321,   87,  323,
 /*   930 */   110,   22,  321,   88,   14,  336,   58,  117,   21,  321,
 /*   940 */   332,   96,  328,  324,  321,  321,  321,  321,  101,  100,
 /*   950 */    99,   98,  382,  382,  382,  382,  382,   89,  382,  382,
 /*   960 */   382,  382,   62,  407,  321,  320,  407,  321,  110,   22,
 /*   970 */   320,  310,   16,  309,   64,  150,   21,  320,  131,   96,
 /*   980 */   110,   22,  320,  320,  320,  320,   79,  124,   21,  152,
 /*   990 */   374,   97,  110,   22,  407,  407,  407,  310,  407,  310,
 /*  1000 */    21,  374,  320,  319,  310,  320,  310,  310,  319,  310,
 /*  1010 */    63,  133,   70,  310,  310,  319,  110,   22,  110,   22,
 /*  1020 */   319,  319,  319,  319,   21,  310,   21,   97,   76,   97,
 /*  1030 */   310,  310,  310,  310,  110,   22,  310,  310,  310,  310,
 /*  1040 */   319,   60,   21,  319,  310,   97,   71,  416,  310,  310,
 /*  1050 */   416,   78,  310,  101,  100,   99,   98,  373,  101,  100,
 /*  1060 */    99,   98,  372,  101,  100,   99,   98,  353,  373,  310,
 /*  1070 */   310,  310,  310,  372,  349,  310,  310,  310,  129,  154,
 /*  1080 */   416,  370,  416,  416,  154,  354,  310,  310,  310,  350,
 /*  1090 */   310,  310,  370,  310,  310,  310,  352,  184,  310,   77,
 /*  1100 */   182,  310,  129,  154,  184,  310,   77,  182,  310,  348,
 /*  1110 */   310,  310,  310,  310,  310,  184,  380,   77,  182,  184,
 /*  1120 */   310,   77,  182,  379,  310,  310,  184,  380,   77,  182,
 /*  1130 */   310,  310,  310,  310,  379,  378,  398,  380,  380,  184,
 /*  1140 */   377,   77,  182,  376,  379,  379,  378,  398,  394,  399,
 /*  1150 */   310,  377,  397,  310,  376,  396,  378,  378,  398,  394,
 /*  1160 */   399,  377,  377,  397,  376,  376,  396,  395,  371,  394,
 /*  1170 */   310,  399,  310,  310,  397,  310,  310,  396,  395,  371,
 /*  1180 */   310,  310,  310,  310,  310,  310,  310,  310,  395,  133,
};
static const YYCODETYPE yy_lookahead[] = {
 /*     0 */     1,    2,    6,    3,    5,   72,    7,    8,    9,   10,
 /*    10 */    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
 /*    20 */     7,    8,    9,   10,   11,   59,   13,   14,   15,   16,
 /*    30 */    31,   31,   36,   67,   38,   39,   37,   44,   45,   40,
 /*    40 */    47,   48,   49,   50,   51,   52,   53,   54,   55,   72,
 /*    50 */    57,   58,   59,   60,   70,   62,   63,    0,   64,   65,
 /*    60 */    67,    4,   71,   70,    7,    8,    9,   10,   11,   12,
 /*    70 */    13,   14,   15,   16,   17,   18,   19,   20,    7,    8,
 /*    80 */     9,   10,   11,   12,   13,   14,   15,   16,   17,   18,
 /*    90 */    19,   20,   62,   63,   37,    0,   55,   64,   65,    4,
 /*   100 */    70,    3,    7,    8,    9,   10,   11,   12,   13,   14,
 /*   110 */    15,   16,   17,   18,   19,   20,    5,   73,    7,    8,
 /*   120 */     9,   10,   11,    6,   13,   14,   15,   16,   17,   18,
 /*   130 */    19,   20,   37,    0,   36,   68,   69,    4,   71,   65,
 /*   140 */     7,    8,    9,   10,   11,   12,   13,   14,   15,   16,
 /*   150 */    17,   18,   19,   20,    5,   38,    7,    8,    9,   10,
 /*   160 */    11,    6,   13,   14,   15,   16,   17,   18,   19,   20,
 /*   170 */    37,    0,   65,   68,   69,    4,   71,   65,    7,    8,
 /*   180 */     9,   10,   11,   12,   13,   14,   15,   16,   17,   18,
 /*   190 */    19,   20,    5,   38,    7,    8,    9,   10,   11,    6,
 /*   200 */    13,   14,   15,   16,   17,   18,   19,   20,   37,    0,
 /*   210 */    65,   32,   33,    4,   35,   55,    7,    8,    9,   10,
 /*   220 */    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
 /*   230 */     5,   38,    7,    8,    9,   10,   11,    6,   13,   14,
 /*   240 */    15,   16,   17,   18,   19,   20,   37,    0,   65,   32,
 /*   250 */    33,    4,   35,   55,    7,    8,    9,   10,   11,   12,
 /*   260 */    13,   14,   15,   16,   17,   18,   19,   20,    5,   38,
 /*   270 */     7,    8,    9,   10,   11,    6,   13,   14,   15,   16,
 /*   280 */    17,   18,   19,   20,   37,    0,   65,   32,   33,    4,
 /*   290 */    35,   65,    7,    8,    9,   10,   11,   12,   13,   14,
 /*   300 */    15,   16,   17,   18,   19,   20,    5,   38,    7,    8,
 /*   310 */     9,   10,   11,    6,   13,   14,   15,   16,   17,   18,
 /*   320 */    19,   20,   37,    0,   64,   65,   65,    4,   64,   65,
 /*   330 */     7,    8,    9,   10,   11,   12,   13,   14,   15,   16,
 /*   340 */    17,   18,   19,   20,    5,   38,    7,    8,    9,   10,
 /*   350 */    11,    6,   13,   14,   15,   16,   17,   18,   19,   20,
 /*   360 */    37,    0,   64,   65,   11,    4,   64,   65,    7,    8,
 /*   370 */     9,   10,   11,   12,   13,   14,   15,   16,   17,   18,
 /*   380 */    19,   20,    5,   38,    7,    8,    9,   10,   11,    6,
 /*   390 */    13,   14,   15,   16,   17,   18,   19,   20,   37,    0,
 /*   400 */    64,   65,   61,    4,   64,   65,    7,    8,    9,   10,
 /*   410 */    11,   12,   13,   14,   15,   16,   17,   18,   19,   20,
 /*   420 */     5,   38,    7,    8,    9,   10,   11,    6,   13,   14,
 /*   430 */    15,   16,   17,   18,   19,   20,   37,    0,   41,   42,
 /*   440 */    66,    4,   41,   42,    7,    8,    9,   10,   11,   12,
 /*   450 */    13,   14,   15,   16,   17,   18,   19,   20,    5,   38,
 /*   460 */     7,    8,    9,   10,   11,    0,   13,   14,   15,   16,
 /*   470 */    17,   18,   19,   20,   37,    3,   11,   41,   42,    4,
 /*   480 */    41,   42,    7,    8,    9,   10,   11,   12,   13,   14,
 /*   490 */    15,   16,   17,   18,   19,   20,    5,    2,    7,    8,
 /*   500 */     9,   10,   11,   31,   13,   14,   15,   16,   17,   18,
 /*   510 */    19,   20,   37,    0,   32,   33,   32,   33,    5,   61,
 /*   520 */     7,    8,    9,   10,   11,   12,   13,   14,   15,   16,
 /*   530 */    17,   18,   19,   20,    4,   32,   33,    7,    8,    9,
 /*   540 */    10,   11,   12,   13,   14,   15,   16,   17,   18,   19,
 /*   550 */    20,    5,   47,    7,    8,    9,   10,   11,   61,   13,
 /*   560 */    14,   15,   16,   17,   18,   19,   20,   37,    0,   32,
 /*   570 */    33,   32,   33,    5,   31,    7,    8,    9,   10,   11,
 /*   580 */    12,   13,   14,   15,   16,   17,   18,   19,   20,    4,
 /*   590 */    32,   33,    7,    8,    9,   10,   11,   12,   13,   14,
 /*   600 */    15,   16,   17,   18,   19,   20,    5,   66,    7,    8,
 /*   610 */     9,   10,   11,   61,   13,   14,   15,   16,   17,   18,
 /*   620 */    19,   20,   37,   32,   33,   32,   33,    4,   23,   24,
 /*   630 */     7,    8,    9,   10,   11,   12,   13,   14,   15,   16,
 /*   640 */    17,   18,   19,   20,    7,    8,    9,   10,   11,   61,
 /*   650 */    13,   14,   15,   16,   17,   18,   19,   20,   63,   63,
 /*   660 */    37,   51,   52,   53,    0,   70,   70,   57,   55,   59,
 /*   670 */    60,    0,   62,   63,    3,   11,    3,   67,   11,    6,
 /*   680 */    70,    7,    8,    9,   10,   11,   22,   13,   14,   15,
 /*   690 */    16,    7,    8,    9,   10,   11,    0,   13,   14,   15,
 /*   700 */    16,    5,   31,   55,    3,    6,   32,    0,   12,   36,
 /*   710 */     3,   38,   39,   17,   18,   19,   20,   66,   34,   24,
 /*   720 */    25,   26,   27,   28,   29,   30,   66,   46,   66,   48,
 /*   730 */    49,   50,   31,   37,   66,   36,   40,    0,   57,   58,
 /*   740 */    32,   33,    5,   62,   63,   32,   33,    0,   61,   12,
 /*   750 */     3,   70,   55,   55,   17,   18,   19,   20,   66,    7,
 /*   760 */     8,    9,   10,   11,   61,   13,   14,   15,   16,   55,
 /*   770 */    66,   61,   53,    0,   37,    0,    3,   40,   59,   60,
 /*   780 */     5,   62,   63,   66,    5,   61,   67,   12,   61,   70,
 /*   790 */     6,   12,   17,   18,   19,   20,   17,   18,   19,   20,
 /*   800 */     7,    8,    9,   10,   11,   66,   13,   14,   15,   16,
 /*   810 */    53,    6,   37,    0,    6,   40,   59,   60,    5,   62,
 /*   820 */    63,    6,   53,   54,   67,   12,    6,   70,   59,   60,
 /*   830 */    17,   18,   19,   20,    6,    6,   67,    3,    7,    8,
 /*   840 */     9,   10,   11,    6,   13,   14,   15,   16,   53,    6,
 /*   850 */    37,    0,    6,   40,   59,   60,    5,    3,   63,    3,
 /*   860 */     5,    0,   67,   12,   36,   70,   38,   39,   17,   18,
 /*   870 */    19,   20,   17,   18,   19,   20,    7,    8,    9,   10,
 /*   880 */    11,    0,   13,   14,   15,   16,   53,    0,   37,    0,
 /*   890 */     0,   40,   59,   60,    5,    0,   63,    3,    5,   11,
 /*   900 */    67,   12,    6,   70,    6,    3,   17,   18,   19,   20,
 /*   910 */    17,   18,   19,   20,    7,    8,    9,   10,   11,    6,
 /*   920 */    13,   14,   15,   16,   53,    6,   37,    0,    3,   40,
 /*   930 */    59,   60,    5,    3,   63,    6,    5,   11,   67,   12,
 /*   940 */     6,   70,    6,    6,   17,   18,   19,   20,   17,   18,
 /*   950 */    19,   20,    7,    8,    9,   10,   11,    3,   13,   14,
 /*   960 */    15,   16,   53,    0,   37,    0,    3,   40,   59,   60,
 /*   970 */     5,    0,   63,    0,   53,   32,   67,   12,   23,   70,
 /*   980 */    59,   60,   17,   18,   19,   20,   53,   54,   67,   56,
 /*   990 */     0,   70,   59,   60,   31,   32,   33,   74,   35,   74,
 /*  1000 */    67,   11,   37,    0,   74,   40,   74,   74,    5,   74,
 /*  1010 */    53,   21,   53,   74,   74,   12,   59,   60,   59,   60,
 /*  1020 */    17,   18,   19,   20,   67,   74,   67,   70,   53,   70,
 /*  1030 */    74,   74,   74,   74,   59,   60,   74,   74,   74,   74,
 /*  1040 */    37,    5,   67,   40,   74,   70,    5,    3,   74,   74,
 /*  1050 */     6,    5,   74,   17,   18,   19,   20,    0,   17,   18,
 /*  1060 */    19,   20,    0,   17,   18,   19,   20,    6,   11,   74,
 /*  1070 */    74,   74,   74,   11,    6,   74,   74,   74,   21,   22,
 /*  1080 */    36,    0,   38,   39,   22,    6,   74,   74,   74,    6,
 /*  1090 */    74,   74,   11,   74,   74,   74,    6,   36,   74,   38,
 /*  1100 */    39,   74,   21,   22,   36,   74,   38,   39,   74,    6,
 /*  1110 */    74,   74,   74,   74,   74,   36,    0,   38,   39,   36,
 /*  1120 */    74,   38,   39,    0,   74,   74,   36,   11,   38,   39,
 /*  1130 */    74,   74,   74,   74,   11,    0,    0,   21,   22,   36,
 /*  1140 */     0,   38,   39,    0,   21,   22,   11,   11,    0,    0,
 /*  1150 */    74,   11,    0,   74,   11,    0,   21,   22,   22,   11,
 /*  1160 */    11,   21,   22,   11,   21,   22,   11,    0,    0,   21,
 /*  1170 */    74,   22,   74,   74,   22,   74,   74,   22,   11,   11,
 /*  1180 */    74,   74,   74,   74,   74,   74,   74,   74,   21,   21,
};
#define YY_SHIFT_USE_DFLT (-5)
#define YY_SHIFT_COUNT (190)
#define YY_SHIFT_MIN   (-4)
#define YY_SHIFT_MAX   (1168)
static const short yy_shift_ofst[] = {
 /*     0 */    -1,  475,  696,  513,   71,  111,  149,  637,  637,  674,
 /*    10 */   187,  225,  263,  301,  637,  637,  637,  637,  684,  779,
 /*    20 */  1057, 1081,   13,  855,  893,   -4,  828, 1061, 1068, 1079,
 /*    30 */  1083, 1090, 1103,  695,  695,  931, 1036, 1041, 1046,  664,
 /*    40 */  1062,  671,  397,  117,  155,  193,  231,    0,  472,  701,
 /*    50 */   269,  307,  345,  383,  465,  353,  495,  353,  353,  353,
 /*    60 */   353,  543,  667,  667,  667,  667,  543,  667,  353,  543,
 /*    70 */   667,  353,  543,  667,  353,  543,  667,  353,  353,  667,
 /*    80 */    57,   95,  133,  171,  209,  247,  285,  323,  361,  399,
 /*    90 */   437,  530,  568,  585,  623,  339,  377,  415,  453,  491,
 /*   100 */   546,  601,  737,  775,  813,  851,  889,  927,  965, 1003,
 /*   110 */   752,  793,  831,  869,  907,  945,  963,  673, 1044, 1116,
 /*   120 */  1123, 1135, 1140, 1143,  179,  217,  255,  990, 1136, 1148,
 /*   130 */  1149, 1152, 1155, 1167, 1168,   98,  401,  436,  439,  421,
 /*   140 */   699,  482,  484,  503,  537,  539,  558,  591,  593,  713,
 /*   150 */   707,  747,  708,  773,  605,  784,  805,  808,  815,  820,
 /*   160 */   829,  837,  843,  846,  834,  854,  856,  861,  881,  887,
 /*   170 */   890,  895,  894,  896,  898,  902,  913,  919,  925,  929,
 /*   180 */   936,  930,  888,  934,  926,  937,  971,  973,  943,  955,
 /*   190 */   954,
};
#define YY_REDUCE_USE_DFLT (-68)
#define YY_REDUCE_COUNT (79)
#define YY_REDUCE_MIN   (-67)
#define YY_REDUCE_MAX   (975)
static const short yy_reduce_ofst[] = {
 /*     0 */    -7,  610,  681,  719,  757,  795,  833,  871,  909,  933,
 /*    10 */   921,  957,  959,  975,  975,  959,  957,  921,  769,   30,
 /*    20 */    67,  105,  -34,  595,  596,   -6,   33,  260,  264,  298,
 /*    30 */   302,  336,  340,  -67,  -23,  -16,  -16,  -16,  -16,   -9,
 /*    40 */    -9,   41,   44,   74,  107,  112,  145,  160,  198,   41,
 /*    50 */   183,  221,  226,  261,  374,  341,  505,  458,  497,  552,
 /*    60 */   588,  613,  541,  651,  660,  662,  648,  668,  687,  697,
 /*    70 */   692,  703,  698,  704,  710,  714,  717,  724,  727,  739,
};
static const YYACTIONTYPE yy_default[] = {
 /*     0 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    10 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    20 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    30 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    40 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    50 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    60 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    70 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    80 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*    90 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   100 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   110 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   120 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   130 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   140 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   150 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   160 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   170 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   180 */   425,  425,  425,  425,  425,  425,  425,  425,  425,  425,
 /*   190 */   425,
};
/********** End of lemon-generated parsing tables *****************************/

/* The next table maps tokens (terminal symbols) into fallback tokens.  
** If a construct like the following:
** 
**      %fallback ID X Y Z.
**
** appears in the grammar, then ID becomes a fallback token for X, Y,
** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
** but it does not parse, the type of the token is changed to ID and
** the parse is retried before an error is thrown.
**
** This feature can be used, for example, to cause some keywords in a language
** to revert to identifiers if they keyword does not apply in the context where
** it appears.
*/
#ifdef YYFALLBACK
static const YYCODETYPE yyFallback[] = {
};
#endif /* YYFALLBACK */

/* The following structure represents a single element of the
** parser's stack.  Information stored includes:
**
**   +  The state number for the parser at this level of the stack.
**
**   +  The value of the token stored at this level of the stack.
**      (In other words, the "major" token.)
**
**   +  The semantic value stored at this level of the stack.  This is
**      the information used by the action routines in the grammar.
**      It is sometimes called the "minor" token.
**
** After the "shift" half of a SHIFTREDUCE action, the stateno field
** actually contains the reduce action for the second half of the
** SHIFTREDUCE.
*/
struct yyStackEntry {
  YYACTIONTYPE stateno;  /* The state-number, or reduce action in SHIFTREDUCE */
  YYCODETYPE major;      /* The major token value.  This is the code
                         ** number for the token at this stack level */
  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
                         ** is the value of the token  */
};
typedef struct yyStackEntry yyStackEntry;

/* The state of the parser is completely contained in an instance of
** the following structure */
struct yyParser {
  yyStackEntry *yytos;          /* Pointer to top element of the stack */
#ifdef YYTRACKMAXSTACKDEPTH
  int yyhwm;                    /* High-water mark of the stack */
#endif
#ifndef YYNOERRORRECOVERY
  int yyerrcnt;                 /* Shifts left before out of the error */
#endif
  CFCParseHeaderARG_SDECL                /* A place to hold %extra_argument */
#if YYSTACKDEPTH<=0
  int yystksz;                  /* Current side of the stack */
  yyStackEntry *yystack;        /* The parser's stack */
  yyStackEntry yystk0;          /* First stack entry */
#else
  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
#endif
};
typedef struct yyParser yyParser;

#ifndef NDEBUG
#include <stdio.h>
static FILE *yyTraceFILE = 0;
static char *yyTracePrompt = 0;
#endif /* NDEBUG */

#ifndef NDEBUG
/* 
** Turn parser tracing on by giving a stream to which to write the trace
** and a prompt to preface each trace message.  Tracing is turned off
** by making either argument NULL 
**
** Inputs:
** <ul>
** <li> A FILE* to which trace output should be written.
**      If NULL, then tracing is turned off.
** <li> A prefix string written at the beginning of every
**      line of trace output.  If NULL, then tracing is
**      turned off.
** </ul>
**
** Outputs:
** None.
*/
void CFCParseHeaderTrace(FILE *TraceFILE, char *zTracePrompt){
  yyTraceFILE = TraceFILE;
  yyTracePrompt = zTracePrompt;
  if( yyTraceFILE==0 ) yyTracePrompt = 0;
  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
}
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing shifts, the names of all terminals and nonterminals
** are required.  The following table supplies these names */
static const char *const yyTokenName[] = { 
  "$",             "FILE_START",    "PARCEL",        "SEMICOLON",   
  "RIGHT_CURLY_BRACE",  "CLASS",         "LEFT_CURLY_BRACE",  "VOID",        
  "VA_LIST",       "INTEGER_TYPE_NAME",  "FLOAT_TYPE_NAME",  "IDENTIFIER",  
  "PUBLIC",        "CONST",         "NULLABLE",      "INCREMENTED", 
  "DECREMENTED",   "INERT",         "INLINE",        "ABSTRACT",    
  "FINAL",         "ASTERISK",      "LEFT_SQUARE_BRACKET",  "RIGHT_SQUARE_BRACKET",
  "INTEGER_LITERAL",  "HEX_LITERAL",   "FLOAT_LITERAL",  "STRING_LITERAL",
  "TRUE",          "FALSE",         "NULL",          "LEFT_PAREN",  
  "RIGHT_PAREN",   "COMMA",         "ELLIPSIS",      "EQUALS",      
  "SCOPE_OP",      "DOCUCOMMENT",   "INHERITS",      "NICKNAME",    
  "CBLOCK_START",  "CBLOCK_CLOSE",  "BLOB",          "error",       
  "result",        "file",          "major_block",   "parcel_definition",
  "class_declaration",  "class_head",    "class_defs",    "var_declaration_statement",
  "subroutine_declaration_statement",  "type",          "param_variable",  "param_list",  
  "param_list_elems",  "docucomment",   "cblock",        "type_qualifier",
  "type_qualifier_list",  "qualified_id",  "exposure_specifier",  "declaration_modifier_list",
  "nickname",      "class_inheritance",  "declarator",    "type_name",   
  "asterisk_postfix",  "array_postfix",  "declaration_modifier",  "array_postfix_elem",
  "scalar_constant",  "blob",        
};
#endif /* NDEBUG */

#ifndef NDEBUG
/* For tracing reduce actions, the names of all rules are required.
*/
static const char *const yyRuleName[] = {
 /*   0 */ "result ::= type",
 /*   1 */ "result ::= param_list",
 /*   2 */ "result ::= param_variable",
 /*   3 */ "result ::= docucomment",
 /*   4 */ "result ::= parcel_definition",
 /*   5 */ "result ::= cblock",
 /*   6 */ "result ::= var_declaration_statement",
 /*   7 */ "result ::= subroutine_declaration_statement",
 /*   8 */ "result ::= class_declaration",
 /*   9 */ "result ::= file",
 /*  10 */ "file ::= FILE_START parcel_definition",
 /*  11 */ "file ::= file major_block",
 /*  12 */ "major_block ::= class_declaration",
 /*  13 */ "major_block ::= cblock",
 /*  14 */ "parcel_definition ::= PARCEL qualified_id SEMICOLON",
 /*  15 */ "class_declaration ::= class_defs RIGHT_CURLY_BRACE",
 /*  16 */ "class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id nickname class_inheritance",
 /*  17 */ "class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id nickname class_inheritance",
 /*  18 */ "class_head ::= docucomment declaration_modifier_list CLASS qualified_id nickname class_inheritance",
 /*  19 */ "class_head ::= declaration_modifier_list CLASS qualified_id nickname class_inheritance",
 /*  20 */ "class_head ::= docucomment exposure_specifier CLASS qualified_id nickname class_inheritance",
 /*  21 */ "class_head ::= exposure_specifier CLASS qualified_id nickname class_inheritance",
 /*  22 */ "class_head ::= docucomment CLASS qualified_id nickname class_inheritance",
 /*  23 */ "class_head ::= CLASS qualified_id nickname class_inheritance",
 /*  24 */ "class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id class_inheritance",
 /*  25 */ "class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id class_inheritance",
 /*  26 */ "class_head ::= docucomment declaration_modifier_list CLASS qualified_id class_inheritance",
 /*  27 */ "class_head ::= declaration_modifier_list CLASS qualified_id class_inheritance",
 /*  28 */ "class_head ::= docucomment exposure_specifier CLASS qualified_id class_inheritance",
 /*  29 */ "class_head ::= exposure_specifier CLASS qualified_id class_inheritance",
 /*  30 */ "class_head ::= docucomment CLASS qualified_id class_inheritance",
 /*  31 */ "class_head ::= CLASS qualified_id class_inheritance",
 /*  32 */ "class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id nickname",
 /*  33 */ "class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id nickname",
 /*  34 */ "class_head ::= docucomment declaration_modifier_list CLASS qualified_id nickname",
 /*  35 */ "class_head ::= declaration_modifier_list CLASS qualified_id nickname",
 /*  36 */ "class_head ::= docucomment exposure_specifier CLASS qualified_id nickname",
 /*  37 */ "class_head ::= exposure_specifier CLASS qualified_id nickname",
 /*  38 */ "class_head ::= docucomment CLASS qualified_id nickname",
 /*  39 */ "class_head ::= CLASS qualified_id nickname",
 /*  40 */ "class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id",
 /*  41 */ "class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id",
 /*  42 */ "class_head ::= docucomment declaration_modifier_list CLASS qualified_id",
 /*  43 */ "class_head ::= declaration_modifier_list CLASS qualified_id",
 /*  44 */ "class_head ::= docucomment exposure_specifier CLASS qualified_id",
 /*  45 */ "class_head ::= exposure_specifier CLASS qualified_id",
 /*  46 */ "class_head ::= docucomment CLASS qualified_id",
 /*  47 */ "class_head ::= CLASS qualified_id",
 /*  48 */ "class_defs ::= class_head LEFT_CURLY_BRACE",
 /*  49 */ "class_defs ::= class_defs var_declaration_statement",
 /*  50 */ "class_defs ::= class_defs subroutine_declaration_statement",
 /*  51 */ "var_declaration_statement ::= type declarator SEMICOLON",
 /*  52 */ "var_declaration_statement ::= declaration_modifier_list type declarator SEMICOLON",
 /*  53 */ "var_declaration_statement ::= exposure_specifier declaration_modifier_list type declarator SEMICOLON",
 /*  54 */ "subroutine_declaration_statement ::= type declarator param_list SEMICOLON",
 /*  55 */ "subroutine_declaration_statement ::= declaration_modifier_list type declarator param_list SEMICOLON",
 /*  56 */ "subroutine_declaration_statement ::= exposure_specifier declaration_modifier_list type declarator param_list SEMICOLON",
 /*  57 */ "subroutine_declaration_statement ::= exposure_specifier type declarator param_list SEMICOLON",
 /*  58 */ "subroutine_declaration_statement ::= docucomment type declarator param_list SEMICOLON",
 /*  59 */ "subroutine_declaration_statement ::= docucomment declaration_modifier_list type declarator param_list SEMICOLON",
 /*  60 */ "subroutine_declaration_statement ::= docucomment exposure_specifier declaration_modifier_list type declarator param_list SEMICOLON",
 /*  61 */ "subroutine_declaration_statement ::= docucomment exposure_specifier type declarator param_list SEMICOLON",
 /*  62 */ "type ::= type_name",
 /*  63 */ "type ::= type_name asterisk_postfix",
 /*  64 */ "type ::= type_name array_postfix",
 /*  65 */ "type ::= type_qualifier_list type_name",
 /*  66 */ "type ::= type_qualifier_list type_name asterisk_postfix",
 /*  67 */ "type ::= type_qualifier_list type_name array_postfix",
 /*  68 */ "type_name ::= VOID",
 /*  69 */ "type_name ::= VA_LIST",
 /*  70 */ "type_name ::= INTEGER_TYPE_NAME",
 /*  71 */ "type_name ::= FLOAT_TYPE_NAME",
 /*  72 */ "type_name ::= IDENTIFIER",
 /*  73 */ "exposure_specifier ::= PUBLIC",
 /*  74 */ "type_qualifier ::= CONST",
 /*  75 */ "type_qualifier ::= NULLABLE",
 /*  76 */ "type_qualifier ::= INCREMENTED",
 /*  77 */ "type_qualifier ::= DECREMENTED",
 /*  78 */ "type_qualifier_list ::= type_qualifier",
 /*  79 */ "type_qualifier_list ::= type_qualifier_list type_qualifier",
 /*  80 */ "declaration_modifier ::= INERT",
 /*  81 */ "declaration_modifier ::= INLINE",
 /*  82 */ "declaration_modifier ::= ABSTRACT",
 /*  83 */ "declaration_modifier ::= FINAL",
 /*  84 */ "declaration_modifier_list ::= declaration_modifier",
 /*  85 */ "declaration_modifier_list ::= declaration_modifier_list declaration_modifier",
 /*  86 */ "asterisk_postfix ::= ASTERISK",
 /*  87 */ "asterisk_postfix ::= asterisk_postfix ASTERISK",
 /*  88 */ "array_postfix_elem ::= LEFT_SQUARE_BRACKET RIGHT_SQUARE_BRACKET",
 /*  89 */ "array_postfix_elem ::= LEFT_SQUARE_BRACKET INTEGER_LITERAL RIGHT_SQUARE_BRACKET",
 /*  90 */ "array_postfix ::= array_postfix_elem",
 /*  91 */ "array_postfix ::= array_postfix array_postfix_elem",
 /*  92 */ "scalar_constant ::= HEX_LITERAL",
 /*  93 */ "scalar_constant ::= FLOAT_LITERAL",
 /*  94 */ "scalar_constant ::= INTEGER_LITERAL",
 /*  95 */ "scalar_constant ::= STRING_LITERAL",
 /*  96 */ "scalar_constant ::= TRUE",
 /*  97 */ "scalar_constant ::= FALSE",
 /*  98 */ "scalar_constant ::= NULL",
 /*  99 */ "declarator ::= IDENTIFIER",
 /* 100 */ "param_variable ::= type declarator",
 /* 101 */ "param_list ::= LEFT_PAREN RIGHT_PAREN",
 /* 102 */ "param_list ::= LEFT_PAREN param_list_elems RIGHT_PAREN",
 /* 103 */ "param_list ::= LEFT_PAREN param_list_elems COMMA ELLIPSIS RIGHT_PAREN",
 /* 104 */ "param_list_elems ::= param_list_elems COMMA param_variable",
 /* 105 */ "param_list_elems ::= param_list_elems COMMA param_variable EQUALS scalar_constant",
 /* 106 */ "param_list_elems ::= param_variable",
 /* 107 */ "param_list_elems ::= param_variable EQUALS scalar_constant",
 /* 108 */ "qualified_id ::= IDENTIFIER",
 /* 109 */ "qualified_id ::= qualified_id SCOPE_OP IDENTIFIER",
 /* 110 */ "docucomment ::= DOCUCOMMENT",
 /* 111 */ "class_inheritance ::= INHERITS qualified_id",
 /* 112 */ "nickname ::= NICKNAME IDENTIFIER",
 /* 113 */ "cblock ::= CBLOCK_START blob CBLOCK_CLOSE",
 /* 114 */ "cblock ::= CBLOCK_START CBLOCK_CLOSE",
 /* 115 */ "blob ::= BLOB",
 /* 116 */ "blob ::= blob BLOB",
};
#endif /* NDEBUG */


#if YYSTACKDEPTH<=0
/*
** Try to increase the size of the parser stack.  Return the number
** of errors.  Return 0 on success.
*/
static int yyGrowStack(yyParser *p){
  int newSize;
  int idx;
  yyStackEntry *pNew;

  newSize = p->yystksz*2 + 100;
  idx = p->yytos ? (int)(p->yytos - p->yystack) : 0;
  if( p->yystack==&p->yystk0 ){
    pNew = malloc(newSize*sizeof(pNew[0]));
    if( pNew ) pNew[0] = p->yystk0;
  }else{
    pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
  }
  if( pNew ){
    p->yystack = pNew;
    p->yytos = &p->yystack[idx];
#ifndef NDEBUG
    if( yyTraceFILE ){
      fprintf(yyTraceFILE,"%sStack grows from %d to %d entries.\n",
              yyTracePrompt, p->yystksz, newSize);
    }
#endif
    p->yystksz = newSize;
  }
  return pNew==0; 
}
#endif

/* Datatype of the argument to the memory allocated passed as the
** second argument to CFCParseHeaderAlloc() below.  This can be changed by
** putting an appropriate #define in the %include section of the input
** grammar.
*/
#ifndef YYMALLOCARGTYPE
# define YYMALLOCARGTYPE size_t
#endif

/* 
** This function allocates a new parser.
** The only argument is a pointer to a function which works like
** malloc.
**
** Inputs:
** A pointer to the function used to allocate memory.
**
** Outputs:
** A pointer to a parser.  This pointer is used in subsequent calls
** to CFCParseHeader and CFCParseHeaderFree.
*/
void *CFCParseHeaderAlloc(void *(*mallocProc)(YYMALLOCARGTYPE)){
  yyParser *pParser;
  pParser = (yyParser*)(*mallocProc)( (YYMALLOCARGTYPE)sizeof(yyParser) );
  if( pParser ){
#ifdef YYTRACKMAXSTACKDEPTH
    pParser->yyhwm = 0;
#endif
#if YYSTACKDEPTH<=0
    pParser->yytos = NULL;
    pParser->yystack = NULL;
    pParser->yystksz = 0;
    if( yyGrowStack(pParser) ){
      pParser->yystack = &pParser->yystk0;
      pParser->yystksz = 1;
    }
#endif
#ifndef YYNOERRORRECOVERY
    pParser->yyerrcnt = -1;
#endif
    pParser->yytos = pParser->yystack;
    pParser->yystack[0].stateno = 0;
    pParser->yystack[0].major = 0;
  }
  return pParser;
}

/* The following function deletes the "minor type" or semantic value
** associated with a symbol.  The symbol can be either a terminal
** or nonterminal. "yymajor" is the symbol code, and "yypminor" is
** a pointer to the value to be deleted.  The code used to do the 
** deletions is derived from the %destructor and/or %token_destructor
** directives of the input grammar.
*/
static void yy_destructor(
  yyParser *yypParser,    /* The parser */
  YYCODETYPE yymajor,     /* Type code for object to destroy */
  YYMINORTYPE *yypminor   /* The object to be destroyed */
){
  CFCParseHeaderARG_FETCH;
  switch( yymajor ){
    /* Here is inserted the actions which take place when a
    ** terminal or non-terminal is destroyed.  This can happen
    ** when the symbol is popped from the stack during a
    ** reduce or during error processing or when a parser is 
    ** being destroyed before it is finished parsing.
    **
    ** Note: during a reduce, the only symbols destroyed are those
    ** which appear on the RHS of the rule, but which are *not* used
    ** inside the C code.
    */
/********* Begin destructor definitions ***************************************/
    case 44: /* result */
{
#line 237 "../src/CFCParseHeader.y"

    (void)state; /* Suppress unused variable warning. */
    CFCBase_decref((CFCBase*)(yypminor->yy82));

#line 1043 "../src/CFCParseHeader.c"
}
      break;
    case 45: /* file */
{
#line 241 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy51)); 
#line 1050 "../src/CFCParseHeader.c"
}
      break;
    case 46: /* major_block */
    case 52: /* subroutine_declaration_statement */
{
#line 242 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy82)); 
#line 1058 "../src/CFCParseHeader.c"
}
      break;
    case 47: /* parcel_definition */
{
#line 243 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy14)); 
#line 1065 "../src/CFCParseHeader.c"
}
      break;
    case 48: /* class_declaration */
    case 49: /* class_head */
    case 50: /* class_defs */
{
#line 244 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy141)); 
#line 1074 "../src/CFCParseHeader.c"
}
      break;
    case 51: /* var_declaration_statement */
    case 54: /* param_variable */
{
#line 247 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy57)); 
#line 1082 "../src/CFCParseHeader.c"
}
      break;
    case 53: /* type */
{
#line 249 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy41)); 
#line 1089 "../src/CFCParseHeader.c"
}
      break;
    case 55: /* param_list */
    case 56: /* param_list_elems */
{
#line 251 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy96)); 
#line 1097 "../src/CFCParseHeader.c"
}
      break;
    case 57: /* docucomment */
{
#line 253 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy73)); 
#line 1104 "../src/CFCParseHeader.c"
}
      break;
    case 58: /* cblock */
{
#line 254 "../src/CFCParseHeader.y"
 CFCBase_decref((CFCBase*)(yypminor->yy117)); 
#line 1111 "../src/CFCParseHeader.c"
}
      break;
/********* End destructor definitions *****************************************/
    default:  break;   /* If no destructor action specified: do nothing */
  }
}

/*
** Pop the parser's stack once.
**
** If there is a destructor routine associated with the token which
** is popped from the stack, then call it.
*/
static void yy_pop_parser_stack(yyParser *pParser){
  yyStackEntry *yytos;
  assert( pParser->yytos!=0 );
  assert( pParser->yytos > pParser->yystack );
  yytos = pParser->yytos--;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sPopping %s\n",
      yyTracePrompt,
      yyTokenName[yytos->major]);
  }
#endif
  yy_destructor(pParser, yytos->major, &yytos->minor);
}

/* 
** Deallocate and destroy a parser.  Destructors are called for
** all stack elements before shutting the parser down.
**
** If the YYPARSEFREENEVERNULL macro exists (for example because it
** is defined in a %include section of the input grammar) then it is
** assumed that the input pointer is never NULL.
*/
void CFCParseHeaderFree(
  void *p,                    /* The parser to be deleted */
  void (*freeProc)(void*)     /* Function used to reclaim memory */
){
  yyParser *pParser = (yyParser*)p;
#ifndef YYPARSEFREENEVERNULL
  if( pParser==0 ) return;
#endif
  while( pParser->yytos>pParser->yystack ) yy_pop_parser_stack(pParser);
#if YYSTACKDEPTH<=0
  if( pParser->yystack!=&pParser->yystk0 ) free(pParser->yystack);
#endif
  (*freeProc)((void*)pParser);
}

/*
** Return the peak depth of the stack for a parser.
*/
#ifdef YYTRACKMAXSTACKDEPTH
int CFCParseHeaderStackPeak(void *p){
  yyParser *pParser = (yyParser*)p;
  return pParser->yyhwm;
}
#endif

/*
** Find the appropriate action for a parser given the terminal
** look-ahead token iLookAhead.
*/
static unsigned int yy_find_shift_action(
  yyParser *pParser,        /* The parser */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
  int stateno = pParser->yytos->stateno;
 
  if( stateno>=YY_MIN_REDUCE ) return stateno;
  assert( stateno <= YY_SHIFT_COUNT );
  do{
    i = yy_shift_ofst[stateno];
    if( i==YY_SHIFT_USE_DFLT ) return yy_default[stateno];
    assert( iLookAhead!=YYNOCODE );
    i += iLookAhead;
    if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
      if( iLookAhead>0 ){
#ifdef YYFALLBACK
        YYCODETYPE iFallback;            /* Fallback token */
        if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
               && (iFallback = yyFallback[iLookAhead])!=0 ){
#ifndef NDEBUG
          if( yyTraceFILE ){
            fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
               yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
          }
#endif
          assert( yyFallback[iFallback]==0 ); /* Fallback loop must terminate */
          iLookAhead = iFallback;
          continue;
        }
#endif
#ifdef YYWILDCARD
        {
          int j = i - iLookAhead + YYWILDCARD;
          if( 
#if YY_SHIFT_MIN+YYWILDCARD<0
            j>=0 &&
#endif
#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
            j<YY_ACTTAB_COUNT &&
#endif
            yy_lookahead[j]==YYWILDCARD
          ){
#ifndef NDEBUG
            if( yyTraceFILE ){
              fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
                 yyTracePrompt, yyTokenName[iLookAhead],
                 yyTokenName[YYWILDCARD]);
            }
#endif /* NDEBUG */
            return yy_action[j];
          }
        }
#endif /* YYWILDCARD */
      }
      return yy_default[stateno];
    }else{
      return yy_action[i];
    }
  }while(1);
}

/*
** Find the appropriate action for a parser given the non-terminal
** look-ahead token iLookAhead.
*/
static int yy_find_reduce_action(
  int stateno,              /* Current state number */
  YYCODETYPE iLookAhead     /* The look-ahead token */
){
  int i;
#ifdef YYERRORSYMBOL
  if( stateno>YY_REDUCE_COUNT ){
    return yy_default[stateno];
  }
#else
  assert( stateno<=YY_REDUCE_COUNT );
#endif
  i = yy_reduce_ofst[stateno];
  assert( i!=YY_REDUCE_USE_DFLT );
  assert( iLookAhead!=YYNOCODE );
  i += iLookAhead;
#ifdef YYERRORSYMBOL
  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
    return yy_default[stateno];
  }
#else
  assert( i>=0 && i<YY_ACTTAB_COUNT );
  assert( yy_lookahead[i]==iLookAhead );
#endif
  return yy_action[i];
}

/*
** The following routine is called if the stack overflows.
*/
static void yyStackOverflow(yyParser *yypParser){
   CFCParseHeaderARG_FETCH;
   yypParser->yytos--;
#ifndef NDEBUG
   if( yyTraceFILE ){
     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
   }
#endif
   while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
   /* Here code is inserted which will execute if the parser
   ** stack every overflows */
/******** Begin %stack_overflow code ******************************************/
/******** End %stack_overflow code ********************************************/
   CFCParseHeaderARG_STORE; /* Suppress warning about unused %extra_argument var */
}

/*
** Print tracing information for a SHIFT action
*/
#ifndef NDEBUG
static void yyTraceShift(yyParser *yypParser, int yyNewState){
  if( yyTraceFILE ){
    if( yyNewState<YYNSTATE ){
      fprintf(yyTraceFILE,"%sShift '%s', go to state %d\n",
         yyTracePrompt,yyTokenName[yypParser->yytos->major],
         yyNewState);
    }else{
      fprintf(yyTraceFILE,"%sShift '%s'\n",
         yyTracePrompt,yyTokenName[yypParser->yytos->major]);
    }
  }
}
#else
# define yyTraceShift(X,Y)
#endif

/*
** Perform a shift action.
*/
static void yy_shift(
  yyParser *yypParser,          /* The parser to be shifted */
  int yyNewState,               /* The new state to shift in */
  int yyMajor,                  /* The major token to shift in */
  CFCParseHeaderTOKENTYPE yyMinor        /* The minor token to shift in */
){
  yyStackEntry *yytos;
  yypParser->yytos++;
#ifdef YYTRACKMAXSTACKDEPTH
  if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
    yypParser->yyhwm++;
    assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack) );
  }
#endif
#if YYSTACKDEPTH>0 
  if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH] ){
    yyStackOverflow(yypParser);
    return;
  }
#else
  if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz] ){
    if( yyGrowStack(yypParser) ){
      yyStackOverflow(yypParser);
      return;
    }
  }
#endif
  if( yyNewState > YY_MAX_SHIFT ){
    yyNewState += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
  }
  yytos = yypParser->yytos;
  yytos->stateno = (YYACTIONTYPE)yyNewState;
  yytos->major = (YYCODETYPE)yyMajor;
  yytos->minor.yy0 = yyMinor;
  yyTraceShift(yypParser, yyNewState);
}

/* The following table contains information about every rule that
** is used during the reduce.
*/
static const struct {
  YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
  unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
} yyRuleInfo[] = {
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 44, 1 },
  { 45, 2 },
  { 45, 2 },
  { 46, 1 },
  { 46, 1 },
  { 47, 3 },
  { 48, 2 },
  { 49, 7 },
  { 49, 6 },
  { 49, 6 },
  { 49, 5 },
  { 49, 6 },
  { 49, 5 },
  { 49, 5 },
  { 49, 4 },
  { 49, 6 },
  { 49, 5 },
  { 49, 5 },
  { 49, 4 },
  { 49, 5 },
  { 49, 4 },
  { 49, 4 },
  { 49, 3 },
  { 49, 6 },
  { 49, 5 },
  { 49, 5 },
  { 49, 4 },
  { 49, 5 },
  { 49, 4 },
  { 49, 4 },
  { 49, 3 },
  { 49, 5 },
  { 49, 4 },
  { 49, 4 },
  { 49, 3 },
  { 49, 4 },
  { 49, 3 },
  { 49, 3 },
  { 49, 2 },
  { 50, 2 },
  { 50, 2 },
  { 50, 2 },
  { 51, 3 },
  { 51, 4 },
  { 51, 5 },
  { 52, 4 },
  { 52, 5 },
  { 52, 6 },
  { 52, 5 },
  { 52, 5 },
  { 52, 6 },
  { 52, 7 },
  { 52, 6 },
  { 53, 1 },
  { 53, 2 },
  { 53, 2 },
  { 53, 2 },
  { 53, 3 },
  { 53, 3 },
  { 67, 1 },
  { 67, 1 },
  { 67, 1 },
  { 67, 1 },
  { 67, 1 },
  { 62, 1 },
  { 59, 1 },
  { 59, 1 },
  { 59, 1 },
  { 59, 1 },
  { 60, 1 },
  { 60, 2 },
  { 70, 1 },
  { 70, 1 },
  { 70, 1 },
  { 70, 1 },
  { 63, 1 },
  { 63, 2 },
  { 68, 1 },
  { 68, 2 },
  { 71, 2 },
  { 71, 3 },
  { 69, 1 },
  { 69, 2 },
  { 72, 1 },
  { 72, 1 },
  { 72, 1 },
  { 72, 1 },
  { 72, 1 },
  { 72, 1 },
  { 72, 1 },
  { 66, 1 },
  { 54, 2 },
  { 55, 2 },
  { 55, 3 },
  { 55, 5 },
  { 56, 3 },
  { 56, 5 },
  { 56, 1 },
  { 56, 3 },
  { 61, 1 },
  { 61, 3 },
  { 57, 1 },
  { 65, 2 },
  { 64, 2 },
  { 58, 3 },
  { 58, 2 },
  { 73, 1 },
  { 73, 2 },
};

static void yy_accept(yyParser*);  /* Forward Declaration */

/*
** Perform a reduce action and the shift that must immediately
** follow the reduce.
*/
static void yy_reduce(
  yyParser *yypParser,         /* The parser */
  unsigned int yyruleno        /* Number of the rule by which to reduce */
){
  int yygoto;                     /* The next state */
  int yyact;                      /* The next action */
  yyStackEntry *yymsp;            /* The top of the parser's stack */
  int yysize;                     /* Amount to pop the stack */
  CFCParseHeaderARG_FETCH;
  yymsp = yypParser->yytos;
#ifndef NDEBUG
  if( yyTraceFILE && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
    yysize = yyRuleInfo[yyruleno].nrhs;
    fprintf(yyTraceFILE, "%sReduce [%s], go to state %d.\n", yyTracePrompt,
      yyRuleName[yyruleno], yymsp[-yysize].stateno);
  }
#endif /* NDEBUG */

  /* Check that the stack is large enough to grow by a single entry
  ** if the RHS of the rule is empty.  This ensures that there is room
  ** enough on the stack to push the LHS value */
  if( yyRuleInfo[yyruleno].nrhs==0 ){
#ifdef YYTRACKMAXSTACKDEPTH
    if( (int)(yypParser->yytos - yypParser->yystack)>yypParser->yyhwm ){
      yypParser->yyhwm++;
      assert( yypParser->yyhwm == (int)(yypParser->yytos - yypParser->yystack));
    }
#endif
#if YYSTACKDEPTH>0 
    if( yypParser->yytos>=&yypParser->yystack[YYSTACKDEPTH-1] ){
      yyStackOverflow(yypParser);
      return;
    }
#else
    if( yypParser->yytos>=&yypParser->yystack[yypParser->yystksz-1] ){
      if( yyGrowStack(yypParser) ){
        yyStackOverflow(yypParser);
        return;
      }
      yymsp = yypParser->yytos;
    }
#endif
  }

  switch( yyruleno ){
  /* Beginning here are the reduction cases.  A typical example
  ** follows:
  **   case 0:
  **  #line <lineno> <grammarfile>
  **     { ... }           // User supplied code
  **  #line <lineno> <thisfile>
  **     break;
  */
/********** Begin reduce actions **********************************************/
        YYMINORTYPE yylhsminor;
      case 0: /* result ::= type */
#line 257 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy41);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy41);
}
#line 1542 "../src/CFCParseHeader.c"
        break;
      case 1: /* result ::= param_list */
#line 262 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy96);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy96);
}
#line 1550 "../src/CFCParseHeader.c"
        break;
      case 2: /* result ::= param_variable */
      case 6: /* result ::= var_declaration_statement */ yytestcase(yyruleno==6);
#line 267 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy57);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy57);
}
#line 1559 "../src/CFCParseHeader.c"
        break;
      case 3: /* result ::= docucomment */
#line 272 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy73);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy73);
}
#line 1567 "../src/CFCParseHeader.c"
        break;
      case 4: /* result ::= parcel_definition */
#line 277 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy14);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy14);
}
#line 1575 "../src/CFCParseHeader.c"
        break;
      case 5: /* result ::= cblock */
#line 282 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy117);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy117);
}
#line 1583 "../src/CFCParseHeader.c"
        break;
      case 7: /* result ::= subroutine_declaration_statement */
#line 292 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy82);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy82);
}
#line 1591 "../src/CFCParseHeader.c"
        break;
      case 8: /* result ::= class_declaration */
#line 297 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy141);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy141);
}
#line 1599 "../src/CFCParseHeader.c"
        break;
      case 9: /* result ::= file */
#line 302 "../src/CFCParseHeader.y"
{
    CFCParser_set_result(state, (CFCBase*)yymsp[0].minor.yy51);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy51);
}
#line 1607 "../src/CFCParseHeader.c"
        break;
      case 10: /* file ::= FILE_START parcel_definition */
#line 309 "../src/CFCParseHeader.y"
{
    yymsp[-1].minor.yy51 = CFCFile_new(yymsp[0].minor.yy14, CFCParser_get_file_spec(state));
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy14);
}
#line 1615 "../src/CFCParseHeader.c"
        break;
      case 11: /* file ::= file major_block */
#line 314 "../src/CFCParseHeader.y"
{
    yylhsminor.yy51 = yymsp[-1].minor.yy51;
    CFCFile_add_block(yylhsminor.yy51, yymsp[0].minor.yy82);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy82);
}
#line 1624 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy51 = yylhsminor.yy51;
        break;
      case 12: /* major_block ::= class_declaration */
#line 320 "../src/CFCParseHeader.y"
{ yylhsminor.yy82 = (CFCBase*)yymsp[0].minor.yy141; }
#line 1630 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy82 = yylhsminor.yy82;
        break;
      case 13: /* major_block ::= cblock */
#line 321 "../src/CFCParseHeader.y"
{ yylhsminor.yy82 = (CFCBase*)yymsp[0].minor.yy117; }
#line 1636 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy82 = yylhsminor.yy82;
        break;
      case 14: /* parcel_definition ::= PARCEL qualified_id SEMICOLON */
#line 324 "../src/CFCParseHeader.y"
{
    yymsp[-2].minor.yy14 = CFCParcel_fetch(yymsp[-1].minor.yy0);
    if (!yymsp[-2].minor.yy14) {
        /* Allow unregistered parcels to simplify tests. */
        yymsp[-2].minor.yy14 = CFCParcel_new(yymsp[-1].minor.yy0, NULL, NULL, NULL, NULL);
        CFCParcel_register(yymsp[-2].minor.yy14);
    }
    else {
        CFCBase_incref((CFCBase*)yymsp[-2].minor.yy14);
    }
    CFCParser_set_parcel(state, yymsp[-2].minor.yy14);
}
#line 1653 "../src/CFCParseHeader.c"
        break;
      case 15: /* class_declaration ::= class_defs RIGHT_CURLY_BRACE */
#line 338 "../src/CFCParseHeader.y"
{
    yylhsminor.yy141 = yymsp[-1].minor.yy141;
    CFCParser_set_class_name(state, NULL);
}
#line 1661 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy141 = yylhsminor.yy141;
        break;
      case 16: /* class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id nickname class_inheritance */
#line 343 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-6].minor.yy73,    yymsp[-5].minor.yy0,    yymsp[-4].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1667 "../src/CFCParseHeader.c"
  yymsp[-6].minor.yy141 = yylhsminor.yy141;
        break;
      case 17: /* class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id nickname class_inheritance */
#line 344 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-5].minor.yy0,    yymsp[-4].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1673 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy141 = yylhsminor.yy141;
        break;
      case 18: /* class_head ::= docucomment declaration_modifier_list CLASS qualified_id nickname class_inheritance */
#line 345 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-5].minor.yy73,    NULL, yymsp[-4].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1679 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy141 = yylhsminor.yy141;
        break;
      case 19: /* class_head ::= declaration_modifier_list CLASS qualified_id nickname class_inheritance */
#line 346 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, NULL, yymsp[-4].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1685 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 20: /* class_head ::= docucomment exposure_specifier CLASS qualified_id nickname class_inheritance */
#line 347 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-5].minor.yy73,    yymsp[-4].minor.yy0,    NULL, yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1691 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy141 = yylhsminor.yy141;
        break;
      case 21: /* class_head ::= exposure_specifier CLASS qualified_id nickname class_inheritance */
#line 348 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-4].minor.yy0,    NULL, yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1697 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 22: /* class_head ::= docucomment CLASS qualified_id nickname class_inheritance */
#line 349 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    NULL, NULL, yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1703 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 23: /* class_head ::= CLASS qualified_id nickname class_inheritance */
#line 350 "../src/CFCParseHeader.y"
{ yymsp[-3].minor.yy141 = S_start_class(state, NULL, NULL, NULL, yymsp[-2].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0   ); }
#line 1709 "../src/CFCParseHeader.c"
        break;
      case 24: /* class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id class_inheritance */
#line 351 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-5].minor.yy73,    yymsp[-4].minor.yy0,    yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1714 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy141 = yylhsminor.yy141;
        break;
      case 25: /* class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id class_inheritance */
#line 352 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-4].minor.yy0,    yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1720 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 26: /* class_head ::= docucomment declaration_modifier_list CLASS qualified_id class_inheritance */
#line 353 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    NULL, yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1726 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 27: /* class_head ::= declaration_modifier_list CLASS qualified_id class_inheritance */
#line 354 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, NULL, yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1732 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 28: /* class_head ::= docucomment exposure_specifier CLASS qualified_id class_inheritance */
#line 355 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    yymsp[-3].minor.yy0,    NULL, yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1738 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 29: /* class_head ::= exposure_specifier CLASS qualified_id class_inheritance */
#line 356 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-3].minor.yy0,    NULL, yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1744 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 30: /* class_head ::= docucomment CLASS qualified_id class_inheritance */
#line 357 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-3].minor.yy73,    NULL, NULL, yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1750 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 31: /* class_head ::= CLASS qualified_id class_inheritance */
#line 358 "../src/CFCParseHeader.y"
{ yymsp[-2].minor.yy141 = S_start_class(state, NULL, NULL, NULL, yymsp[-1].minor.yy0,    NULL, yymsp[0].minor.yy0   ); }
#line 1756 "../src/CFCParseHeader.c"
        break;
      case 32: /* class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id nickname */
#line 359 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-5].minor.yy73,    yymsp[-4].minor.yy0,    yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1761 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy141 = yylhsminor.yy141;
        break;
      case 33: /* class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id nickname */
#line 360 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-4].minor.yy0,    yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1767 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 34: /* class_head ::= docucomment declaration_modifier_list CLASS qualified_id nickname */
#line 361 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    NULL, yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1773 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 35: /* class_head ::= declaration_modifier_list CLASS qualified_id nickname */
#line 362 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, NULL, yymsp[-3].minor.yy0,    yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1779 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 36: /* class_head ::= docucomment exposure_specifier CLASS qualified_id nickname */
#line 363 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    yymsp[-3].minor.yy0,    NULL, yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1785 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 37: /* class_head ::= exposure_specifier CLASS qualified_id nickname */
#line 364 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-3].minor.yy0,    NULL, yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1791 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 38: /* class_head ::= docucomment CLASS qualified_id nickname */
#line 365 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-3].minor.yy73,    NULL, NULL, yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1797 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 39: /* class_head ::= CLASS qualified_id nickname */
#line 366 "../src/CFCParseHeader.y"
{ yymsp[-2].minor.yy141 = S_start_class(state, NULL, NULL, NULL, yymsp[-1].minor.yy0,    yymsp[0].minor.yy0,    NULL ); }
#line 1803 "../src/CFCParseHeader.c"
        break;
      case 40: /* class_head ::= docucomment exposure_specifier declaration_modifier_list CLASS qualified_id */
#line 367 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-4].minor.yy73,    yymsp[-3].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1808 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy141 = yylhsminor.yy141;
        break;
      case 41: /* class_head ::= exposure_specifier declaration_modifier_list CLASS qualified_id */
#line 368 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-3].minor.yy0,    yymsp[-2].minor.yy0,    yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1814 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 42: /* class_head ::= docucomment declaration_modifier_list CLASS qualified_id */
#line 369 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-3].minor.yy73,    NULL, yymsp[-2].minor.yy0,    yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1820 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 43: /* class_head ::= declaration_modifier_list CLASS qualified_id */
#line 370 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, NULL, yymsp[-2].minor.yy0,    yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1826 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy141 = yylhsminor.yy141;
        break;
      case 44: /* class_head ::= docucomment exposure_specifier CLASS qualified_id */
#line 371 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-3].minor.yy73,    yymsp[-2].minor.yy0,    NULL, yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1832 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy141 = yylhsminor.yy141;
        break;
      case 45: /* class_head ::= exposure_specifier CLASS qualified_id */
#line 372 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, NULL, yymsp[-2].minor.yy0,    NULL, yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1838 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy141 = yylhsminor.yy141;
        break;
      case 46: /* class_head ::= docucomment CLASS qualified_id */
#line 373 "../src/CFCParseHeader.y"
{ yylhsminor.yy141 = S_start_class(state, yymsp[-2].minor.yy73,    NULL, NULL, yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1844 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy141 = yylhsminor.yy141;
        break;
      case 47: /* class_head ::= CLASS qualified_id */
#line 374 "../src/CFCParseHeader.y"
{ yymsp[-1].minor.yy141 = S_start_class(state, NULL, NULL, NULL, yymsp[0].minor.yy0,    NULL, NULL ); }
#line 1850 "../src/CFCParseHeader.c"
        break;
      case 48: /* class_defs ::= class_head LEFT_CURLY_BRACE */
#line 377 "../src/CFCParseHeader.y"
{
    yylhsminor.yy141 = yymsp[-1].minor.yy141;
}
#line 1857 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy141 = yylhsminor.yy141;
        break;
      case 49: /* class_defs ::= class_defs var_declaration_statement */
#line 381 "../src/CFCParseHeader.y"
{
    yylhsminor.yy141 = yymsp[-1].minor.yy141;
    if (CFCVariable_inert(yymsp[0].minor.yy57)) {
        CFCClass_add_inert_var(yylhsminor.yy141, yymsp[0].minor.yy57);
    }
    else {
        CFCClass_add_member_var(yylhsminor.yy141, yymsp[0].minor.yy57);
    }
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy57);
}
#line 1872 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy141 = yylhsminor.yy141;
        break;
      case 50: /* class_defs ::= class_defs subroutine_declaration_statement */
#line 392 "../src/CFCParseHeader.y"
{
    yylhsminor.yy141 = yymsp[-1].minor.yy141;
    if (strcmp(CFCBase_get_cfc_class(yymsp[0].minor.yy82), "Clownfish::CFC::Model::Function") == 0) {
        CFCClass_add_function(yylhsminor.yy141, (CFCFunction*)yymsp[0].minor.yy82);
    }
    else {
        CFCClass_add_method(yylhsminor.yy141, (CFCMethod*)yymsp[0].minor.yy82);
    }
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy82);
}
#line 1887 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy141 = yylhsminor.yy141;
        break;
      case 51: /* var_declaration_statement ::= type declarator SEMICOLON */
#line 405 "../src/CFCParseHeader.y"
{
    yylhsminor.yy57 = S_new_var(CFCParser_dupe(state, "private"), NULL, yymsp[-2].minor.yy41, yymsp[-1].minor.yy0);
}
#line 1895 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy57 = yylhsminor.yy57;
        break;
      case 52: /* var_declaration_statement ::= declaration_modifier_list type declarator SEMICOLON */
#line 411 "../src/CFCParseHeader.y"
{
    yylhsminor.yy57 = S_new_var(CFCParser_dupe(state, "parcel"), yymsp[-3].minor.yy0, yymsp[-2].minor.yy41, yymsp[-1].minor.yy0);
}
#line 1903 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy57 = yylhsminor.yy57;
        break;
      case 53: /* var_declaration_statement ::= exposure_specifier declaration_modifier_list type declarator SEMICOLON */
#line 418 "../src/CFCParseHeader.y"
{
    yylhsminor.yy57 = S_new_var(yymsp[-4].minor.yy0, yymsp[-3].minor.yy0, yymsp[-2].minor.yy41, yymsp[-1].minor.yy0);
}
#line 1911 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy57 = yylhsminor.yy57;
        break;
      case 54: /* subroutine_declaration_statement ::= type declarator param_list SEMICOLON */
#line 424 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, NULL, NULL, NULL, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1919 "../src/CFCParseHeader.c"
  yymsp[-3].minor.yy82 = yylhsminor.yy82;
        break;
      case 55: /* subroutine_declaration_statement ::= declaration_modifier_list type declarator param_list SEMICOLON */
#line 430 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, NULL, NULL, yymsp[-4].minor.yy0, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1927 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy82 = yylhsminor.yy82;
        break;
      case 56: /* subroutine_declaration_statement ::= exposure_specifier declaration_modifier_list type declarator param_list SEMICOLON */
#line 437 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, NULL, yymsp[-5].minor.yy0, yymsp[-4].minor.yy0, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1935 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy82 = yylhsminor.yy82;
        break;
      case 57: /* subroutine_declaration_statement ::= exposure_specifier type declarator param_list SEMICOLON */
#line 443 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, NULL, yymsp[-4].minor.yy0, NULL, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1943 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy82 = yylhsminor.yy82;
        break;
      case 58: /* subroutine_declaration_statement ::= docucomment type declarator param_list SEMICOLON */
#line 449 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, yymsp[-4].minor.yy73, NULL, NULL, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1951 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy82 = yylhsminor.yy82;
        break;
      case 59: /* subroutine_declaration_statement ::= docucomment declaration_modifier_list type declarator param_list SEMICOLON */
#line 456 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, yymsp[-5].minor.yy73, NULL, yymsp[-4].minor.yy0, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1959 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy82 = yylhsminor.yy82;
        break;
      case 60: /* subroutine_declaration_statement ::= docucomment exposure_specifier declaration_modifier_list type declarator param_list SEMICOLON */
#line 464 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, yymsp[-6].minor.yy73, yymsp[-5].minor.yy0, yymsp[-4].minor.yy0, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1967 "../src/CFCParseHeader.c"
  yymsp[-6].minor.yy82 = yylhsminor.yy82;
        break;
      case 61: /* subroutine_declaration_statement ::= docucomment exposure_specifier type declarator param_list SEMICOLON */
#line 471 "../src/CFCParseHeader.y"
{
    yylhsminor.yy82 = S_new_sub(state, yymsp[-5].minor.yy73, yymsp[-4].minor.yy0, NULL, yymsp[-3].minor.yy41, yymsp[-2].minor.yy0, yymsp[-1].minor.yy96);
}
#line 1975 "../src/CFCParseHeader.c"
  yymsp[-5].minor.yy82 = yylhsminor.yy82;
        break;
      case 62: /* type ::= type_name */
#line 476 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, 0, yymsp[0].minor.yy0, NULL, NULL);
}
#line 1983 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy41 = yylhsminor.yy41;
        break;
      case 63: /* type ::= type_name asterisk_postfix */
#line 480 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, 0, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, NULL);
}
#line 1991 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy41 = yylhsminor.yy41;
        break;
      case 64: /* type ::= type_name array_postfix */
#line 484 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, 0, yymsp[-1].minor.yy0, NULL, yymsp[0].minor.yy0);
}
#line 1999 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy41 = yylhsminor.yy41;
        break;
      case 65: /* type ::= type_qualifier_list type_name */
#line 488 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, yymsp[-1].minor.yy8, yymsp[0].minor.yy0, NULL, NULL);
}
#line 2007 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy41 = yylhsminor.yy41;
        break;
      case 66: /* type ::= type_qualifier_list type_name asterisk_postfix */
#line 492 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, yymsp[-2].minor.yy8, yymsp[-1].minor.yy0, yymsp[0].minor.yy0, NULL);
}
#line 2015 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy41 = yylhsminor.yy41;
        break;
      case 67: /* type ::= type_qualifier_list type_name array_postfix */
#line 496 "../src/CFCParseHeader.y"
{
    yylhsminor.yy41 = S_new_type(state, yymsp[-2].minor.yy8, yymsp[-1].minor.yy0, NULL, yymsp[0].minor.yy0);
}
#line 2023 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy41 = yylhsminor.yy41;
        break;
      case 68: /* type_name ::= VOID */
      case 69: /* type_name ::= VA_LIST */ yytestcase(yyruleno==69);
      case 70: /* type_name ::= INTEGER_TYPE_NAME */ yytestcase(yyruleno==70);
      case 71: /* type_name ::= FLOAT_TYPE_NAME */ yytestcase(yyruleno==71);
      case 72: /* type_name ::= IDENTIFIER */ yytestcase(yyruleno==72);
      case 73: /* exposure_specifier ::= PUBLIC */ yytestcase(yyruleno==73);
      case 80: /* declaration_modifier ::= INERT */ yytestcase(yyruleno==80);
      case 81: /* declaration_modifier ::= INLINE */ yytestcase(yyruleno==81);
      case 82: /* declaration_modifier ::= ABSTRACT */ yytestcase(yyruleno==82);
      case 83: /* declaration_modifier ::= FINAL */ yytestcase(yyruleno==83);
      case 84: /* declaration_modifier_list ::= declaration_modifier */ yytestcase(yyruleno==84);
      case 86: /* asterisk_postfix ::= ASTERISK */ yytestcase(yyruleno==86);
      case 90: /* array_postfix ::= array_postfix_elem */ yytestcase(yyruleno==90);
      case 92: /* scalar_constant ::= HEX_LITERAL */ yytestcase(yyruleno==92);
      case 93: /* scalar_constant ::= FLOAT_LITERAL */ yytestcase(yyruleno==93);
      case 94: /* scalar_constant ::= INTEGER_LITERAL */ yytestcase(yyruleno==94);
      case 95: /* scalar_constant ::= STRING_LITERAL */ yytestcase(yyruleno==95);
      case 96: /* scalar_constant ::= TRUE */ yytestcase(yyruleno==96);
      case 97: /* scalar_constant ::= FALSE */ yytestcase(yyruleno==97);
      case 98: /* scalar_constant ::= NULL */ yytestcase(yyruleno==98);
      case 108: /* qualified_id ::= IDENTIFIER */ yytestcase(yyruleno==108);
      case 115: /* blob ::= BLOB */ yytestcase(yyruleno==115);
#line 500 "../src/CFCParseHeader.y"
{ yylhsminor.yy0 = yymsp[0].minor.yy0; }
#line 2050 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 74: /* type_qualifier ::= CONST */
#line 508 "../src/CFCParseHeader.y"
{ yymsp[0].minor.yy8 = CFCTYPE_CONST; }
#line 2056 "../src/CFCParseHeader.c"
        break;
      case 75: /* type_qualifier ::= NULLABLE */
#line 509 "../src/CFCParseHeader.y"
{ yymsp[0].minor.yy8 = CFCTYPE_NULLABLE; }
#line 2061 "../src/CFCParseHeader.c"
        break;
      case 76: /* type_qualifier ::= INCREMENTED */
#line 510 "../src/CFCParseHeader.y"
{ yymsp[0].minor.yy8 = CFCTYPE_INCREMENTED; }
#line 2066 "../src/CFCParseHeader.c"
        break;
      case 77: /* type_qualifier ::= DECREMENTED */
#line 511 "../src/CFCParseHeader.y"
{ yymsp[0].minor.yy8 = CFCTYPE_DECREMENTED; }
#line 2071 "../src/CFCParseHeader.c"
        break;
      case 78: /* type_qualifier_list ::= type_qualifier */
#line 514 "../src/CFCParseHeader.y"
{
    yylhsminor.yy8 = yymsp[0].minor.yy8;
}
#line 2078 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy8 = yylhsminor.yy8;
        break;
      case 79: /* type_qualifier_list ::= type_qualifier_list type_qualifier */
#line 518 "../src/CFCParseHeader.y"
{
    yylhsminor.yy8 = yymsp[-1].minor.yy8;
    yylhsminor.yy8 |= yymsp[0].minor.yy8;
}
#line 2087 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy8 = yylhsminor.yy8;
        break;
      case 85: /* declaration_modifier_list ::= declaration_modifier_list declaration_modifier */
#line 530 "../src/CFCParseHeader.y"
{
    size_t size = strlen(yymsp[-1].minor.yy0) + strlen(yymsp[0].minor.yy0) + 2;
    yylhsminor.yy0 = (char*)CFCParser_allocate(state, size);
    sprintf(yylhsminor.yy0, "%s %s", yymsp[-1].minor.yy0, yymsp[0].minor.yy0);
}
#line 2097 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 87: /* asterisk_postfix ::= asterisk_postfix ASTERISK */
#line 538 "../src/CFCParseHeader.y"
{
    size_t size = strlen(yymsp[-1].minor.yy0) + 2;
    yylhsminor.yy0 = (char*)CFCParser_allocate(state, size);
    sprintf(yylhsminor.yy0, "%s*", yymsp[-1].minor.yy0);
}
#line 2107 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 88: /* array_postfix_elem ::= LEFT_SQUARE_BRACKET RIGHT_SQUARE_BRACKET */
#line 545 "../src/CFCParseHeader.y"
{
    yymsp[-1].minor.yy0 = CFCParser_dupe(state, "[]");
}
#line 2115 "../src/CFCParseHeader.c"
        break;
      case 89: /* array_postfix_elem ::= LEFT_SQUARE_BRACKET INTEGER_LITERAL RIGHT_SQUARE_BRACKET */
#line 549 "../src/CFCParseHeader.y"
{
    size_t size = strlen(yymsp[-1].minor.yy0) + 3;
    yymsp[-2].minor.yy0 = (char*)CFCParser_allocate(state, size);
    sprintf(yymsp[-2].minor.yy0, "[%s]", yymsp[-1].minor.yy0);
}
#line 2124 "../src/CFCParseHeader.c"
        break;
      case 91: /* array_postfix ::= array_postfix array_postfix_elem */
      case 116: /* blob ::= blob BLOB */ yytestcase(yyruleno==116);
#line 557 "../src/CFCParseHeader.y"
{
    size_t size = strlen(yymsp[-1].minor.yy0) + strlen(yymsp[0].minor.yy0) + 1;
    yylhsminor.yy0 = (char*)CFCParser_allocate(state, size);
    sprintf(yylhsminor.yy0, "%s%s", yymsp[-1].minor.yy0, yymsp[0].minor.yy0);
}
#line 2134 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy0 = yylhsminor.yy0;
        break;
      case 99: /* declarator ::= IDENTIFIER */
#line 572 "../src/CFCParseHeader.y"
{
    yylhsminor.yy0 = yymsp[0].minor.yy0;
}
#line 2142 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy0 = yylhsminor.yy0;
        break;
      case 100: /* param_variable ::= type declarator */
#line 577 "../src/CFCParseHeader.y"
{
    yylhsminor.yy57 = S_new_var(NULL, NULL, yymsp[-1].minor.yy41, yymsp[0].minor.yy0);
}
#line 2150 "../src/CFCParseHeader.c"
  yymsp[-1].minor.yy57 = yylhsminor.yy57;
        break;
      case 101: /* param_list ::= LEFT_PAREN RIGHT_PAREN */
#line 582 "../src/CFCParseHeader.y"
{
    yymsp[-1].minor.yy96 = CFCParamList_new(false);
}
#line 2158 "../src/CFCParseHeader.c"
        break;
      case 102: /* param_list ::= LEFT_PAREN param_list_elems RIGHT_PAREN */
#line 586 "../src/CFCParseHeader.y"
{
    yymsp[-2].minor.yy96 = yymsp[-1].minor.yy96;
}
#line 2165 "../src/CFCParseHeader.c"
        break;
      case 103: /* param_list ::= LEFT_PAREN param_list_elems COMMA ELLIPSIS RIGHT_PAREN */
#line 590 "../src/CFCParseHeader.y"
{
    yymsp[-4].minor.yy96 = yymsp[-3].minor.yy96;
    CFCParamList_set_variadic(yymsp[-4].minor.yy96, true);
}
#line 2173 "../src/CFCParseHeader.c"
        break;
      case 104: /* param_list_elems ::= param_list_elems COMMA param_variable */
#line 595 "../src/CFCParseHeader.y"
{
    yylhsminor.yy96 = yymsp[-2].minor.yy96;
    CFCParamList_add_param(yylhsminor.yy96, yymsp[0].minor.yy57, NULL);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy57);
}
#line 2182 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy96 = yylhsminor.yy96;
        break;
      case 105: /* param_list_elems ::= param_list_elems COMMA param_variable EQUALS scalar_constant */
#line 601 "../src/CFCParseHeader.y"
{
    yylhsminor.yy96 = yymsp[-4].minor.yy96;
    CFCParamList_add_param(yylhsminor.yy96, yymsp[-2].minor.yy57, yymsp[0].minor.yy0);
    CFCBase_decref((CFCBase*)yymsp[-2].minor.yy57);
}
#line 2192 "../src/CFCParseHeader.c"
  yymsp[-4].minor.yy96 = yylhsminor.yy96;
        break;
      case 106: /* param_list_elems ::= param_variable */
#line 607 "../src/CFCParseHeader.y"
{
    yylhsminor.yy96 = CFCParamList_new(false);
    CFCParamList_add_param(yylhsminor.yy96, yymsp[0].minor.yy57, NULL);
    CFCBase_decref((CFCBase*)yymsp[0].minor.yy57);
}
#line 2202 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy96 = yylhsminor.yy96;
        break;
      case 107: /* param_list_elems ::= param_variable EQUALS scalar_constant */
#line 613 "../src/CFCParseHeader.y"
{
    yylhsminor.yy96 = CFCParamList_new(false);
    CFCParamList_add_param(yylhsminor.yy96, yymsp[-2].minor.yy57, yymsp[0].minor.yy0);
    CFCBase_decref((CFCBase*)yymsp[-2].minor.yy57);
}
#line 2212 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy96 = yylhsminor.yy96;
        break;
      case 109: /* qualified_id ::= qualified_id SCOPE_OP IDENTIFIER */
#line 621 "../src/CFCParseHeader.y"
{
    size_t size = strlen(yymsp[-2].minor.yy0) + strlen(yymsp[0].minor.yy0) + 3;
    yylhsminor.yy0 = (char*)CFCParser_allocate(state, size);
    sprintf(yylhsminor.yy0, "%s::%s", yymsp[-2].minor.yy0, yymsp[0].minor.yy0);
}
#line 2222 "../src/CFCParseHeader.c"
  yymsp[-2].minor.yy0 = yylhsminor.yy0;
        break;
      case 110: /* docucomment ::= DOCUCOMMENT */
#line 627 "../src/CFCParseHeader.y"
{ yylhsminor.yy73 = CFCDocuComment_parse(yymsp[0].minor.yy0); }
#line 2228 "../src/CFCParseHeader.c"
  yymsp[0].minor.yy73 = yylhsminor.yy73;
        break;
      case 111: /* class_inheritance ::= INHERITS qualified_id */
      case 112: /* nickname ::= NICKNAME IDENTIFIER */ yytestcase(yyruleno==112);
#line 628 "../src/CFCParseHeader.y"
{ yymsp[-1].minor.yy0 = yymsp[0].minor.yy0; }
#line 2235 "../src/CFCParseHeader.c"
        break;
      case 113: /* cblock ::= CBLOCK_START blob CBLOCK_CLOSE */
#line 630 "../src/CFCParseHeader.y"
{ yymsp[-2].minor.yy117 = CFCCBlock_new(yymsp[-1].minor.yy0); }
#line 2240 "../src/CFCParseHeader.c"
        break;
      case 114: /* cblock ::= CBLOCK_START CBLOCK_CLOSE */
#line 631 "../src/CFCParseHeader.y"
{ yymsp[-1].minor.yy117 = CFCCBlock_new(""); }
#line 2245 "../src/CFCParseHeader.c"
        break;
      default:
        break;
/********** End reduce actions ************************************************/
  };
  assert( yyruleno<sizeof(yyRuleInfo)/sizeof(yyRuleInfo[0]) );
  yygoto = yyRuleInfo[yyruleno].lhs;
  yysize = yyRuleInfo[yyruleno].nrhs;
  yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
  if( yyact <= YY_MAX_SHIFTREDUCE ){
    if( yyact>YY_MAX_SHIFT ){
      yyact += YY_MIN_REDUCE - YY_MIN_SHIFTREDUCE;
    }
    yymsp -= yysize-1;
    yypParser->yytos = yymsp;
    yymsp->stateno = (YYACTIONTYPE)yyact;
    yymsp->major = (YYCODETYPE)yygoto;
    yyTraceShift(yypParser, yyact);
  }else{
    assert( yyact == YY_ACCEPT_ACTION );
    yypParser->yytos -= yysize;
    yy_accept(yypParser);
  }
}

/*
** The following code executes when the parse fails
*/
#ifndef YYNOERRORRECOVERY
static void yy_parse_failed(
  yyParser *yypParser           /* The parser */
){
  CFCParseHeaderARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
  }
#endif
  while( yypParser->yytos>yypParser->yystack ) yy_pop_parser_stack(yypParser);
  /* Here code is inserted which will be executed whenever the
  ** parser fails */
/************ Begin %parse_failure code ***************************************/
/************ End %parse_failure code *****************************************/
  CFCParseHeaderARG_STORE; /* Suppress warning about unused %extra_argument variable */
}
#endif /* YYNOERRORRECOVERY */

/*
** The following code executes when a syntax error first occurs.
*/
static void yy_syntax_error(
  yyParser *yypParser,           /* The parser */
  int yymajor,                   /* The major type of the error token */
  CFCParseHeaderTOKENTYPE yyminor         /* The minor type of the error token */
){
  CFCParseHeaderARG_FETCH;
#define TOKEN yyminor
/************ Begin %syntax_error code ****************************************/
#line 212 "../src/CFCParseHeader.y"

    (void)yymajor;
    (void)yyminor;
    CFCParser_set_errors(state, true);
    CFCParser_set_lineno(state, yyget_lineno());
#line 2310 "../src/CFCParseHeader.c"
/************ End %syntax_error code ******************************************/
  CFCParseHeaderARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/*
** The following is executed when the parser accepts
*/
static void yy_accept(
  yyParser *yypParser           /* The parser */
){
  CFCParseHeaderARG_FETCH;
#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
  }
#endif
#ifndef YYNOERRORRECOVERY
  yypParser->yyerrcnt = -1;
#endif
  assert( yypParser->yytos==yypParser->yystack );
  /* Here code is inserted which will be executed whenever the
  ** parser accepts */
/*********** Begin %parse_accept code *****************************************/
/*********** End %parse_accept code *******************************************/
  CFCParseHeaderARG_STORE; /* Suppress warning about unused %extra_argument variable */
}

/* The main parser program.
** The first argument is a pointer to a structure obtained from
** "CFCParseHeaderAlloc" which describes the current state of the parser.
** The second argument is the major token number.  The third is
** the minor token.  The fourth optional argument is whatever the
** user wants (and specified in the grammar) and is available for
** use by the action routines.
**
** Inputs:
** <ul>
** <li> A pointer to the parser (an opaque structure.)
** <li> The major token number.
** <li> The minor token number.
** <li> An option argument of a grammar-specified type.
** </ul>
**
** Outputs:
** None.
*/
void CFCParseHeader(
  void *yyp,                   /* The parser */
  int yymajor,                 /* The major token code number */
  CFCParseHeaderTOKENTYPE yyminor       /* The value for the token */
  CFCParseHeaderARG_PDECL               /* Optional %extra_argument parameter */
){
  YYMINORTYPE yyminorunion;
  unsigned int yyact;   /* The parser action. */
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  int yyendofinput;     /* True if we are at the end of input */
#endif
#ifdef YYERRORSYMBOL
  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
#endif
  yyParser *yypParser;  /* The parser */

  yypParser = (yyParser*)yyp;
  assert( yypParser->yytos!=0 );
#if !defined(YYERRORSYMBOL) && !defined(YYNOERRORRECOVERY)
  yyendofinput = (yymajor==0);
#endif
  CFCParseHeaderARG_STORE;

#ifndef NDEBUG
  if( yyTraceFILE ){
    fprintf(yyTraceFILE,"%sInput '%s'\n",yyTracePrompt,yyTokenName[yymajor]);
  }
#endif

  do{
    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
    if( yyact <= YY_MAX_SHIFTREDUCE ){
      yy_shift(yypParser,yyact,yymajor,yyminor);
#ifndef YYNOERRORRECOVERY
      yypParser->yyerrcnt--;
#endif
      yymajor = YYNOCODE;
    }else if( yyact <= YY_MAX_REDUCE ){
      yy_reduce(yypParser,yyact-YY_MIN_REDUCE);
    }else{
      assert( yyact == YY_ERROR_ACTION );
      yyminorunion.yy0 = yyminor;
#ifdef YYERRORSYMBOL
      int yymx;
#endif
#ifndef NDEBUG
      if( yyTraceFILE ){
        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
      }
#endif
#ifdef YYERRORSYMBOL
      /* A syntax error has occurred.
      ** The response to an error depends upon whether or not the
      ** grammar defines an error token "ERROR".  
      **
      ** This is what we do if the grammar does define ERROR:
      **
      **  * Call the %syntax_error function.
      **
      **  * Begin popping the stack until we enter a state where
      **    it is legal to shift the error symbol, then shift
      **    the error symbol.
      **
      **  * Set the error count to three.
      **
      **  * Begin accepting and shifting new tokens.  No new error
      **    processing will occur until three tokens have been
      **    shifted successfully.
      **
      */
      if( yypParser->yyerrcnt<0 ){
        yy_syntax_error(yypParser,yymajor,yyminor);
      }
      yymx = yypParser->yytos->major;
      if( yymx==YYERRORSYMBOL || yyerrorhit ){
#ifndef NDEBUG
        if( yyTraceFILE ){
          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
             yyTracePrompt,yyTokenName[yymajor]);
        }
#endif
        yy_destructor(yypParser, (YYCODETYPE)yymajor, &yyminorunion);
        yymajor = YYNOCODE;
      }else{
        while( yypParser->yytos >= &yypParser->yystack
            && yymx != YYERRORSYMBOL
            && (yyact = yy_find_reduce_action(
                        yypParser->yytos->stateno,
                        YYERRORSYMBOL)) >= YY_MIN_REDUCE
        ){
          yy_pop_parser_stack(yypParser);
        }
        if( yypParser->yytos < yypParser->yystack || yymajor==0 ){
          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
          yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
          yypParser->yyerrcnt = -1;
#endif
          yymajor = YYNOCODE;
        }else if( yymx!=YYERRORSYMBOL ){
          yy_shift(yypParser,yyact,YYERRORSYMBOL,yyminor);
        }
      }
      yypParser->yyerrcnt = 3;
      yyerrorhit = 1;
#elif defined(YYNOERRORRECOVERY)
      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
      ** do any kind of error recovery.  Instead, simply invoke the syntax
      ** error routine and continue going as if nothing had happened.
      **
      ** Applications can set this macro (for example inside %include) if
      ** they intend to abandon the parse upon the first syntax error seen.
      */
      yy_syntax_error(yypParser,yymajor, yyminor);
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      yymajor = YYNOCODE;
      
#else  /* YYERRORSYMBOL is not defined */
      /* This is what we do if the grammar does not define ERROR:
      **
      **  * Report an error message, and throw away the input token.
      **
      **  * If the input token is $, then fail the parse.
      **
      ** As before, subsequent error messages are suppressed until
      ** three input tokens have been successfully shifted.
      */
      if( yypParser->yyerrcnt<=0 ){
        yy_syntax_error(yypParser,yymajor, yyminor);
      }
      yypParser->yyerrcnt = 3;
      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
      if( yyendofinput ){
        yy_parse_failed(yypParser);
#ifndef YYNOERRORRECOVERY
        yypParser->yyerrcnt = -1;
#endif
      }
      yymajor = YYNOCODE;
#endif
    }
  }while( yymajor!=YYNOCODE && yypParser->yytos>yypParser->yystack );
#ifndef NDEBUG
  if( yyTraceFILE ){
    yyStackEntry *i;
    char cDiv = '[';
    fprintf(yyTraceFILE,"%sReturn. Stack=",yyTracePrompt);
    for(i=&yypParser->yystack[1]; i<=yypParser->yytos; i++){
      fprintf(yyTraceFILE,"%c%s", cDiv, yyTokenName[i->major]);
      cDiv = ' ';
    }
    fprintf(yyTraceFILE,"]\n");
  }
#endif
  return;
}
