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 =
(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) >] ->