From 15b5b48992bef1bb827c15926eb0ce1edd0353fd Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Sat, 17 Sep 2022 08:46:45 +0200 Subject: [PATCH] Sim: More descriptive parsing errors in all Spice parsers In my previous commit, which changed Spice parsing errors to be more descriptive, I forgot to apply this to all invocations of the Spice parser. This commit corrects that. --- eeschema/sim/sim_model.cpp | 2 ++ eeschema/sim/sim_model_subckt.cpp | 1 + eeschema/sim/spice_grammar.h | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/eeschema/sim/sim_model.cpp b/eeschema/sim/sim_model.cpp index 54081902c6..4d83fffdb8 100644 --- a/eeschema/sim/sim_model.cpp +++ b/eeschema/sim/sim_model.cpp @@ -391,6 +391,7 @@ TYPE SIM_MODEL::ReadTypeFromSpiceCode( const wxString& aSpiceCode ) { root = tao::pegtl::parse_tree::parse ( in ); } @@ -855,6 +856,7 @@ void SIM_MODEL::ReadSpiceCode( const wxString& aSpiceCode ) { root = tao::pegtl::parse_tree::parse ( in ); } diff --git a/eeschema/sim/sim_model_subckt.cpp b/eeschema/sim/sim_model_subckt.cpp index 0e810d20f5..ede46ad462 100644 --- a/eeschema/sim/sim_model_subckt.cpp +++ b/eeschema/sim/sim_model_subckt.cpp @@ -82,6 +82,7 @@ void SIM_MODEL_SUBCKT::ReadSpiceCode( const wxString& aSpiceCode ) { root = tao::pegtl::parse_tree::parse ( in ); } diff --git a/eeschema/sim/spice_grammar.h b/eeschema/sim/spice_grammar.h index 56def9935b..d69f52b7c6 100644 --- a/eeschema/sim/spice_grammar.h +++ b/eeschema/sim/spice_grammar.h @@ -213,7 +213,7 @@ namespace SPICE_GRAMMAR kLine, eol, // Empty line. This is necessary to terminate on EOF. unknownLine> {}; - struct spiceUnitGrammar : must {}; + struct spiceUnitGrammar : spiceUnit {}; struct spiceSource : star {};