/* * TEST_DPARSE.C * * (c)Copyright 1993-2014, Matthew Dillon, All Rights Reserved. See the * COPYRIGHT file at the base of the distribution. */ #include "defs.h" int main(int ac, char **av) { int i; LibRuneInit(); LibGenInterpInit(); for (i = 1; i < ac; ++i) { Stmt *st; Parse *p; int t; DebugOpt = 1; st = BuildRootImportStmt(av[i]); t = ParseOpen(st, &p, NULL); if ((t & TOKF_ERROR) == 0) { t = ParseModule(p, st, t); if ((t & TOKF_ERROR) == 0) { printf("Resolving for Interpreter\n"); ResolveProject(p, st); (void)st->st_Func(NULL, st); printf("Run Complete\n"); } else { LexPrintError(&p->p_Token); } } } return(0); }