2 * Example test program that just uses the tokenization and
3 * preprocessing phases, and prints out the results.
5 * Copyright (C) 2003 Transmeta Corp, all rights reserved.
18 int main(int argc
, char **argv
)
20 int fd
= open(argv
[1], O_RDONLY
);
24 die("No such file: %s", argv
[1]);
27 token
= tokenize(argv
[1], fd
, NULL
);
29 token
= preprocess(token
);
31 while (!eof_token(token
)) {
32 struct token
*next
= token
->next
;
33 char * separator
= "";
34 if (next
->pos
.whitespace
)
36 if (next
->pos
.newline
)
38 printf("%s%s", show_token(token
), separator
);
42 show_identifier_stats();