Don't attempt to recognize SPICE directives line-by-line.
.model and .subckt can be multi-line without requiring the continuation- line syntax.
This commit is contained in:
parent
6dc7c30174
commit
cbfbd3a0de
|
@ -393,10 +393,9 @@ void NETLIST_EXPORTER_SPICE::ReadDirectives( unsigned aNetlistOptions )
|
||||||
}
|
}
|
||||||
catch( const tao::pegtl::parse_error& )
|
catch( const tao::pegtl::parse_error& )
|
||||||
{
|
{
|
||||||
// Even if we couldn't parse it, send anything that _looks_ like a directive to
|
// Even if we couldn't parse it, send anything that _looks_ like it contains
|
||||||
// SPICE
|
// directives straight through to SPICE
|
||||||
wxStringTokenizer tokenizer( text, wxT( "\r\n" ), wxTOKEN_STRTOK );
|
wxStringTokenizer tokenizer( text, wxT( "\r\n" ), wxTOKEN_STRTOK );
|
||||||
bool inDirective = false;
|
|
||||||
|
|
||||||
while( tokenizer.HasMoreTokens() )
|
while( tokenizer.HasMoreTokens() )
|
||||||
{
|
{
|
||||||
|
@ -404,16 +403,8 @@ void NETLIST_EXPORTER_SPICE::ReadDirectives( unsigned aNetlistOptions )
|
||||||
|
|
||||||
if( line.StartsWith( "." ) )
|
if( line.StartsWith( "." ) )
|
||||||
{
|
{
|
||||||
m_directives.emplace_back( line );
|
m_directives.emplace_back( text );
|
||||||
inDirective = true;
|
break;
|
||||||
}
|
|
||||||
else if( inDirective && line.StartsWith( "+" ) )
|
|
||||||
{
|
|
||||||
m_directives.emplace_back( line );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inDirective = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue