Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] otags problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] camlp4o problem (was: otags problem)
Hi,

On Mon, Feb 04, 2002 at 10:40:04PM -0500, Patrick M Doane wrote:

> Why? The ocaml syntax has changed before - there is no technical reason
> that prevents identical behavior between the two systems.

Just experience. This case is more complicated than "fun x -> x+x"
vs. "fun x -> 2*x".

> I just don't see camlp4 as being practical until it can correctly
> parse standard ocaml syntax.

I have done it, little by little. But with the current ("standard")
syntax I have sometimes problems, in particular lastly with class
types. But there are ways to turn around by adding specific grammar
entries with simple parsers, but loosing the "extensibility" for these
cases. In the revised syntax, there are no such hacks.

> From what I can tell, the revised syntax makes more changes to the
> language than are necessary to fit into camlp4 parsing technology.

Indeed. I was not obliged to use the constructors with currification
or list cons between brackets: I just considered this as better (read
the chapter about revised syntax in the Camlp4 tutorial), more
logical. Yes this syntax is not only to make Camlp4 work, it is an
"opinion", my opinion (built in part from my ideas, but not only).

> If the revised syntax only changed the syntax as necessary to
> support camlp4, and the standard compiler would be modified to
> reject anything not accepted by this new syntax, then the following
> proposal seems perfectly reasonable.

You propose that I add a third syntax? A middle between the normal
and the revised syntax. A norsed (or revmal) syntax?

Mmmm... there is also the problem of unclosed constructions (match,
try) which results in problems sometimes. It is not necessary to add
that to be able to parse with LL(1) Camlp4. The revised syntax is
supposed to fix some problems of the normal syntax.

-- 
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr