*** empty log message ***

This commit is contained in:
hyung-hwan 2006-03-30 16:31:50 +00:00
parent 52d92a7d08
commit a966ad3296
5 changed files with 29 additions and 9 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: parse.c,v 1.63 2006-03-30 16:24:10 bacon Exp $
* $Id: parse.c,v 1.64 2006-03-30 16:31:50 bacon Exp $
*/
#include <xp/awk/awk.h>
@ -1118,7 +1118,7 @@ static xp_awk_nde_t* __parse_logical_or (xp_awk_t* awk)
{ TOKEN_EOF, 0 }
};
return __parse_binary_expr (awk, __parse_logical_and, map);
return __parse_binary_expr (awk, map, __parse_logical_and);
}
static xp_awk_nde_t* __parse_logical_and (xp_awk_t* awk)
@ -1129,7 +1129,7 @@ static xp_awk_nde_t* __parse_logical_and (xp_awk_t* awk)
{ TOKEN_EOF, 0 }
};
return __parse_binary_expr (awk, __parse_bitwise_or, map);
return __parse_binary_expr (awk, map, __parse_bitwise_or);
}
static xp_awk_nde_t* __parse_bitwise_or (xp_awk_t* awk)
@ -1140,7 +1140,7 @@ static xp_awk_nde_t* __parse_bitwise_or (xp_awk_t* awk)
{ TOKEN_EOF, 0 }
};
return __parse_binary_expr (awk, __parse_bitwise_xor, map);
return __parse_binary_expr (awk, map, __parse_bitwise_xor);
}
static xp_awk_nde_t* __parse_bitwise_xor (xp_awk_t* awk)
@ -1151,7 +1151,7 @@ static xp_awk_nde_t* __parse_bitwise_xor (xp_awk_t* awk)
{ TOKEN_EOF, 0 }
};
return __parse_binary_expr (awk, __parse_equality, map);
return __parse_binary_expr (awk, map, __parse_equality);
}
static xp_awk_nde_t* __parse_equality (xp_awk_t* awk)

View File

@ -1,5 +1,5 @@
/*
* $Id: run.c,v 1.26 2006-03-28 16:33:09 bacon Exp $
* $Id: run.c,v 1.27 2006-03-30 16:31:50 bacon Exp $
*/
#include <xp/awk/awk.h>
@ -670,6 +670,18 @@ static xp_awk_val_t* __eval_binary (xp_awk_t* awk, xp_awk_nde_exp_t* nde)
res = xp_awk_makeintval (awk, r);
}
}
else if (nde->opcode == XP_AWK_BINOP_BXOR)
{
if (left->type == XP_AWK_VAL_INT &&
right->type == XP_AWK_VAL_INT)
{
xp_long_t r =
((xp_awk_val_int_t*)left)->val ^
((xp_awk_val_int_t*)right)->val;
res = xp_awk_makeintval (awk, r);
}
}
xp_awk_refdownval (awk, left);
xp_awk_refdownval (awk, right);

View File

@ -1,5 +1,5 @@
/*
* $Id: run.h,v 1.3 2006-03-30 16:24:10 bacon Exp $
* $Id: run.h,v 1.4 2006-03-30 16:31:50 bacon Exp $
*/
#ifndef _XP_AWK_RUN_H_
@ -21,6 +21,9 @@ struct xp_awk_frm_t
enum
{
/* if you change this, you have to change
* __binop_str in tree.c accordingly */
XP_AWK_BINOP_LOR,
XP_AWK_BINOP_LAND,
XP_AWK_BINOP_BOR,

View File

@ -1,5 +1,5 @@
/*
* $Id: tree.c,v 1.27 2006-03-28 16:33:09 bacon Exp $
* $Id: tree.c,v 1.28 2006-03-30 16:31:50 bacon Exp $
*/
#include <xp/awk/awk.h>
@ -12,6 +12,11 @@
static const xp_char_t* __binop_str[] =
{
XP_TEXT("||"),
XP_TEXT("&&"),
XP_TEXT("|"),
XP_TEXT("^"),
XP_TEXT("&"),
XP_TEXT("+"),
XP_TEXT("-"),
XP_TEXT("*"),

View File

@ -1,6 +1,6 @@
CC = cl
#CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I..\..\..
CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I..\..\.. -D__STAND_ALONE
CFLAGS = /nologo /MT /W3 /GR- /D_WIN32_WINNT=0x0400 -I..\..\.. -D__STAND_ALONE -DXP_CHAR_IS_WCHAR
LDFLAGS = /libpath:..\..\bas /libpath:..\..\awk
#LIBS = xpbas.lib xpawk.lib
LIBS = xpawk.lib