2 * Example trivial client program that uses the sparse library
3 * to tokenize, pre-process and parse a C file, and prints out
6 * Copyright (C) 2003 Transmeta Corp.
9 * Licensed under the Open Software License version 1.1
24 #include "expression.h"
26 static void clean_up_symbols(struct symbol_list
*list
)
30 FOR_EACH_PTR(list
, sym
) {
32 } END_FOR_EACH_PTR(sym
);
35 int main(int argc
, char **argv
)
37 struct symbol_list
*list
= sparse(argc
, argv
);
40 clean_up_symbols(list
);
43 // Show the end result.
44 show_symbol_list(list
, "\n\n");
49 // And show the allocation statistics
53 show_expression_alloc();
54 show_statement_alloc();