bitmatch of wild card fails on Ocaml3.11-beta1

6 views
Skip to first unread message

Hans Ole Rafaelsen

unread,
Nov 4, 2008, 10:54:04 AM11/4/08
to bits...@googlegroups.com
Hi,

I tested bitstring on the beta release of Ocaml 3.11 (CVS tag ocaml311beta1). The tests fails on matching wild cards:


File "tests/10_match_bits.ml", line 31, characters 5-6:
Parse error: ":" expected after [patt] (in [patt_field])
File "tests/10_match_bits.ml", line 1, characters 0-1:
Error: Preprocessor error

....
30:    | { b0 : 1; rest : -1 : bitstring } -> b0 :: loop rest
31:    | { _ } -> []
32:      in
....

I know too little about caml4p to look much further into the problem.

Regards,

Hans Ole

Richard Jones

unread,
Nov 4, 2008, 12:10:45 PM11/4/08
to bits...@googlegroups.com

OK, good to be aware of this anyway.

I've only look at ocaml 3.11 on Windows so far. We're waiting for
Fedora 10 to be released / Fedora 11 to start before we go for the
'big upgrade', and then I'll take a look at bitstring and no doubt
other stuff.

Rich.

--
Richard Jones
Red Hat

Hans Ole Rafaelsen

unread,
Nov 6, 2008, 5:48:13 PM11/6/08
to bits...@googlegroups.com
I found a temporary workaround I can use until you find the time.

Replacing:
    | { _ } -> []

with

    | { _ : -1 : bitstring } -> []

seems to give the desired behaviour. I did this for the regression tests, and they all ran without failure.

--
Hans Ole

Richard Jones

unread,
Nov 24, 2008, 6:05:35 AM11/24/08
to bits...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages