Loading CHANGELOG.txt +5 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ email address. 2010-Jun-17 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ++eeschema: Added "template fieldnames" to eeschema. This is a list of template elements Added "template fieldnames" to eeschema. Thanks to Brian Sidebotham <brian.sidebotham@gmail.com> for the origins of this patch. https://lists.launchpad.net/kicad-developers/msg04828.html A template fieldnames are a list of template elements consisting of {name, value, visibility} which you want shown in the eeschema component fieldname (property) editors (both schematic and library versions of the editors). Template fieldnames are forced into the editors' Loading CMakeModules/TokenList2DsnLexer.cmake +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ # ${CMAKE_BINARY_DIR}/cmp_library_keywords.cpp # COMMAND ${CMAKE_COMMAND} # -Denum=YOURTOK_T # -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst # -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords # -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords # ) # # Input parameters: Loading common/dsnlexer.cpp +45 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,18 @@ wxString DSNLEXER::GetTokenString( int aTok ) } bool DSNLEXER::IsSymbol( int aTok ) { // This is static and not inline to reduce code space. // if aTok is >= 0, then it is a coincidental match to a keyword. return aTok==DSN_SYMBOL || aTok==DSN_STRING || aTok>=0 ; } void DSNLEXER::ThrowIOError( wxString aText, int charOffset ) throw (IOError) { // append to aText, do not overwrite Loading Loading @@ -235,6 +247,39 @@ void DSNLEXER::Unexpected( const wxString& text ) throw( IOError ) } void DSNLEXER::NeedLEFT() throw( IOError ) { int tok = NextTok(); if( tok != DSN_LEFT ) Expecting( DSN_LEFT ); } void DSNLEXER::NeedRIGHT() throw( IOError ) { int tok = NextTok(); if( tok != DSN_RIGHT ) Expecting( DSN_RIGHT ); } int DSNLEXER::NeedSYMBOL() throw( IOError ) { int tok = NextTok(); if( !IsSymbol( tok ) ) Expecting( DSN_SYMBOL ); return tok; } int DSNLEXER::NeedSYMBOLorNUMBER() throw( IOError ) { int tok = NextTok(); if( !IsSymbol( tok ) && tok!=DSN_NUMBER ) Expecting( _("symbol|number") ); return tok; } /** * Function isspace * strips the upper bits of the int to ensure the value passed to ::isspace() is Loading eeschema/CMakeLists.txt +6 −6 Original line number Diff line number Diff line Loading @@ -160,11 +160,11 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.h ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp COMMAND ${CMAKE_COMMAND} -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.h(.cpp) from ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst" from ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords" ) set_source_files_properties( cmp_library_lexer.cpp PROPERTIES Loading @@ -177,11 +177,11 @@ add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp COMMAND ${CMAKE_COMMAND} -Denum=TFIELD_T -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.h(.cpp) from ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst" from ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords" ) Loading eeschema/cmp_library.lst→eeschema/cmp_library.keywords +0 −0 File moved. View file Loading
CHANGELOG.txt +5 −1 Original line number Diff line number Diff line Loading @@ -7,7 +7,11 @@ email address. 2010-Jun-17 UPDATE Dick Hollenbeck <dick@softplc.com> ================================================================================ ++eeschema: Added "template fieldnames" to eeschema. This is a list of template elements Added "template fieldnames" to eeschema. Thanks to Brian Sidebotham <brian.sidebotham@gmail.com> for the origins of this patch. https://lists.launchpad.net/kicad-developers/msg04828.html A template fieldnames are a list of template elements consisting of {name, value, visibility} which you want shown in the eeschema component fieldname (property) editors (both schematic and library versions of the editors). Template fieldnames are forced into the editors' Loading
CMakeModules/TokenList2DsnLexer.cmake +2 −2 Original line number Diff line number Diff line Loading @@ -43,9 +43,9 @@ # ${CMAKE_BINARY_DIR}/cmp_library_keywords.cpp # COMMAND ${CMAKE_COMMAND} # -Denum=YOURTOK_T # -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst # -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords # -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst # DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords # ) # # Input parameters: Loading
common/dsnlexer.cpp +45 −0 Original line number Diff line number Diff line Loading @@ -192,6 +192,18 @@ wxString DSNLEXER::GetTokenString( int aTok ) } bool DSNLEXER::IsSymbol( int aTok ) { // This is static and not inline to reduce code space. // if aTok is >= 0, then it is a coincidental match to a keyword. return aTok==DSN_SYMBOL || aTok==DSN_STRING || aTok>=0 ; } void DSNLEXER::ThrowIOError( wxString aText, int charOffset ) throw (IOError) { // append to aText, do not overwrite Loading Loading @@ -235,6 +247,39 @@ void DSNLEXER::Unexpected( const wxString& text ) throw( IOError ) } void DSNLEXER::NeedLEFT() throw( IOError ) { int tok = NextTok(); if( tok != DSN_LEFT ) Expecting( DSN_LEFT ); } void DSNLEXER::NeedRIGHT() throw( IOError ) { int tok = NextTok(); if( tok != DSN_RIGHT ) Expecting( DSN_RIGHT ); } int DSNLEXER::NeedSYMBOL() throw( IOError ) { int tok = NextTok(); if( !IsSymbol( tok ) ) Expecting( DSN_SYMBOL ); return tok; } int DSNLEXER::NeedSYMBOLorNUMBER() throw( IOError ) { int tok = NextTok(); if( !IsSymbol( tok ) && tok!=DSN_NUMBER ) Expecting( _("symbol|number") ); return tok; } /** * Function isspace * strips the upper bits of the int to ensure the value passed to ::isspace() is Loading
eeschema/CMakeLists.txt +6 −6 Original line number Diff line number Diff line Loading @@ -160,11 +160,11 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.h ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.cpp COMMAND ${CMAKE_COMMAND} -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library_keywords.h(.cpp) from ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.lst" from ${CMAKE_CURRENT_SOURCE_DIR}/cmp_library.keywords" ) set_source_files_properties( cmp_library_lexer.cpp PROPERTIES Loading @@ -177,11 +177,11 @@ add_custom_command( ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.cpp COMMAND ${CMAKE_COMMAND} -Denum=TFIELD_T -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst -DinputFile=${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords -P ${CMAKE_MODULE_PATH}/TokenList2DsnLexer.cmake DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords COMMENT "creating ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames_keywords.h(.cpp) from ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.lst" from ${CMAKE_CURRENT_SOURCE_DIR}/template_fieldnames.keywords" ) Loading