Trouble at EOF

Ed Nilges EGNILGES at pucc.Princeton.EDU
Tue Jun 18 01:34:45 AEST 1991


In article <4739 at inews.intel.com>, bhoughto at pima.intel.com (Blair P. Houghton) writes:

>
>As confusing as that was, I think I got it.

The only confusion resulted from the misuse of a line reader in a
lexical analyzer, which is a character-by-character sort of thing.
A minor source of confusion was the omission of the reference.
It was ANSI C: A Lexical Guide, published by the Mark Williams
Company.

I took the advice of Mr. Ken Yap down in Australia at CSIRO, and
this morning completely altered the lexical analyzer to use
getc and ungetc.  It considerably simplified the code.  The use
of a line reader in the first place was the unfortunate byproduct
of having an IBM, unit-record background.  Yes, there may be a
performance penalty on IBM mainframe systems compiling C, in which
case the getc and ungetc can be hand-rolled around a unit record
reader for efficiency.

No, I don't want to use lexx.  I do not like the code it generates
and (once I get rid of these subtle tendencies to think in IBMerese)
I believe I can write more efficient code for the language I am
lexxicating.

Thanks to Mr. Ken Yap and the rest of the gang on comp.lang.c for
your patience.



More information about the Comp.lang.c mailing list