KiCad PCB EDA Suite
pcb_plot_params_keywords.cpp
Go to the documentation of this file.
1 
2 /* Do not modify this file it was automatically generated by the
3  * TokenList2DsnLexer CMake script.
4  *
5  * Include this file in your lexer class to provide the keywords for
6  * your DSN lexer.
7  */
8 
10 
11 using namespace PCBPLOTPARAMS_T;
12 
13 #define TOKDEF(x) { #x, T_##x }
14 
16  TOKDEF( drillshape ),
17  TOKDEF( excludeedgelayer ),
18  TOKDEF( false ),
19  TOKDEF( gerberprecision ),
20  TOKDEF( hpglpendiameter ),
21  TOKDEF( hpglpennumber ),
22  TOKDEF( hpglpenoverlay ),
23  TOKDEF( hpglpenspeed ),
24  TOKDEF( layerselection ),
25  TOKDEF( linewidth ),
26  TOKDEF( mirror ),
27  TOKDEF( mode ),
28  TOKDEF( outputdirectory ),
29  TOKDEF( outputformat ),
30  TOKDEF( padsonsilk ),
31  TOKDEF( pcbplotparams ),
32  TOKDEF( plotframeref ),
33  TOKDEF( plotinvisibletext ),
34  TOKDEF( plotreference ),
35  TOKDEF( plotvalue ),
36  TOKDEF( psa4output ),
37  TOKDEF( pscolor ),
38  TOKDEF( psnegative ),
39  TOKDEF( scaleselection ),
40  TOKDEF( subtractmaskfromsilk ),
41  TOKDEF( true ),
42  TOKDEF( useauxorigin ),
43  TOKDEF( usegerberadvancedattributes ),
44  TOKDEF( usegerberattributes ),
45  TOKDEF( usegerberextensions ),
46  TOKDEF( viasonmask )
47 };
48 
49 const unsigned PCB_PLOT_PARAMS_LEXER::keyword_count = unsigned( sizeof( PCB_PLOT_PARAMS_LEXER::keywords )/sizeof( PCB_PLOT_PARAMS_LEXER::keywords[0] ) );
50 
51 
53 {
54  const char* ret;
55 
56  if( aTok < 0 )
57  ret = DSNLEXER::Syntax( aTok );
58  else if( (unsigned) aTok < keyword_count )
59  ret = keywords[aTok].name;
60  else
61  ret = "token too big";
62 
63  return ret;
64 }
const char * name
unique keyword.
Definition: dsnlexer.h:42
static const unsigned keyword_count
static const KEYWORD keywords[]
Auto generated lexer keywords table and length:
static const char * TokenName(PCBPLOTPARAMS_T::T aTok)
Function TokenName returns the name of the token in ASCII form.
#define TOKDEF(x)
C++ does not put enum values in separate namespaces unless the enum itself is in a separate namespace...
T
enum T contains all this lexer's tokens.
Struct KEYWORD holds a keyword string and its unique integer token.
Definition: dsnlexer.h:40
static const char * Syntax(int aTok)
Definition: dsnlexer.cpp:272