Update grammar definition

This commit is contained in:
Daniel M 2022-01-28 15:11:46 +01:00
parent 4d5188d9d6
commit b128b3357a

View File

@ -78,7 +78,9 @@ expr_primary = LITERAL | "(" expr ")" | "-" expr_primary
expr_mul = expr_primary (("*" | "/" | "%") expr_primary)*
expr_add = expr_mul (("+" | "-") expr_mul)*
expr_shift = expr_add ((">>" | "<<") expr_add)*
expr_band = expr_shift ("&" expr_shift)*
expr_rel = expr_shift ((">" | ">=" | "<" | "<=") expr_shift)*
expr_equ = expr_rel (("==" | "!=") expr_rel)*
expr_band = expr_equ ("&" expr_equ)*
expr_bxor = expr_band ("^") expr_band)*
expr_bor = expr_bxor ("|" expr_bxor)*
expr = expr_bor