From 81b432a9b3405a1ddec82e2fe028c3132bd4fba0 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 19 Feb 2007 15:45:02 +0000 Subject: [PATCH] *** empty log message *** --- ase/awk/awk.c | 3 ++- ase/awk/parse.c | 7 +++++-- ase/test/awk/err-001.awk | Bin 0 -> 10 bytes 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 ase/test/awk/err-001.awk diff --git a/ase/awk/awk.c b/ase/awk/awk.c index 3e2a47b8..c4a7b0da 100644 --- a/ase/awk/awk.c +++ b/ase/awk/awk.c @@ -1,5 +1,5 @@ /* - * $Id: awk.c,v 1.107 2007-02-03 10:47:40 bacon Exp $ + * $Id: awk.c,v 1.108 2007-02-19 15:45:02 bacon Exp $ * * {License} */ @@ -243,6 +243,7 @@ int ase_awk_clear (ase_awk_t* awk) while (awk->tree.chain != ASE_NULL) { ase_awk_chain_t* next = awk->tree.chain->next; + if (awk->tree.chain->pattern != ASE_NULL) ase_awk_clrpt (awk, awk->tree.chain->pattern); if (awk->tree.chain->action != ASE_NULL) diff --git a/ase/awk/parse.c b/ase/awk/parse.c index 65bbf69d..8f096735 100644 --- a/ase/awk/parse.c +++ b/ase/awk/parse.c @@ -1,5 +1,5 @@ /* - * $Id: parse.c,v 1.243 2007-02-18 11:21:34 bacon Exp $ + * $Id: parse.c,v 1.244 2007-02-19 15:44:46 bacon Exp $ * * {License} */ @@ -647,7 +647,10 @@ static ase_awk_t* __parse_progunit (ase_awk_t* awk) { if (__get_token (awk) == -1) { - ase_awk_clrpt (awk, ptn); + /* ptn has been added to the chain. + * it doesn't have to be cleared here + * as ase_awk_clear does it */ + /*ase_awk_clrpt (awk, ptn);*/ return ASE_NULL; } } diff --git a/ase/test/awk/err-001.awk b/ase/test/awk/err-001.awk new file mode 100644 index 0000000000000000000000000000000000000000..d7800ed57bd78ddbf56db1858c1b2268f853e21b GIT binary patch literal 10 RcmdN7E-lVX)#qa10ss)}0(<}f literal 0 HcmV?d00001