extra: move some code out of match_comparison()
[smatch.git] / test-inspect.c
blobe437e11242aa25a47b4dfdf380f36451fbdeac65
2 #include <stdarg.h>
3 #include <stdlib.h>
4 #include <stdio.h>
5 #include <string.h>
6 #include <ctype.h>
7 #include <unistd.h>
8 #include <fcntl.h>
10 #include "lib.h"
11 #include "allocate.h"
12 #include "token.h"
13 #include "parse.h"
14 #include "symbol.h"
15 #include "expression.h"
17 #include "ast-view.h"
19 static void expand_symbols(struct symbol_list *list)
21 struct symbol *sym;
22 FOR_EACH_PTR(list, sym) {
23 expand_symbol(sym);
24 } END_FOR_EACH_PTR(sym);
27 int main(int argc, char **argv)
29 struct string_list *filelist = NULL;
30 char *file;
31 struct symbol_list *view_syms = NULL;
33 gtk_init(&argc,&argv);
34 expand_symbols(sparse_initialize(argc, argv, &filelist));
35 FOR_EACH_PTR_NOTAG(filelist, file) {
36 struct symbol_list *syms = sparse(file);
37 expand_symbols(syms);
38 concat_symbol_list(syms, &view_syms);
39 } END_FOR_EACH_PTR_NOTAG(file);
40 treeview_main(view_syms);
41 return 0;