My Project
Loading...
Searching...
No Matches
main.c
Go to the documentation of this file.
1
#include "gwion_util.h"
2
#include "
gwion_ast.h
"
3
#include "parser.h"
4
int
main
(
int
argc,
char
**argv) {
5
// MemPool p = mempool_ini(sizeof(Exp));
6
MemPool p = mempool_ini(1024);
7
SymTable *st = new_symbol_table(p, 65536);
8
PPArg
ppa
;
9
for
(
int
i = 1; i < argc; i++) {
10
FILE *f = fopen(argv[i],
"r"
);
11
if
(!f) {
12
gw_err(
"{R+}%s{0} not found\n"
);
13
continue
;
14
}
15
struct
AstGetter_
arg = { argv[i],
f
,
st
, .ppa = &
ppa
};
16
parse
(&arg);
17
fclose(
f
);
18
}
19
}
parse
static ANN Ast parse(struct AstGetter_ *const arg)
Definition
ast_getter.h:31
gwion_ast.h
include this file to use gwion-ast library
main
int main(int argc, char **argv)
Definition
main.c:4
ppa
return macro_rem & ppa
Definition
pparg.h:30
AstGetter_
Definition
ast_getter.h:21
AstGetter_::f
FILE * f
Definition
ast_getter.h:23
AstGetter_::st
SymTable * st
Definition
ast_getter.h:24
PPArg_
Definition
pparg.h:7
Generated by
1.12.0