X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fcomponents%2Fgrafite_parser%2FdependenciesParser.ml;h=16c2a2c69f288ea3bab9100c8a95a80e8998afcf;hb=f3f6b451707a3feb8245717e3fa7ca25df0ce8ef;hp=6b0142bf12233a544c2dd2f34b3b18c3b064d366;hpb=f6b7c6ae353e014761a3d24dbc87e00d828d7f2d;p=helm.git diff --git a/matita/components/grafite_parser/dependenciesParser.ml b/matita/components/grafite_parser/dependenciesParser.ml index 6b0142bf1..16c2a2c69 100644 --- a/matita/components/grafite_parser/dependenciesParser.ml +++ b/matita/components/grafite_parser/dependenciesParser.ml @@ -40,7 +40,8 @@ let pp_dependency = function 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 = @@ -48,9 +49,11 @@ let parse_dependencies lexbuf = (parser | [< '("QSTRING", s) >] -> (* because of alias id qstring = qstring :-( *) - if String.sub s 0 5 <> "cic:/" then true,acc - else - true, (UriDep (NUri.uri_of_string s) :: acc) + (try + 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 (NUri.uri_of_string u) :: acc) | [< '("IDENT", "include"); '("QSTRING", fname) >] ->