]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite_parser/dependenciesParser.ml
LexiconAstPp: fixed syntax for include
[helm.git] / helm / software / components / grafite_parser / dependenciesParser.ml
index 74cf0aa774333592b5ed396aab97581a38cd678b..b7b4151fa3b5c47f874cd476f60012e9bcfe7f85 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) >] ->
@@ -55,7 +72,8 @@ let parse_dependencies lexbuf =
     | [< 'tok >] -> parse acc
     | [<  >] -> acc) tok_stream
    with
-    Stream.Error _ -> parse acc
+      Stream.Error _ -> parse acc
+    | CicNotationLexer.Error _ -> parse acc
   in
   List.rev (parse [])