diff --git a/eeschema/sim/sim_model.cpp b/eeschema/sim/sim_model.cpp index b799d1ecf3..93e40d5164 100644 --- a/eeschema/sim/sim_model.cpp +++ b/eeschema/sim/sim_model.cpp @@ -67,7 +67,7 @@ namespace SIM_MODEL_PARSER template struct fieldInferValueSelector : std::false_type {}; template <> struct fieldInferValueSelector : std::true_type {}; - template <> struct fieldInferValueSelector : std::true_type {}; + template <> struct fieldInferValueSelector : std::true_type {}; template <> struct fieldInferValueSelector> : std::true_type {}; template <> struct fieldInferValueSelector : std::true_type {}; } @@ -1182,7 +1182,7 @@ void SIM_MODEL::doReadDataFields( unsigned aSymbolPinCount, const std::vector template void SIM_MODEL::InferredReadDataFields( unsigned aSymbolPinCount, const std::vector* aFields, - bool aAllowPrincipalValueWithoutName ) + bool aAllowPrimaryValueWithoutName ) { // TODO: Make a subclass SIM_MODEL_NONE. if( GetType() == SIM_MODEL::TYPE::NONE ) @@ -1208,9 +1208,9 @@ void SIM_MODEL::InferredReadDataFields( unsigned aSymbolPinCount, const std::vec for( const auto& node : root->children ) { - if( node->is_type() ) + if( node->is_type() ) { - if( aAllowPrincipalValueWithoutName ) + if( aAllowPrimaryValueWithoutName ) { for( const auto& subnode : node->children ) { @@ -1224,7 +1224,7 @@ void SIM_MODEL::InferredReadDataFields( unsigned aSymbolPinCount, const std::vec else { THROW_IO_ERROR( - wxString::Format( _( "Simulation model of type '%s' cannot have a principal value (which is '%s') in Value field" ), + wxString::Format( _( "Simulation model of type '%s' cannot have a primary value (which is '%s') in Value field" ), GetTypeInfo().fieldValue, node->string() ) ); } diff --git a/eeschema/sim/sim_model.h b/eeschema/sim/sim_model.h index 9633bd81ea..fed4cc5652 100644 --- a/eeschema/sim/sim_model.h +++ b/eeschema/sim/sim_model.h @@ -83,24 +83,24 @@ namespace SIM_MODEL_GRAMMAR tao::pegtl::eof> {}; struct fieldInferValueType : plus {}; - struct fieldInferValuePrincipalValue : seq>, - tao::pegtl::digit>>, + struct fieldInferValuePrimaryValue : seq>, + tao::pegtl::digit>>, // END HACK. - number, + number, // Hackish: match anything until param-value pairs. // Because the user may want to write something like // "10k 30% 30mW w=0.4", but we care only about the // "10k" and "w=0.4". - star, - any>> {}; + star, + any>> {}; struct fieldInferValue : sor>, - seq, + seq, opt, opt>> {}; struct fieldInferValueGrammar : must, @@ -113,7 +113,7 @@ namespace SIM_MODEL_GRAMMAR template <> inline constexpr auto errorMessage> = ""; template <> inline constexpr auto errorMessage> = ""; template <> inline constexpr auto errorMessage>> = ""; + fieldInferValuePrimaryValue>>> = ""; template <> inline constexpr auto errorMessage> = "expected '='"; template <> inline constexpr auto errorMessage inline constexpr auto errorMessage> = ""; template <> inline constexpr auto errorMessage = - "expected parameter=value pairs, together possibly preceded by a type or principal value"; + "expected parameter=value pairs, together possibly preceded by a type or primary value"; template <> inline constexpr auto errorMessage = "expected end of string"; @@ -631,7 +631,7 @@ protected: template void InferredReadDataFields( unsigned aSymbolPinCount, const std::vector* aFields, - bool aAllowPrincipalValueWithoutName = false ); + bool aAllowPrimaryValueWithoutName = false ); std::vector m_params; const SIM_MODEL* m_baseModel;