Browse thread
[Caml-list] Camlp4 3.01.4
-
Daniel de Rauglaudre
- Daniel de Rauglaudre
-
Anton Moscal
- Daniel de Rauglaudre
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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] Camlp4 3.01.4 |
Hi,
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
parameters.
> 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.
--
Daniel de RAUGLAUDRE
daniel.de_rauglaudre@inria.fr
http://cristal.inria.fr/~ddr/
-------------------
To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr