Specctra import: accept layer names like numbers (i.e. +12).
This commit is contained in:
parent
230980fc9d
commit
c2227abb36
|
@ -347,10 +347,7 @@ bool DSNLEXER::IsSymbol( int aTok )
|
||||||
// This is static and not inline to reduce code space.
|
// This is static and not inline to reduce code space.
|
||||||
|
|
||||||
// if aTok is >= 0, then it is a coincidental match to a keyword.
|
// if aTok is >= 0, then it is a coincidental match to a keyword.
|
||||||
return aTok==DSN_SYMBOL
|
return aTok==DSN_SYMBOL || aTok==DSN_STRING || aTok>=0;
|
||||||
|| aTok==DSN_STRING
|
|
||||||
|| aTok>=0
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1009,9 +1009,9 @@ void SPECCTRA_DB::doBOUNDARY( BOUNDARY* growth ) throw( IO_ERROR, boost::bad_poi
|
||||||
|
|
||||||
void SPECCTRA_DB::doPATH( PATH* growth ) throw( IO_ERROR )
|
void SPECCTRA_DB::doPATH( PATH* growth ) throw( IO_ERROR )
|
||||||
{
|
{
|
||||||
T tok = NextTok();
|
T tok = NextTok();
|
||||||
|
|
||||||
if( !IsSymbol( tok ) )
|
if( !IsSymbol( tok ) && (int)tok != DSN_NUMBER ) // a layer name can be like a number like +12
|
||||||
Expecting( "layer_id" );
|
Expecting( "layer_id" );
|
||||||
|
|
||||||
growth->layer_id = CurText();
|
growth->layer_id = CurText();
|
||||||
|
@ -1084,7 +1084,7 @@ void SPECCTRA_DB::doCIRCLE( CIRCLE* growth ) throw( IO_ERROR )
|
||||||
{
|
{
|
||||||
T tok;
|
T tok;
|
||||||
|
|
||||||
NeedSYMBOL();
|
NeedSYMBOLorNUMBER();
|
||||||
growth->layer_id = CurText();
|
growth->layer_id = CurText();
|
||||||
|
|
||||||
if( NextTok() != T_NUMBER )
|
if( NextTok() != T_NUMBER )
|
||||||
|
@ -2062,6 +2062,7 @@ L_done_that:
|
||||||
if( growth->shape )
|
if( growth->shape )
|
||||||
Unexpected( tok );
|
Unexpected( tok );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// the example in the spec uses "circ" instead of "circle". Bad!
|
// the example in the spec uses "circ" instead of "circle". Bad!
|
||||||
if( !strcmp( "circ", CurText() ) )
|
if( !strcmp( "circ", CurText() ) )
|
||||||
|
@ -2811,7 +2812,7 @@ void SPECCTRA_DB::doWIRE( WIRE* growth ) throw( IO_ERROR, boost::bad_pointer )
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case T_net:
|
case T_net:
|
||||||
NeedSYMBOL();
|
NeedSYMBOLorNUMBER();
|
||||||
growth->net_id = CurText();
|
growth->net_id = CurText();
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue