diff -c2 inpgtok.c.orig inpgtok.c *** inpgtok.c.orig Wed Jul 21 18:40:08 1993 --- inpgtok.c Tue Jan 24 15:27:34 1995 *************** *** 28,31 **** --- 28,32 ---- { char * point; + int signstate; /* scan along throwing away garbage characters */ *************** *** 42,45 **** --- 43,47 ---- *line = point; /* now find all good characters */ + signstate = 0; for(point = *line;*point!='\0';point++) { if(*point == ' ') break; *************** *** 49,52 **** --- 51,70 ---- if(*point == ')') break; if(*point == ',') break; + /* This is not complex enough to catch all errors, but it will + get the "good" parses */ + if(*point == '+' && (signstate == 1 || signstate == 3)) break; + if(*point == '-' && (signstate == 1 || signstate == 3)) break; + if(*point == '*') break; + if(*point == '/') break; + if(*point == '^') break; + if (isdigit(*point) || *point == '.') { + if (signstate > 1) + signstate = 3; + else + signstate = 1; + } else if (tolower(*point) == 'e' && signstate == 1) + signstate = 2; + else + signstate = 3; } if (point == *line && *point) /* Weird items, 1 char */ Change the following line in src/lib/inp/inpptree.c: diff -c2 inpptree.c.orig inpptree.c *** inpptree.c.orig Mon May 3 05:16:54 1993 --- inpptree.c Tue Jan 24 14:28:50 1995 *************** *** 978,982 **** } ! td = INPevaluate(&sbuf, &err, 0); if (err == OK) { el.token = TOK_VALUE; --- 978,982 ---- } ! td = INPevaluate(&sbuf, &err, 1); if (err == OK) { el.token = TOK_VALUE;