
/* 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 <template_fieldnames_lexer.h>

using namespace TFIELD_T;

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

const KEYWORD TEMPLATE_FIELDNAMES_LEXER::keywords[] = {
    TOKDEF( field ),
    TOKDEF( name ),
    TOKDEF( templatefields ),
    TOKDEF( value ),
    TOKDEF( visible )
};

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


const char* TEMPLATE_FIELDNAMES_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;
}
