diff --git a/parser/jaz.jison b/parser/jaz.jison index 7fd7089..52bd166 100644 --- a/parser/jaz.jison +++ b/parser/jaz.jison @@ -514,7 +514,7 @@ e12 : e12 '^' e11 { if (($1.type == "NUMBER") && ($3.type == "NUMBER")) { - $$ = { type: "NUMBER", value: $1.value.or($3.value).and(__MASK__) }; + $$ = { type: "NUMBER", value: $1.value.xor($3.value).and(__MASK__) }; } else { $$ = { type: "OP", op: "^", values: [$1, $3] }; } diff --git a/parser/jaz.js b/parser/jaz.js index 60c32fa..1d202be 100644 --- a/parser/jaz.js +++ b/parser/jaz.js @@ -361,7 +361,7 @@ break; case 59: if (($$[$0-2].type == "NUMBER") && ($$[$0].type == "NUMBER")) { - this.$ = { type: "NUMBER", value: $$[$0-2].value.or($$[$0].value).and(__MASK__) }; + this.$ = { type: "NUMBER", value: $$[$0-2].value.xor($$[$0].value).and(__MASK__) }; } else { this.$ = { type: "OP", op: "^", values: [$$[$0-2], $$[$0]] }; }