# HG changeset patch # User Adam Chlipala # Date 1270398574 14400 # Node ID c316ca3c9ec6980311eeb23e09b65fc99886a6df # Parent 6d8e3dcb9713a6bfab7425aa8f8d8bed57357efb Pushing policies through diff -r 6d8e3dcb9713 -r c316ca3c9ec6 lib/ur/basis.urs --- a/lib/ur/basis.urs Thu Apr 01 17:23:17 2010 -0400 +++ b/lib/ur/basis.urs Sun Apr 04 12:29:34 2010 -0400 @@ -795,4 +795,13 @@ val initialize : task_kind +(** Information flow security *) + +type sql_policy + +val query_policy : tables ::: {{Type}} -> exps ::: {Type} + -> [tables ~ exps] => sql_query [] tables exps + -> sql_policy + + val debug : string -> transaction unit diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/cjrize.sml --- a/src/cjrize.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/cjrize.sml Sun Apr 04 12:29:34 2010 -0400 @@ -674,6 +674,7 @@ end | _ => (ErrorMsg.errorAt loc "Initializer has not been fully determined"; (NONE, NONE, sm))) + | L.DPolicy _ => (NONE, NONE, sm) fun cjrize ds = let diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/core.sml --- a/src/core.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/core.sml Sun Apr 04 12:29:34 2010 -0400 @@ -135,6 +135,7 @@ | DCookie of string * int * con * string | DStyle of string * int * string | DTask of exp * exp + | DPolicy of exp withtype decl = decl' located diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/core_env.sml --- a/src/core_env.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/core_env.sml Sun Apr 04 12:29:34 2010 -0400 @@ -349,6 +349,7 @@ pushENamed env x n t NONE s end | DTask _ => env + | DPolicy _ => env fun patBinds env (p, loc) = case p of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/core_print.sml --- a/src/core_print.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/core_print.sml Sun Apr 04 12:29:34 2010 -0400 @@ -618,6 +618,9 @@ string "=", space, p_exp env e2] + | DPolicy e1 => box [string "policy", + space, + p_exp env e1] fun p_file env file = let diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/core_util.sml --- a/src/core_util.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/core_util.sml Sun Apr 04 12:29:34 2010 -0400 @@ -992,6 +992,10 @@ S.map2 (mfe ctx e2, fn e2' => (DTask (e1', e2'), loc))) + | DPolicy e => + S.map2 (mfe ctx e, + fn e' => + (DPolicy e', loc)) and mfvi ctx (x, n, t, e, s) = S.bind2 (mfc ctx t, @@ -1147,6 +1151,7 @@ bind (ctx, NamedE (x, n, t, NONE, s)) end | DTask _ => ctx + | DPolicy _ => ctx in S.map2 (mff ctx' ds', fn ds' => @@ -1210,7 +1215,8 @@ | DDatabase _ => count | DCookie (_, n, _, _) => Int.max (n, count) | DStyle (_, n, _) => Int.max (n, count) - | DTask _ => count) 0 + | DTask _ => count + | DPolicy _ => count) 0 end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/corify.sml --- a/src/corify.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/corify.sml Sun Apr 04 12:29:34 2010 -0400 @@ -1080,6 +1080,9 @@ | L.DTask (e1, e2) => ([(L'.DTask (corifyExp st e1, corifyExp st e2), loc)], st) + | L.DPolicy e1 => + ([(L'.DPolicy (corifyExp st e1), loc)], st) + and corifyStr mods ((str, _), st) = case str of L.StrConst ds => @@ -1137,7 +1140,8 @@ | L.DDatabase _ => n | L.DCookie (_, _, n', _) => Int.max (n, n') | L.DStyle (_, _, n') => Int.max (n, n') - | L.DTask _ => n) + | L.DTask _ => n + | L.DPolicy _ => n) 0 ds and maxNameStr (str, _) = diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/css.sml --- a/src/css.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/css.sml Sun Apr 04 12:29:34 2010 -0400 @@ -287,6 +287,7 @@ | DCookie _ => st | DStyle (_, n, s) => (IM.insert (globals, n, (SOME s, [])), classes) | DTask _ => st + | DPolicy _ => st end val (globals, classes) = foldl decl (IM.empty, IM.empty) file diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elab.sml --- a/src/elab.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elab.sml Sun Apr 04 12:29:34 2010 -0400 @@ -171,6 +171,7 @@ | DCookie of int * string * int * con | DStyle of int * string * int | DTask of exp * exp + | DPolicy of exp and str' = StrConst of decl list diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elab_env.sml --- a/src/elab_env.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elab_env.sml Sun Apr 04 12:29:34 2010 -0400 @@ -1623,5 +1623,6 @@ pushENamedAs env x n t end | DTask _ => env + | DPolicy _ => env end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elab_print.sml --- a/src/elab_print.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elab_print.sml Sun Apr 04 12:29:34 2010 -0400 @@ -806,6 +806,9 @@ string "=", space, p_exp env e2] + | DPolicy e1 => box [string "policy", + space, + p_exp env e1] and p_str env (str, _) = case str of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elab_util.sml --- a/src/elab_util.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elab_util.sml Sun Apr 04 12:29:34 2010 -0400 @@ -854,7 +854,8 @@ c), loc))) | DStyle (tn, x, n) => bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc))) - | DTask _ => ctx, + | DTask _ => ctx + | DPolicy _ => ctx, mfd ctx d)) ctx ds, fn ds' => (StrConst ds', loc)) | StrVar _ => S.return2 strAll @@ -985,6 +986,10 @@ S.map2 (mfe ctx e2, fn e2' => (DTask (e1', e2'), loc))) + | DPolicy e1 => + S.map2 (mfe ctx e1, + fn e1' => + (DPolicy e1', loc)) and mfvi ctx (x, n, c, e) = S.bind2 (mfc ctx c, @@ -1128,6 +1133,7 @@ | DCookie (n1, _, n2, _) => Int.max (n1, n2) | DStyle (n1, _, n2) => Int.max (n1, n2) | DTask _ => 0 + | DPolicy _ => 0 and maxNameStr (str, _) = case str of StrConst ds => maxName ds diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elaborate.sml --- a/src/elaborate.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elaborate.sml Sun Apr 04 12:29:34 2010 -0400 @@ -2595,6 +2595,7 @@ | L'.DCookie (tn, x, n, c) => [(L'.SgiVal (x, n, (L'.CApp (cookieOf (), c), loc)), loc)] | L'.DStyle (tn, x, n) => [(L'.SgiVal (x, n, styleOf ()), loc)] | L'.DTask _ => [] + | L'.DPolicy _ => [] and subSgn' counterparts env strLoc sgn1 (sgn2 as (_, loc2)) = ((*prefaces "subSgn" [("sgn1", p_sgn env sgn1), @@ -3729,6 +3730,15 @@ checkCon env e2' t2 t2'; ([(L'.DTask (e1', e2'), loc)], (env, denv, gs2 @ gs1 @ gs)) end + | L.DPolicy e1 => + let + val (e1', t1, gs1) = elabExp (env, denv) e1 + + val t1' = (L'.CModProj (!basis_r, [], "sql_policy"), loc) + in + checkCon env e1' t1 t1'; + ([(L'.DPolicy e1', loc)], (env, denv, gs1 @ gs)) + end (*val tcs = List.filter (fn TypeClass _ => true | _ => false) (#3 (#2 r))*) in diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elisp/urweb-defs.el --- a/src/elisp/urweb-defs.el Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elisp/urweb-defs.el Sun Apr 04 12:29:34 2010 -0400 @@ -108,7 +108,7 @@ "datatype" "type" "open" "include" urweb-module-head-syms "con" "map" "where" "extern" "constraint" "constraints" - "table" "sequence" "class" "cookie" "task") + "table" "sequence" "class" "cookie" "task" "policy") "Symbols starting an sexp.") ;; (defconst urweb-not-arg-start-re @@ -135,7 +135,7 @@ (("case" "datatype" "if" "then" "else" "let" "open" "sig" "struct" "type" "val" "con" "constraint" "table" "sequence" "class" "cookie" - "task"))))) + "task" "policy"))))) (defconst urweb-starters-indent-after (urweb-syms-re "let" "in" "struct" "sig") @@ -190,7 +190,7 @@ '("datatype" "fun" "open" "type" "val" "and" "con" "constraint" "table" "sequence" "class" "cookie" - "task")) + "task" "policy")) "The starters of new expressions.") (defconst urweb-exptrail-syms diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/elisp/urweb-mode.el --- a/src/elisp/urweb-mode.el Thu Apr 01 17:23:17 2010 -0400 +++ b/src/elisp/urweb-mode.el Sun Apr 04 12:29:34 2010 -0400 @@ -136,7 +136,7 @@ "datatype" "else" "end" "extern" "fn" "map" "fun" "functor" "if" "include" "of" "open" "let" "in" - "rec" "sequence" "sig" "signature" "cookie" "style" "task" + "rec" "sequence" "sig" "signature" "cookie" "style" "task" "policy" "struct" "structure" "table" "view" "then" "type" "val" "where" "with" @@ -226,7 +226,7 @@ ("\\<\\(\\(data\\)?type\\|con\\|class\\)\\s-+\\(\\sw+\\)" (1 font-lock-keyword-face) (3 (amAttribute font-lock-type-def-face))) - ("\\<\\(val\\|table\\|sequence\\|cookie\\|style\\|task\\)\\s-+\\(\\sw+\\>\\s-*\\)?\\(\\sw+\\)\\s-*[=:]" + ("\\<\\(val\\|table\\|sequence\\|cookie\\|style\\|task\\|policy\\)\\s-+\\(\\sw+\\>\\s-*\\)?\\(\\sw+\\)\\s-*[=:]" (1 font-lock-keyword-face) (3 (amAttribute font-lock-variable-name-face))) ("\\<\\(structure\\|functor\\)\\s-+\\(\\sw+\\)" diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/expl.sml --- a/src/expl.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/expl.sml Sun Apr 04 12:29:34 2010 -0400 @@ -148,6 +148,7 @@ | DCookie of int * string * int * con | DStyle of int * string * int | DTask of exp * exp + | DPolicy of exp and str' = StrConst of decl list diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/expl_env.sml --- a/src/expl_env.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/expl_env.sml Sun Apr 04 12:29:34 2010 -0400 @@ -344,6 +344,7 @@ pushENamed env x n t end | DTask _ => env + | DPolicy _ => env fun sgiBinds env (sgi, loc) = case sgi of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/expl_print.sml --- a/src/expl_print.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/expl_print.sml Sun Apr 04 12:29:34 2010 -0400 @@ -720,6 +720,9 @@ string "=", space, p_exp env e2] + | DPolicy e1 => box [string "policy", + space, + p_exp env e1] and p_str env (str, _) = case str of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/explify.sml --- a/src/explify.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/explify.sml Sun Apr 04 12:29:34 2010 -0400 @@ -196,6 +196,7 @@ | L.DCookie (nt, x, n, c) => SOME (L'.DCookie (nt, x, n, explifyCon c), loc) | L.DStyle (nt, x, n) => SOME (L'.DStyle (nt, x, n), loc) | L.DTask (e1, e2) => SOME (L'.DTask (explifyExp e1, explifyExp e2), loc) + | L.DPolicy e1 => SOME (L'.DPolicy (explifyExp e1), loc) and explifyStr (str, loc) = case str of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/mono.sml --- a/src/mono.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/mono.sml Sun Apr 04 12:29:34 2010 -0400 @@ -1,4 +1,4 @@ -(* Copyright (c) 2008, Adam Chlipala +(* Copyright (c) 2008-2010, Adam Chlipala * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -123,6 +123,8 @@ withtype exp = exp' located +datatype policy = PolQuery of exp + datatype decl' = DDatatype of (string * int * (string * int * typ option) list) list | DVal of string * int * typ * exp * string @@ -141,6 +143,8 @@ | DTask of exp * exp + | DPolicy of policy + withtype decl = decl' located type file = decl list diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/mono_env.sml --- a/src/mono_env.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/mono_env.sml Sun Apr 04 12:29:34 2010 -0400 @@ -130,6 +130,7 @@ | DCookie _ => env | DStyle _ => env | DTask _ => env + | DPolicy _ => env fun patBinds env (p, loc) = case p of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/mono_print.sml --- a/src/mono_print.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/mono_print.sml Sun Apr 04 12:29:34 2010 -0400 @@ -412,6 +412,12 @@ cons] end +fun p_policy env pol = + case pol of + PolQuery e => box [string "query", + space, + p_exp env e] + fun p_decl env (dAll as (d, _) : decl) = case d of DDatatype x => box [string "datatype", @@ -506,6 +512,9 @@ string "=", space, p_exp env e2] + | DPolicy p => box [string "policy", + space, + p_policy env p] fun p_file env file = diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/mono_shake.sml --- a/src/mono_shake.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/mono_shake.sml Sun Apr 04 12:29:34 2010 -0400 @@ -58,6 +58,13 @@ | ((DDatabase {expunge = n1, initialize = n2, ...}, _), (page_cs, page_es)) => (page_cs, IS.addList (page_es, [n1, n2])) | ((DTask (e1, e2), _), st) => usedVars (usedVars st e2) e1 + | ((DPolicy pol, _), st) => + let + val e1 = case pol of + PolQuery e1 => e1 + in + usedVars st e1 + end | (_, st) => st) (IS.empty, IS.empty) file val (cdef, edef) = foldl (fn ((DDatatype dts, _), (cdef, edef)) => @@ -74,7 +81,8 @@ | ((DJavaScript _, _), acc) => acc | ((DCookie _, _), acc) => acc | ((DStyle _, _), acc) => acc - | ((DTask _, _), acc) => acc) + | ((DTask _, _), acc) => acc + | ((DPolicy _, _), acc) => acc) (IM.empty, IM.empty) file fun typ (c, s) = @@ -141,7 +149,8 @@ | (DJavaScript _, _) => true | (DCookie _, _) => true | (DStyle _, _) => true - | (DTask _, _) => true) file + | (DTask _, _) => true + | (DPolicy _, _) => true) file end end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/mono_util.sml --- a/src/mono_util.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/mono_util.sml Sun Apr 04 12:29:34 2010 -0400 @@ -534,6 +534,16 @@ S.map2 (mfe ctx e2, fn e2' => (DTask (e1', e2'), loc))) + | DPolicy pol => + S.map2 (mfpol ctx pol, + fn p' => + (DPolicy p', loc)) + + and mfpol ctx pol = + case pol of + PolQuery e => + S.map2 (mfe ctx e, + PolQuery) and mfvi ctx (x, n, t, e, s) = S.bind2 (mft t, @@ -621,6 +631,7 @@ | DCookie _ => ctx | DStyle _ => ctx | DTask _ => ctx + | DPolicy _ => ctx in S.map2 (mff ctx' ds', fn ds' => @@ -674,7 +685,8 @@ | DJavaScript _ => count | DCookie _ => count | DStyle _ => count - | DTask _ => count) 0 + | DTask _ => count + | DPolicy _ => count) 0 end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/monoize.sml --- a/src/monoize.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/monoize.sml Sun Apr 04 12:29:34 2010 -0400 @@ -3738,6 +3738,20 @@ fm, [(L'.DTask (e1, e2), loc)]) end + | L.DPolicy e => + let + val (e, make) = + case #1 e of + L.EApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "query_policy"), _), _), _), _), _), e) => + (e, L'.PolQuery) + | _ => (poly (); (e, L'.PolQuery)) + + val (e, fm) = monoExp (env, St.empty, fm) e + in + SOME (env, + fm, + [(L'.DPolicy (make e), loc)]) + end end datatype expungable = Client | Channel diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/reduce.sml --- a/src/reduce.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/reduce.sml Sun Apr 04 12:29:34 2010 -0400 @@ -746,6 +746,15 @@ namedC, namedE)) end + | DPolicy e1 => + let + val e1 = exp (namedC, namedE) [] e1 + in + ((DPolicy e1, loc), + (polyC, + namedC, + namedE)) + end val (file, _) = ListUtil.foldlMap doDecl (IS.empty, IM.empty, IM.empty) file in diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/reduce_local.sml --- a/src/reduce_local.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/reduce_local.sml Sun Apr 04 12:29:34 2010 -0400 @@ -252,6 +252,7 @@ | DCookie _ => d | DStyle _ => d | DTask (e1, e2) => (DTask (exp [] e1, exp [] e2), loc) + | DPolicy e1 => (DPolicy (exp [] e1), loc) in map doDecl file end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/shake.sml --- a/src/shake.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/shake.sml Sun Apr 04 12:29:34 2010 -0400 @@ -90,6 +90,11 @@ st else usedVars (usedVars st e1) e2 + | ((DPolicy e1, _), st) => + if !sliceDb then + st + else + usedVars st e1 | (_, acc) => acc) (IS.empty, IS.empty) file val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) @@ -116,7 +121,8 @@ (cdef, IM.insert (edef, n, ([], c, dummye))) | ((DStyle (_, n, _), _), (cdef, edef)) => (cdef, IM.insert (edef, n, ([], dummyt, dummye))) - | ((DTask _, _), acc) => acc) + | ((DTask _, _), acc) => acc + | ((DPolicy _, _), acc) => acc) (IM.empty, IM.empty) file fun kind (_, s) = s @@ -203,7 +209,8 @@ | (DDatabase _, _) => not (!sliceDb) | (DCookie _, _) => not (!sliceDb) | (DStyle _, _) => not (!sliceDb) - | (DTask _, _) => not (!sliceDb)) file + | (DTask _, _) => not (!sliceDb) + | (DPolicy _, _) => not (!sliceDb)) file end end diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/source.sml --- a/src/source.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/source.sml Sun Apr 04 12:29:34 2010 -0400 @@ -168,6 +168,7 @@ | DCookie of string * con | DStyle of string | DTask of exp * exp + | DPolicy of exp and str' = StrConst of decl list diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/source_print.sml --- a/src/source_print.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/source_print.sml Sun Apr 04 12:29:34 2010 -0400 @@ -669,6 +669,9 @@ string "=", space, p_exp e2] + | DPolicy e1 => box [string "policy", + space, + p_exp e1] and p_str (str, _) = case str of diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/unnest.sml --- a/src/unnest.sml Thu Apr 01 17:23:17 2010 -0400 +++ b/src/unnest.sml Sun Apr 04 12:29:34 2010 -0400 @@ -423,6 +423,7 @@ | DCookie _ => default () | DStyle _ => default () | DTask _ => explore () + | DPolicy _ => explore () end and doStr (all as (str, loc), st) = diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/urweb.grm --- a/src/urweb.grm Thu Apr 01 17:23:17 2010 -0400 +++ b/src/urweb.grm Sun Apr 04 12:29:34 2010 -0400 @@ -202,7 +202,7 @@ | LET | IN | STRUCTURE | SIGNATURE | STRUCT | SIG | END | FUNCTOR | WHERE | EXTERN | SQL | SELECT1 | INCLUDE | OPEN | CONSTRAINT | CONSTRAINTS | EXPORT | TABLE | SEQUENCE | VIEW - | COOKIE | STYLE | TASK + | COOKIE | STYLE | TASK | POLICY | CASE | IF | THEN | ELSE | ANDALSO | ORELSE | XML_BEGIN of string | XML_END | XML_BEGIN_END of string @@ -481,6 +481,7 @@ | COOKIE SYMBOL COLON cexp ([(DCookie (SYMBOL, cexp), s (COOKIEleft, cexpright))]) | STYLE SYMBOL ([(DStyle SYMBOL, s (STYLEleft, SYMBOLright))]) | TASK eapps EQ eexp ([(DTask (eapps, eexp), s (TASKleft, eexpright))]) + | POLICY eexp ([(DPolicy eexp, s (POLICYleft, eexpright))]) dtype : SYMBOL dargs EQ barOpt dcons (SYMBOL, dargs, dcons) diff -r 6d8e3dcb9713 -r c316ca3c9ec6 src/urweb.lex --- a/src/urweb.lex Thu Apr 01 17:23:17 2010 -0400 +++ b/src/urweb.lex Sun Apr 04 12:29:34 2010 -0400 @@ -416,6 +416,7 @@ "cookie" => (Tokens.COOKIE (pos yypos, pos yypos + size yytext)); "style" => (Tokens.STYLE (pos yypos, pos yypos + size yytext)); "task" => (Tokens.TASK (pos yypos, pos yypos + size yytext)); + "policy" => (Tokens.POLICY (pos yypos, pos yypos + size yytext)); "Type" => (Tokens.TYPE (pos yypos, pos yypos + size yytext)); "Name" => (Tokens.NAME (pos yypos, pos yypos + size yytext)); diff -r 6d8e3dcb9713 -r c316ca3c9ec6 tests/policy.ur --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/policy.ur Sun Apr 04 12:29:34 2010 -0400 @@ -0,0 +1,3 @@ +table fruit : { Id : int, Nam : string, Weight : float } + +policy query_policy (SELECT * FROM fruit) diff -r 6d8e3dcb9713 -r c316ca3c9ec6 tests/policy.urp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/policy.urp Sun Apr 04 12:29:34 2010 -0400 @@ -0,0 +1,1 @@ +policy