From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA04373; Thu, 24 May 2001 18:45:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA04558 for ; Thu, 24 May 2001 18:45:01 +0200 (MET DST) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f4OGimX21396; Thu, 24 May 2001 18:44:48 +0200 (MET DST) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id SAA14410; Thu, 24 May 2001 18:44:48 +0200 Date: Thu, 24 May 2001 18:44:48 +0200 From: Daniel de Rauglaudre To: Anton Moscal Cc: caml-list@inria.fr Subject: Re: [Caml-list] Camlp4 3.01.4 Message-ID: <20010524184448.C14164@verdot.inria.fr> References: <20010521134328.C16047@verdot.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0us In-Reply-To: ; from msk@post.tepkom.ru on Thu, May 24, 2001 at 11:42:23AM +0400 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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