Bug 3886.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@7323 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
master
Michel Mauny 2006-01-12 08:54:21 +00:00
parent e6940c4f8d
commit 400095d7e7
4 changed files with 41 additions and 24 deletions

View File

@ -137,6 +137,8 @@ let print_warning loc s = print_location loc; eprintf "%s\n" s;;
let rec parse_file pa getdir useast =
let name = !(Pcaml.input_file) in
let (_, _, fname) = !(Pcaml.position) in
let () = fname := name in
Pcaml.warning := print_warning;
let ic = if name = "-" then stdin else open_in_bin name in
let cs = Stream.of_channel ic in

View File

@ -20,7 +20,7 @@ let gram =
Grammar.gcreate
{Token.tok_func = (fun _ -> failwith "no loaded parsing module");
Token.tok_using = (fun _ -> ()); Token.tok_removing = (fun _ -> ());
Token.tok_match = (fun _ -> raise (Match_failure ("", 23, 23)));
Token.tok_match = (fun _ -> raise (Match_failure ("pcaml.ml", 23, 23)));
Token.tok_text = (fun _ -> ""); Token.tok_comm = None}
;;
@ -383,37 +383,48 @@ and kont = pretty Stream.t
;;
let pr_str_item =
{pr_fun = (fun _ -> raise (Match_failure ("", 409, 30))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 409, 30)));
pr_levels = []}
;;
let pr_sig_item =
{pr_fun = (fun _ -> raise (Match_failure ("", 410, 30))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 410, 30)));
pr_levels = []}
;;
let pr_module_type =
{pr_fun = (fun _ -> raise (Match_failure ("", 411, 33))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 411, 33)));
pr_levels = []}
;;
let pr_module_expr =
{pr_fun = (fun _ -> raise (Match_failure ("", 412, 33))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 412, 33)));
pr_levels = []}
;;
let pr_expr =
{pr_fun = (fun _ -> raise (Match_failure ("", 413, 26))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 413, 26)));
pr_levels = []}
;;
let pr_patt =
{pr_fun = (fun _ -> raise (Match_failure ("", 414, 26))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 414, 26)));
pr_levels = []}
;;
let pr_ctyp =
{pr_fun = (fun _ -> raise (Match_failure ("", 415, 26))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 415, 26)));
pr_levels = []}
;;
let pr_class_sig_item =
{pr_fun = (fun _ -> raise (Match_failure ("", 416, 36))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 416, 36)));
pr_levels = []}
;;
let pr_class_str_item =
{pr_fun = (fun _ -> raise (Match_failure ("", 417, 36))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 417, 36)));
pr_levels = []}
;;
let pr_class_type =
{pr_fun = (fun _ -> raise (Match_failure ("", 418, 32))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 418, 32)));
pr_levels = []}
;;
let pr_class_expr =
{pr_fun = (fun _ -> raise (Match_failure ("", 419, 32))); pr_levels = []}
{pr_fun = (fun _ -> raise (Match_failure ("pcaml.ml", 419, 32)));
pr_levels = []}
;;
let pr_expr_fun_args = ref Extfun.empty;;

View File

@ -1089,11 +1089,11 @@ let make_lexer () =
let id_table = Hashtbl.create 301 in
let glexr =
ref
{tok_func = (fun _ -> raise (Match_failure ("", 774, 17)));
tok_using = (fun _ -> raise (Match_failure ("", 774, 37)));
tok_removing = (fun _ -> raise (Match_failure ("", 774, 60)));
tok_match = (fun _ -> raise (Match_failure ("", 775, 18)));
tok_text = (fun _ -> raise (Match_failure ("", 775, 37)));
{tok_func = (fun _ -> raise (Match_failure ("plexer.ml", 774, 17)));
tok_using = (fun _ -> raise (Match_failure ("plexer.ml", 774, 37)));
tok_removing = (fun _ -> raise (Match_failure ("plexer.ml", 774, 60)));
tok_match = (fun _ -> raise (Match_failure ("plexer.ml", 775, 18)));
tok_text = (fun _ -> raise (Match_failure ("plexer.ml", 775, 37)));
tok_comm = None}
in
let (f, pos) = func kwd_table glexr in
@ -1125,11 +1125,11 @@ let make () =
let id_table = Hashtbl.create 301 in
let glexr =
ref
{tok_func = (fun _ -> raise (Match_failure ("", 808, 17)));
tok_using = (fun _ -> raise (Match_failure ("", 808, 37)));
tok_removing = (fun _ -> raise (Match_failure ("", 808, 60)));
tok_match = (fun _ -> raise (Match_failure ("", 809, 18)));
tok_text = (fun _ -> raise (Match_failure ("", 809, 37)));
{tok_func = (fun _ -> raise (Match_failure ("plexer.ml", 808, 17)));
tok_using = (fun _ -> raise (Match_failure ("plexer.ml", 808, 37)));
tok_removing = (fun _ -> raise (Match_failure ("plexer.ml", 808, 60)));
tok_match = (fun _ -> raise (Match_failure ("plexer.ml", 809, 18)));
tok_text = (fun _ -> raise (Match_failure ("plexer.ml", 809, 37)));
tok_comm = None}
in
{func = fst (func kwd_table glexr); using = using_token kwd_table id_table;

View File

@ -689,7 +689,9 @@ Grammar.extend
(let (_, c, tl) =
match ctl with
Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
| _ -> match () with _ -> raise (Match_failure ("", 332, 19))
| _ ->
match () with
_ -> raise (Match_failure ("q_MLast.ml", 332, 19))
in
Qast.Node ("StExc", [Qast.Loc; c; tl; b]) :
'str_item));
@ -985,7 +987,9 @@ Grammar.extend
(let (_, c, tl) =
match ctl with
Qast.Tuple [xx1; xx2; xx3] -> xx1, xx2, xx3
| _ -> match () with _ -> raise (Match_failure ("", 390, 19))
| _ ->
match () with
_ -> raise (Match_failure ("q_MLast.ml", 390, 19))
in
Qast.Node ("SgExc", [Qast.Loc; c; tl]) :
'sig_item));