More PEGTL tomfoolery.

(cherry picked from commit 8aaca0509c)
This commit is contained in:
Jeff Young
2024-05-17 11:25:26 +01:00
parent f52a51dce3
commit 882ff06e24
+15 -14
View File
@@ -156,6 +156,17 @@ namespace SPICE_GRAMMAR
opt<sep>,
newline>> {};
struct dotModelCPL : seq<opt<sep>,
if_must<seq<TAO_PEGTL_ISTRING( ".model" ),
sep,
modelName,
sep,
TAO_PEGTL_ISTRING( "CPL" )>,
opt<sep,
cplParamValuePairs>,
opt<sep>,
newline>> {};
struct dotModel : seq<opt<sep>,
if_must<TAO_PEGTL_ISTRING( ".model" ),
sep,
@@ -167,19 +178,6 @@ namespace SPICE_GRAMMAR
opt<sep>,
newline>> {};
struct dotModelCPL : seq<opt<sep>,
if_must<TAO_PEGTL_ISTRING( ".model" ),
sep,
modelName,
sep,
TAO_PEGTL_ISTRING( "CPL" ),
opt<sep,
cplParamValuePairs>,
opt<sep>,
newline>> {};
struct dotSubcktParamValuePair : seq<param,
// TODO: Check if these `star<space>`s match Ngspice's
// behavior.
@@ -216,6 +214,7 @@ namespace SPICE_GRAMMAR
struct modelUnit : seq<star<commentLine>,
sor<dotModelAko,
dotModelCPL,
dotModel,
dotSubckt>> {};
@@ -305,7 +304,9 @@ namespace SPICE_GRAMMAR
"";
template <> inline constexpr auto errorMessage<opt<sep, paramValuePairs>> =
"";
template <> inline constexpr auto errorMessage<opt<sep, dotSubcktPinSequence>> =
template <> inline constexpr auto errorMessage<opt<sep, cplParamValuePairs>> =
"";
template <> inline constexpr auto errorMessage<opt<sep, dotSubcktPinSequence>> =
"";
template <> inline constexpr auto errorMessage<opt<sep, dotSubcktParams>> =
"";