diff options
Diffstat (limited to 'read.c')
-rw-r--r-- | read.c | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -0,0 +1,19 @@ +#include <string.h> +#include <stdio.h> + +#include "read.h" +#include "run.h" + +AstNode read() { + AstNode ret; + memset(&ret, 0, sizeof ret); + pcc_context_t *ctx = pcc_create(NULL); + pcc_parse(ctx, &ret); + pcc_destroy(ctx); + return ret; +} + +int main() { + for(;;) printf("%d\n",eval(read())); +} + |