comparison src/urweb.grm @ 750:059074c8d2fc

LEFT JOIN
author Adam Chlipala <adamc@hcoop.net>
date Tue, 28 Apr 2009 11:05:28 -0400
parents 16bfd9e244cd
children f95d652086cd
comparison
equal deleted inserted replaced
749:16bfd9e244cd 750:059074c8d2fc
211 | ASC | DESC 211 | ASC | DESC
212 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS 212 | INSERT | INTO | VALUES | UPDATE | SET | DELETE | NULL | IS
213 | CURRENT_TIMESTAMP 213 | CURRENT_TIMESTAMP
214 | NE | LT | LE | GT | GE 214 | NE | LT | LE | GT | GE
215 | CCONSTRAINT | UNIQUE | CHECK | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES 215 | CCONSTRAINT | UNIQUE | CHECK | PRIMARY | FOREIGN | KEY | ON | NO | ACTION | RESTRICT | CASCADE | REFERENCES
216 | JOIN | INNER | CROSS 216 | JOIN | INNER | CROSS | LEFT
217 217
218 %nonterm 218 %nonterm
219 file of decl list 219 file of decl list
220 | decls of decl list 220 | decls of decl list
221 | decl of decl list 221 | decl of decl list
359 %nonassoc DARROW 359 %nonassoc DARROW
360 %nonassoc COLON 360 %nonassoc COLON
361 %nonassoc DCOLON TCOLON 361 %nonassoc DCOLON TCOLON
362 %left UNION INTERSECT EXCEPT 362 %left UNION INTERSECT EXCEPT
363 %right COMMA 363 %right COMMA
364 %right JOIN INNER CROSS 364 %right JOIN INNER CROSS LEFT
365 %right OR 365 %right OR
366 %right CAND 366 %right CAND
367 %nonassoc EQ NE LT LE GT GE IS 367 %nonassoc EQ NE LT LE GT GE IS
368 %right ARROW 368 %right ARROW
369 %right CARET PLUSPLUS MINUSMINUS MINUSMINUSMINUS 369 %right CARET PLUSPLUS MINUSMINUS MINUSMINUSMINUS
1466 val tru = sql_inject (EVar (["Basis"], "True", Infer), loc) 1466 val tru = sql_inject (EVar (["Basis"], "True", Infer), loc)
1467 in 1467 in
1468 (#1 fitem1 @ #1 fitem2, 1468 (#1 fitem1 @ #1 fitem2,
1469 (EApp (e, tru), loc)) 1469 (EApp (e, tru), loc))
1470 end) 1470 end)
1471 | fitem LEFT JOIN fitem ON sqlexp (let
1472 val loc = s (fitem1left, sqlexpright)
1473
1474 val e = (EVar (["Basis"], "sql_left_join", Infer), loc)
1475 val e = (EApp (e, #2 fitem1), loc)
1476 val e = (EApp (e, #2 fitem2), loc)
1477 in
1478 (#1 fitem1 @ #1 fitem2,
1479 (EApp (e, sqlexp), loc))
1480 end)
1471 1481
1472 tname : CSYMBOL (CName CSYMBOL, s (CSYMBOLleft, CSYMBOLright)) 1482 tname : CSYMBOL (CName CSYMBOL, s (CSYMBOLleft, CSYMBOLright))
1473 | LBRACE cexp RBRACE (cexp) 1483 | LBRACE cexp RBRACE (cexp)
1474 1484
1475 table : SYMBOL ((CName (capitalize SYMBOL), s (SYMBOLleft, SYMBOLright)), 1485 table : SYMBOL ((CName (capitalize SYMBOL), s (SYMBOLleft, SYMBOLright)),