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] Camlp4 questions
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-02-09 (10:30)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Camlp4 questions

>    I changed this by using AFTER "<" instead of AFTER "apply", which
>    seemed to work, but is that the recommended solution?


> Secondly, enclosing the new infix in parentheses to suppress its
> infix status, e.g. "(o)", doesn't work; it still expects an operator
> name. It was easy enough to hack the parser a bit more, but is there
> a nice solution using simple extensions?

Yes, the fact to accept an added infix between parentheses is not
automatic and you have to add a grammar rule to parse that. At the
expr level "simple". It should work, but I have not tested.

> 2. Most of my changes are at the lexical level. Yet the only way I
>    could figure out of changing the lexer was to rebuild the CAML
>    parser in "camlp4/etc/pa_o.ml" from scratch with a new lexer and
>    additional modifications. Is it possible to change the lexer but
>    otherwise make only simple extensions? This is for the toplevel,
>    by the way.

The lexer Plexer is not extensible. It is possible to create an
extensible lexer with extensible grammars but the time performances
are very bad. I would like to find a solution to be able to extend it
without slowing down the system, but for the moment, I have no idea...

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