--- parser3/src/targets/parser/Attic/parser.C 2001/02/20 18:45:53 1.7 +++ parser3/src/targets/parser/Attic/parser.C 2001/02/21 17:37:04 1.15 @@ -1,5 +1,5 @@ /* - $Id: parser.C,v 1.7 2001/02/20 18:45:53 paf Exp $ + $Id: parser.C,v 1.15 2001/02/21 17:37:04 paf Exp $ */ #include @@ -10,8 +10,9 @@ #include "pa_table.h" #include "pa_common.h" #include "pa_pool.h" -#include "compile.h" -#include "execute.h" +#include "pa_vclass.h" + +#include "core.h" char *itoa(int n, char *buf){ snprintf(buf,MAX_STRING,"%d",n); @@ -19,6 +20,9 @@ char *itoa(int n, char *buf){ } int main(int argc, char *argv[]) { + core(); + return 0; + Exception fatal_exception; if(EXCEPTION_TRY(fatal_exception)) { Pool pool(fatal_exception); @@ -35,7 +39,7 @@ int main(int argc, char *argv[]) { printf(string.cstr()); char *key1_file="key1_file"; - Hash& hash=*new(pool) Hash(pool, false); + Hash& hash=*new(pool) Hash(pool); String key1=string; key1.APPEND("1", 0,key1_file, 1); String& value1=*new(pool) String(pool); @@ -145,12 +149,6 @@ int main(int argc, char *argv[]) { int type=si.skip_to(types); si++; */ - // compile - char *file="test.p"; - char *source=file_read(pool, file); - Array *ops=COMPILE(&pool, source, file); - execute(&pool, ops); - } else { Exception& e=request.exception(); printf("operator_error occured: %s\n", e.comment()); @@ -165,9 +163,12 @@ int main(int argc, char *argv[]) { const String *problem_source=e.problem_source(); if(problem_source) { const Origin& origin=problem_source->origin(); - printf(" '%s' [%s:%d]\n", - problem_source->cstr(), - origin.file, origin.line); + printf(" '%s'\n", + problem_source->cstr()); + if(origin.file) + printf(" [%s:%d]", + origin.file, origin.line); + printf("\n"); } } } else {