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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-05-24 (16:45)
From: Daniel de Rauglaudre <daniel.de_rauglaudre@i...>
Subject: Re: [Caml-list] Camlp4 3.01.4

On Thu, May 24, 2001 at 11:42:23AM +0400, Anton Moscal wrote:

> parameterized rules: something like
> rule [parameters list]: [[ ... ]]
> and invoking by "rule [actual parameters list]"

It is a problem to type that. The entries could not be just 'a entry
but ('a, 'b) entry, something like that, where 'b is the type of the

> predicates 
>    (expression)? => rule, 
> parser try to parse "rule" only if "expression" true, 

This could be possible, I guess. I have to think of it. But you can also
write a parser and use Grammar.Entry.of_parser.

> syntax predicates:
>    (rule1) => rule2: parser try to parse rule1, if succeed then parser 
> returns to initial position and try to parse rule2. rule1 usually is a
> prefix of rule2, but without side effects

A mutable value has side effect. To undo side effects, it is rather
complicated. This could be done with purely functionnal parsers (I
am thinking of a library and a syntax for purely functionnal streams
and parsers), and purely functionnal grammars (much more code).

> And the last, but not least:
> Implements some explicit distinction beetween rule with side effects and
> without it (for example - rule: ... and rule :: ... ).  When rule without
> side effects failed, parser can keeps trying other alternatives.

Same answer.

> The last two features requires input streams with "reset to saved
> position" function, but this shouldn't be a serious problem.

Yes it is.

To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr