Datalight faster than 4.2, why?
Gregory Smith
greg at utcsri.UUCP
Thu Jun 5 02:20:01 AEST 1986
In article <3844 at sun.uucp> guy at sun.uucp (Guy Harris) writes:
>> And again, we would still need a separate cpp to make the kernel,
>
>Well, note that if a "cc" is to be considered a real UNIX "cc", it will have
>to support "-P" and "-E". This means that if you don't have a separate
>preprocessor, there will have to be *some* way of running just the
>preprocessor part of the lexical analyzer and getting compilable C output
>from it. (Sorry, any of you people who want to bundle "cpp" and the lexical
>analyzer, but that's the way it is.) Given that, you can either hack "cc"
Bee's Knees.
Any c compiler with an integral cpp will have a function 'inchar()' ( or
possibly a macro for speed ) which is called from the lexer to get the
next input char from the cpp. In effect, 'inchar()' runs the cpp. So the
-E option is done by the following magnum opus (which of course is also
used to debug the cpp code ):
while( (c=inchar()) !=EOF ) putc( c, outfile );
Modularity in software design does not imply a separate program for each
module.
--
"We demand rigidly defined areas of doubt and uncertainty!" - Vroomfondel
----------------------------------------------------------------------
Greg Smith University of Toronto UUCP: ..utzoo!utcsri!greg
More information about the Comp.lang.c
mailing list