X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fgrafite_parser%2FdependenciesParser.ml;h=16c2a2c69f288ea3bab9100c8a95a80e8998afcf;hb=098e3728bb1d993145b893b83ac6e01173b58486;hp=53fb7ab6d63b8cdf5f845f9fe7c68d0d0e72532c;hpb=2c01ff6094173915e7023076ea48b5804dca7778;p=helm.git diff --git a/matita/components/grafite_parser/dependenciesParser.ml b/matita/components/grafite_parser/dependenciesParser.ml index 53fb7ab6d..16c2a2c69 100644 --- a/matita/components/grafite_parser/dependenciesParser.ml +++ b/matita/components/grafite_parser/dependenciesParser.ml @@ -30,17 +30,18 @@ exception UnableToInclude of string (* statements meaningful for matitadep *) type dependency = | IncludeDep of string - | UriDep of UriManager.uri + | UriDep of NUri.uri | InlineDep of string let pp_dependency = function | IncludeDep str -> "include \"" ^ str ^ "\"" - | UriDep uri -> "uri \"" ^ UriManager.string_of_uri uri ^ "\"" + | UriDep uri -> "uri \"" ^ NUri.string_of_uri uri ^ "\"" | InlineDep str -> "inline \"" ^ str ^ "\"" let parse_dependencies lexbuf = let tok_stream,_ = - (CicNotationLexer.level2_ast_lexer ()).Token.tok_func (Obj.magic lexbuf) + let lexers = (CicNotationLexer.mk_lexers []) in + lexers.CicNotationLexer.level2_ast_lexer.Token.tok_func (Obj.magic lexbuf) in let rec parse acc = let continue, acc = @@ -49,11 +50,12 @@ let parse_dependencies lexbuf = | [< '("QSTRING", s) >] -> (* because of alias id qstring = qstring :-( *) (try - true, (UriDep (UriManager.uri_of_string s) :: acc) - with - UriManager.IllFormedUri _ -> true, acc) + if String.sub s 0 5 <> "cic:/" then true,acc + else + true, (UriDep (NUri.uri_of_string s) :: acc) + with Invalid_argument _ -> true,acc) | [< '("URI", u) >] -> - true, (UriDep (UriManager.uri_of_string u) :: acc) + true, (UriDep (NUri.uri_of_string u) :: acc) | [< '("IDENT", "include"); '("QSTRING", fname) >] -> true, (IncludeDep fname :: acc) | [< '("IDENT", "include"); '("IDENT", "source"); '("QSTRING", fname) >] ->