type dependency =
| IncludeDep of string
| UriDep of UriManager.uri
-
+ | InlineDep of string
+
let pp_dependency = function
| IncludeDep str -> "include \"" ^ str ^ "\""
| UriDep uri -> "uri \"" ^ UriManager.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)
+ (CicNotationLexer.level2_ast_lexer ()).Token.tok_func (Obj.magic lexbuf)
in
let rec parse acc =
let continue, acc =
true, (UriDep (UriManager.uri_of_string u) :: acc)
| [< '("IDENT", "include"); '("QSTRING", fname) >] ->
true, (IncludeDep fname :: acc)
+ | [< '("IDENT", "include"); '("IDENT", "source"); '("QSTRING", fname) >] ->
+ true, (IncludeDep fname :: acc)
| [< '("IDENT", "include'"); '("QSTRING", fname) >] ->
true, (IncludeDep fname :: acc)
+ | [< '("IDENT", "inline"); '("QSTRING", fname) >] ->
+ true, (InlineDep fname :: acc)
| [< '("EOI", _) >] -> false, acc
| [< 'tok >] -> true, acc
| [< >] -> false, acc) tok_stream