Browse Source

Report an error when trying to define ports

'v', 'vd', 'i', and 'id' as 'inout'
Parch 105 provided by  Giles Atkinson
pre-master-46
Holger Vogt 5 years ago
parent
commit
545d2f9177
  1. 13
      src/xspice/cmpp/ifs_yacc.y

13
src/xspice/cmpp/ifs_yacc.y

@ -221,6 +221,11 @@ static void check_port_type_direction (Dir_t dir, Port_Type_t port_type)
case DIFF_VOLTAGE:
case CURRENT:
case DIFF_CURRENT:
if (dir == CMPP_INOUT) {
yyerror ("Port types `v', `vd', `i', `id' are not valid for `inout' ports");
ifs_num_errors++;
}
break;
case DIGITAL:
case USER_DEFINED:
/*
@ -229,8 +234,8 @@ static void check_port_type_direction (Dir_t dir, Port_Type_t port_type)
break;
case VSOURCE_CURRENT:
if (dir != CMPP_IN) {
yyerror ("Port type `vnam' is only valid for `in' ports");
ifs_num_errors++;
yyerror ("Port type `vnam' is only valid for `in' ports");
ifs_num_errors++;
}
break;
case CONDUCTANCE:
@ -238,8 +243,8 @@ static void check_port_type_direction (Dir_t dir, Port_Type_t port_type)
case RESISTANCE:
case DIFF_RESISTANCE:
if (dir != CMPP_INOUT) {
yyerror ("Port types `g', `gd', `h', `hd' are only valid for `inout' ports");
ifs_num_errors++;
yyerror ("Port types `g', `gd', `h', `hd' are only valid for `inout' ports");
ifs_num_errors++;
}
break;
default:

Loading…
Cancel
Save