Commit 8339732a authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2003-03-16 12:49:49 by cvscast] Empty log message

Original author: cvscast
Date: 2003-03-16 12:49:49+00:00
parent a52e7583
......@@ -9,7 +9,6 @@ let exn_print_xml = CDuceExn (Pair (
Atom (Atoms.mk "Invalid_argument"),
string "print_xml"))
let to_enc = `Enc_iso88591
let string_of_xml v=
......
......@@ -61,6 +61,7 @@ let make_result_basic v (code,r) =
in
buf.(!cursor + a) <- x
done;
cursor := !cursor + n;
code )
......@@ -77,6 +78,7 @@ let make_result_char ch (code,r) =
in
buf.(!cursor + a) <- x
done;
cursor := !cursor + n;
code )
let tail_string i j s q =
......@@ -109,8 +111,6 @@ let rec run_disp_basic v f = function
| (t,r)::rem -> if f t then make_result_basic v r else run_disp_basic v f rem
| _ -> assert false
let dummy_r = 0
let rec run_dispatcher d v =
(*
Format.fprintf Format.std_formatter "Matching (%a) with:@\n" Value.print v;
......@@ -143,7 +143,7 @@ and run_disp_kind actions v =
and run_disp_prod v v1 v2 = function
| Impossible -> assert false
| TailCall d1 -> run_dispatcher d1 v1
| Ignore d2 -> run_disp_prod2 v1 dummy_r v v2 d2
| Ignore d2 -> run_disp_prod2 v1 !cursor v v2 d2
| Dispatch (d1,b1) ->
let r1 = !cursor in
let code1 = run_dispatcher d1 v1 in
......@@ -151,7 +151,7 @@ and run_disp_prod v v1 v2 = function
and run_disp_prod2 v1 r1 v v2 = function
| Impossible -> assert false
| Ignore r -> make_result_prod v1 r1 v2 dummy_r v r
| Ignore r -> make_result_prod v1 r1 v2 !cursor v r
| TailCall d2 -> run_dispatcher d2 v2
| Dispatch (d2,b2) ->
let r2 = !cursor in
......@@ -178,7 +178,7 @@ and run_disp_record other v fields = function
and run_disp_record1 other v1 rem = function
| Impossible -> assert false
| TailCall d1 -> run_dispatcher d1 v1
| Ignore d2 -> run_disp_record2 other v1 dummy_r rem d2
| Ignore d2 -> run_disp_record2 other v1 !cursor rem d2
| Dispatch (d1,b1) ->
let r1 = !cursor in
let code1 = run_dispatcher d1 v1 in
......@@ -186,7 +186,7 @@ and run_disp_record1 other v1 rem = function
and run_disp_record2 other v1 r1 rem = function
| Impossible -> assert false
| Ignore r -> make_result_prod v1 r1 Absent dummy_r Absent r
| Ignore r -> make_result_prod v1 r1 Absent !cursor Absent r
| TailCall d2 -> run_disp_record_loop other rem d2
| Dispatch (d2,b2) ->
let r2 = !cursor in
......@@ -204,7 +204,7 @@ and run_disp_string i j s q actions =
else match actions.prod with
| Impossible -> assert false
| TailCall d1 -> run_disp_string_char d1 (Chars.mk_char s.[i])
| Ignore d2 -> run_disp_string2 dummy_r i j s q d2
| Ignore d2 -> run_disp_string2 !cursor i j s q d2
| Dispatch (d1,b1) ->
let r1 = !cursor in
let code1 = run_disp_string_char d1 (Chars.mk_char s.[i]) in
......@@ -216,7 +216,7 @@ and run_disp_string_char d ch =
and run_disp_string2 r1 i j s q = function
| Impossible -> assert false
| Ignore r ->
make_result_string i j s q r1 dummy_r r
make_result_string i j s q r1 !cursor r
| TailCall d2 -> run_disp_string_loop i j s q d2
| Dispatch (d2,b2) ->
let r2 = !cursor in
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment