KiCad PCB EDA Suite
TLIB_T Namespace Reference

C++ does not put enum values in separate namespaces unless the enum itself is in a separate namespace. More...

Enumerations

enum  T {
  T_NONE = DSN_NONE, T_COMMENT = DSN_COMMENT, T_STRING_QUOTE = DSN_STRING_QUOTE, T_QUOTE_DEF = DSN_QUOTE_DEF,
  T_DASH = DSN_DASH, T_SYMBOL = DSN_SYMBOL, T_NUMBER = DSN_NUMBER, T_RIGHT = DSN_RIGHT,
  T_LEFT = DSN_LEFT, T_STRING = DSN_STRING, T_EOF = DSN_EOF, T_arc = 0,
  T_author, T_center, T_circle, T_comment,
  T_component, T_copyright, T_docs, T_drawing,
  T_electical_type, T_end, T_field, T_fill_style,
  T_header, T_height, T_length, T_license,
  T_name, T_number, T_orientation, T_pin,
  T_polyline, T_position, T_radius, T_rectangle,
  T_start, T_style, T_symbol, T_tags,
  T_text, T_url, T_version, T_width
}
 enum T contains all this lexer's tokens. More...
 

Detailed Description

C++ does not put enum values in separate namespaces unless the enum itself is in a separate namespace.

All the token enums must be in separate namespaces otherwise the C++ compiler will eventually complain if it sees more than one DSNLEXER in the same compilation unit, say by mutliple header file inclusion. Plus this also enables re-use of the same enum name T. A typedef can always be used to clarify which enum T is in play should that ever be a problem. This is unlikely since Parse() functions will usually only be exposed to one header file like this one. But if there is a problem, then use: typedef TLIB_T::T T; within that problem area.

Enumeration Type Documentation

enum TLIB_T::T

enum T contains all this lexer's tokens.

Enumerator
T_NONE 
T_COMMENT 
T_STRING_QUOTE 
T_QUOTE_DEF 
T_DASH 
T_SYMBOL 
T_NUMBER 
T_RIGHT 
T_LEFT 
T_STRING 
T_EOF 
T_arc 
T_author 
T_center 
T_circle 
T_comment 
T_component 
T_copyright 
T_docs 
T_drawing 
T_electical_type 
T_end 
T_field 
T_fill_style 
T_header 
T_height 
T_length 
T_license 
T_name 
T_number 
T_orientation 
T_pin 
T_polyline 
T_position 
T_radius 
T_rectangle 
T_start 
T_style 
T_symbol 
T_tags 
T_text 
T_url 
T_version 
T_width 

Definition at line 26 of file cmp_library_lexer.h.

27  {
28  // these first few are negative special ones for syntax, and are
29  // inherited from DSNLEXER.
30  T_NONE = DSN_NONE,
34  T_DASH = DSN_DASH,
37  T_RIGHT = DSN_RIGHT, // right bracket: ')'
38  T_LEFT = DSN_LEFT, // left bracket: '('
39  T_STRING = DSN_STRING, // a quoted string, stripped of the quotes
40  T_EOF = DSN_EOF, // special case for end of file
41 
42  T_arc = 0,
43  T_author,
44  T_center,
45  T_circle,
46  T_comment,
49  T_docs,
50  T_drawing,
52  T_end,
53  T_field,
55  T_header,
56  T_height,
57  T_length,
58  T_license,
59  T_name,
60  T_number,
62  T_pin,
63  T_polyline,
64  T_position,
65  T_radius,
67  T_start,
68  T_style,
69  T_symbol,
70  T_tags,
71  T_text,
72  T_url,
73  T_version,
74  T_width
75  };