4 The program can be divided into three parts. A first pass, which
5 parses C program files and outputs definitions, a second pass which
6 processes the definitions and a driver,
7 which feeds the set of files to the first pass and
8 directs its output to the second pass. Both passes produce the
9 warnings on standard error output, which are redirected to standard
12 The first pass is based on an existing C front end, called
16 is part of the Amsterdam Compiler Kit (ACK), as described in [4].
20 is left unchanged. This has several reasons. A lot of work, which
23 , must also be done by
25 E.g. the lexical analysis, the macro expansions,
26 the parsing part and the semantical analysis.
27 Only the code generation part is turned off.
28 An advantage of this approach is, that a person who understands
30 will not have to spend to much time in understanding
33 All changes and extensions to
35 can be turned off by not defining the compiler directive
39 Compiling should then result in the original C compiler.
41 The second pass is a much less complex program.
42 It reads simple definitions generated by the first pass and
43 checks their consistency.
44 This second pass gives warnings
45 about wrong usage of function arguments, their results and
46 about external variables, which are used and defined in more
49 The driver is a shell program, to be executed by the
53 It executes the two passes and let them communicate through a
55 Actually it is simplex communication: the first pass only talks to
56 the second pass through the filter.