diff src/urweb.grm @ 746:2c7244c066f1

sql_ufunc and octet_length
author Adam Chlipala <adamc@hcoop.net>
date Sun, 26 Apr 2009 12:35:45 -0400
parents 12ec14a6be0b
children 5f9b9972e6b8
line wrap: on
line diff
--- a/src/urweb.grm	Sun Apr 26 11:07:25 2009 -0400
+++ b/src/urweb.grm	Sun Apr 26 12:35:45 2009 -0400
@@ -329,6 +329,7 @@
  | ofopt of exp
  | sqlint of exp
  | sqlagg of string
+ | fname of exp
 
  | texp of exp
  | fields of con list
@@ -1536,6 +1537,17 @@
                                          in
                                              (EApp (e, sqlexp), loc)
                                          end)
+       | fname LPAREN sqlexp RPAREN     (let
+                                             val loc = s (fnameleft, RPARENright)
+
+                                             val e = (EVar (["Basis"], "sql_ufunc", Infer), loc)
+                                             val e = (EApp (e, fname), loc)
+                                         in
+                                             (EApp (e, sqlexp), loc)
+                                         end)
+
+fname  : SYMBOL                         (EVar (["Basis"], "sql_" ^ SYMBOL, Infer), s (SYMBOLleft, SYMBOLright))
+       | LBRACE eexp RBRACE             (eexp)
 
 wopt   :                                (sql_inject (EVar (["Basis"], "True", Infer),
                                                      dummy))