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

using namespace PCB_KEYS_T;

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

const KEYWORD PCB_LEXER::keywords[] = {
    TOKDEF( add_net ),
    TOKDEF( allowed ),
    TOKDEF( angle ),
    TOKDEF( arc ),
    TOKDEF( arc_segments ),
    TOKDEF( area ),
    TOKDEF( arrow1a ),
    TOKDEF( arrow1b ),
    TOKDEF( arrow2a ),
    TOKDEF( arrow2b ),
    TOKDEF( at ),
    TOKDEF( attr ),
    TOKDEF( autoplace_cost180 ),
    TOKDEF( autoplace_cost90 ),
    TOKDEF( aux_axis_origin ),
    TOKDEF( blind ),
    TOKDEF( bold ),
    TOKDEF( bottom ),
    TOKDEF( center ),
    TOKDEF( chamfer ),
    TOKDEF( circle ),
    TOKDEF( clearance ),
    TOKDEF( comment ),
    TOKDEF( company ),
    TOKDEF( connect ),
    TOKDEF( connect_pads ),
    TOKDEF( copperpour ),
    TOKDEF( crossbar ),
    TOKDEF( date ),
    TOKDEF( descr ),
    TOKDEF( die_length ),
    TOKDEF( dimension ),
    TOKDEF( drawings ),
    TOKDEF( drill ),
    TOKDEF( edge ),
    TOKDEF( edge_width ),
    TOKDEF( effects ),
    TOKDEF( end ),
    TOKDEF( feature1 ),
    TOKDEF( feature2 ),
    TOKDEF( fill ),
    TOKDEF( fill_segments ),
    TOKDEF( filled_polygon ),
    TOKDEF( fillet ),
    TOKDEF( font ),
    TOKDEF( fp_arc ),
    TOKDEF( fp_circle ),
    TOKDEF( fp_curve ),
    TOKDEF( fp_line ),
    TOKDEF( fp_poly ),
    TOKDEF( fp_text ),
    TOKDEF( full ),
    TOKDEF( general ),
    TOKDEF( gr_arc ),
    TOKDEF( gr_circle ),
    TOKDEF( gr_curve ),
    TOKDEF( gr_line ),
    TOKDEF( gr_poly ),
    TOKDEF( gr_text ),
    TOKDEF( hatch ),
    TOKDEF( hide ),
    TOKDEF( italic ),
    TOKDEF( justify ),
    TOKDEF( keepout ),
    TOKDEF( kicad_pcb ),
    TOKDEF( last_trace_width ),
    TOKDEF( layer ),
    TOKDEF( layers ),
    TOKDEF( left ),
    TOKDEF( links ),
    TOKDEF( locked ),
    TOKDEF( micro ),
    TOKDEF( min_thickness ),
    TOKDEF( mirror ),
    TOKDEF( mod_edge_width ),
    TOKDEF( mod_text_size ),
    TOKDEF( mod_text_width ),
    TOKDEF( mode ),
    TOKDEF( model ),
    TOKDEF( module ),
    TOKDEF( net ),
    TOKDEF( net_class ),
    TOKDEF( net_name ),
    TOKDEF( nets ),
    TOKDEF( no ),
    TOKDEF( no_connects ),
    TOKDEF( none ),
    TOKDEF( not_allowed ),
    TOKDEF( np_thru_hole ),
    TOKDEF( offset ),
    TOKDEF( oval ),
    TOKDEF( pad ),
    TOKDEF( pad_drill ),
    TOKDEF( pad_size ),
    TOKDEF( pad_to_mask_clearance ),
    TOKDEF( pad_to_paste_clearance ),
    TOKDEF( pad_to_paste_clearance_ratio ),
    TOKDEF( pads ),
    TOKDEF( page ),
    TOKDEF( path ),
    TOKDEF( pcb_text_size ),
    TOKDEF( pcb_text_width ),
    TOKDEF( pcbplotparams ),
    TOKDEF( placed ),
    TOKDEF( plus ),
    TOKDEF( polygon ),
    TOKDEF( portrait ),
    TOKDEF( priority ),
    TOKDEF( pts ),
    TOKDEF( radius ),
    TOKDEF( rect ),
    TOKDEF( rect_delta ),
    TOKDEF( reference ),
    TOKDEF( rev ),
    TOKDEF( right ),
    TOKDEF( rotate ),
    TOKDEF( scale ),
    TOKDEF( segment ),
    TOKDEF( segment_width ),
    TOKDEF( setup ),
    TOKDEF( size ),
    TOKDEF( smd ),
    TOKDEF( smoothing ),
    TOKDEF( solder_mask_margin ),
    TOKDEF( solder_mask_min_width ),
    TOKDEF( solder_paste_margin ),
    TOKDEF( solder_paste_margin_ratio ),
    TOKDEF( solder_paste_ratio ),
    TOKDEF( start ),
    TOKDEF( status ),
    TOKDEF( tags ),
    TOKDEF( target ),
    TOKDEF( tedit ),
    TOKDEF( thermal_bridge_width ),
    TOKDEF( thermal_gap ),
    TOKDEF( thermal_width ),
    TOKDEF( thickness ),
    TOKDEF( thru ),
    TOKDEF( thru_hole ),
    TOKDEF( thru_hole_only ),
    TOKDEF( title ),
    TOKDEF( title_block ),
    TOKDEF( top ),
    TOKDEF( trace_clearance ),
    TOKDEF( trace_min ),
    TOKDEF( trace_width ),
    TOKDEF( tracks ),
    TOKDEF( trapezoid ),
    TOKDEF( tstamp ),
    TOKDEF( user ),
    TOKDEF( user_trace_width ),
    TOKDEF( user_via ),
    TOKDEF( uvia_dia ),
    TOKDEF( uvia_drill ),
    TOKDEF( uvia_min_drill ),
    TOKDEF( uvia_min_size ),
    TOKDEF( uvia_size ),
    TOKDEF( uvias_allowed ),
    TOKDEF( value ),
    TOKDEF( version ),
    TOKDEF( via ),
    TOKDEF( via_dia ),
    TOKDEF( via_drill ),
    TOKDEF( via_min_drill ),
    TOKDEF( via_min_size ),
    TOKDEF( via_size ),
    TOKDEF( vias ),
    TOKDEF( virtual ),
    TOKDEF( visible_elements ),
    TOKDEF( width ),
    TOKDEF( x ),
    TOKDEF( xy ),
    TOKDEF( xyz ),
    TOKDEF( yes ),
    TOKDEF( zone ),
    TOKDEF( zone_45_only ),
    TOKDEF( zone_clearance ),
    TOKDEF( zone_connect ),
    TOKDEF( zone_type ),
    TOKDEF( zones )
};

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


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