37 #if defined(_WIN32) & not defined(__MINGW32__)
38 #define strcasecmp stricmp
41 #define YYERROR_VERBOSE 42
43 #define YYMAXDEPTH 1000000
49 for (
unsigned int i = 0;
i < strlen (str);
i++) {
50 if (str[
i] >=
'a' && str[
i] <=
'z') str[
i] = toupper (str[
i]);
60 def->
type = (
char *) calloc (2, 1);
89 val->
value = strtod (value, NULL);
134 %token
Identifier Digits Floats Nodes Options Function
135 %token SUBCKT_Action ENDS_Action AC_Action OP_Action I_Source SAVE_Action
136 %token RLC_Device L_Device K_Device IV_Source GE_Source FH_Source V_Source
137 %token Diode_Device Bipolar_Device JFET_Device MOSFET_Device MESFET_Device
138 %token MODEL_Action MODEL_Spec TRAN_Action PLOT_Action VoltFunc CurrFunc
139 %token DC_Action PRINT_Action OPTIONS_Action WIDTH_Action NOISE_Action
140 %token PZ_Action CurVol PoleZero ALL_Special X_Device O_Device ModelProps
141 %token
OFF_Special IC_Special SIM_Type TEMP_Special MOS_Special B_Source
142 %token DISTO_Action INCLUDE_Action File
BranchFunc NODESET_Action T_Device
143 %token U_Device S_Device W_Device
ON_Special TF_Action SENS_Action FOUR_Action
144 %token
OpFunc Behave TC_Special TEMP_Action
155 %type <str> TitleLine
159 %type <value> VOLTAGE_Output CURRENT_Output Output_Range PRINT_List
161 %type <value> IC_Condition_1 IC_Condition_2 IC_Condition_3
NODESET_List
162 %type <value> IC_Condition_4 SWITCH_State
NodeValueList TC_Value_1 TC_Value_2
165 %type <ident>
Identifier Nodes Function Value Floats Digits
Node FH_Node
166 %type <ident> RLC_Device K_Device L_Device IV_Source GE_Source FH_Source
167 %type <ident> V_Source MODEL_Spec Diode_Device Bipolar_Device JFET_Device
168 %type <ident> MOSFET_Device MESFET_Device TRAN_Action PLOT_Action MODEL_Action
169 %type <ident> VoltFunc CurrFunc AC_Action DC_Action B_Source DISTO_Action
170 %type <ident> PRINT_Action Options OPTIONS_Action WIDTH_Action INCLUDE_Action
171 %type <ident> NOISE_Action PZ_Action CurVol PoleZero ALL_Special File
172 %type <ident> X_Device SUBCKT_Action SubCkt_Ident O_Device MODEL_Ident
173 %type <ident> ModelProps OP_Action I_Source IV_Reference SAVE_Action
ON_Special
174 %type <ident> IC_Special
OFF_Special SIM_Type TEMP_Special MOS_Special
175 %type <ident>
BranchFunc NODESET_Action T_Device U_Device S_Device W_Device
176 %type <ident> TF_Action SENS_Action FOUR_Action
OpFunc TC_Special TEMP_Action
188 fprintf (stderr,
"spice notice, no .END directive found, continuing\n");
192 fprintf (stderr,
"spice notice, no .END directive found, continuing\n");
275 | K_Device L_Device L_Device Value
Eol {
299 if (!strcasecmp ($4,
"POLY")) {
308 fprintf (stderr,
"spice notice, behavioural %s source ignored\n", $1);
314 fprintf (stderr,
"spice notice, behavioural %s source ignored\n", $1);
328 if (!strcasecmp ($4,
"POLY")) {
338 fprintf (stderr,
"spice notice, behavioural %s source ignored\n", $1);
342 | FH_Source FH_Node FH_Node Behave
Eol {
344 fprintf (stderr,
"spice notice, behavioural %s source ignored\n", $1);
347 | FH_Source FH_Node FH_Node V_Source Value
Eol {
428 | AC_Action Expr
Eol {
437 | DC_Action DC_List
Eol {
442 | DC_Action DC_List DC_List
Eol {
447 | PRINT_Action SIM_Type PRINT_List
Eol {
453 | PRINT_Action PRINT_List
Eol {
458 | PRINT_Action SIM_Type ALL_Special
Eol {
479 | NOISE_Action VOLTAGE_Output IV_Reference Expr
Eol {
512 | W_Device
Node Node V_Source MODEL_Ident SWITCH_State
Eol {
582 | DISTO_Action Expr
Eol {
587 | INCLUDE_Action File
Eol {
610 TC_Special Value Value {
626 IC_Special Value Value {
634 IC_Special Value Value Value {
644 IC_Special Value Value Value Value {
685 IV_Reference: I_Source | V_Source;
712 | VOLTAGE_Output Output_Range
PLOT_List {
719 | CURRENT_Output Output_Range
PLOT_List {
725 SWITCH_State: { $$ = NULL; }
734 PRINT_List: { $$ = NULL; }
840 IV_Reference Value Value Value {
850 Value: Digits | Floats;
940 | ENDS_Action SubCkt_Ident {
free ($2); }
static struct definition_t * spice_create_device(char *instance)
static struct value_t * spice_create_val_value(char *value, int hint)
static struct value_t * spice_append_str_values(struct value_t *values, char *value, int hint)
#define create_definition()
static struct value_t * spice_create_str_value(char *value, int hint)
static __END_DECLS char * spice_toupper(char *str)
TEMP_Special Value DEVICE_List_3
int spice_error(const char *error)
static struct value_t * spice_create_par_value(char *key, char *value)
RLC_Device Node Node Value MODEL_Ident PairList Eol
TEMP_Special Value DEVICE_List_1
Identifier Value PairList
static void spice_append_val_value(struct definition_t *def, char *value, int hint)
< INITIAL >< INITIAL >< INITIAL >< INITIAL > return InvalidCharacter
static struct value_t * spice_append_val_values(struct value_t *values, char *value, int hint)
static struct definition_t * spice_create_action(char *type, char *instance)
spice_add_last_hint($2, HINT_MSTOP)
void spice_set_last_hint(struct value_t *val, int hint)
TEMP_Special Value DEVICE_List_2
struct value_t * netlist_append_values(struct value_t *v1, struct value_t *v2)
VoltFunc Node Value NODESET_List
static void spice_append_str_value(struct definition_t *def, char *value, int hint)