diff --git a/CMakeModules/TokenList2DsnLexer.cmake b/CMakeModules/TokenList2DsnLexer.cmake index 9bc5594c80..f27cbdbaee 100644 --- a/CMakeModules/TokenList2DsnLexer.cmake +++ b/CMakeModules/TokenList2DsnLexer.cmake @@ -380,7 +380,7 @@ const char* ${LEXERCLASS}::TokenName( T aTok ) } else if( aTok < 0 ) { - return DSNLEXER::Syntax( aTok ); + ret = DSNLEXER::Syntax( aTok ); } else ret = \"token too big\"; diff --git a/include/dsnlexer.h b/include/dsnlexer.h index bd7d346b8d..5ec01dd8e5 100644 --- a/include/dsnlexer.h +++ b/include/dsnlexer.h @@ -31,7 +31,7 @@ #include "richio.h" - +#ifndef SWIG /** * Struct KEYWORD * holds a keyword string and its unique integer token. @@ -41,6 +41,7 @@ struct KEYWORD const char* name; ///< unique keyword. int token; ///< a zero based index into an array of KEYWORDs }; +#endif // something like this macro can be used to help initialize a KEYWORD table. // see SPECCTRA_DB::keywords[] as an example. @@ -76,6 +77,7 @@ enum DSN_SYNTAX_T { */ class DSNLEXER { +#ifndef SWIG protected: bool iOwnReaders; ///< on readerStack, should I delete them? const char* start; @@ -155,7 +157,7 @@ protected: return false; } - +#endif public: diff --git a/new/sch_lib_table.cpp b/new/sch_lib_table.cpp index e1742db5f8..c17ba2d698 100644 --- a/new/sch_lib_table.cpp +++ b/new/sch_lib_table.cpp @@ -97,7 +97,7 @@ void LIB_TABLE::Parse( SCH_LIB_TABLE_LEXER* in ) throw( IO_ERROR ) strcmp( in->CurText(), "subversion" ) && strcmp( in->CurText(), "http" ) ) { - in->Expecting( wxT( "dir|schematic|subversion|http" ) ); + in->Expecting( "dir|schematic|subversion|http" ); } row->SetType( in->CurText() ); diff --git a/new/sch_part.cpp b/new/sch_part.cpp index 3e9e0126fb..0cb263754c 100644 --- a/new/sch_part.cpp +++ b/new/sch_part.cpp @@ -176,7 +176,7 @@ public: for( ; tok!=T_RIGHT; tok = in->NextTok() ) { if( tok==T_EOF ) - in->Unexpected( _( "end of input" ) ); + in->Unexpected( T_EOF ); if( tok == T_LEFT ) tok = in->NextTok(); @@ -185,14 +185,13 @@ public: { default: // describe what we expect at this level - in->Expecting( wxT( + in->Expecting( "anchor|value|footprint|model|keywords|alternates\n" "|property\n" " |property_del\n" "|pin\n" " |pin_merge|pin_swap|pin_renum|pin_rename|route_pin_swap\n" "|polyline|line|rectangle|circle|arc|bezier|text" - ) ); break; diff --git a/new/sweet.i b/new/sweet.i index b9fbe60bdc..a548e01719 100644 --- a/new/sweet.i +++ b/new/sweet.i @@ -22,6 +22,10 @@ %ignore LINE_READER::operator char* () const; +namespace SCH { +%ignore PART::operator=( const PART& other ); +} + %include "richio.h" %include "dsnlexer.h" //%include "sch_lib_table_lexer.h" @@ -29,4 +33,5 @@ %include "sch_lib.h" %include "sch_lib_table.h" %include "sweet_lexer.h" + %include "sch_part.h"