diff --git a/lexer.c b/lexer.c index 1b9903c..bc938c9 100644 --- a/lexer.c +++ b/lexer.c @@ -83,7 +83,7 @@ static sxi32 TokenizePHP(SyStream *pStream, SyToken *pToken, void *pUserData, vo nKeyword = KeywordCode(pStr->zString, (int)pStr->nByte); if(nKeyword != PH7_TK_ID) { if(nKeyword & - (PH7_TKWRD_NEW | PH7_TKWRD_CLONE | PH7_TKWRD_AND | PH7_TKWRD_XOR | PH7_TKWRD_OR | PH7_TKWRD_INSTANCEOF)) { + (PH7_TKWRD_NEW | PH7_TKWRD_CLONE | PH7_TKWRD_AND | PH7_TKWRD_OR | PH7_TKWRD_INSTANCEOF)) { /* Alpha stream operators [i.e: new,clone,and,instanceof,eq,ne,or,xor],save the operator instance for later processing */ pToken->pUserData = (void *)PH7_ExprExtractOperator(pStr, 0); /* Mark as an operator */ @@ -648,7 +648,6 @@ static sxu32 KeywordCode(const char *z, int n) { {"public", PH7_TKWRD_PUBLIC}, {"catch", PH7_TKWRD_CATCH}, {"unset", PH7_TKWRD_UNSET}, - {"xor", PH7_TKWRD_XOR}, {"break", PH7_TKWRD_BREAK} }; if(n < 2) { diff --git a/parser.c b/parser.c index 381db71..2a5a3b7 100644 --- a/parser.c +++ b/parser.c @@ -241,8 +241,6 @@ static const ph7_expr_op aOpTable[] = { { {">>=", sizeof(char) * 3}, EXPR_OP_SHR_ASSIGN, 19, EXPR_OP_ASSOC_RIGHT, PH7_OP_SHR_STORE }, /* Precedence 20,left-associative */ { {"and", sizeof("and") - 1}, EXPR_OP_LAND, 20, EXPR_OP_ASSOC_LEFT, PH7_OP_LAND}, - /* Precedence 21,left-associative */ - { {"xor", sizeof("xor") - 1}, EXPR_OP_LXOR, 21, EXPR_OP_ASSOC_LEFT, PH7_OP_LXOR}, /* Precedence 22,left-associative */ { {"or", sizeof("or") - 1}, EXPR_OP_LOR, 22, EXPR_OP_ASSOC_LEFT, PH7_OP_LOR}, /* Precedence 23,left-associative [Lowest operator] */ diff --git a/ph7int.h b/ph7int.h index 56475c0..14013b6 100644 --- a/ph7int.h +++ b/ph7int.h @@ -1410,7 +1410,7 @@ enum ph7_vm_op { PH7_OP_BOR, /* Bitwise or '|' */ PH7_OP_LAND, /* Logical and '&&','and' */ PH7_OP_LOR, /* Logical or '||','or' */ - PH7_OP_LXOR, /* Logical xor 'xor' */ + PH7_OP_LXOR, /* Logical xor '^^' */ PH7_OP_STORE, /* Store Object */ PH7_OP_STORE_IDX, /* Store indexed object */ PH7_OP_STORE_IDX_REF,/* Store indexed object by reference */ @@ -1493,7 +1493,7 @@ enum ph7_expr_id { EXPR_OP_BOR, /* bitwise or '|' */ EXPR_OP_LAND, /* Logical and '&&','and' */ EXPR_OP_LOR, /* Logical or '||','or'*/ - EXPR_OP_LXOR, /* Logical xor 'xor' */ + EXPR_OP_LXOR, /* Logical xor '^^' */ EXPR_OP_QUESTY, /* Ternary operator '?' */ EXPR_OP_ASSIGN, /* Assignment '=' */ EXPR_OP_ADD_ASSIGN, /* Combined operator: += */ @@ -1612,7 +1612,6 @@ enum ph7_expr_id { #define PH7_TKWRD_CATCH 53 /* catch */ #define PH7_TKWRD_RETURN 54 /* return */ #define PH7_TKWRD_UNSET 0x2000 /* unset: MUST BE A POWER OF TWO */ -#define PH7_TKWRD_XOR 0x4000 /* xor: MUST BE A POWER OF TWO */ #define PH7_TKWRD_BREAK 55 /* break */ #define PH7_TKWRD_GOTO 56 /* goto */ #define PH7_TKWRD_BOOL 0x8000 /* bool: MUST BE A POWER OF TWO */