X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fmathql_test%2FmQGTopParser.mly;h=e36dd5435c6b4c1e3adba2b6c83dedb1afff2e6a;hb=a48c5f0f412bbb8c1d6601dd5e11e5c3746f11d5;hp=cf2280dadd8f827ddf98a140f44f639c98d5032b;hpb=3c7ca719c304eb7de7d8d4e9a90ebe0db8d8ecab;p=helm.git diff --git a/helm/ocaml/mathql_test/mQGTopParser.mly b/helm/ocaml/mathql_test/mQGTopParser.mly index cf2280dad..e36dd5435 100644 --- a/helm/ocaml/mathql_test/mQGTopParser.mly +++ b/helm/ocaml/mathql_test/mQGTopParser.mly @@ -30,20 +30,7 @@ let f (x, y, z) = x let s (x, y, z) = y let t (x, y, z) = z - - let builtin s = - let ns = "http://www.cs.unibo.it/helm/schemas/schema-helm#" in - match s with - | "MH" -> ns ^ "MainHypothesis" - | "IH" -> ns ^ "InHypothesis" - | "MC" -> ns ^ "MainConclusion" - | "IC" -> ns ^ "InConclusion" - | "IB" -> ns ^ "InBody" - | "SET" -> "Set" - | "PROP" -> "Prop" - | "TYPE" -> "Type" - | _ -> raise Parsing.Parse_error - + module G = MQueryGenerator %} %token ID @@ -88,8 +75,8 @@ | STR qstr { $1 ^ $2 } ; str: - | STR { $1 } - | DL ID { builtin $2 } + | STR { $1 } + | DL ID { try G.builtin $2 with _ -> "" } ; strs: | str CM strs { $1 :: $3 }