]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/dependenciesParser.ml
Wrong invariant: Hypothesis (i.e. lambda-abstractions) can have no
[helm.git] / helm / software / components / grafite_parser / dependenciesParser.ml
index e07d4ec031e972e33a409f30fa73659638c03c1a..eb33e49b80d7b5f453dbadb433851f7de3e96556 100644 (file)
 
 (* $Id$ *)
 
+(* FG
+ * From Cambridge dictionary
+ * Dependency:
+ * a country which is supported and governed by another country
+ * Dependence:
+ * when you need something or someone all the time, especially in order to
+ * continue existing or operating
+ *
+ * Fate vobis ...
+ *)
+
 exception UnableToInclude of string
 
   (* statements meaningful for matitadep *)
@@ -45,6 +56,12 @@ let parse_dependencies lexbuf =
   let rec parse acc = 
    try
     (parser
+    | [< '("QSTRING", s) >] ->
+        (* because of alias id qstring = qstring :-( *)
+        (try
+          parse (UriDep (UriManager.uri_of_string s) :: acc)
+         with
+          UriManager.IllFormedUri _ -> parse acc)
     | [< '("URI", u) >] ->
         parse (UriDep (UriManager.uri_of_string u) :: acc)
     | [< '("IDENT", "include"); '("QSTRING", fname) >] ->
@@ -66,7 +83,9 @@ let make_absolute paths path =
    | p :: tl ->
       let path = p ^ "/" ^ path in
        try
-         ignore (Unix.stat path); path
+         ignore (Unix.stat path);
+         HLog.debug ("Including "^path^" with path: " ^ p);
+         path
        with Unix.Unix_error _ -> aux tl
    in
    try