Browse Source

There is no fixed rule and XOR has different position in programming languages, but it has surely not higher precedence than AND and not lower than OR

pull/8/head
Rafal Kupiec 3 years ago
parent
commit
0ad681ccf6
Signed by: belliash GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      parse.c

+ 2
- 2
parse.c View File

@ -219,9 +219,9 @@ static const ph7_expr_op aOpTable[] = {
/* Precedence 15,left-associative */
{ {"&&",sizeof(char)*2}, EXPR_OP_LAND,15, EXPR_OP_ASSOC_LEFT, PH7_OP_LAND},
/* Precedence 16,left-associative */
{ {"||",sizeof(char)*2}, EXPR_OP_LOR, 16, EXPR_OP_ASSOC_LEFT, PH7_OP_LOR},
{ {"^^",sizeof(char)*2}, EXPR_OP_LXOR, 16, EXPR_OP_ASSOC_LEFT, PH7_OP_LXOR},
/* Precedence 17,left-associative */
{ {"^^",sizeof(char)*2}, EXPR_OP_LXOR, 17, EXPR_OP_ASSOC_LEFT, PH7_OP_LXOR},
{ {"||",sizeof(char)*2}, EXPR_OP_LOR, 17, EXPR_OP_ASSOC_LEFT, PH7_OP_LOR},
/* Ternary operator */
/* Precedence 18,left-associative */
{ {"?",sizeof(char)}, EXPR_OP_QUESTY, 18, EXPR_OP_ASSOC_LEFT, 0},


Loading…
Cancel
Save