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

using namespace PCBCALC_DATA_T;

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

const KEYWORD PCB_CALCULATOR_DATAFILE_LEXER::keywords[] = {
    TOKDEF( reg_iadj ),
    TOKDEF( reg_type ),
    TOKDEF( reg_vref ),
    TOKDEF( regulator ),
    TOKDEF( regulators )
};

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


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