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

This commit is contained in:
Tomasz Wlostowski 2020-06-30 10:43:16 +02:00
parent 0e0cf5dff8
commit bc86ea7682
2 changed files with 6 additions and 5 deletions

View File

@ -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" );

View File

@ -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 );