// Generated by Bisonc++ V2.4.8 on Fri, 11 Jun 2010 10:00:34 +0200

// $insert class.ih
#include "tnlConfigDescriptionParser.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 _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 _error_
// which is applied. In this _error_ 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)
// Last element:    {set to d_token__,    action to perform}
//      }

// When the --thread-safe option is specified, all static data are defined as
// const. If --thread-safe is not provided, the state-tables are not defined
// as const, since the lookup() function below will modify them


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

    enum 
    {
        STACK_EXPANSION = 5     // size to expand the state-stack with when
                                // full
    };

    enum ReservedTokens
    {
        PARSE_ACCEPT     = 0,   // `ACCEPT' TRANSITION
        _UNDETERMINED_   = -2,
        _EOF_            = -1,
        _error_          = 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
    };    
    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
            int 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)
            size_t d_errorState;    // used with Error states
        };
    };

    // $insert staticdata
    
// Productions Info Records:
PI__ const s_productionInfo[] = 
{
     {0, 0}, // not used: reduction values are negative
     {270, 1}, // 1: config_entries ->  config_entry
     {270, 2}, // 2: config_entries ->  config_entry config_entries
     {271, 1}, // 3: config_entry ->  keyword
     {271, 1}, // 4: config_entry ->  group
     {273, 8}, // 5: group ->  GROUP group_identifier '{' keywords '}' ',' group_comment ';'
     {275, 1}, // 6: keywords ->  keyword
     {275, 2}, // 7: keywords ->  keyword keywords
     {272, 1}, // 8: keyword ->  string_keyword
     {272, 1}, // 9: keyword ->  integer_keyword
     {272, 1}, // 10: keyword ->  real_keyword
     {272, 1}, // 11: keyword ->  boolean_keyword
     {272, 2}, // 12: keyword ->  list_of_keyword string_keyword
     {272, 2}, // 13: keyword ->  list_of_keyword integer_keyword
     {272, 2}, // 14: keyword ->  list_of_keyword real_keyword
     {272, 2}, // 15: keyword ->  list_of_keyword boolean_keyword
     {277, 3}, // 16: string_keyword ->  STRING_KEYWORD keyword_identifier ';'
     {277, 6}, // 17: string_keyword ->  STRING_KEYWORD keyword_identifier '(' '!' ')' ';'
     {277, 6}, // 18: string_keyword ->  STRING_KEYWORD keyword_identifier '(' string_value ')' ';'
     {277, 4}, // 19: string_keyword ->  STRING_KEYWORD keyword_identifier keyword_comment ';'
     {277, 7}, // 20: string_keyword ->  STRING_KEYWORD keyword_identifier '(' '!' ')' keyword_comment ';'
     {277, 7}, // 21: string_keyword ->  STRING_KEYWORD keyword_identifier '(' string_value ')' keyword_comment ';'
     {278, 3}, // 22: integer_keyword ->  INTEGER_KEYWORD keyword_identifier ';'
     {278, 6}, // 23: integer_keyword ->  INTEGER_KEYWORD keyword_identifier '(' '!' ')' ';'
     {278, 6}, // 24: integer_keyword ->  INTEGER_KEYWORD keyword_identifier '(' integer_value ')' ';'
     {278, 4}, // 25: integer_keyword ->  INTEGER_KEYWORD keyword_identifier keyword_comment ';'
     {278, 7}, // 26: integer_keyword ->  INTEGER_KEYWORD keyword_identifier '(' '!' ')' keyword_comment ';'
     {278, 7}, // 27: integer_keyword ->  INTEGER_KEYWORD keyword_identifier '(' integer_value ')' keyword_comment ';'
     {279, 3}, // 28: real_keyword ->  REAL_KEYWORD keyword_identifier ';'
     {279, 6}, // 29: real_keyword ->  REAL_KEYWORD keyword_identifier '(' '!' ')' ';'
     {279, 6}, // 30: real_keyword ->  REAL_KEYWORD keyword_identifier '(' real_value ')' ';'
     {279, 4}, // 31: real_keyword ->  REAL_KEYWORD keyword_identifier keyword_comment ';'
     {279, 7}, // 32: real_keyword ->  REAL_KEYWORD keyword_identifier '(' '!' ')' keyword_comment ';'
     {279, 7}, // 33: real_keyword ->  REAL_KEYWORD keyword_identifier '(' real_value ')' keyword_comment ';'
     {280, 3}, // 34: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier ';'
     {280, 6}, // 35: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier '(' '!' ')' ';'
     {280, 6}, // 36: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier '(' boolean_value ')' ';'
     {280, 4}, // 37: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier keyword_comment ';'
     {280, 7}, // 38: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier '(' '!' ')' keyword_comment ';'
     {280, 7}, // 39: boolean_keyword ->  BOOLEAN_KEYWORD keyword_identifier '(' boolean_value ')' keyword_comment ';'
     {281, 1}, // 40: list_of_keyword ->  LIST_OF_KEYWORD
     {274, 1}, // 41: group_identifier ->  IDENTIFIER
     {276, 1}, // 42: group_comment ->  COMMENT
     {287, 1}, // 43: keyword_identifier ->  IDENTIFIER
     {283, 1}, // 44: keyword_comment ->  COMMENT
     {282, 1}, // 45: string_value ->  STRING
     {285, 1}, // 46: real_value ->  REAL
     {284, 1}, // 47: integer_value ->  INTEGER
     {286, 1}, // 48: boolean_value ->  BOOLEAN
     {288, 1}, // 49: config_entries_$ ->  config_entries
};

// State info and SR__ transitions for each state.


SR__ s_0[] =
{
    { { REQ_TOKEN}, { 16} },                   
    { {       270}, {  1} }, // config_entries 
    { {       271}, {  2} }, // config_entry   
    { {       272}, {  3} }, // keyword        
    { {       273}, {  4} }, // group          
    { {       277}, {  5} }, // string_keyword 
    { {       278}, {  6} }, // integer_keyword
    { {       279}, {  7} }, // real_keyword   
    { {       280}, {  8} }, // boolean_keyword
    { {       281}, {  9} }, // list_of_keyword
    { {       257}, { 10} }, // GROUP          
    { {       258}, { 11} }, // STRING_KEYWORD 
    { {       259}, { 12} }, // INTEGER_KEYWORD
    { {       260}, { 13} }, // REAL_KEYWORD   
    { {       261}, { 14} }, // BOOLEAN_KEYWORD
    { {       262}, { 15} }, // LIST_OF_KEYWORD
    { {         0}, {  0} },                   
};

SR__ s_1[] =
{
    { { REQ_TOKEN}, {            2} }, 
    { {     _EOF_}, { PARSE_ACCEPT} }, 
    { {         0}, {            0} }, 
};

SR__ s_2[] =
{
    { { REQ_DEF}, { 16} },                   
    { {     270}, { 16} }, // config_entries 
    { {     271}, {  2} }, // config_entry   
    { {     272}, {  3} }, // keyword        
    { {     273}, {  4} }, // group          
    { {     277}, {  5} }, // string_keyword 
    { {     278}, {  6} }, // integer_keyword
    { {     279}, {  7} }, // real_keyword   
    { {     280}, {  8} }, // boolean_keyword
    { {     281}, {  9} }, // list_of_keyword
    { {     257}, { 10} }, // GROUP          
    { {     258}, { 11} }, // STRING_KEYWORD 
    { {     259}, { 12} }, // INTEGER_KEYWORD
    { {     260}, { 13} }, // REAL_KEYWORD   
    { {     261}, { 14} }, // BOOLEAN_KEYWORD
    { {     262}, { 15} }, // LIST_OF_KEYWORD
    { {       0}, { -1} },                   
};

SR__ s_3[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -3} }, 
};

SR__ s_4[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -4} }, 
};

SR__ s_5[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -8} }, 
};

SR__ s_6[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -9} }, 
};

SR__ s_7[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -10} }, 
};

SR__ s_8[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -11} }, 
};

SR__ s_9[] =
{
    { { REQ_TOKEN}, {  9} },                   
    { {       277}, { 17} }, // string_keyword 
    { {       278}, { 18} }, // integer_keyword
    { {       279}, { 19} }, // real_keyword   
    { {       280}, { 20} }, // boolean_keyword
    { {       258}, { 11} }, // STRING_KEYWORD 
    { {       259}, { 12} }, // INTEGER_KEYWORD
    { {       260}, { 13} }, // REAL_KEYWORD   
    { {       261}, { 14} }, // BOOLEAN_KEYWORD
    { {         0}, {  0} },                   
};

SR__ s_10[] =
{
    { { REQ_TOKEN}, {  3} },                    
    { {       274}, { 21} }, // group_identifier
    { {       263}, { 22} }, // IDENTIFIER      
    { {         0}, {  0} },                    
};

SR__ s_11[] =
{
    { { REQ_TOKEN}, {  3} },                      
    { {       287}, { 23} }, // keyword_identifier
    { {       263}, { 24} }, // IDENTIFIER        
    { {         0}, {  0} },                      
};

SR__ s_12[] =
{
    { { REQ_TOKEN}, {  3} },                      
    { {       287}, { 25} }, // keyword_identifier
    { {       263}, { 24} }, // IDENTIFIER        
    { {         0}, {  0} },                      
};

SR__ s_13[] =
{
    { { REQ_TOKEN}, {  3} },                      
    { {       287}, { 26} }, // keyword_identifier
    { {       263}, { 24} }, // IDENTIFIER        
    { {         0}, {  0} },                      
};

SR__ s_14[] =
{
    { { REQ_TOKEN}, {  3} },                      
    { {       287}, { 27} }, // keyword_identifier
    { {       263}, { 24} }, // IDENTIFIER        
    { {         0}, {  0} },                      
};

SR__ s_15[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -40} }, 
};

SR__ s_16[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -2} }, 
};

SR__ s_17[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -12} }, 
};

SR__ s_18[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -13} }, 
};

SR__ s_19[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -14} }, 
};

SR__ s_20[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -15} }, 
};

SR__ s_21[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {       123}, { 28} }, // '{'
    { {         0}, {  0} },       
};

SR__ s_22[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -41} }, 
};

SR__ s_23[] =
{
    { { REQ_TOKEN}, {  5} },                   
    { {        59}, { 29} }, // ';'            
    { {        40}, { 30} }, // '('            
    { {       283}, { 31} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_24[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -43} }, 
};

SR__ s_25[] =
{
    { { REQ_TOKEN}, {  5} },                   
    { {        59}, { 33} }, // ';'            
    { {        40}, { 34} }, // '('            
    { {       283}, { 35} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_26[] =
{
    { { REQ_TOKEN}, {  5} },                   
    { {        59}, { 36} }, // ';'            
    { {        40}, { 37} }, // '('            
    { {       283}, { 38} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_27[] =
{
    { { REQ_TOKEN}, {  5} },                   
    { {        59}, { 39} }, // ';'            
    { {        40}, { 40} }, // '('            
    { {       283}, { 41} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_28[] =
{
    { { REQ_TOKEN}, { 13} },                   
    { {       275}, { 42} }, // keywords       
    { {       272}, { 43} }, // keyword        
    { {       277}, {  5} }, // string_keyword 
    { {       278}, {  6} }, // integer_keyword
    { {       279}, {  7} }, // real_keyword   
    { {       280}, {  8} }, // boolean_keyword
    { {       281}, {  9} }, // list_of_keyword
    { {       258}, { 11} }, // STRING_KEYWORD 
    { {       259}, { 12} }, // INTEGER_KEYWORD
    { {       260}, { 13} }, // REAL_KEYWORD   
    { {       261}, { 14} }, // BOOLEAN_KEYWORD
    { {       262}, { 15} }, // LIST_OF_KEYWORD
    { {         0}, {  0} },                   
};

SR__ s_29[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -16} }, 
};

SR__ s_30[] =
{
    { { REQ_TOKEN}, {  4} },                
    { {        33}, { 44} }, // '!'         
    { {       282}, { 45} }, // string_value
    { {       266}, { 46} }, // STRING      
    { {         0}, {  0} },                
};

SR__ s_31[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 47} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_32[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -44} }, 
};

SR__ s_33[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -22} }, 
};

SR__ s_34[] =
{
    { { REQ_TOKEN}, {  4} },                 
    { {        33}, { 48} }, // '!'          
    { {       284}, { 49} }, // integer_value
    { {       264}, { 50} }, // INTEGER      
    { {         0}, {  0} },                 
};

SR__ s_35[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 51} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_36[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -28} }, 
};

SR__ s_37[] =
{
    { { REQ_TOKEN}, {  4} },              
    { {        33}, { 52} }, // '!'       
    { {       285}, { 53} }, // real_value
    { {       265}, { 54} }, // REAL      
    { {         0}, {  0} },              
};

SR__ s_38[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 55} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_39[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -34} }, 
};

SR__ s_40[] =
{
    { { REQ_TOKEN}, {  4} },                 
    { {        33}, { 56} }, // '!'          
    { {       286}, { 57} }, // boolean_value
    { {       268}, { 58} }, // BOOLEAN      
    { {         0}, {  0} },                 
};

SR__ s_41[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 59} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_42[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {       125}, { 60} }, // '}'
    { {         0}, {  0} },       
};

SR__ s_43[] =
{
    { { REQ_DEF}, { 13} },                   
    { {     275}, { 61} }, // keywords       
    { {     272}, { 43} }, // keyword        
    { {     277}, {  5} }, // string_keyword 
    { {     278}, {  6} }, // integer_keyword
    { {     279}, {  7} }, // real_keyword   
    { {     280}, {  8} }, // boolean_keyword
    { {     281}, {  9} }, // list_of_keyword
    { {     258}, { 11} }, // STRING_KEYWORD 
    { {     259}, { 12} }, // INTEGER_KEYWORD
    { {     260}, { 13} }, // REAL_KEYWORD   
    { {     261}, { 14} }, // BOOLEAN_KEYWORD
    { {     262}, { 15} }, // LIST_OF_KEYWORD
    { {       0}, { -6} },                   
};

SR__ s_44[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 62} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_45[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 63} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_46[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -45} }, 
};

SR__ s_47[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -19} }, 
};

SR__ s_48[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 64} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_49[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 65} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_50[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -47} }, 
};

SR__ s_51[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -25} }, 
};

SR__ s_52[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 66} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_53[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 67} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_54[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -46} }, 
};

SR__ s_55[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -31} }, 
};

SR__ s_56[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 68} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_57[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        41}, { 69} }, // ')'
    { {         0}, {  0} },       
};

SR__ s_58[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -48} }, 
};

SR__ s_59[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -37} }, 
};

SR__ s_60[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        44}, { 70} }, // ','
    { {         0}, {  0} },       
};

SR__ s_61[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -7} }, 
};

SR__ s_62[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 71} }, // ';'            
    { {       283}, { 72} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_63[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 73} }, // ';'            
    { {       283}, { 74} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_64[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 75} }, // ';'            
    { {       283}, { 76} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_65[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 77} }, // ';'            
    { {       283}, { 78} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_66[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 79} }, // ';'            
    { {       283}, { 80} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_67[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 81} }, // ';'            
    { {       283}, { 82} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_68[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 83} }, // ';'            
    { {       283}, { 84} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_69[] =
{
    { { REQ_TOKEN}, {  4} },                   
    { {        59}, { 85} }, // ';'            
    { {       283}, { 86} }, // keyword_comment
    { {       267}, { 32} }, // COMMENT        
    { {         0}, {  0} },                   
};

SR__ s_70[] =
{
    { { REQ_TOKEN}, {  3} },                 
    { {       276}, { 87} }, // group_comment
    { {       267}, { 88} }, // COMMENT      
    { {         0}, {  0} },                 
};

SR__ s_71[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -17} }, 
};

SR__ s_72[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 89} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_73[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -18} }, 
};

SR__ s_74[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 90} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_75[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -23} }, 
};

SR__ s_76[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 91} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_77[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -24} }, 
};

SR__ s_78[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 92} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_79[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -29} }, 
};

SR__ s_80[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 93} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_81[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -30} }, 
};

SR__ s_82[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 94} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_83[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -35} }, 
};

SR__ s_84[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 95} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_85[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -36} }, 
};

SR__ s_86[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 96} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_87[] =
{
    { { REQ_TOKEN}, {  2} },       
    { {        59}, { 97} }, // ';'
    { {         0}, {  0} },       
};

SR__ s_88[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -42} }, 
};

SR__ s_89[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -20} }, 
};

SR__ s_90[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -21} }, 
};

SR__ s_91[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -26} }, 
};

SR__ s_92[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -27} }, 
};

SR__ s_93[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -32} }, 
};

SR__ s_94[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -33} }, 
};

SR__ s_95[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -38} }, 
};

SR__ s_96[] =
{
    { { DEF_RED}, {   1} }, 
    { {       0}, { -39} }, 
};

SR__ s_97[] =
{
    { { DEF_RED}, {  1} }, 
    { {       0}, { -5} }, 
};


// 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,
};

} // anonymous namespace ends



// If the parsing function call uses 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.

tnlConfigDescriptionParserBase::tnlConfigDescriptionParserBase()
:
    d_stackIdx__(-1),
    // $insert debuginit
    d_debug__(false),
    d_nErrors__(0),
    // $insert requiredtokens
    d_requiredTokens__(0),
    d_acceptedTokens__(d_requiredTokens__),
    d_token__(_UNDETERMINED_),
    d_nextToken__(_UNDETERMINED_)
{}


void tnlConfigDescriptionParserBase::clearin()
{
    d_token__ = d_nextToken__ = _UNDETERMINED_;
}

void tnlConfigDescriptionParserBase::push__(size_t state)
{
    if (static_cast<size_t>(d_stackIdx__ + 1) == d_stateStack__.size())
    {
        size_t newSize = d_stackIdx__ + STACK_EXPANSION;
        d_stateStack__.resize(newSize);
        d_valueStack__.resize(newSize);
    }
    ++d_stackIdx__;
    d_stateStack__[d_stackIdx__] = d_state__ = state;
    *(d_vsp__ = &d_valueStack__[d_stackIdx__]) = d_val__;
}

void tnlConfigDescriptionParserBase::popToken__()
{
    d_token__ = d_nextToken__;

    d_val__ = d_nextVal__;
    d_nextVal__ = STYPE__();

    d_nextToken__ = _UNDETERMINED_;
}
     
void tnlConfigDescriptionParserBase::pushToken__(int token)
{
    d_nextToken__ = d_token__;
    d_nextVal__ = d_val__;
    d_token__ = token;
}
     
void tnlConfigDescriptionParserBase::pop__(size_t count)
{
    if (d_stackIdx__ < static_cast<int>(count))
    {
        ABORT();
    }

    d_stackIdx__ -= count;
    d_state__ = d_stateStack__[d_stackIdx__];
    d_vsp__ = &d_valueStack__[d_stackIdx__];
}

inline size_t tnlConfigDescriptionParserBase::top__() const
{
    return d_stateStack__[d_stackIdx__];
}

void tnlConfigDescriptionParser::executeAction(int production)
{
    if (d_token__ != _UNDETERMINED_)
        pushToken__(d_token__);     // save an already available token

                                    // save default non-nested block $$
    if (int size = s_productionInfo[production].d_size)
        d_val__ = d_vsp__[1 - size];

    switch (production)
    {
        // $insert actioncases
        
        case 5:
        { AddCurrentGroup(); }
        break;

        case 16:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntry( false );}
        break;

        case 17:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntry( true );}
        break;

        case 18:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 19:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntry( false );}
        break;

        case 20:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntry( true );}
        break;

        case 21:
        {
         SetCurrentEntryTypeName( "string" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 22:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntry( false );}
        break;

        case 23:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntry( true );}
        break;

        case 24:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 25:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntry( false );}
        break;

        case 26:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntry( true );}
        break;

        case 27:
        {
         SetCurrentEntryTypeName( "integer" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 28:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntry( false );}
        break;

        case 29:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntry( true );}
        break;

        case 30:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 31:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntry( false );}
        break;

        case 32:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntry( true );}
        break;

        case 33:
        {
         SetCurrentEntryTypeName( "real" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 34:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntry( false );}
        break;

        case 35:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntry( true );}
        break;

        case 36:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 37:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntry( false );}
        break;

        case 38:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntry( true );}
        break;

        case 39:
        {
         SetCurrentEntryTypeName( "bool" );
         AddCurrentEntryWithDefaultValue();}
        break;

        case 40:
        { SetCurrentEntryTypeIsList( true ); }
        break;

        case 41:
        { SetCurrentGroupId( d_vsp__[0].s_val ); }
        break;

        case 42:
        { SetCurrentGroupComment( d_vsp__[0].s_val ); }
        break;

        case 43:
        { SetCurrentEntryId( d_vsp__[0].s_val ); }
        break;

        case 44:
        { SetCurrentEntryComment( d_vsp__[0].s_val ); }
        break;

        case 45:
        { string_default_value. setString( d_vsp__[0].s_val, 1, 1 );}
        break;

        case 46:
        { real_default_value = d_vsp__[0].d_val; }
        break;

        case 47:
        { integer_default_value = d_vsp__[0].i_val; }
        break;

        case 48:
        { bool_default_value = d_vsp__[0].b_val; }
        break;

    }
}

inline void tnlConfigDescriptionParserBase::reduce__(PI__ const &pi)
{
    d_token__ = pi.d_nonTerm;
    pop__(pi.d_size);

}

// If d_token__ is _UNDETERMINED_ then if d_nextToken__ is _UNDETERMINED_ another
// token is obtained from lex(). Then d_nextToken__ is assigned to d_token__.
void tnlConfigDescriptionParser::nextToken()
{
    if (d_token__ != _UNDETERMINED_)        // no need for a token: got one
        return;                             // already

    if (d_nextToken__ != _UNDETERMINED_)
    {
        popToken__();                       // consume pending token
    }
    else
    {
        ++d_acceptedTokens__;               // accept another token (see
                                            // errorRecover())
        d_token__ = lex();
        if (d_token__ <= 0)
            d_token__ = _EOF_;
    }
    print();
}

// if the final transition is negative, then we should reduce by the rule
// given by its positive value. Note that the `recovery' parameter is only
// used with the --debug option
int tnlConfigDescriptionParser::lookup(bool recovery)
{
    // $insert threading
    SR__ *sr = s_state[d_state__];        // get the appropriate state-table
    int lastIdx = sr->d_lastIdx;        // sentinel-index in the SR__ array

    SR__ *lastElementPtr = sr + lastIdx;
    SR__ *elementPtr = sr + 1;            // start the search at s_xx[1]

    lastElementPtr->d_token = d_token__;// set search-token

    while (elementPtr->d_token != d_token__)
        ++elementPtr;

    if (elementPtr == lastElementPtr)   // reached the last element
    {
        if (elementPtr->d_action < 0)   // default reduction
        {
            return elementPtr->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 = elementPtr->d_action;


    return action;
}

    // 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)
void tnlConfigDescriptionParser::errorRecovery()
try
{
    if (d_acceptedTokens__ >= d_requiredTokens__)// only generate an error-
    {                                           // message if enough tokens 
        ++d_nErrors__;                          // were accepted. Otherwise
        error("Syntax error");                  // simply skip input

    }


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

    // In the error state, lookup a token allowing us to proceed.
    // Continuation may be possible following multiple reductions,
    // but eventuall a shift will be used, requiring the retrieval of
    // a terminal token. If a retrieved token doesn't match, the catch below 
    // will ensure the next token is requested in the while(true) block
    // implemented below:

    int lastToken = d_token__;                  // give the unexpected token a
                                                // chance to be processed
                                                // again.

    pushToken__(_error_);                       // specify _error_ as next token
    push__(lookup(true));                       // push the error state

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

    bool gotToken = true;                       // the next token is a terminal

    while (true)
    {
        try
        {
            if (s_state[d_state__]->d_type & REQ_TOKEN)
            {
                gotToken = d_token__ == _UNDETERMINED_;
                nextToken();                    // obtain next token
            }
            
            int action = lookup(true);

            if (action > 0)                 // push a new state
            {
                push__(action);
                popToken__();

                if (gotToken)
                {

                    d_acceptedTokens__ = 0;
                    return;
                }
            }
            else if (action < 0)
            {
                // no actions executed on recovery but save an already 
                // available token:
                if (d_token__ != _UNDETERMINED_)
                    pushToken__(d_token__);
 
                                            // next token is the rule's LHS
                reduce__(s_productionInfo[-action]); 
            }
            else
                ABORT();                    // abort when accepting during
                                            // error recovery
        }
        catch (...)
        {
            if (d_token__ == _EOF_)
                ABORT();                    // saw inappropriate _EOF_
                      
            popToken__();                   // failing token now skipped
        }
    }
}
catch (ErrorRecovery__)       // This is: DEFAULT_RECOVERY_MODE
{
    ABORT();
}

    // The parsing algorithm:
    // Initially, state 0 is pushed on the stack, and d_token__ as well as
    // d_nextToken__ are initialized to _UNDETERMINED_. 
    //
    // Then, in an eternal loop:
    //
    //  1. If a state does not have REQ_TOKEN no token is assigned to
    //     d_token__. If the state has REQ_TOKEN, nextToken() is called to
    //      determine d_nextToken__ and d_token__ is set to
    //     d_nextToken__. nextToken() will not call lex() unless d_nextToken__ is 
    //     _UNDETERMINED_. 
    //
    //  2. lookup() is called: 
    //     d_token__ is stored in the final element's d_token field of the
    //     state's SR_ array. 
    //
    //  3. The current token is looked up in the 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. Error handling was described at the top of this
    //     file.

int tnlConfigDescriptionParser::parse()
try 
{
    push__(0);                              // initial state
    clearin();                              // clear the tokens.

    while (true)
    {
        try
        {
            if (s_state[d_state__]->d_type & REQ_TOKEN)
                nextToken();                // obtain next token


            int action = lookup(false);     // lookup d_token__ in d_state__

            if (action > 0)                 // SHIFT: push a new state
            {
                push__(action);
                popToken__();               // token processed
            }
            else if (action < 0)            // REDUCE: execute and pop.
            {
                executeAction(-action);
                                            // next token is the rule's LHS
                reduce__(s_productionInfo[-action]); 
            }
            else 
                ACCEPT();
        }
        catch (ErrorRecovery__)
        {
            errorRecovery();
        }
    }
}
catch (Return__ retValue)
{
    return retValue;
}

