-(* This is used to parse dependency expressions on the command line. *)
-let parse_cli_expr str =
- let lexbuf = Lexing.from_string str in
- lexbuf.lex_curr_p <- { lexbuf.lex_curr_p with pos_fname = "<command line>" };
+(* This is used to parse expressions on the command line and
+ * the output from functions.
+ *)
+let parse_expr source str =
+ Cmdline.debug "parse expression: %S" str;
+ let lexbuf = Lexing.from_string ~with_positions:true str in
+ let pos = lexbuf.lex_curr_p in
+ lexbuf.lex_curr_p <- { pos with pos_fname = source };