From aca2acab75e1ab597147347278bdec917c643806 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 23 Jul 2008 07:01:49 +0000 Subject: [PATCH] --- ase/include/ase/awk/awk.h | 4 +++- ase/lib/awk/parse.c | 8 +++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ase/include/ase/awk/awk.h b/ase/include/ase/awk/awk.h index d63ba7b7..79a71793 100644 --- a/ase/include/ase/awk/awk.h +++ b/ase/include/ase/awk/awk.h @@ -1,5 +1,5 @@ /* - * $Id: awk.h 279 2008-07-21 05:27:34Z baconevi $ + * $Id: awk.h 282 2008-07-22 13:01:49Z baconevi $ * * {License} */ @@ -157,6 +157,8 @@ enum ase_awk_option_t /* allow variable shading */ /*ASE_AWK_SHADING = (1 << 3),*/ #endif + /* change ^ from exponentation to bitwise xor */ + ASE_AWK_BXOR = (1 << 3), /* support shift operators */ ASE_AWK_SHIFT = (1 << 4), diff --git a/ase/lib/awk/parse.c b/ase/lib/awk/parse.c index a3b7189e..34079f7c 100644 --- a/ase/lib/awk/parse.c +++ b/ase/lib/awk/parse.c @@ -1,5 +1,5 @@ /* - * $Id: parse.c 271 2008-07-20 12:42:39Z baconevi $ + * $Id: parse.c 282 2008-07-22 13:01:49Z baconevi $ * * {License} */ @@ -4785,13 +4785,15 @@ static int get_token (ase_awk_t* awk) if (c == ASE_T('=')) { - SET_TOKEN_TYPE (awk, TOKEN_BXOR_ASSIGN); + SET_TOKEN_TYPE (awk, ((awk->option & ASE_AWK_BXOR)? + TOKEN_BXOR_ASSIGN: TOKEN_EXP_ASSIGN)); ADD_TOKEN_CHAR (awk, c); GET_CHAR (awk); } else { - SET_TOKEN_TYPE (awk, TOKEN_BXOR); + SET_TOKEN_TYPE (awk, ((awk->option & ASE_AWK_BXOR)? + TOKEN_BXOR: TOKEN_EXP)); } } else if (c == ASE_T('+'))