From 6d3ccf1fb1dcadc874d56c93dffea4056e1d4a68 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 11 May 2006 17:32:37 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/awk.c | 3 +-- ase/awk/parse.c | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 32eff25b..d2dc48cf 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.48 2006-05-10 16:02:38 bacon Exp $ + * $Id: awk.c,v 1.49 2006-05-11 17:32:37 bacon Exp $ */ #include @@ -97,7 +97,6 @@ int xp_awk_close (xp_awk_t* awk) return 0; } - /* TODO: write a function to clear awk->parse data structure. this would be need either as a separate function or as a part of xp_awk_clear... do i have to pass an option to xp_awk_clear to do this??? */ diff --git a/ase/awk/parse.c b/ase/awk/parse.c index e31ee6d6..6f2d8184 100644 --- a/ase/awk/parse.c +++ b/ase/awk/parse.c @@ -1,5 +1,5 @@ /* - * $Id: parse.c,v 1.103 2006-05-10 16:02:39 bacon Exp $ + * $Id: parse.c,v 1.104 2006-05-11 17:32:37 bacon Exp $ */ #include @@ -339,15 +339,14 @@ static void __dump (xp_awk_t* awk) int xp_awk_parse (xp_awk_t* awk) { - if (awk->srcio == XP_NULL) { + /* the source code io handler is not set */ awk->errnum = XP_AWK_ENOSRCIO; return -1; } - /* if you want to parse anew, call xp_awk_clear first. - * otherwise, the result is appened to the accumulated result */ + xp_awk_clear (awk); GET_CHAR (awk); GET_TOKEN (awk); @@ -358,8 +357,7 @@ int xp_awk_parse (xp_awk_t* awk) if (__parse_progunit(awk) == XP_NULL) { -/* TODO: cleanup the parse tree created so far.... - function tables also etc... */ + xp_awk_clear (awk); return -1; } }