English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2002-02-04 (14:52)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] camlp4o problem (was: otags problem)

On Mon, Feb 04, 2002 at 03:11:37PM +0100, Hendrik Tews wrote:

> For Daniel de Rauglaudre: Because normal ocaml users are now
> sometimes requested to use camlp4o for parsing (for instance for
> streams) I think it makes sense to provide a camlp4 parser that
> is _exacly_ ocaml. Maybe by placing the quotation syntax in a
> separate file, say pa_q.cmo?

This is a problem of lexing, not parsing. I could add a flag to set
or unset the lexing of quotations.

Remark: but to be _exactly_ ocaml, the only solution is to use
_exactly_ the same technology, i.e. ocamlyacc. There will be
always differences in the behaviour of the two systems.


Michel Mauny pretends that it is the solution: that I should use
ocamlyacc for the normal OCaml syntax and extensible grammars for
the revised syntax.

In this case, if you want syntax extensions and quotations, you are
*obliged* to use the revised syntax:

  If you want quotations -> revised syntax
  If you want extensible grammars -> revised syntax
  If you want ifdef -> revised syntax
  If you want functionnal streams -> revised syntax
  If you want extensible functions -> revised syntax
  If you want Alain Frisch's ocamllex extension -> revised syntax
  If you want Graydon Hoare's quotations for C -> revised syntax
  If you want my last baby: IoXML -> revised syntax

Are you ok for this change? I am against, but if you convice me that
I am wrong, I can do it.

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