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.
This commit is contained in:
Mikolaj Wielgus 2022-09-17 08:46:45 +02:00
parent 5fa0a1a064
commit 15b5b48992
3 changed files with 4 additions and 1 deletions

View File

@ -391,6 +391,7 @@ TYPE SIM_MODEL::ReadTypeFromSpiceCode( const wxString& aSpiceCode )
{
root = tao::pegtl::parse_tree::parse<SIM_MODEL_SPICE_PARSER::spiceUnitGrammar,
SIM_MODEL_SPICE_PARSER::spiceUnitSelector,
tao::pegtl::nothing,
SIM_MODEL_SPICE_PARSER::control>
( in );
}
@ -855,6 +856,7 @@ void SIM_MODEL::ReadSpiceCode( const wxString& aSpiceCode )
{
root = tao::pegtl::parse_tree::parse<SIM_MODEL_SPICE_PARSER::spiceUnitGrammar,
SIM_MODEL_SPICE_PARSER::spiceUnitSelector,
tao::pegtl::nothing,
SIM_MODEL_SPICE_PARSER::control>
( in );
}

View File

@ -82,6 +82,7 @@ void SIM_MODEL_SUBCKT::ReadSpiceCode( const wxString& aSpiceCode )
{
root = tao::pegtl::parse_tree::parse<SIM_MODEL_SUBCKT_SPICE_PARSER::spiceUnitGrammar,
SIM_MODEL_SUBCKT_SPICE_PARSER::spiceUnitSelector,
tao::pegtl::nothing,
SIM_MODEL_SUBCKT_SPICE_PARSER::control>
( in );
}

View File

@ -213,7 +213,7 @@ namespace SPICE_GRAMMAR
kLine,
eol, // Empty line. This is necessary to terminate on EOF.
unknownLine> {};
struct spiceUnitGrammar : must<spiceUnit> {};
struct spiceUnitGrammar : spiceUnit {};
struct spiceSource : star<spiceUnit> {};