KiCad PCB EDA Suite
DRCRULE_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_allow = 0,
  T_condition, T_enable, T_error, T_expression,
  T_ignore, T_info, T_max, T_min,
  T_name, T_opt, T_priority, T_rule,
  T_severity, T_type, T_version, T_warning
}
 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 DRCRULE_T::T T; within that problem area.

Enumeration Type Documentation

◆ 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_allow 
T_condition 
T_enable 
T_error 
T_expression 
T_ignore 
T_info 
T_max 
T_min 
T_name 
T_opt 
T_priority 
T_rule 
T_severity 
T_type 
T_version 
T_warning 

Definition at line 26 of file drc_rules_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_allow = 0,
44  T_enable,
45  T_error,
47  T_ignore,
48  T_info,
49  T_max,
50  T_min,
51  T_name,
52  T_opt,
53  T_priority,
54  T_rule,
55  T_severity,
56  T_type,
57  T_version,
58  T_warning
59  };