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 LAA07113; Sat, 9 Feb 2002 11:30:38 +0100 (MET) 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 LAA12423 for ; Sat, 9 Feb 2002 11:30:37 +0100 (MET) Received: from verdot.inria.fr (verdot.inria.fr [128.93.11.7]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g19AUbr24005 for ; Sat, 9 Feb 2002 11:30:37 +0100 (MET) Received: (from ddr@localhost) by verdot.inria.fr (8.9.3/8.9.3) id LAA31407 for caml-list@inria.fr; Sat, 9 Feb 2002 11:30:32 +0100 Date: Sat, 9 Feb 2002 11:30:32 +0100 From: Daniel de Rauglaudre To: caml-list@inria.fr Subject: Re: [Caml-list] Camlp4 questions Message-ID: <20020209113032.F25375@verdot.inria.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from johnh@ichips.intel.com on Fri, Feb 08, 2002 at 01:24:40PM -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, > I changed this by using AFTER "<" instead of AFTER "apply", which > seemed to work, but is that the recommended solution? Yes. > 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... -- Daniel de RAUGLAUDRE daniel.de_rauglaudre@inria.fr http://cristal.inria.fr/~ddr/ ------------------- 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