> but I don't see where do you restore its prev value for the rest of the input?
No need to do this. There is additional explicit check for '.'
parse_num:
for(;;) {
t = c;
cstr_ccat(&tokcstr, c);
PEEKC(c, p);
if (!((isidnum_table[c - CH_EOF] & (IS_ID|IS_NUM))
|| c == '.'
|| ((c == '+' || c == '-')
&& (t == 'e' || t == 'E' || t == 'p' || t == 'P')
)))
break;
}
All other places check for IS_SPC.
PS: There is much cleaner solution (but it is a bit slower): change
isidnum_table when we change parse_flags (in #define)
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel