X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql%2FmQueryUtil.ml;h=450e40210560b8d40c063f213212a223f3c0fdfd;hb=fb4f3bb1bafb5d5541a777758b4074ee8e2de4ae;hp=73006b60675994d0a5e8b5d69ed7718600d52b3f;hpb=e281113f887c39b4aa86a794f73b074ef5655319;p=helm.git diff --git a/helm/ocaml/mathql/mQueryUtil.ml b/helm/ocaml/mathql/mQueryUtil.ml index 73006b606..450e40210 100644 --- a/helm/ocaml/mathql/mQueryUtil.ml +++ b/helm/ocaml/mathql/mQueryUtil.ml @@ -54,7 +54,7 @@ let text_of_query x = | M.SuperOp -> "super " in let txt_vvar_list l = - txt_list txt_vvar ", " l + l in let rec txt_val = function | M.Const [s] -> txt_qstr s @@ -62,7 +62,7 @@ let text_of_query x = | M.VVar vv -> txt_vvar vv | M.Record (rv, vv) -> txt_rvar rv ^ "." ^ txt_vvar vv | M.Fun (s, x) -> "fun " ^ txt_qstr s ^ " " ^ txt_val x - | M.Attribute (r, s, x) -> "attribute " ^ txt_ref r ^ txt_qstr s ^ " " ^ txt_val x + | M.Attribute (r, p, x) -> "attribute " ^ txt_ref r ^ txt_list txt_qstr "/" p ^ " " ^ txt_val x | M.RefOf x -> "refof " ^ txt_set x and txt_boole = function | M.False -> "false" @@ -77,8 +77,8 @@ let text_of_query x = and txt_set = function | M.SVar sv -> txt_svar sv | M.RVar rv -> txt_rvar rv - | M.Relation (r, s, x, []) -> "relation " ^ txt_ref r ^ txt_qstr s ^ " " ^ txt_set x - | M.Relation (r, s, x, l) -> "relation " ^ txt_ref r ^ txt_qstr s ^ " " ^ txt_set x ^ " attr " ^ txt_vvar_list l + | M.Relation (r, p, x, []) -> "relation " ^ txt_ref r ^ txt_list txt_qstr "/" p ^ " " ^ txt_set x + | M.Relation (r, p, x, l) -> "relation " ^ txt_ref r ^ txt_list txt_qstr "/" p ^ " " ^ txt_set x ^ " attr " ^ txt_list txt_vvar ", " l | M.Union (x, y) -> "(" ^ txt_set x ^ " union " ^ txt_set y ^ ")" | M.Intersect (x, y) -> "(" ^ txt_set x ^ " intersect " ^ txt_set y ^ ")" | M.Diff (x, y) -> "(" ^ txt_set x ^ " diff " ^ txt_set y ^ ")" @@ -87,7 +87,7 @@ let text_of_query x = | M.Select (rv, x, y) -> "select " ^ txt_rvar rv ^ " in " ^ txt_set x ^ " where " ^ txt_boole y | M.Pattern x -> "pattern " ^ txt_val x | M.Ref x -> "ref " ^ txt_val x - in + in txt_set x let text_of_result x sep = @@ -100,7 +100,7 @@ let text_of_result x sep = | (s, []) -> txt_qstr s | (s, l) -> txt_qstr s ^ " attr " ^ txt_list txt_group ", " l in - let txt_set l = txt_list txt_res ("; " ^ sep) l in + let txt_set l = txt_list txt_res ("; " ^ sep) l ^ sep in txt_set x let query_of_text lexbuf =