Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocaml parser
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Michel Mauny <Michel.Mauny@i...>
Subject: Re: [Caml-list] ocaml parser
Christophe Raffalli écrit/writes [07/01/2008 06:34 PM] :

> Is it a bug to have any difference between both ocaml parser (with "-pp 
> camlp4o" or without) ?

In some situations yes, in others no.

> I expected that everything that compiles with ocamlc should compile with 
> ocamlc -pp camlp4o
> (the opposite is not true and does not need to be true) which is not the 
> case.

Camlp4o is supposed to parse all OCaml plus things such as stream
parsers.  Since adding keywords ("parser", for instance) may break
legal OCaml programs, Camlp4o is supposed to parse OCaml programs that
don't conflict with such extensions.  Camlp4o cannot therefore parse
_all_ OCaml programs.

> And a secondary question : why to have two parsers (except maybe for 
> bootstraping) ?

I'm not sure I understand your question, but the OCaml and Camlp4o
parsers use a different technology. The latter is extensible while the
former is not.

-- Michel