X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite_parser%2FdependenciesParser.ml;h=5e80d8b4c8279d118cd8c92dd03172bd78b304eb;hb=9052c3d19ade20c086bb114133fe7cd060e23ec4;hp=686caa5b108bbf9e0c971f19c1fecebbe3b8b2b8;hpb=f7f2a793b445a052138cd3df377a9e417f6e37c4;p=helm.git diff --git a/helm/software/components/grafite_parser/dependenciesParser.ml b/helm/software/components/grafite_parser/dependenciesParser.ml index 686caa5b1..5e80d8b4c 100644 --- a/helm/software/components/grafite_parser/dependenciesParser.ml +++ b/helm/software/components/grafite_parser/dependenciesParser.ml @@ -45,6 +45,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 +61,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 []) @@ -86,4 +93,4 @@ let baseuri_of_script ~include_paths file = let uri = Http_getter_misc.strip_trailing_slash buri in if String.length uri < 5 || String.sub uri 0 5 <> "cic:/" then HLog.error (file ^ " sets an incorrect baseuri: " ^ buri); - uri + uri,file