KiCad PCB EDA Suite
DRC_RULES_PARSER Class Reference

#include <drc_rule_parser.h>

Inheritance diagram for DRC_RULES_PARSER:

Public Member Functions

 DRC_RULES_PARSER (const wxString &aSource, const wxString &aSourceDescr)
 
 DRC_RULES_PARSER (FILE *aFile, const wxString &aFilename)
 
void Parse (std::vector< DRC_RULE * > &aRules, REPORTER *aReporter)
 

Private Member Functions

DRC_RULEparseDRC_RULE ()
 
void parseConstraint (DRC_RULE *aRule)
 
void parseValueWithUnits (const wxString &aExpr, int &aResult)
 
LSET parseLayer ()
 
void parseUnknown ()
 
void reportError (const wxString &aMessage)
 

Private Attributes

int m_requiredVersion
 
bool m_tooRecent
 
REPORTERm_reporter
 

Detailed Description

Definition at line 40 of file drc_rule_parser.h.

Constructor & Destructor Documentation

◆ DRC_RULES_PARSER() [1/2]

DRC_RULES_PARSER::DRC_RULES_PARSER ( const wxString &  aSource,
const wxString &  aSourceDescr 
)

Definition at line 35 of file drc_rule_parser.cpp.

35  :
36  DRC_RULES_LEXER( aSource.ToStdString(), aSourceDescr ),
37  m_requiredVersion( 0 ),
38  m_tooRecent( false ),
39  m_reporter( nullptr )
40 {
41 }
REPORTER * m_reporter

◆ DRC_RULES_PARSER() [2/2]

DRC_RULES_PARSER::DRC_RULES_PARSER ( FILE *  aFile,
const wxString &  aFilename 
)

Definition at line 44 of file drc_rule_parser.cpp.

44  :
45  DRC_RULES_LEXER( aFile, aFilename ),
46  m_requiredVersion( 0 ),
47  m_tooRecent( false ),
48  m_reporter( nullptr )
49 {
50 }
REPORTER * m_reporter

Member Function Documentation

◆ Parse()

void DRC_RULES_PARSER::Parse ( std::vector< DRC_RULE * > &  aRules,
REPORTER aReporter 
)

Definition at line 92 of file drc_rule_parser.cpp.

93 {
94  bool haveVersion = false;
95  wxString msg;
96 
97  m_reporter = aReporter;
98 
99  for( T token = NextTok(); token != T_EOF; token = NextTok() )
100  {
101  if( token != T_LEFT )
102  reportError( _( "Missing '('." ) );
103 
104  token = NextTok();
105 
106  if( !haveVersion && token != T_version )
107  {
108  reportError( _( "Missing version statement." ) );
109  haveVersion = true; // don't keep on reporting it
110  }
111 
112  switch( token )
113  {
114  case T_version:
115  haveVersion = true;
116  token = NextTok();
117 
118  if( (int) token == DSN_RIGHT )
119  {
120  reportError( _( "Missing version number." ) );
121  break;
122  }
123 
124  if( (int) token == DSN_NUMBER )
125  {
126  m_requiredVersion = (int)strtol( CurText(), nullptr, 10 );
128  token = NextTok();
129  }
130  else
131  {
132  msg.Printf( _( "Unrecognized item '%s'.| Expected version number." ),
133  FromUTF8() );
134  reportError( msg );
135  }
136 
137  if( (int) token != DSN_RIGHT )
138  {
139  msg.Printf( _( "Unrecognized item '%s'." ),
140  FromUTF8() );
141  reportError( msg );
142  parseUnknown();
143  }
144 
145  break;
146 
147  case T_rule:
148  aRules.push_back( parseDRC_RULE() );
149  break;
150 
151  case T_EOF:
152  reportError( _( "Incomplete statement." ) );
153  break;
154 
155  default:
156  msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
157  "'rule', 'version'" );
158  reportError( msg );
159  parseUnknown();
160  }
161  }
162 
163  if( m_reporter && !m_reporter->HasMessage() )
164  m_reporter->Report( _( "No errors found." ), RPT_SEVERITY_INFO );
165 
166  m_reporter = nullptr;
167 }
void reportError(const wxString &aMessage)
REPORTER * m_reporter
virtual bool HasMessage() const =0
Returns true if the reporter client is non-empty.
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
#define DRC_RULE_FILE_VERSION
DRC_RULE * parseDRC_RULE()
#define _(s)

References _, DRC_RULE_FILE_VERSION, DSN_NUMBER, DSN_RIGHT, REPORTER::HasMessage(), m_reporter, m_requiredVersion, m_tooRecent, parseDRC_RULE(), parseUnknown(), REPORTER::Report(), reportError(), and RPT_SEVERITY_INFO.

Referenced by DRC_ENGINE::loadRules(), and PANEL_SETUP_RULES::OnCompile().

◆ parseConstraint()

void DRC_RULES_PARSER::parseConstraint ( DRC_RULE aRule)
private

Definition at line 247 of file drc_rule_parser.cpp.

248 {
249  DRC_CONSTRAINT c;
250  int value;
251  wxString msg;
252 
253  T token = NextTok();
254 
255  if( (int) token == DSN_RIGHT || token == T_EOF )
256  {
257  msg.Printf( _( "Missing constraint type.| Expected %s." ),
258  "clearance, hole_clearance, edge_clearance, hole, hole_to_hole, "
259  "courtyard_clearance, silk_clearance, track_width, annular_width, via_diameter, "
260  "disallow, length, skew, via_count, diff_pair_gap or diff_pair_uncoupled" );
261  reportError( msg );
262  return;
263  }
264 
265  switch( token )
266  {
267  case T_clearance: c.m_Type = CLEARANCE_CONSTRAINT; break;
268  case T_hole_clearance: c.m_Type = HOLE_CLEARANCE_CONSTRAINT; break;
269  case T_edge_clearance: c.m_Type = EDGE_CLEARANCE_CONSTRAINT; break;
270  case T_hole: // legacy token
271  case T_hole_size: c.m_Type = HOLE_SIZE_CONSTRAINT; break;
272  case T_hole_to_hole: c.m_Type = HOLE_TO_HOLE_CONSTRAINT; break;
273  case T_courtyard_clearance: c.m_Type = COURTYARD_CLEARANCE_CONSTRAINT; break;
274  case T_silk_clearance: c.m_Type = SILK_CLEARANCE_CONSTRAINT; break;
275  case T_track_width: c.m_Type = TRACK_WIDTH_CONSTRAINT; break;
276  case T_annular_width: c.m_Type = ANNULAR_WIDTH_CONSTRAINT; break;
277  case T_via_diameter: c.m_Type = VIA_DIAMETER_CONSTRAINT; break;
278  case T_disallow: c.m_Type = DISALLOW_CONSTRAINT; break;
279  case T_length: c.m_Type = LENGTH_CONSTRAINT; break;
280  case T_skew: c.m_Type = SKEW_CONSTRAINT; break;
281  case T_via_count: c.m_Type = VIA_COUNT_CONSTRAINT; break;
282  case T_diff_pair_gap: c.m_Type = DIFF_PAIR_GAP_CONSTRAINT; break;
283  case T_diff_pair_uncoupled: c.m_Type = DIFF_PAIR_MAX_UNCOUPLED_CONSTRAINT; break;
284  default:
285  msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
286  "clearance, hole_clearance, edge_clearance, hole_size, hole_to_hole, "
287  "courtyard_clearance, silk_clearance, track_width, annular_width, via_diameter, "
288  "disallow, length, skew, diff_pair_gap or diff_pair_uncoupled." );
289  reportError( msg );
290  }
291 
292  if( aRule->FindConstraint( c.m_Type ) )
293  {
294  msg.Printf( _( "Rule already has a '%s' constraint." ), FromUTF8() );
295  reportError( msg );
296  }
297 
298  if( c.m_Type == DISALLOW_CONSTRAINT )
299  {
300  for( token = NextTok(); token != T_RIGHT; token = NextTok() )
301  {
302  if( (int) token == DSN_STRING )
303  token = GetCurStrAsToken();
304 
305  switch( token )
306  {
307  case T_track: c.m_DisallowFlags |= DRC_DISALLOW_TRACKS; break;
308  case T_via: c.m_DisallowFlags |= DRC_DISALLOW_VIAS; break;
309  case T_micro_via: c.m_DisallowFlags |= DRC_DISALLOW_MICRO_VIAS; break;
310  case T_buried_via: c.m_DisallowFlags |= DRC_DISALLOW_BB_VIAS; break;
311  case T_pad: c.m_DisallowFlags |= DRC_DISALLOW_PADS; break;
312  case T_zone: c.m_DisallowFlags |= DRC_DISALLOW_ZONES; break;
313  case T_text: c.m_DisallowFlags |= DRC_DISALLOW_TEXTS; break;
314  case T_graphic: c.m_DisallowFlags |= DRC_DISALLOW_GRAPHICS; break;
315  case T_hole: c.m_DisallowFlags |= DRC_DISALLOW_HOLES; break;
316  case T_footprint: c.m_DisallowFlags |= DRC_DISALLOW_FOOTPRINTS; break;
317 
318  case T_EOF:
319  reportError( _( "Missing ')'." ) );
320  return;
321 
322  default:
323  msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
324  "track, via, micro_via, buried_via, pad, zone, text, graphic, hole "
325  "or footprint." );
326  reportError( msg );
327  break;
328  }
329  }
330 
331  if( (int) CurTok() != DSN_RIGHT )
332  reportError( _( "Missing ')'." ) );
333 
334  aRule->AddConstraint( c );
335  return;
336  }
337 
338  for( token = NextTok(); token != T_RIGHT && token != T_EOF; token = NextTok() )
339  {
340  if( token != T_LEFT )
341  reportError( _( "Missing '('." ) );
342 
343  token = NextTok();
344 
345  switch( token )
346  {
347  case T_min:
348  token = NextTok();
349 
350  if( (int) token == DSN_RIGHT )
351  {
352  reportError( _( "Missing min value." ) );
353  break;
354  }
355 
356  parseValueWithUnits( FromUTF8(), value );
357  c.m_Value.SetMin( value );
358 
359  if( (int) NextTok() != DSN_RIGHT )
360  {
361  reportError( wxString::Format( _( "Unrecognized item '%s'." ), FromUTF8() ) );
362  parseUnknown();
363  }
364 
365  break;
366 
367  case T_max:
368  token = NextTok();
369 
370  if( (int) token == DSN_RIGHT )
371  {
372  reportError( _( "Missing max value." ) );
373  break;
374  }
375 
376  parseValueWithUnits( FromUTF8(), value );
377  c.m_Value.SetMax( value );
378 
379  if( (int) NextTok() != DSN_RIGHT )
380  {
381  reportError( wxString::Format( _( "Unrecognized item '%s'." ), FromUTF8() ) );
382  parseUnknown();
383  }
384 
385  break;
386 
387  case T_opt:
388  token = NextTok();
389 
390  if( (int) token == DSN_RIGHT )
391  {
392  reportError( _( "Missing opt value." ) );
393  break;
394  }
395 
396  parseValueWithUnits( FromUTF8(), value );
397  c.m_Value.SetOpt( value );
398 
399  if( (int) NextTok() != DSN_RIGHT )
400  {
401  reportError( wxString::Format( _( "Unrecognized item '%s'." ), FromUTF8() ) );
402  parseUnknown();
403  }
404 
405  break;
406 
407  case T_EOF:
408  reportError( _( "Incomplete statement." ) );
409  return;
410 
411  default:
412  msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ),
413  FromUTF8(),
414  "min, max or opt" );
415  reportError( msg );
416  parseUnknown();
417  }
418  }
419 
420  if( (int) CurTok() != DSN_RIGHT )
421  reportError( _( "Missing ')'." ) );
422 
423  aRule->AddConstraint( c );
424 }
OPT< DRC_CONSTRAINT > FindConstraint(DRC_CONSTRAINT_T aType)
Definition: drc_rule.cpp:53
void reportError(const wxString &aMessage)
void SetMin(T v)
Definition: minoptmax.h:41
void SetOpt(T v)
Definition: minoptmax.h:43
MINOPTMAX< int > m_Value
Definition: drc_rule.h:145
void parseValueWithUnits(const wxString &aExpr, int &aResult)
void SetMax(T v)
Definition: minoptmax.h:42
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
void AddConstraint(DRC_CONSTRAINT &aConstraint)
Definition: drc_rule.cpp:46
int m_DisallowFlags
Definition: drc_rule.h:146
DRC_CONSTRAINT_T m_Type
Definition: drc_rule.h:144

References _, DRC_RULE::AddConstraint(), ANNULAR_WIDTH_CONSTRAINT, CLEARANCE_CONSTRAINT, COURTYARD_CLEARANCE_CONSTRAINT, DIFF_PAIR_GAP_CONSTRAINT, DIFF_PAIR_MAX_UNCOUPLED_CONSTRAINT, DISALLOW_CONSTRAINT, DRC_DISALLOW_BB_VIAS, DRC_DISALLOW_FOOTPRINTS, DRC_DISALLOW_GRAPHICS, DRC_DISALLOW_HOLES, DRC_DISALLOW_MICRO_VIAS, DRC_DISALLOW_PADS, DRC_DISALLOW_TEXTS, DRC_DISALLOW_TRACKS, DRC_DISALLOW_VIAS, DRC_DISALLOW_ZONES, DSN_RIGHT, DSN_STRING, EDGE_CLEARANCE_CONSTRAINT, DRC_RULE::FindConstraint(), Format(), HOLE_CLEARANCE_CONSTRAINT, HOLE_SIZE_CONSTRAINT, HOLE_TO_HOLE_CONSTRAINT, LENGTH_CONSTRAINT, DRC_CONSTRAINT::m_DisallowFlags, DRC_CONSTRAINT::m_Type, DRC_CONSTRAINT::m_Value, parseUnknown(), parseValueWithUnits(), reportError(), MINOPTMAX< T >::SetMax(), MINOPTMAX< T >::SetMin(), MINOPTMAX< T >::SetOpt(), SILK_CLEARANCE_CONSTRAINT, SKEW_CONSTRAINT, TRACK_WIDTH_CONSTRAINT, VIA_COUNT_CONSTRAINT, and VIA_DIAMETER_CONSTRAINT.

Referenced by parseDRC_RULE().

◆ parseDRC_RULE()

DRC_RULE * DRC_RULES_PARSER::parseDRC_RULE ( )
private

Definition at line 170 of file drc_rule_parser.cpp.

171 {
172  DRC_RULE* rule = new DRC_RULE();
173  T token = NextTok();
174  wxString msg;
175 
176  if( !IsSymbol( token ) )
177  reportError( _( "Missing rule name." ) );
178 
179  rule->m_Name = FromUTF8();
180 
181  for( token = NextTok(); token != T_RIGHT && token != T_EOF; token = NextTok() )
182  {
183  if( token != T_LEFT )
184  reportError( _( "Missing '('." ) );
185 
186  token = NextTok();
187 
188  switch( token )
189  {
190  case T_constraint:
191  parseConstraint( rule );
192  break;
193 
194  case T_condition:
195  token = NextTok();
196 
197  if( (int) token == DSN_RIGHT )
198  {
199  reportError( _( "Missing condition expression." ) );
200  break;
201  }
202 
203  if( IsSymbol( token ) )
204  {
205  rule->m_Condition = new DRC_RULE_CONDITION( FromUTF8() );
206  rule->m_Condition->Compile( m_reporter, CurLineNumber(), CurOffset() );
207  }
208  else
209  {
210  msg.Printf( _( "Unrecognized item '%s'.| Expected quoted expression." ),
211  FromUTF8() );
212  reportError( msg );
213  }
214 
215  if( (int) NextTok() != DSN_RIGHT )
216  {
217  reportError( wxString::Format( _( "Unrecognized item '%s'." ), FromUTF8() ) );
218  parseUnknown();
219  }
220 
221  break;
222 
223  case T_layer:
224  rule->m_LayerSource = FromUTF8();
225  rule->m_LayerCondition = parseLayer();
226  break;
227 
228  case T_EOF:
229  reportError( _( "Incomplete statement." ) );
230  return rule;
231 
232  default:
233  msg.Printf( _( "Unrecognized item '%s'.| Expected %s." ), FromUTF8(),
234  "constraint, condition or disallow" );
235  reportError( msg );
236  parseUnknown();
237  }
238  }
239 
240  if( (int) CurTok() != DSN_RIGHT )
241  reportError( _( "Missing ')'." ) );
242 
243  return rule;
244 }
void reportError(const wxString &aMessage)
REPORTER * m_reporter
DRC_RULE_CONDITION * m_Condition
Definition: drc_rule.h:99
wxString m_Name
Definition: drc_rule.h:96
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
wxString m_LayerSource
Definition: drc_rule.h:97
void parseConstraint(DRC_RULE *aRule)
LSET m_LayerCondition
Definition: drc_rule.h:98
bool Compile(REPORTER *aReporter, int aSourceLine=0, int aSourceOffset=0)

References _, DRC_RULE_CONDITION::Compile(), DSN_RIGHT, Format(), DRC_RULE::m_Condition, DRC_RULE::m_LayerCondition, DRC_RULE::m_LayerSource, DRC_RULE::m_Name, m_reporter, parseConstraint(), parseLayer(), parseUnknown(), and reportError().

Referenced by Parse().

◆ parseLayer()

LSET DRC_RULES_PARSER::parseLayer ( )
private

Definition at line 458 of file drc_rule_parser.cpp.

459 {
460  LSET retVal;
461  int token = NextTok();
462 
463  if( (int) token == DSN_RIGHT )
464  {
465  reportError( _( "Missing layer name or type." ) );
466  return LSET::AllCuMask();
467  }
468  else if( token == T_outer )
469  {
470  retVal = LSET::ExternalCuMask();
471  }
472  else if( token == T_inner )
473  {
474  retVal = LSET::InternalCuMask();
475  }
476  else
477  {
478  wxString layerName = FromUTF8();
479  wxPGChoices& layerMap = ENUM_MAP<PCB_LAYER_ID>::Instance().Choices();
480 
481  for( unsigned ii = 0; ii < layerMap.GetCount(); ++ii )
482  {
483  wxPGChoiceEntry& entry = layerMap[ii];
484 
485  if( entry.GetText().Matches( layerName ) )
486  retVal.set( ToLAYER_ID( entry.GetValue() ) );
487  }
488 
489  if( !retVal.any() )
490  {
491  reportError( wxString::Format( _( "Unrecognized layer '%s'." ), layerName ) );
492  retVal.set( Rescue );
493  }
494  }
495 
496  if( (int) NextTok() != DSN_RIGHT )
497  {
498  reportError( wxString::Format( _( "Unrecognized item '%s'." ), FromUTF8() ) );
499  parseUnknown();
500  }
501 
502  return retVal;
503 }
static LSET AllCuMask(int aCuLayerCount=MAX_CU_LAYERS)
Return a mask holding the requested number of Cu PCB_LAYER_IDs.
Definition: lset.cpp:750
void reportError(const wxString &aMessage)
static ENUM_MAP< T > & Instance()
Definition: property.h:510
LSET is a set of PCB_LAYER_IDs.
Definition: layer_ids.h:504
static LSET InternalCuMask()
Return a complete set of internal copper layers which is all Cu layers except F_Cu and B_Cu.
Definition: lset.cpp:710
static LSET ExternalCuMask()
Return a mask holding the Front and Bottom layers.
Definition: lset.cpp:780
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
PCB_LAYER_ID ToLAYER_ID(int aLayer)
Definition: lset.cpp:905

References _, LSET::AllCuMask(), DSN_RIGHT, LSET::ExternalCuMask(), Format(), ENUM_MAP< T >::Instance(), LSET::InternalCuMask(), parseUnknown(), reportError(), Rescue, and ToLAYER_ID().

Referenced by parseDRC_RULE().

◆ parseUnknown()

void DRC_RULES_PARSER::parseUnknown ( )
private

Definition at line 74 of file drc_rule_parser.cpp.

75 {
76  int depth = 1;
77 
78  for( T token = NextTok(); token != T_EOF; token = NextTok() )
79  {
80  if( token == T_LEFT )
81  depth++;
82 
83  if( token == T_RIGHT )
84  {
85  if( --depth == 0 )
86  break;
87  }
88  }
89 }

Referenced by Parse(), parseConstraint(), parseDRC_RULE(), and parseLayer().

◆ parseValueWithUnits()

void DRC_RULES_PARSER::parseValueWithUnits ( const wxString &  aExpr,
int &  aResult 
)
private

Definition at line 427 of file drc_rule_parser.cpp.

428 {
429  auto errorHandler = [&]( const wxString& aMessage, int aOffset )
430  {
431  wxString rest;
432  wxString first = aMessage.BeforeFirst( '|', &rest );
433 
434  if( m_reporter )
435  {
436  wxString msg = wxString::Format( _( "ERROR: <a href='%d:%d'>%s</a>%s" ),
437  CurLineNumber(), CurOffset() + aOffset, first, rest );
438 
440  }
441  else
442  {
443  wxString msg = wxString::Format( _( "ERROR: %s%s" ), first, rest );
444 
445  THROW_PARSE_ERROR( msg, CurSource(), CurLine(), CurLineNumber(),
446  CurOffset() + aOffset );
447  }
448  };
449 
450  PCB_EXPR_EVALUATOR evaluator;
451  evaluator.SetErrorCallback( errorHandler );
452 
453  evaluator.Evaluate( aExpr );
454  aResult = evaluator.Result();
455 }
REPORTER * m_reporter
void SetErrorCallback(std::function< void(const wxString &aMessage, int aOffset)> aCallback)
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
#define THROW_PARSE_ERROR(aProblem, aSource, aInputLine, aLineNumber, aByteIndex)
Definition: ki_exception.h:164
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200
bool Evaluate(const wxString &aExpr)

References _, PCB_EXPR_EVALUATOR::Evaluate(), Format(), m_reporter, REPORTER::Report(), PCB_EXPR_EVALUATOR::Result(), RPT_SEVERITY_ERROR, PCB_EXPR_EVALUATOR::SetErrorCallback(), and THROW_PARSE_ERROR.

Referenced by parseConstraint().

◆ reportError()

void DRC_RULES_PARSER::reportError ( const wxString &  aMessage)
private

Definition at line 53 of file drc_rule_parser.cpp.

54 {
55  wxString rest;
56  wxString first = aMessage.BeforeFirst( '|', &rest );
57 
58  if( m_reporter )
59  {
60  wxString msg = wxString::Format( _( "ERROR: <a href='%d:%d'>%s</a>%s" ), CurLineNumber(),
61  CurOffset(), first, rest );
62 
64  }
65  else
66  {
67  wxString msg = wxString::Format( _( "ERROR: %s%s" ), first, rest );
68 
69  THROW_PARSE_ERROR( msg, CurSource(), CurLine(), CurLineNumber(), CurOffset() );
70  }
71 }
REPORTER * m_reporter
virtual REPORTER & Report(const wxString &aText, SEVERITY aSeverity=RPT_SEVERITY_UNDEFINED)=0
Report a string with a given severity.
#define THROW_PARSE_ERROR(aProblem, aSource, aInputLine, aLineNumber, aByteIndex)
Definition: ki_exception.h:164
#define _(s)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:200

References _, Format(), m_reporter, REPORTER::Report(), RPT_SEVERITY_ERROR, and THROW_PARSE_ERROR.

Referenced by Parse(), parseConstraint(), parseDRC_RULE(), and parseLayer().

Member Data Documentation

◆ m_reporter

REPORTER* DRC_RULES_PARSER::m_reporter
private

Definition at line 61 of file drc_rule_parser.h.

Referenced by Parse(), parseDRC_RULE(), parseValueWithUnits(), and reportError().

◆ m_requiredVersion

int DRC_RULES_PARSER::m_requiredVersion
private

Definition at line 59 of file drc_rule_parser.h.

Referenced by Parse().

◆ m_tooRecent

bool DRC_RULES_PARSER::m_tooRecent
private

Definition at line 60 of file drc_rule_parser.h.

Referenced by Parse().


The documentation for this class was generated from the following files: