
/* Do not modify this file it was automatically generated by the
 * TokenList2DsnLexer CMake script.
 *
 * Include this file in your lexer class to provide the keywords for
 * your DSN lexer.
 */

#include <fp_lib_table_lexer.h>

using namespace FP_LIB_TABLE_T;

#define TOKDEF(x)    { #x, T_##x }

const KEYWORD FP_LIB_TABLE_LEXER::keywords[] = {
    TOKDEF( descr ),
    TOKDEF( fp_lib_table ),
    TOKDEF( lib ),
    TOKDEF( name ),
    TOKDEF( options ),
    TOKDEF( type ),
    TOKDEF( uri )
};

const unsigned FP_LIB_TABLE_LEXER::keyword_count = unsigned( sizeof( FP_LIB_TABLE_LEXER::keywords )/sizeof( FP_LIB_TABLE_LEXER::keywords[0] ) );


const char* FP_LIB_TABLE_LEXER::TokenName( T aTok )
{
    const char* ret;

    if( (unsigned) aTok < keyword_count )
    {
        ret = keywords[aTok].name;
    }
    else if( aTok < 0 )
    {
        ret = DSNLEXER::Syntax( aTok );
    }
    else
        ret = "token too big";

    return ret;
}
