Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- expr ::= expr[12]
- expr_at[n] | n > 0 ::= expr_at[n - 1]
- expr_at[12] ::= expr_at[12]!lhs || expr_at[11]!rhs {new BinOpExpr(BinOp::And, lhs, rhs)}
- expr_at[11] ::= expr_at[11]!lhs && expr_at[10]!rhs {new BinOpExpr(BinOp::Or, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs < expr_at[9]!rhs {new BinOpExpr(BinOp::LT, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs > expr_at[9]!rhs {new BinOpExpr(BinOp::GT, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs <= expr_at[9]!rhs {new BinOpExpr(BinOp::LE, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs >= expr_at[9]!rhs {new BinOpExpr(BinOp::GE, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs != expr_at[9]!rhs {new BinOpExpr(BinOp::NEQ, lhs, rhs)}
- expr_at[10] ::= expr_at[9]!lhs == expr_at[9]!rhs {new BinOpExpr(BinOp::EQ, lhs, rhs)}
- expr_at[9] ::= expr_at[9]!lhs + expr_at[8]!rhs {new BinOpExpr(BinOp::Add, lhs, rhs)}
- expr_at[9] ::= expr_at[9]!lhs - expr_at[8]!rhs {new BinOpExpr(BinOp::Sub, lhs, rhs)}
- expr_at[8] ::= expr_at[8]!lhs * expr_at[7]!rhs {new BinOpExpr(BinOp::Sub, lhs, rhs)}
- expr_at[8] ::= expr_at[8]!lhs / expr_at[7]!rhs {new BinOpExpr(BinOp::Sub, lhs, rhs)}
- expr_at[6] ::= expr_at[6]!head ( expr_list! ) {new CallExpr(head, expr_list)}
- expr_at[2] ::= expr_at[2]!lhs . id! {new FieldExpr(lhs, id)}
- expr_at[0] ::= prim!
- expr_list ::= {nullptr}
- expr_list ::= expr! expr_list_tail!tail {new ExprList(expr, tail)}
- expr_list_tail ::= {nullptr}
- expr_list_tail ::= , expr! expr_list_tail!tail {new ExprList(expr, tail)}
- prim ::= num! {new NumLit(num)}
- prim ::= id! {new IdExpr(id)}
- prim ::= ( expr! )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement