Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Slight parsing difference with/without -pp "camlp4o"
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Peter Jolly <peter@j...>
Subject: Re: [Caml-list] Slight parsing difference with/without -pp "camlp4o"
Michel Mauny wrote:
> Hum, according to the grammar given at
> http://caml.inria.fr/ocaml/htmlman/manual008.html, this should be
> accepted by ocaml. Either the spec is too large, or the ocaml parser
> is too restrictive (and camlp4o conforms to the spec, here).

Camlp4o is also more permissive with "with" in record constructions:

   $ cat test.ml
   type t = { a: int }
   let f() = { a = 0 }
   let y = { f() with a = 1 }

   $ ocamlc -pp camlp4o test.ml
   $ ocamlc test.ml
   File "test.ml", line 3, characters 11-12:
   Syntax error

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners