repositories
/
lambda.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Fix memory leaks and verbosify reduction
[lambda.git]
/
main.c
1
#include <stdio.h>
2
3
#include
"lambda.h"
4
#include
"lambda.tab.h"
5
#include
"lambda.yy.h"
6
#include
"reduce.h"
7
#include
"print.h"
8
#include
"mem.h"
9
10
extern
struct
lambda
*
result
;
11
12
int
main
()
13
{
14
int
r
=
yyparse
();
15
int
maxdepth
=
10000
;
16
if
(
r
==
0
){
17
printf
(
" "
);
18
lambda_reduce
(
result
,
result
, &
maxdepth
);
19
lambda_print
(
result
,
NULL
);
20
}
21
yylex_destroy
();
22
lambda_free
(
result
);
23
decls_free
();
24
return
r
;
25
}