Parses a binary operator expression.
$(BNF BinaryExpr := OrOrExpr /OrOrExpr := AndAndExpr ("||" AndAndExpr)* /AndAndExpr := OrExpr ("&&" OrExpr)* /OrExpr := XorExpr ("|" XorExpr)* /XorExpr := AndExpr ("^" AndExpr)* /AndExpr := CmpExpr ("&" CmpExpr)* /CmpExpr := ShiftExpr (CmpOp ShiftExpr)? /CmpOp := "is" | "!" "is" | "in" | "==" | "!=" | "<" | "<=" | ">" | / ">=" | "!<>=" | "!<>" | "!<=" | "!<" | / "!>=" | "!>" | "<>=" | "<>" /ShiftExpr := AddExpr (ShiftOp AddExpr)* /ShiftOp := "<<" | ">>" | ">>>" /AddExpr := MulExpr (AddOp MulExpr)* /AddOp := "+" | "-" | "~" /MulExpr := PostExpr (MulOp PostExpr)* /MulExpr2 := PowExpr (MulOp PowExpr)* # D2 /MulOp := "*" | "/" | "%" /PowExpr := PostExpr ("^^" PostExpr)* # D2 /)
The precedence of the previous operator. Note: Uses the "precedence climbing" method as described here: http://www.engr.mun.ca/~theo/Misc/exp_parsing.htm#climbing
See Implementation
Parses a binary operator expression.
$(BNF BinaryExpr := OrOrExpr /OrOrExpr := AndAndExpr ("||" AndAndExpr)* /AndAndExpr := OrExpr ("&&" OrExpr)* /OrExpr := XorExpr ("|" XorExpr)* /XorExpr := AndExpr ("^" AndExpr)* /AndExpr := CmpExpr ("&" CmpExpr)* /CmpExpr := ShiftExpr (CmpOp ShiftExpr)? /CmpOp := "is" | "!" "is" | "in" | "==" | "!=" | "<" | "<=" | ">" | / ">=" | "!<>=" | "!<>" | "!<=" | "!<" | / "!>=" | "!>" | "<>=" | "<>" /ShiftExpr := AddExpr (ShiftOp AddExpr)* /ShiftOp := "<<" | ">>" | ">>>" /AddExpr := MulExpr (AddOp MulExpr)* /AddOp := "+" | "-" | "~" /MulExpr := PostExpr (MulOp PostExpr)* /MulExpr2 := PowExpr (MulOp PowExpr)* # D2 /MulOp := "*" | "/" | "%" /PowExpr := PostExpr ("^^" PostExpr)* # D2 /)