Browse Source

drc_proto: use separate lexer for rule file from current pcbnew DRC

pull/16/head
Tomasz Wlostowski 5 years ago
parent
commit
bc86ea7682
  1. 7
      qa/drc_proto/drc_rule_parser.cpp
  2. 4
      qa/drc_proto/drc_rule_parser.h

7
qa/drc_proto/drc_rule_parser.cpp

@ -33,11 +33,10 @@
#include <pcb_expr_evaluator.h>
using namespace DRCRULE_T;
using namespace DRCRULEPROTO_T;
test::DRC_RULES_PARSER::DRC_RULES_PARSER( BOARD* aBoard, FILE* aFile, const wxString& aFilename )
: DRC_RULES_LEXER( aFile, aFilename ),
: DRC_RULES_PROTO_LEXER( aFile, aFilename ),
m_board( aBoard ),
m_requiredVersion( 0 ),
m_tooRecent( false )
@ -62,6 +61,8 @@ void test::DRC_RULES_PARSER::Parse(
token = NextTok();
printf("TOK %d %d\n", token, T_version );
if( !haveVersion && token != T_version )
Expecting( "version" );

4
qa/drc_proto/drc_rule_parser.h

@ -28,7 +28,7 @@
#include <netclass.h>
#include <layers_id_colors_and_visibility.h>
#include <drc_proto/drc_rule.h>
#include <drc_rules_lexer.h>
#include <drc_rules_proto_lexer.h>
class BOARD_ITEM;
@ -40,7 +40,7 @@ class DRC_RULE;
#define DRC_RULE_FILE_VERSION 20200610
class DRC_RULES_PARSER : public DRC_RULES_LEXER
class DRC_RULES_PARSER : public DRC_RULES_PROTO_LEXER
{
public:
DRC_RULES_PARSER( BOARD* aBoard, FILE* aFile, const wxString& aFilename );

Loading…
Cancel
Save