I noticed that kernel/bootstrap.c fails parsing empty \ comments, e.g. from "bootstrap.fs":
\ Some comment<lf> <lf> : tuck swap over ;
complaining about "tuck not defined". No problem if the 2nd line has a space: \ <lf>
One could say "That's FORTH", but IMHO this behavior is ugly because the difference between both cases is not visible. In my case I had an editor configured to truncate trailing spaces in a line ...
I suggest to resolve this problem by not eating <lf> when parsing for white spaces(delim=0) in parse(f,line,delim ), something like:
static int parse(FILE * f, char *line, char delim) { int cnt = 0, c; while (!feof(f)) { c = getc(f); if (delim && c == delim) break; if ((!delim) && (c == ' ' || c == '\n' || c == '\t')) {
if (c == '\n') ungetc(c, f);
break; } line[cnt++] = c; } line[cnt] = 0; return cnt; }
A similar change should probably be done at FORTH level in ": parse-word" and/or ": parse".
Regards, Rolf.