powell@ole.UUCP (Gary Powell) (02/26/88)
The lex patch lets <^L> through without complaining. At SSC we tend to
group functions in files by similar utility, seperating them by ^L.
Note : octal 14 is assumed to be page break. edit if your host is different.
The change to main.c does two things. 1) print the character in question
if it is a printable char (who remebers what token 59 is???) 2) change the
format of the line number to be like that of lint so that if you pipe the
output thru error (BSD4.3) it will know how to read it.
Just run this message thru patch.
| patch -d [your source directory]
Thanks to Nick Crossly for the program. I find miss matched comments a
royal pain to debug.
*** lex.l
40c
[ \t\n\14]+ ;
.
*** main.c
156,157c
Fprintf (stderr, "%s(%d): %s\n",
filename, yylineno, s);
.
145,146c
if (yychar >= ' ' && yychar <= '~') /* printable char */
Fprintf (stderr, "%s(%d): %s: token (%c)\n",
filename, yylineno, s, yychar);
else
Fprintf (stderr, "%s(%d): %s: token %d\n",
filename, yylineno, s, yychar);
.
--
_Q _Q _Q _Q _Q_Q _Q _Q _Q
/_\) /_\) /_\) /_\)/_/\\) /_\) /_\) Gary Powell /_\)
_O|/O_O|/O__O|/O___O|/O_OO|/O__O|/O__O|/O__________________________________O|/O_
UUCP!uw-beaver!tikal!ole!powell Seattle Silicon Corp. (206) 828-4422
ok@quintus.UUCP (Richard A. O'Keefe) (02/26/88)
In the function error() in main.c, change exit(errors); to exit(errors == 0 ? 0 : 1); This is because 256 errors looks exactly like 0 errors in UNIX systems... In the function main() in main.c, change return errors; to exit(errors == 0 ? 0 : 1); This is for the same reason.