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 00000000..d7800ed5 Binary files /dev/null and b/ase/test/awk/err-001.awk differ