eval_expr.y: references to unknown identifiers cause the lexer to return an error so the expression is not evaluated and returned as is, instead of erroneously interpreting the unknown identifier as 0
This commit is contained in:
parent
f9ccf878c2
commit
d3e0ca82b4
|
|
@ -274,10 +274,11 @@ static int kklex()
|
|||
while (c != 0 && isalnum(c) && i < length);
|
||||
str--;
|
||||
symbuf[i] = '\0';
|
||||
s = getsym (symbuf);
|
||||
s = getsym(symbuf);
|
||||
kklval.tptr = s;
|
||||
dbg(dbglev, "ylex: FNCT=%s\n", symbuf);
|
||||
return FNCT;
|
||||
if(s) return FNCT;
|
||||
return 0; /* error : undefined identifier */
|
||||
}
|
||||
/* Any other character is a token by itself. */
|
||||
return c;
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ S {}
|
|||
E {}
|
||||
P 4 5 10 -20 10 -140 140 -140 140 -20 10 -20 {}
|
||||
T {@device} 12.5 -18.125 0 0 0.2 0.2 {layer=4}
|
||||
T {tcleval(@spice_get_node [xschem get_fqdevice @device ] )} 12.5 -139.375 0 0 0.15 0.15 {layer=15}
|
||||
T {tcleval(@spice_get_node [xschem get_fqdevice @device ] )} 12.5 -139.375 0 0 0.15 0.15 {layer=17}
|
||||
|
|
|
|||
Loading…
Reference in New Issue