// Generated by Bisonc++ V6.04.02 on Sun, 21 Feb 2021 13:33:53 +0100

// base/comment

// $insert class.ih
#include "parser.ih"

// The FIRST element of SR arrays shown below uses `d_type', defining the
// state's type, and `d_lastIdx' containing the last element's index. If
// d_lastIdx contains the REQ_TOKEN bitflag (see below) then the state needs
// a token: if in this state d_token is Reserved_::UNDETERMINED_, nextToken() will be
// called

// The LAST element of SR arrays uses `d_token' containing the last retrieved
// token to speed up the (linear) seach.  Except for the first element of SR
// arrays, the field `d_action' is used to determine what to do next. If
// positive, it represents the next state (used with SHIFT); if zero, it
// indicates `ACCEPT', if negative, -d_action represents the number of the
// rule to reduce to.

// `lookup()' tries to find d_token in the current SR array. If it fails, and
// there is no default reduction UNEXPECTED_TOKEN_ is thrown, which is then
// caught by the error-recovery function.

// The error-recovery function will pop elements off the stack until a state
// having bit flag ERR_ITEM is found. This state has a transition on errTok_
// which is applied. In this errTok_ state, while the current token is not a
// proper continuation, new tokens are obtained by nextToken(). If such a
// token is found, error recovery is successful and the token is
// handled according to the error state's SR table and parsing continues.
// During error recovery semantic actions are ignored.

// A state flagged with the DEF_RED flag will perform a default
// reduction if no other continuations are available for the current token.

// The ACCEPT STATE never shows a default reduction: when it is reached the
// parser returns ACCEPT(). During the grammar
// analysis phase a default reduction may have been defined, but it is
// removed during the state-definition phase.

// So:
//      s_x[] = 
//      {
//                  [_field_1_]         [_field_2_]
//
// First element:   {state-type,        idx of last element},
// Other elements:  {required token,    action to perform},
//                                      ( < 0: reduce, 
//                                          0: ACCEPT,
//                                        > 0: next state)
//      }

// base/declarations

namespace // anonymous
{
    char const author[] = "Frank B. Brokken (f.b.brokken@rug.nl)";

    enum Reserved_
    {
        UNDETERMINED_   = -2,
        EOF_            = -1,
        errTok_         = 256
    };
    enum StateType       // modify statetype/data.cc when this enum changes
    {
        NORMAL,
        ERR_ITEM,
        REQ_TOKEN,
        ERR_REQ,    // ERR_ITEM | REQ_TOKEN
        DEF_RED,    // state having default reduction
        ERR_DEF,    // ERR_ITEM | DEF_RED
        REQ_DEF,    // REQ_TOKEN | DEF_RED
        ERR_REQ_DEF // ERR_ITEM | REQ_TOKEN | DEF_RED
    };    
    inline bool operator&(StateType lhs, StateType rhs)
    {
        return (static_cast<int>(lhs) & rhs) != 0;
    }
    enum StateTransition
    {
        ACCEPT_   = 0,     // `ACCEPT' TRANSITION
    };

    struct PI_     // Production Info
    {
        size_t d_nonTerm; // identification number of this production's
                            // non-terminal 
        size_t d_size;    // number of elements in this production 
    };

    struct SR_     // Shift Reduce info, see its description above
    {
        union
        {
            int _field_1_;      // initializer, allowing initializations 
                                // of the SR s_[] arrays
            StateType d_type;
            int       d_token;
        };
        union
        {
            int _field_2_;

            int d_lastIdx;          // if negative, the state uses SHIFT
            int d_action;           // may be negative (reduce), 
                                    // postive (shift), or 0 (accept)
        };
    };

    // $insert staticdata
    
    enum                        // size to expand the state-stack with when
    {                           // full
        STACK_EXPANSION_ = 10
    };

// Productions Info Records:
PI_ const s_productionInfo[] = 
{
     {0, 0}, // not used: reduction values are negative
     {313, 4}, // 1: input ->  directives _two_percents rules optTwo_percents
     {315, 1}, // 2: _two_percents (TWO_PERCENTS) ->  TWO_PERCENTS
     {318, 1}, // 3: identifier (IDENTIFIER) ->  IDENTIFIER
     {319, 3}, // 4: typename ('<') ->  '<' identifier '>'
     {320, 1}, // 5: optComma (',') ->  ','
     {320, 0}, // 6: optComma ->  <empty>
     {321, 1}, // 7: optNumber (NUMBER) ->  NUMBER
     {321, 0}, // 8: optNumber ->  <empty>
     {322, 1}, // 9: optSemiCol (';') ->  ';'
     {322, 0}, // 10: optSemiCol ->  <empty>
     {323, 0}, // 11: _tokenname ->  <empty>
     {324, 2}, // 12: optTypename ->  typename _tokenname
     {324, 1}, // 13: optTypename ->  _tokenname
     {317, 1}, // 14: optTwo_percents (TWO_PERCENTS) ->  TWO_PERCENTS
     {317, 0}, // 15: optTwo_percents ->  <empty>
     {325, 1}, // 16: _baseclass_header (BASECLASS_HEADER) ->  BASECLASS_HEADER
     {326, 1}, // 17: _baseclass_preinclude (BASECLASS_PREINCLUDE) ->  BASECLASS_PREINCLUDE
     {327, 1}, // 18: _class_header (CLASS_HEADER) ->  CLASS_HEADER
     {328, 1}, // 19: _class_name (CLASS_NAME) ->  CLASS_NAME
     {329, 1}, // 20: _expect (EXPECT) ->  EXPECT
     {330, 1}, // 21: _filenames (FILENAMES) ->  FILENAMES
     {331, 1}, // 22: _implementation_header (IMPLEMENTATION_HEADER) ->  IMPLEMENTATION_HEADER
     {332, 0}, // 23: _incrementPrecedence ->  <empty>
     {333, 2}, // 24: _left (LEFT) ->  LEFT _typesymbol
     {335, 1}, // 25: _locationstruct (LOCATIONSTRUCT) ->  LOCATIONSTRUCT
     {336, 1}, // 26: _ltype (LTYPE) ->  LTYPE
     {337, 1}, // 27: _namespace (NAMESPACE) ->  NAMESPACE
     {338, 2}, // 28: _nonassoc (NONASSOC) ->  NONASSOC _typesymbol
     {339, 1}, // 29: _parsefun_source (PARSEFUN_SOURCE) ->  PARSEFUN_SOURCE
     {340, 0}, // 30: _pushPrecedence ->  <empty>
     {341, 1}, // 31: _required (REQUIRED) ->  REQUIRED
     {342, 2}, // 32: _right (RIGHT) ->  RIGHT _typesymbol
     {343, 1}, // 33: _scanner (SCANNER) ->  SCANNER
     {344, 1}, // 34: _scanner_class_name (SCANNER_CLASS_NAME) ->  SCANNER_CLASS_NAME
     {345, 1}, // 35: _scanner_token_function (SCANNER_TOKEN_FUNCTION) ->  SCANNER_TOKEN_FUNCTION
     {346, 1}, // 36: _scanner_matched_text_function (SCANNER_MATCHED_TEXT_FUNCTION) ->  SCANNER_MATCHED_TEXT_FUNCTION
     {347, 1}, // 37: _stack_expansion (STACK_EXPANSION) ->  STACK_EXPANSION
     {348, 1}, // 38: _start (START) ->  START
     {349, 0}, // 39: _symbol_exp ->  <empty>
     {350, 1}, // 40: _symbol (QUOTE) ->  QUOTE
     {350, 2}, // 41: _symbol ->  identifier optNumber
     {351, 3}, // 42: _symbolList ->  _symbolList optComma _symbol
     {351, 1}, // 43: _symbolList ->  _symbol
     {352, 3}, // 44: _symbols ->  _symbol_exp _symbolList optSemiCol
     {353, 1}, // 45: _target_directory (TARGET_DIRECTORY) ->  TARGET_DIRECTORY
     {354, 1}, // 46: _type (TYPE) ->  TYPE
     {355, 1}, // 47: _stype (STYPE) ->  STYPE
     {334, 0}, // 48: _typesymbol ->  <empty>
     {356, 2}, // 49: _token (TOKEN) ->  TOKEN _typesymbol
     {357, 1}, // 50: _token_class (TOKEN_CLASS) ->  TOKEN_CLASS
     {358, 1}, // 51: _token_namespace (TOKEN_NAMESPACE) ->  TOKEN_NAMESPACE
     {359, 1}, // 52: _token_path (TOKEN_PATH) ->  TOKEN_PATH
     {360, 1}, // 53: _union (UNION) ->  UNION
     {361, 1}, // 54: _default_actions (DEFAULT_ACTIONS) ->  DEFAULT_ACTIONS
     {362, 1}, // 55: _constructor_checks (CONSTRUCTOR_CHECKS) ->  CONSTRUCTOR_CHECKS
     {363, 1}, // 56: _tag_mismatches (WARN_TAGS) ->  WARN_TAGS
     {364, 1}, // 57: _polymorphic (POLYMORPHIC) ->  POLYMORPHIC
     {365, 1}, // 58: _typespec (':') ->  ':'
     {366, 3}, // 59: _polyspec ->  identifier _typespec identifier
     {367, 3}, // 60: _polyspecs (';') ->  _polyspecs ';' _polyspec
     {367, 1}, // 61: _polyspecs ->  _polyspec
     {368, 2}, // 62: _directiveSpec (STRING) ->  _baseclass_header STRING
     {368, 2}, // 63: _directiveSpec (STRING) ->  _baseclass_preinclude STRING
     {368, 2}, // 64: _directiveSpec (STRING) ->  _class_header STRING
     {368, 2}, // 65: _directiveSpec (IDENTIFIER) ->  _class_name IDENTIFIER
     {368, 1}, // 66: _directiveSpec (DEBUGFLAG) ->  DEBUGFLAG
     {368, 1}, // 67: _directiveSpec (PROMPT) ->  PROMPT
     {368, 1}, // 68: _directiveSpec (THREAD_SAFE) ->  THREAD_SAFE
     {368, 1}, // 69: _directiveSpec (ERROR_VERBOSE) ->  ERROR_VERBOSE
     {368, 2}, // 70: _directiveSpec (NUMBER) ->  _expect NUMBER
     {368, 2}, // 71: _directiveSpec (STRING) ->  _filenames STRING
     {368, 1}, // 72: _directiveSpec (FLEX) ->  FLEX
     {368, 2}, // 73: _directiveSpec (STRING) ->  _implementation_header STRING
     {368, 4}, // 74: _directiveSpec ->  _left _incrementPrecedence optTypename _symbols
     {368, 3}, // 75: _directiveSpec (BLOCK) ->  _locationstruct BLOCK optSemiCol
     {368, 1}, // 76: _directiveSpec (LSP_NEEDED) ->  LSP_NEEDED
     {368, 2}, // 77: _directiveSpec (STRING) ->  _ltype STRING
     {368, 2}, // 78: _directiveSpec (IDENTIFIER) ->  _namespace IDENTIFIER
     {368, 1}, // 79: _directiveSpec (NEG_DOLLAR) ->  NEG_DOLLAR
     {368, 1}, // 80: _directiveSpec (NOLINES) ->  NOLINES
     {368, 4}, // 81: _directiveSpec ->  _nonassoc _incrementPrecedence optTypename _symbols
     {368, 2}, // 82: _directiveSpec (STRING) ->  _parsefun_source STRING
     {368, 1}, // 83: _directiveSpec (PRINT_TOKENS) ->  PRINT_TOKENS
     {368, 2}, // 84: _directiveSpec (NUMBER) ->  _required NUMBER
     {368, 4}, // 85: _directiveSpec ->  _right _incrementPrecedence optTypename _symbols
     {368, 2}, // 86: _directiveSpec (STRING) ->  _scanner STRING
     {368, 2}, // 87: _directiveSpec (STRING) ->  _scanner_class_name STRING
     {368, 2}, // 88: _directiveSpec (STRING) ->  _scanner_token_function STRING
     {368, 2}, // 89: _directiveSpec (STRING) ->  _scanner_matched_text_function STRING
     {368, 2}, // 90: _directiveSpec (NUMBER) ->  _stack_expansion NUMBER
     {368, 2}, // 91: _directiveSpec (IDENTIFIER) ->  _start IDENTIFIER
     {368, 2}, // 92: _directiveSpec (STRING) ->  _stype STRING
     {368, 2}, // 93: _directiveSpec (STRING) ->  _target_directory STRING
     {368, 4}, // 94: _directiveSpec ->  _token optTypename _pushPrecedence _symbols
     {368, 2}, // 95: _directiveSpec (IDENTIFIER) ->  _token_class IDENTIFIER
     {368, 2}, // 96: _directiveSpec (IDENTIFIER) ->  _token_namespace IDENTIFIER
     {368, 2}, // 97: _directiveSpec (STRING) ->  _token_path STRING
     {368, 3}, // 98: _directiveSpec ->  _type typename _symbols
     {368, 3}, // 99: _directiveSpec (BLOCK) ->  _union BLOCK optSemiCol
     {368, 2}, // 100: _directiveSpec (IDENTIFIER) ->  _default_actions IDENTIFIER
     {368, 2}, // 101: _directiveSpec (IDENTIFIER) ->  _constructor_checks IDENTIFIER
     {368, 3}, // 102: _directiveSpec ->  _polymorphic _polyspecs optSemiCol
     {368, 1}, // 103: _directiveSpec (WEAK_TAGS) ->  WEAK_TAGS
     {368, 2}, // 104: _directiveSpec (IDENTIFIER) ->  _tag_mismatches IDENTIFIER
     {368, 1}, // 105: _directiveSpec (errTok_) ->  errTok_
     {369, 1}, // 106: _directive ->  _directiveSpec
     {314, 2}, // 107: directives ->  directives _directive
     {314, 0}, // 108: directives ->  <empty>
     {370, 1}, // 109: _precSpec (IDENTIFIER) ->  IDENTIFIER
     {370, 1}, // 110: _precSpec (QUOTE) ->  QUOTE
     {371, 1}, // 111: _productionElement (QUOTE) ->  QUOTE
     {371, 1}, // 112: _productionElement (IDENTIFIER) ->  IDENTIFIER
     {371, 1}, // 113: _productionElement (BLOCK) ->  BLOCK
     {371, 2}, // 114: _productionElement (PREC) ->  PREC _precSpec
     {372, 2}, // 115: _productionElements ->  _productionElements _productionElement
     {372, 1}, // 116: _productionElements ->  _productionElement
     {373, 1}, // 117: _production ->  _productionElements
     {373, 0}, // 118: _production ->  <empty>
     {374, 1}, // 119: _productionSeparator ('|') ->  '|'
     {375, 3}, // 120: _productionList ->  _productionList _productionSeparator _production
     {375, 1}, // 121: _productionList ->  _production
     {376, 2}, // 122: _ruleName (':') ->  identifier ':'
     {377, 3}, // 123: _rule (';') ->  _ruleName _productionList ';'
     {316, 2}, // 124: rules ->  rules _rule
     {316, 0}, // 125: rules ->  <empty>
     {378, 1}, // 126: input_$ ->  input
};

// State info and SR_ transitions for each state.


SR_ s_0[] =
{
    { { DEF_RED}, {    3} },              
    { {     313}, {    1} }, // input     
    { {     314}, {    2} }, // directives
    { {       0}, { -108} },              
};

SR_ s_1[] =
{
    { { REQ_TOKEN}, {       2} }, 
    { {      EOF_}, { ACCEPT_} }, 
    { {         0}, {       0} }, 
};

SR_ s_2[] =
{
    { { ERR_REQ}, { 82} },                                  
    { {     315}, {  3} }, // _two_percents                 
    { {     369}, {  4} }, // _directive                    
    { {     297}, {  5} }, // TWO_PERCENTS                  
    { {     368}, {  6} }, // _directiveSpec                
    { {     325}, {  7} }, // _baseclass_header             
    { {     326}, {  8} }, // _baseclass_preinclude         
    { {     327}, {  9} }, // _class_header                 
    { {     328}, { 10} }, // _class_name                   
    { {     263}, { 11} }, // DEBUGFLAG                     
    { {     302}, { 12} }, // PROMPT                        
    { {     303}, { 13} }, // THREAD_SAFE                   
    { {     265}, { 14} }, // ERROR_VERBOSE                 
    { {     329}, { 15} }, // _expect                       
    { {     330}, { 16} }, // _filenames                    
    { {     268}, { 17} }, // FLEX                          
    { {     331}, { 18} }, // _implementation_header        
    { {     333}, { 19} }, // _left                         
    { {     335}, { 20} }, // _locationstruct               
    { {     273}, { 21} }, // LSP_NEEDED                    
    { {     336}, { 22} }, // _ltype                        
    { {     337}, { 23} }, // _namespace                    
    { {     276}, { 24} }, // NEG_DOLLAR                    
    { {     277}, { 25} }, // NOLINES                       
    { {     338}, { 26} }, // _nonassoc                     
    { {     339}, { 27} }, // _parsefun_source              
    { {     283}, { 28} }, // PRINT_TOKENS                  
    { {     341}, { 29} }, // _required                     
    { {     342}, { 30} }, // _right                        
    { {     343}, { 31} }, // _scanner                      
    { {     344}, { 32} }, // _scanner_class_name           
    { {     345}, { 33} }, // _scanner_token_function       
    { {     346}, { 34} }, // _scanner_matched_text_function
    { {     347}, { 35} }, // _stack_expansion              
    { {     348}, { 36} }, // _start                        
    { {     355}, { 37} }, // _stype                        
    { {     353}, { 38} }, // _target_directory             
    { {     356}, { 39} }, // _token                        
    { {     357}, { 40} }, // _token_class                  
    { {     358}, { 41} }, // _token_namespace              
    { {     359}, { 42} }, // _token_path                   
    { {     354}, { 43} }, // _type                         
    { {     360}, { 44} }, // _union                        
    { {     361}, { 45} }, // _default_actions              
    { {     362}, { 46} }, // _constructor_checks           
    { {     364}, { 47} }, // _polymorphic                  
    { {     301}, { 48} }, // WEAK_TAGS                     
    { {     363}, { 49} }, // _tag_mismatches               
    { { errTok_}, { 50} }, // errTok_                       
    { {     257}, { 51} }, // BASECLASS_HEADER              
    { {     258}, { 52} }, // BASECLASS_PREINCLUDE          
    { {     260}, { 53} }, // CLASS_HEADER                  
    { {     261}, { 54} }, // CLASS_NAME                    
    { {     266}, { 55} }, // EXPECT                        
    { {     267}, { 56} }, // FILENAMES                     
    { {     270}, { 57} }, // IMPLEMENTATION_HEADER         
    { {     271}, { 58} }, // LEFT                          
    { {     272}, { 59} }, // LOCATIONSTRUCT                
    { {     274}, { 60} }, // LTYPE                         
    { {     275}, { 61} }, // NAMESPACE                     
    { {     278}, { 62} }, // NONASSOC                      
    { {     280}, { 63} }, // PARSEFUN_SOURCE               
    { {     285}, { 64} }, // REQUIRED                      
    { {     286}, { 65} }, // RIGHT                         
    { {     287}, { 66} }, // SCANNER                       
    { {     288}, { 67} }, // SCANNER_CLASS_NAME            
    { {     290}, { 68} }, // SCANNER_TOKEN_FUNCTION        
    { {     289}, { 69} }, // SCANNER_MATCHED_TEXT_FUNCTION 
    { {     291}, { 70} }, // STACK_EXPANSION               
    { {     292}, { 71} }, // START                         
    { {     294}, { 72} }, // STYPE                         
    { {     295}, { 73} }, // TARGET_DIRECTORY              
    { {     296}, { 74} }, // TOKEN                         
    { {     304}, { 75} }, // TOKEN_CLASS                   
    { {     305}, { 76} }, // TOKEN_NAMESPACE               
    { {     306}, { 77} }, // TOKEN_PATH                    
    { {     298}, { 78} }, // TYPE                          
    { {     299}, { 79} }, // UNION                         
    { {     264}, { 80} }, // DEFAULT_ACTIONS               
    { {     262}, { 81} }, // CONSTRUCTOR_CHECKS            
    { {     281}, { 82} }, // POLYMORPHIC                   
    { {     300}, { 83} }, // WARN_TAGS                     
    { {       0}, {  0} },                                  
};

SR_ s_3[] =
{
    { { DEF_RED}, {    2} },         
    { {     316}, {   84} }, // rules
    { {       0}, { -125} },         
};

SR_ s_4[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -107} }, 
};

SR_ s_5[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -2} }, 
};

SR_ s_6[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -106} }, 
};

SR_ s_7[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 85} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_8[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 86} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_9[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 87} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_10[] =
{
    { { REQ_TOKEN}, {  2} },              
    { {       269}, { 88} }, // IDENTIFIER
    { {         0}, {  0} },              
};

SR_ s_11[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -66} }, 
};

SR_ s_12[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -67} }, 
};

SR_ s_13[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -68} }, 
};

SR_ s_14[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -69} }, 
};

SR_ s_15[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       279}, { 89} }, // NUMBER
    { {         0}, {  0} },          
};

SR_ s_16[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 90} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_17[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -72} }, 
};

SR_ s_18[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 91} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_19[] =
{
    { { DEF_RED}, {   2} },                        
    { {     332}, {  92} }, // _incrementPrecedence
    { {       0}, { -23} },                        
};

SR_ s_20[] =
{
    { { REQ_TOKEN}, {  2} },         
    { {       259}, { 93} }, // BLOCK
    { {         0}, {  0} },         
};

SR_ s_21[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -76} }, 
};

SR_ s_22[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 94} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_23[] =
{
    { { REQ_TOKEN}, {  2} },              
    { {       269}, { 95} }, // IDENTIFIER
    { {         0}, {  0} },              
};

SR_ s_24[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -79} }, 
};

SR_ s_25[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -80} }, 
};

SR_ s_26[] =
{
    { { DEF_RED}, {   2} },                        
    { {     332}, {  96} }, // _incrementPrecedence
    { {       0}, { -23} },                        
};

SR_ s_27[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       293}, { 97} }, // STRING
    { {         0}, {  0} },          
};

SR_ s_28[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -83} }, 
};

SR_ s_29[] =
{
    { { REQ_TOKEN}, {  2} },          
    { {       279}, { 98} }, // NUMBER
    { {         0}, {  0} },          
};

SR_ s_30[] =
{
    { { DEF_RED}, {   2} },                        
    { {     332}, {  99} }, // _incrementPrecedence
    { {       0}, { -23} },                        
};

SR_ s_31[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 100} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_32[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 101} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_33[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 102} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_34[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 103} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_35[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       279}, { 104} }, // NUMBER
    { {         0}, {   0} },          
};

SR_ s_36[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 105} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_37[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 106} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_38[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 107} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_39[] =
{
    { { REQ_DEF}, {   5} },               
    { {     324}, { 108} }, // optTypename
    { {     319}, { 109} }, // typename   
    { {     323}, { 110} }, // _tokenname 
    { {      60}, { 111} }, // '<'        
    { {       0}, { -11} },               
};

SR_ s_40[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 112} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_41[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 113} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_42[] =
{
    { { REQ_TOKEN}, {   2} },          
    { {       293}, { 114} }, // STRING
    { {         0}, {   0} },          
};

SR_ s_43[] =
{
    { { REQ_TOKEN}, {   3} },            
    { {       319}, { 115} }, // typename
    { {        60}, { 111} }, // '<'     
    { {         0}, {   0} },            
};

SR_ s_44[] =
{
    { { REQ_TOKEN}, {   2} },         
    { {       259}, { 116} }, // BLOCK
    { {         0}, {   0} },         
};

SR_ s_45[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 117} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_46[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 118} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_47[] =
{
    { { REQ_TOKEN}, {   5} },              
    { {       367}, { 119} }, // _polyspecs
    { {       366}, { 120} }, // _polyspec 
    { {       318}, { 121} }, // identifier
    { {       269}, { 122} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_48[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -103} }, 
};

SR_ s_49[] =
{
    { { REQ_TOKEN}, {   2} },              
    { {       269}, { 123} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_50[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -105} }, 
};

SR_ s_51[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -16} }, 
};

SR_ s_52[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -17} }, 
};

SR_ s_53[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -18} }, 
};

SR_ s_54[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -19} }, 
};

SR_ s_55[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -20} }, 
};

SR_ s_56[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -21} }, 
};

SR_ s_57[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -22} }, 
};

SR_ s_58[] =
{
    { { DEF_RED}, {   2} },               
    { {     334}, { 124} }, // _typesymbol
    { {       0}, { -48} },               
};

SR_ s_59[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -25} }, 
};

SR_ s_60[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -26} }, 
};

SR_ s_61[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -27} }, 
};

SR_ s_62[] =
{
    { { DEF_RED}, {   2} },               
    { {     334}, { 125} }, // _typesymbol
    { {       0}, { -48} },               
};

SR_ s_63[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -29} }, 
};

SR_ s_64[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -31} }, 
};

SR_ s_65[] =
{
    { { DEF_RED}, {   2} },               
    { {     334}, { 126} }, // _typesymbol
    { {       0}, { -48} },               
};

SR_ s_66[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -33} }, 
};

SR_ s_67[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -34} }, 
};

SR_ s_68[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -35} }, 
};

SR_ s_69[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -36} }, 
};

SR_ s_70[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -37} }, 
};

SR_ s_71[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -38} }, 
};

SR_ s_72[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -47} }, 
};

SR_ s_73[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -45} }, 
};

SR_ s_74[] =
{
    { { DEF_RED}, {   2} },               
    { {     334}, { 127} }, // _typesymbol
    { {       0}, { -48} },               
};

SR_ s_75[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -50} }, 
};

SR_ s_76[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -51} }, 
};

SR_ s_77[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -52} }, 
};

SR_ s_78[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -46} }, 
};

SR_ s_79[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -53} }, 
};

SR_ s_80[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -54} }, 
};

SR_ s_81[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -55} }, 
};

SR_ s_82[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -57} }, 
};

SR_ s_83[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -56} }, 
};

SR_ s_84[] =
{
    { { REQ_DEF}, {   7} },                   
    { {     317}, { 128} }, // optTwo_percents
    { {     377}, { 129} }, // _rule          
    { {     297}, { 130} }, // TWO_PERCENTS   
    { {     376}, { 131} }, // _ruleName      
    { {     318}, { 132} }, // identifier     
    { {     269}, { 122} }, // IDENTIFIER     
    { {       0}, { -15} },                   
};

SR_ s_85[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -62} }, 
};

SR_ s_86[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -63} }, 
};

SR_ s_87[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -64} }, 
};

SR_ s_88[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -65} }, 
};

SR_ s_89[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -70} }, 
};

SR_ s_90[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -71} }, 
};

SR_ s_91[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -73} }, 
};

SR_ s_92[] =
{
    { { REQ_DEF}, {   5} },               
    { {     324}, { 133} }, // optTypename
    { {     319}, { 109} }, // typename   
    { {     323}, { 110} }, // _tokenname 
    { {      60}, { 111} }, // '<'        
    { {       0}, { -11} },               
};

SR_ s_93[] =
{
    { { REQ_DEF}, {   3} },              
    { {     322}, { 134} }, // optSemiCol
    { {      59}, { 135} }, // ';'       
    { {       0}, { -10} },              
};

SR_ s_94[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -77} }, 
};

SR_ s_95[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -78} }, 
};

SR_ s_96[] =
{
    { { REQ_DEF}, {   5} },               
    { {     324}, { 136} }, // optTypename
    { {     319}, { 109} }, // typename   
    { {     323}, { 110} }, // _tokenname 
    { {      60}, { 111} }, // '<'        
    { {       0}, { -11} },               
};

SR_ s_97[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -82} }, 
};

SR_ s_98[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -84} }, 
};

SR_ s_99[] =
{
    { { REQ_DEF}, {   5} },               
    { {     324}, { 137} }, // optTypename
    { {     319}, { 109} }, // typename   
    { {     323}, { 110} }, // _tokenname 
    { {      60}, { 111} }, // '<'        
    { {       0}, { -11} },               
};

SR_ s_100[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -86} }, 
};

SR_ s_101[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -87} }, 
};

SR_ s_102[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -88} }, 
};

SR_ s_103[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -89} }, 
};

SR_ s_104[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -90} }, 
};

SR_ s_105[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -91} }, 
};

SR_ s_106[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -92} }, 
};

SR_ s_107[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -93} }, 
};

SR_ s_108[] =
{
    { { DEF_RED}, {   2} },                   
    { {     340}, { 138} }, // _pushPrecedence
    { {       0}, { -30} },                   
};

SR_ s_109[] =
{
    { { DEF_RED}, {   2} },              
    { {     323}, { 139} }, // _tokenname
    { {       0}, { -11} },              
};

SR_ s_110[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -13} }, 
};

SR_ s_111[] =
{
    { { REQ_TOKEN}, {   3} },              
    { {       318}, { 140} }, // identifier
    { {       269}, { 122} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_112[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -95} }, 
};

SR_ s_113[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -96} }, 
};

SR_ s_114[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -97} }, 
};

SR_ s_115[] =
{
    { { DEF_RED}, {   3} },               
    { {     352}, { 141} }, // _symbols   
    { {     349}, { 142} }, // _symbol_exp
    { {       0}, { -39} },               
};

SR_ s_116[] =
{
    { { REQ_DEF}, {   3} },              
    { {     322}, { 143} }, // optSemiCol
    { {      59}, { 135} }, // ';'       
    { {       0}, { -10} },              
};

SR_ s_117[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -100} }, 
};

SR_ s_118[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -101} }, 
};

SR_ s_119[] =
{
    { { REQ_DEF}, {   3} },              
    { {     322}, { 144} }, // optSemiCol
    { {      59}, { 145} }, // ';'       
    { {       0}, { -10} },              
};

SR_ s_120[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -61} }, 
};

SR_ s_121[] =
{
    { { REQ_TOKEN}, {   3} },             
    { {       365}, { 146} }, // _typespec
    { {        58}, { 147} }, // ':'      
    { {         0}, {   0} },             
};

SR_ s_122[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -3} }, 
};

SR_ s_123[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -104} }, 
};

SR_ s_124[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -24} }, 
};

SR_ s_125[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -28} }, 
};

SR_ s_126[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -32} }, 
};

SR_ s_127[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -49} }, 
};

SR_ s_128[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -1} }, 
};

SR_ s_129[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -124} }, 
};

SR_ s_130[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -14} }, 
};

SR_ s_131[] =
{
    { { REQ_DEF}, {    9} },                       
    { {     375}, {  148} }, // _productionList    
    { {     373}, {  149} }, // _production        
    { {     372}, {  150} }, // _productionElements
    { {     371}, {  151} }, // _productionElement 
    { {     284}, {  152} }, // QUOTE              
    { {     269}, {  153} }, // IDENTIFIER         
    { {     259}, {  154} }, // BLOCK              
    { {     282}, {  155} }, // PREC               
    { {       0}, { -118} },                       
};

SR_ s_132[] =
{
    { { REQ_TOKEN}, {   2} },       
    { {        58}, { 156} }, // ':'
    { {         0}, {   0} },       
};

SR_ s_133[] =
{
    { { DEF_RED}, {   3} },               
    { {     352}, { 157} }, // _symbols   
    { {     349}, { 142} }, // _symbol_exp
    { {       0}, { -39} },               
};

SR_ s_134[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -75} }, 
};

SR_ s_135[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -9} }, 
};

SR_ s_136[] =
{
    { { DEF_RED}, {   3} },               
    { {     352}, { 158} }, // _symbols   
    { {     349}, { 142} }, // _symbol_exp
    { {       0}, { -39} },               
};

SR_ s_137[] =
{
    { { DEF_RED}, {   3} },               
    { {     352}, { 159} }, // _symbols   
    { {     349}, { 142} }, // _symbol_exp
    { {       0}, { -39} },               
};

SR_ s_138[] =
{
    { { DEF_RED}, {   3} },               
    { {     352}, { 160} }, // _symbols   
    { {     349}, { 142} }, // _symbol_exp
    { {       0}, { -39} },               
};

SR_ s_139[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -12} }, 
};

SR_ s_140[] =
{
    { { REQ_TOKEN}, {   2} },       
    { {        62}, { 161} }, // '>'
    { {         0}, {   0} },       
};

SR_ s_141[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -98} }, 
};

SR_ s_142[] =
{
    { { REQ_TOKEN}, {   6} },               
    { {       351}, { 162} }, // _symbolList
    { {       350}, { 163} }, // _symbol    
    { {       284}, { 164} }, // QUOTE      
    { {       318}, { 165} }, // identifier 
    { {       269}, { 122} }, // IDENTIFIER 
    { {         0}, {   0} },               
};

SR_ s_143[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -99} }, 
};

SR_ s_144[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -102} }, 
};

SR_ s_145[] =
{
    { { REQ_DEF}, {   4} },              
    { {     366}, { 166} }, // _polyspec 
    { {     318}, { 121} }, // identifier
    { {     269}, { 122} }, // IDENTIFIER
    { {       0}, {  -9} },              
};

SR_ s_146[] =
{
    { { REQ_TOKEN}, {   3} },              
    { {       318}, { 167} }, // identifier
    { {       269}, { 122} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_147[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -58} }, 
};

SR_ s_148[] =
{
    { { REQ_TOKEN}, {   4} },                        
    { {        59}, { 168} }, // ';'                 
    { {       374}, { 169} }, // _productionSeparator
    { {       124}, { 170} }, // '|'                 
    { {         0}, {   0} },                        
};

SR_ s_149[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -121} }, 
};

SR_ s_150[] =
{
    { { REQ_DEF}, {    6} },                      
    { {     371}, {  171} }, // _productionElement
    { {     284}, {  152} }, // QUOTE             
    { {     269}, {  153} }, // IDENTIFIER        
    { {     259}, {  154} }, // BLOCK             
    { {     282}, {  155} }, // PREC              
    { {       0}, { -117} },                      
};

SR_ s_151[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -116} }, 
};

SR_ s_152[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -111} }, 
};

SR_ s_153[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -112} }, 
};

SR_ s_154[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -113} }, 
};

SR_ s_155[] =
{
    { { REQ_TOKEN}, {   4} },              
    { {       370}, { 172} }, // _precSpec 
    { {       269}, { 173} }, // IDENTIFIER
    { {       284}, { 174} }, // QUOTE     
    { {         0}, {   0} },              
};

SR_ s_156[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -122} }, 
};

SR_ s_157[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -74} }, 
};

SR_ s_158[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -81} }, 
};

SR_ s_159[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -85} }, 
};

SR_ s_160[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -94} }, 
};

SR_ s_161[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -4} }, 
};

SR_ s_162[] =
{
    { { REQ_DEF}, {  50} },                                 
    { {     322}, { 175} }, // optSemiCol                   
    { {     320}, { 176} }, // optComma                     
    { {      59}, { 135} }, // ';'                          
    { {      44}, { 177} }, // ','                          
    { { errTok_}, { -10} }, // errTok_                      
    { {     257}, { -10} }, // BASECLASS_HEADER             
    { {     258}, { -10} }, // BASECLASS_PREINCLUDE         
    { {     260}, { -10} }, // CLASS_HEADER                 
    { {     261}, { -10} }, // CLASS_NAME                   
    { {     262}, { -10} }, // CONSTRUCTOR_CHECKS           
    { {     263}, { -10} }, // DEBUGFLAG                    
    { {     264}, { -10} }, // DEFAULT_ACTIONS              
    { {     265}, { -10} }, // ERROR_VERBOSE                
    { {     266}, { -10} }, // EXPECT                       
    { {     267}, { -10} }, // FILENAMES                    
    { {     268}, { -10} }, // FLEX                         
    { {     285}, { -10} }, // REQUIRED                     
    { {     270}, { -10} }, // IMPLEMENTATION_HEADER        
    { {     271}, { -10} }, // LEFT                         
    { {     272}, { -10} }, // LOCATIONSTRUCT               
    { {     273}, { -10} }, // LSP_NEEDED                   
    { {     274}, { -10} }, // LTYPE                        
    { {     275}, { -10} }, // NAMESPACE                    
    { {     276}, { -10} }, // NEG_DOLLAR                   
    { {     277}, { -10} }, // NOLINES                      
    { {     278}, { -10} }, // NONASSOC                     
    { {     280}, { -10} }, // PARSEFUN_SOURCE              
    { {     281}, { -10} }, // POLYMORPHIC                  
    { {     283}, { -10} }, // PRINT_TOKENS                 
    { {     286}, { -10} }, // RIGHT                        
    { {     287}, { -10} }, // SCANNER                      
    { {     288}, { -10} }, // SCANNER_CLASS_NAME           
    { {     289}, { -10} }, // SCANNER_MATCHED_TEXT_FUNCTION
    { {     290}, { -10} }, // SCANNER_TOKEN_FUNCTION       
    { {     291}, { -10} }, // STACK_EXPANSION              
    { {     292}, { -10} }, // START                        
    { {     294}, { -10} }, // STYPE                        
    { {     295}, { -10} }, // TARGET_DIRECTORY             
    { {     296}, { -10} }, // TOKEN                        
    { {     297}, { -10} }, // TWO_PERCENTS                 
    { {     298}, { -10} }, // TYPE                         
    { {     299}, { -10} }, // UNION                        
    { {     300}, { -10} }, // WARN_TAGS                    
    { {     301}, { -10} }, // WEAK_TAGS                    
    { {     302}, { -10} }, // PROMPT                       
    { {     303}, { -10} }, // THREAD_SAFE                  
    { {     304}, { -10} }, // TOKEN_CLASS                  
    { {     305}, { -10} }, // TOKEN_NAMESPACE              
    { {     306}, { -10} }, // TOKEN_PATH                   
    { {       0}, {  -6} },                                 
};

SR_ s_163[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -43} }, 
};

SR_ s_164[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -40} }, 
};

SR_ s_165[] =
{
    { { REQ_DEF}, {   3} },             
    { {     321}, { 178} }, // optNumber
    { {     279}, { 179} }, // NUMBER   
    { {       0}, {  -8} },             
};

SR_ s_166[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -60} }, 
};

SR_ s_167[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -59} }, 
};

SR_ s_168[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -123} }, 
};

SR_ s_169[] =
{
    { { REQ_DEF}, {    8} },                       
    { {     373}, {  180} }, // _production        
    { {     372}, {  150} }, // _productionElements
    { {     371}, {  151} }, // _productionElement 
    { {     284}, {  152} }, // QUOTE              
    { {     269}, {  153} }, // IDENTIFIER         
    { {     259}, {  154} }, // BLOCK              
    { {     282}, {  155} }, // PREC               
    { {       0}, { -118} },                       
};

SR_ s_170[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -119} }, 
};

SR_ s_171[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -115} }, 
};

SR_ s_172[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -114} }, 
};

SR_ s_173[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -109} }, 
};

SR_ s_174[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -110} }, 
};

SR_ s_175[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -44} }, 
};

SR_ s_176[] =
{
    { { REQ_TOKEN}, {   5} },              
    { {       350}, { 181} }, // _symbol   
    { {       284}, { 164} }, // QUOTE     
    { {       318}, { 165} }, // identifier
    { {       269}, { 122} }, // IDENTIFIER
    { {         0}, {   0} },              
};

SR_ s_177[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -5} }, 
};

SR_ s_178[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -41} }, 
};

SR_ s_179[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -7} }, 
};

SR_ s_180[] =
{
    { { DEF_RED}, {    1} }, 
    { {       0}, { -120} }, 
};

SR_ s_181[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -42} }, 
};


// State array:
SR_ *s_state[] =
{
  s_0,  s_1,  s_2,  s_3,  s_4,  s_5,  s_6,  s_7,  s_8,  s_9,
  s_10,  s_11,  s_12,  s_13,  s_14,  s_15,  s_16,  s_17,  s_18,  s_19,
  s_20,  s_21,  s_22,  s_23,  s_24,  s_25,  s_26,  s_27,  s_28,  s_29,
  s_30,  s_31,  s_32,  s_33,  s_34,  s_35,  s_36,  s_37,  s_38,  s_39,
  s_40,  s_41,  s_42,  s_43,  s_44,  s_45,  s_46,  s_47,  s_48,  s_49,
  s_50,  s_51,  s_52,  s_53,  s_54,  s_55,  s_56,  s_57,  s_58,  s_59,
  s_60,  s_61,  s_62,  s_63,  s_64,  s_65,  s_66,  s_67,  s_68,  s_69,
  s_70,  s_71,  s_72,  s_73,  s_74,  s_75,  s_76,  s_77,  s_78,  s_79,
  s_80,  s_81,  s_82,  s_83,  s_84,  s_85,  s_86,  s_87,  s_88,  s_89,
  s_90,  s_91,  s_92,  s_93,  s_94,  s_95,  s_96,  s_97,  s_98,  s_99,
  s_100,  s_101,  s_102,  s_103,  s_104,  s_105,  s_106,  s_107,  s_108,  s_109,
  s_110,  s_111,  s_112,  s_113,  s_114,  s_115,  s_116,  s_117,  s_118,  s_119,
  s_120,  s_121,  s_122,  s_123,  s_124,  s_125,  s_126,  s_127,  s_128,  s_129,
  s_130,  s_131,  s_132,  s_133,  s_134,  s_135,  s_136,  s_137,  s_138,  s_139,
  s_140,  s_141,  s_142,  s_143,  s_144,  s_145,  s_146,  s_147,  s_148,  s_149,
  s_150,  s_151,  s_152,  s_153,  s_154,  s_155,  s_156,  s_157,  s_158,  s_159,
  s_160,  s_161,  s_162,  s_163,  s_164,  s_165,  s_166,  s_167,  s_168,  s_169,
  s_170,  s_171,  s_172,  s_173,  s_174,  s_175,  s_176,  s_177,  s_178,  s_179,
  s_180,  s_181,
};

} // anonymous namespace ends



// $insert polymorphicCode
namespace Meta_
{

size_t const *t_nErrors;
// $insert idoftag
char const *idOfTag_[] = {
    "SYMBOL",
    "TERMINAL",
    "BLOCK",
    "TEXT",
    "SIZE_T",
    "BOOL",
    "<undefined>"
};

size_t const *s_nErrors_;

Base::~Base()
{}

}   // namespace Meta_

// If the parsing function call (i.e., parse()' needs arguments, then provide
// an overloaded function.  The code below doesn't rely on parameters, so no
// arguments are required.  Furthermore, parse uses a function try block to
// allow us to do ACCEPT and ABORT from anywhere, even from within members
// called by actions, simply throwing the appropriate exceptions.


// base/base1
ParserBase::ParserBase()
:
    d_token(Reserved_::UNDETERMINED_),
    // $insert baseclasscode
    d_requiredTokens_(0)
{
    Meta_::t_nErrors = &d_nErrors_;
}

// base/clearin
void ParserBase::clearin_()
{
    d_nErrors_ = 0;
    d_stackIdx = -1;
    d_stateStack.clear();
    d_token = Reserved_::UNDETERMINED_;
    d_next = TokenPair{ Reserved_::UNDETERMINED_, STYPE_{} };
    d_recovery = false;
    d_acceptedTokens_ = d_requiredTokens_;
    d_val_ = STYPE_{};

    push_(0);
}

// base/debugfunctions

void ParserBase::setDebug(bool mode)
{
    d_actionCases_ = false;
    d_debug_ = mode;
}

void ParserBase::setDebug(DebugMode_ mode)
{
    d_actionCases_ = mode & ACTIONCASES;
    d_debug_ =       mode & ON;
}

// base/lex
void ParserBase::lex_(int token)
{
    d_token = token;

    if (d_token <= 0)
        d_token = Reserved_::EOF_;

    d_terminalToken = true;
}

// base/lookup
int ParserBase::lookup_() const
{
    // if the final transition is negative, then we should reduce by the rule
    // given by its positive value.

    SR_ const *sr = s_state[d_state];
    SR_ const *last = sr + sr->d_lastIdx;

    for ( ; ++sr != last; )           // visit all but the last SR entries
    {
        if (sr->d_token == d_token)
            return sr->d_action;
    }

    if (sr == last)   // reached the last element
    {
        if (sr->d_action < 0)   // default reduction
        {
            return sr->d_action;                
        }

        // No default reduction, so token not found, so error.
        throw UNEXPECTED_TOKEN_;
    }

    // not at the last element: inspect the nature of the action
    // (< 0: reduce, 0: ACCEPT, > 0: shift)

    int action = sr->d_action;


    return action;
}

// base/pop
void ParserBase::pop_(size_t count)
{
    if (d_stackIdx < static_cast<int>(count))
    {
        ABORT();
    }

    d_stackIdx -= count;
    d_state = d_stateStack[d_stackIdx].first;
    d_vsp = &d_stateStack[d_stackIdx];

}

// base/poptoken
void ParserBase::popToken_()
{
    d_token = d_next.first;
    d_val_ = std::move(d_next.second);

    d_next.first = Reserved_::UNDETERMINED_;
}

// base/push
void ParserBase::push_(size_t state)
{
    size_t currentSize = d_stateStack.size();
    if (stackSize_() == currentSize)
    {
        size_t newSize = currentSize + STACK_EXPANSION_;
        d_stateStack.resize(newSize);
    }

    ++d_stackIdx;
    d_stateStack[d_stackIdx] = 
                    StatePair{ d_state = state, std::move(d_val_) };

    d_vsp = &d_stateStack[d_stackIdx];

    if (d_stackIdx == 0)
    {
    }
    else
    {
    }
}

// base/pushtoken
void ParserBase::pushToken_(int token)
{
    d_next = TokenPair{ d_token, std::move(d_val_) };
    d_token = token;
}

// base/redotoken
void ParserBase::redoToken_()
{
    if (d_token != Reserved_::UNDETERMINED_)
        pushToken_(d_token);
}

// base/reduce
void ParserBase::reduce_(int rule)
{
    PI_ const &pi = s_productionInfo[rule];

    d_token = pi.d_nonTerm;
    pop_(pi.d_size);

    d_terminalToken = false;
}

// base/shift
void ParserBase::shift_(int action)
{
    push_(action);
    popToken_();               // token processed

    if (d_recovery and d_terminalToken)
    {
        d_recovery = false;
        d_acceptedTokens_ = 0;
    }
}

// base/startrecovery
void ParserBase::startRecovery_()
{
    int lastToken = d_token;                // give the unexpected token a
                                            // chance to be processed
                                            // again.

    pushToken_(Reserved_::errTok_);      // specify errTok_ as next token
    push_(lookup_());                     // push the error state

    d_token = lastToken;                    // reactivate the unexpected
                                            // token (we're now in an
                                            // ERROR state).

    d_recovery = true;
}

// base/top
inline size_t ParserBase::top_() const
{
    return d_stateStack[d_stackIdx].first;
}

// derived/errorrecovery
void Parser::errorRecovery_()
{
    // When an error has occurred, pop elements off the stack until the top
    // state has an error-item. If none is found, the default recovery
    // mode (which is to abort) is activated. 
    //
    // If EOF is encountered without being appropriate for the current state,
    // then the error recovery will fall back to the default recovery mode.
    // (i.e., parsing terminates)



    if (d_acceptedTokens_ >= d_requiredTokens_)// only generate an error-
    {                                           // message if enough tokens 
        ++d_nErrors_;                          // were accepted. Otherwise
        error();                                // simply skip input
    }

    // get the error state
    while (not (s_state[top_()][0].d_type & ERR_ITEM))
    {
        pop_();
    }

    // In the error state, looking up a token allows us to proceed.
    // Continuation may be require multiple reductions, but eventually a
    // terminal-token shift is used. See nextCycle_ for details.

    startRecovery_();
}

// derived/executeaction
void Parser::executeAction_(int production)
try
{
    if (token_() != Reserved_::UNDETERMINED_)
        pushToken_(token_());     // save an already available token
    switch (production)
    {
        // $insert actioncases
        
        case 2:
#line 48 "grammar"
        {
         expectRules();
         }
        break;

        case 3:
#line 3 "inc/identifier"
        {
         d_val_ = d_matched;
         }
        break;

        case 4:
#line 5 "inc/typename"
        {
         checkField(vs_(-1).get<Tag_::TEXT>()); 
         }
        break;

        case 7:
#line 9 "inc/opt"
        {
         d_val_ = true;
         }
        break;

        case 8:
#line 13 "inc/opt"
        {
         d_val_ = false;
         }
        break;

        case 11:
#line 25 "inc/opt"
        {
         d_expect = "token name";
         }
        break;

        case 13:
#line 35 "inc/opt"
        {
         d_field.clear();
         }
        break;

        case 14:
#line 42 "inc/opt"
        {
         wmsg << 
         "Ignoring all input beyond the second %% token" << endl;
         ACCEPT();
         }
        break;

        case 16:
#line 3 "inc/directives"
        {
         d_expect = "baseclass header name";
         }
        break;

        case 17:
#line 10 "inc/directives"
        {
         d_expect = "baseclass pre-include name";
         }
        break;

        case 18:
#line 17 "inc/directives"
        {
         d_expect = "class header name";
         }
        break;

        case 19:
#line 24 "inc/directives"
        {
         d_expect = "class name";
         }
        break;

        case 20:
#line 31 "inc/directives"
        {
         d_expect = "number (of conflicts)";
         }
        break;

        case 21:
#line 38 "inc/directives"
        {
         d_expect = "generic name of files";
         }
        break;

        case 22:
#line 45 "inc/directives"
        {
         d_expect = "implementation header name";
         }
        break;

        case 23:
#line 51 "inc/directives"
        {
         Terminal::incrementPrecedence();
         }
        break;

        case 24:
#line 59 "inc/directives"
        {
         d_association = Terminal::LEFT;
         }
        break;

        case 25:
#line 66 "inc/directives"
        {
         d_expect = "Location struct definition";
         }
        break;

        case 26:
#line 73 "inc/directives"
        {
         d_expect = "Location type specification";
         }
        break;

        case 27:
#line 80 "inc/directives"
        {
         d_expect = "Namespace identifier";
         }
        break;

        case 28:
#line 88 "inc/directives"
        {
         d_association = Terminal::NONASSOC;
         }
        break;

        case 29:
#line 95 "inc/directives"
        {
         d_expect = "File name for the parse() member";
         }
        break;

        case 30:
#line 101 "inc/directives"
        {
         d_val_ = Terminal::sPrecedence();
         Terminal::resetPrecedence();
         }
        break;

        case 31:
#line 109 "inc/directives"
        {
         d_expect = "Required number of tokens between errors";
         }
        break;

        case 32:
#line 117 "inc/directives"
        {
         d_association = Terminal::RIGHT;
         }
        break;

        case 33:
#line 124 "inc/directives"
        {
         d_expect = "Path to the scanner header filename";
         }
        break;

        case 34:
#line 131 "inc/directives"
        {
         d_expect = "Name of the Scanner class";
         }
        break;

        case 35:
#line 138 "inc/directives"
        {
         d_expect = "Scanner function returning the next token";
         }
        break;

        case 36:
#line 145 "inc/directives"
        {
         d_expect = "Scanner function returning the matched text";
         }
        break;

        case 37:
#line 152 "inc/directives"
        {
         d_expect = "Stack expansion size";
         }
        break;

        case 38:
#line 159 "inc/directives"
        {
         d_expect = "Start rule" ;
         }
        break;

        case 39:
#line 165 "inc/directives"
        {
         d_expect = "identifier or character-constant";
         }
        break;

        case 40:
#line 172 "inc/directives"
        {
         defineTerminal(d_scanner.canonicalQuote(), Symbol::CHAR_TERMINAL);
         }
        break;

        case 41:
#line 178 "inc/directives"
        { 
         defineTokenName(vs_(-1).get<Tag_::TEXT>(), vs_(0).get<Tag_::BOOL>()); 
         }
        break;

        case 45:
#line 197 "inc/directives"
        {
         d_expect = "target directory";
         }
        break;

        case 46:
#line 204 "inc/directives"
        {
         d_expect = "type-name";
         d_typeDirective = true;
         }
        break;

        case 47:
#line 212 "inc/directives"
        {
         d_expect = "STYPE type name" ;
         }
        break;

        case 48:
#line 218 "inc/directives"
        {
         d_expect = "opt. <type> identifier(s) or char constant(s)";
         }
        break;

        case 49:
#line 226 "inc/directives"
        {
         d_association = Terminal::UNDEFINED;
         }
        break;

        case 50:
#line 233 "inc/directives"
        {
         d_expect = "token class name";
         }
        break;

        case 51:
#line 240 "inc/directives"
        {
         d_expect = "token namespace";
         }
        break;

        case 52:
#line 247 "inc/directives"
        {
         d_expect = "path to the token file";
         }
        break;

        case 53:
#line 254 "inc/directives"
        {
         d_expect = "Semantic value union definition";
         }
        break;

        case 54:
#line 261 "inc/directives"
        {
         d_expect = "%default-actions on/off specification";
         }
        break;

        case 55:
#line 268 "inc/directives"
        {
         d_expect = "%constructor-checks  on/off specification";
         }
        break;

        case 56:
#line 275 "inc/directives"
        {
         d_expect = "%tag-mismatches on/off specification";
         }
        break;

        case 57:
#line 282 "inc/directives"
        {
         setPolymorphicDecl();
         }
        break;

        case 58:
#line 289 "inc/directives"
        {
         d_scanner.beginTypeSpec();
         }
        break;

        case 59:
#line 296 "inc/directives"
        {
         addPolymorphic(vs_(-2).get<Tag_::TEXT>(), vs_(0).get<Tag_::TEXT>());
         }
        break;

        case 62:
#line 311 "inc/directives"
        {
         d_options.setBaseClassHeader(); 
         }
        break;

        case 63:
#line 317 "inc/directives"
        {
         d_options.setPreInclude();
         }
        break;

        case 64:
#line 323 "inc/directives"
        {
         d_options.setClassHeader();
         }
        break;

        case 65:
#line 329 "inc/directives"
        {
         d_options.setClassName();
         }
        break;

        case 66:
#line 334 "inc/directives"
        {
         d_options.setGenDebug();
         }
        break;

        case 67:
#line 339 "inc/directives"
        {
         d_options.setPrompt();
         }
        break;

        case 68:
#line 344 "inc/directives"
        {
         d_options.setThreadSafe();
         }
        break;

        case 69:
#line 349 "inc/directives"
        {
         d_options.setErrorVerbose();
         }
        break;

        case 70:
#line 355 "inc/directives"
        {
         setExpectedConflicts();
         }
        break;

        case 71:
#line 361 "inc/directives"
        {
         d_options.setGenericFilename();
         }
        break;

        case 72:
#line 366 "inc/directives"
        {
         d_options.setFlex();
         }
        break;

        case 73:
#line 372 "inc/directives"
        {
         d_options.setImplementationHeader();
         }
        break;

        case 75:
#line 384 "inc/directives"
        {
         d_options.setLocationDecl(d_scanner.block().str());
         }
        break;

        case 76:
#line 389 "inc/directives"
        {
         d_options.setLspNeeded();
         }
        break;

        case 77:
#line 395 "inc/directives"
        {
         d_options.setLtype();
         }
        break;

        case 78:
#line 401 "inc/directives"
        {
         d_options.setNamespace();
         }
        break;

        case 79:
#line 406 "inc/directives"
        {
         setNegativeDollarIndices();
         }
        break;

        case 80:
#line 411 "inc/directives"
        {
         d_options.unsetLines();
         }
        break;

        case 82:
#line 422 "inc/directives"
        {
         d_options.setParsefunSource();
         }
        break;

        case 83:
#line 427 "inc/directives"
        {
         d_options.setPrintTokens();
         }
        break;

        case 84:
#line 433 "inc/directives"
        {
         d_options.setRequiredTokens(d_scanner.number());
         }
        break;

        case 86:
#line 444 "inc/directives"
        {
         d_options.setScannerInclude();
         }
        break;

        case 87:
#line 450 "inc/directives"
        {
         d_options.setScannerClassName();
         }
        break;

        case 88:
#line 456 "inc/directives"
        {
         d_options.setScannerTokenFunction();
         }
        break;

        case 89:
#line 462 "inc/directives"
        {
         d_options.setScannerMatchedTextFunction();
         }
        break;

        case 90:
#line 468 "inc/directives"
        {
         d_options.setStackExpansion(d_scanner.number());
         }
        break;

        case 91:
#line 474 "inc/directives"
        {
         setStart();
         }
        break;

        case 92:
#line 480 "inc/directives"
        {
         d_options.setStype();
         }
        break;

        case 93:
#line 486 "inc/directives"
        {
         d_options.setTargetDirectory();
         }
        break;

        case 94:
#line 494 "inc/directives"
        {
         Terminal::set_sPrecedence(vs_(-1).get<Tag_::SIZE_T>());
         }
        break;

        case 95:
#line 500 "inc/directives"
        {
         d_options.setTokenClass();
         }
        break;

        case 96:
#line 506 "inc/directives"
        {
         d_options.setTokenNameSpace();
         }
        break;

        case 97:
#line 512 "inc/directives"
        {
         d_options.setTokenPath();
         }
        break;

        case 99:
#line 523 "inc/directives"
        {
         setUnionDecl();
         }
        break;

        case 100:
#line 529 "inc/directives"
        {
         defaultAction();
         }
        break;

        case 101:
#line 535 "inc/directives"
        {
         constructorChecks();
         }
        break;

        case 103:
#line 544 "inc/directives"
        {
         d_options.unsetStrongTags();
         }
        break;

        case 104:
#line 550 "inc/directives"
        {
         warnTagMismatches();
         }
        break;

        case 106:
#line 560 "inc/directives"
        {
         d_expect.erase();
         d_typeDirective = false;
         }
        break;

        case 109:
#line 3 "inc/rules"
        {
         d_val_.assign<Tag_::SIZE_T>(IDENTIFIER);
         }
        break;

        case 110:
#line 8 "inc/rules"
        {
         d_val_.assign<Tag_::SIZE_T>(QUOTE);
         }
        break;

        case 111:
#line 15 "inc/rules"
        {
         d_val_ = useTerminal();
         }
        break;

        case 112:
#line 20 "inc/rules"
        {
         d_val_ = useSymbol();
         }
        break;

        case 113:
#line 25 "inc/rules"
        {
         d_val_ = d_scanner.block();
         }
        break;

        case 114:
#line 31 "inc/rules"
        {
         setPrecedence(vs_(0).get<Tag_::SIZE_T>());
         d_val_ = STYPE_{};
         }
        break;

        case 115:
#line 39 "inc/rules"
        {
         d_val_ = handleProductionElements(vs_(-1), vs_(0));
         
         
         }
        break;

        case 116:
#line 46 "inc/rules"
        {
         d_val_ = vs_(0);
         }
        break;

        case 117:
#line 53 "inc/rules"
        {
         handleProductionElement(vs_(0));
         
         
         }
        break;

        case 118:
#line 59 "inc/rules"
        {
         
         
         checkEmptyBlocktype();
         }
        break;

        case 119:
#line 69 "inc/rules"
        {
         d_rules.addProduction(d_scanner.lineNr());
         }
        break;

        case 122:
#line 84 "inc/rules"
        {
         openRule(vs_(-1).get<Tag_::TEXT>());
         }
        break;

        case 123:
#line 93 "inc/rules"
        {
         updateDefaultActionLineNr();
         }
        break;

    }
}
catch (std::exception const &exc)
{
    exceptionHandler(exc);
}

// derived/nextcycle
void Parser::nextCycle_()
try
{
    if (s_state[state_()]->d_type & REQ_TOKEN)
        nextToken_();              // obtain next token


    int action = lookup_();        // lookup d_token in d_state

    if (action > 0)                 // SHIFT: push a new state
    {
        shift_(action);
        return;
    }

    if (action < 0)            // REDUCE: execute and pop.
    {

        if (recovery_())
            redoToken_();
        else
            executeAction_(-action);
                                            // next token is the rule's LHS
        reduce_(-action); 
        return;
    }

    if (recovery_())
        ABORT();
    else 
        ACCEPT();
}
catch (ErrorRecovery_)
{
    if (not recovery_())
        errorRecovery_();
    else
    {
        if (token_() == Reserved_::EOF_)
            ABORT();
        popToken_();               // skip the failing token
    }
}


// derived/nexttoken
void Parser::nextToken_()
{ 
    // If d_token is Reserved_::UNDETERMINED_ then if savedToken_() is
    // Reserved_::UNDETERMINED_ another token is obtained from lex(). Then
    // savedToken_() is assigned to d_token.

                                    // no need for a token: got one already
    if (token_() != Reserved_::UNDETERMINED_) 
    {
        return;                             
    }

    if (savedToken_() != Reserved_::UNDETERMINED_)
    {
        popToken_();               // consume pending token
    }
    else
    {
        ++d_acceptedTokens_;       // accept another token (see
                                    // errorRecover())
        lex_(lex());
        print_();
    }
    print();
}

// derived/print
void Parser::print_()
{
// $insert print
}

// derived/parse
int Parser::parse()
try 
{
    // The parsing algorithm:
    // Initially, state 0 is pushed on the stack, and all relevant variables
    // are initialized by Base::clearin_.
    //
    // Then, in an eternal loop:
    //
    //  1. If a state is a REQ_TOKEN type, then the next token is obtained
    //     from nextToken().  This may very well be the currently available
    //     token. When retrieving a terminal token d_terminal is set to true.
    //
    //  2. lookup() is called, d_token is looked up in the current state's
    //     SR_ array.
    //
    //  4. Depending on the result of the lookup() function the next state is
    //     shifted on the parser's stack, a reduction by some rule is applied,
    //     or the parsing function returns ACCEPT(). When a reduction is
    //     called for, any action that may have been defined for that
    //     reduction is executed.
    //
    //  5. An error occurs if d_token is not found, and the state has no
    //     default reduction.

    clearin_();                            // initialize, push(0)

    while (true)
    {
// $insert prompt
        nextCycle_();
    }
}
catch (Return_ retValue)
{
    return retValue or d_nErrors_;
}


// derived/tail


