; Extended relational algebra grammar rules.
; Uses rules from core_grammar.bnf.

expression ::= expression | theta_join_expr | intersect_expr

natural_join_expr ::= expression natural_join expression

theta_join_expr ::= expression join param_start conditions param_stop expression

intersect_expr ::= expression intersect expression

; Three-valued logic rules
defined_op ::= "defined"
defined_condition ::= defined_op "(" operand ")"
condition ::= condition | defined_condition

intersect ::= "\\intersect"
natural_join ::= "\\natural_join"

full_outer_join_expr ::= expression \\full_outer_join param_start conditions param_stop expression
left_outer_join_expr ::= expression \\left_outer_join param_start conditions param_stop expression
right_outer_join_expr ::= expression \\right_outer_join param_start conditions param_stop expression

full_outer_join ::= "\\full_outer_join"
left_outer_join ::= "\\left_outer_join"
right_outer_join ::= "\\right_outer_join"