From: Daniel de Rauglaudre <daniel.de_rauglaudre@inria.fr>
To: Anton Moscal <msk@post.tepkom.ru>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Camlp4 3.01.4
Date: Thu, 24 May 2001 18:44:48 +0200 [thread overview]
Message-ID: <20010524184448.C14164@verdot.inria.fr> (raw)
In-Reply-To: <Pine.LNX.4.21.0105241129570.1137-100000@kouzdra.glokaya>; from msk@post.tepkom.ru on Thu, May 24, 2001 at 11:42:23AM +0400
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
prev parent reply other threads:[~2001-05-24 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-21 11:43 Daniel de Rauglaudre
2001-05-21 11:45 ` [Caml-list] " Daniel de Rauglaudre
2001-05-24 7:42 ` [Caml-list] " Anton Moscal
2001-05-24 16:44 ` Daniel de Rauglaudre [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20010524184448.C14164@verdot.inria.fr \
--to=daniel.de_rauglaudre@inria.fr \
--cc=caml-list@inria.fr \
--cc=msk@post.tepkom.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox