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 SAA21731; Fri, 13 Aug 2004 18:58:23 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA21847 for ; Fri, 13 Aug 2004 18:58:21 +0200 (MET DST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.97]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7DGwKmL006733 for ; Fri, 13 Aug 2004 18:58:20 +0200 Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i7DGwJJd009562; Fri, 13 Aug 2004 09:58:19 -0700 (PDT) Received: from [192.168.1.100] (dsl081-080-123.lax1.dsl.speakeasy.net [64.81.80.123]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id i7DGwIBA008568; Fri, 13 Aug 2004 09:58:18 -0700 (PDT) In-Reply-To: <73EC7D25-ED42-11D8-99DF-000A95C19BAA@Avisere.com> References: <73EC7D25-ED42-11D8-99DF-000A95C19BAA@Avisere.com> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Brian Hurt , caml-list@inria.fr From: Paul Snively Subject: Re: [Caml-list] CFG's and OCaml Date: Fri, 13 Aug 2004 09:58:02 -0700 To: David McClain X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619) X-Miltered: at nez-perce with ID 411CF32C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 hash:01 mcclain:01 non-obvious:01 context-free:99 non-trivial:01 context-free:99 real-world:01 antlr:01 bison:01 mcclain:01 1.2.4:01 darwin:01 ocaml:01 pgp:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi David! On Aug 13, 2004, at 9:04 AM, David McClain wrote: > Uhuhh... Yes, I did that same "evil" thing as well, even before > discussing all these reduce/reduce conflicts/ > > What I find is that these screwball little tricks might help, and the > might not. YACC is just too darned sensitive to minor and non-obvious > perturbations in the input grammar specification. Realizing its > legacy, indeed it does arise from the old IBM-360, or more properly > PDP-10, days. That was the style of programming back then.. I remember > it well. > The issue isn't strictly one of style. You're using an entirely context-free parser generator to attempt to parse a grammar that _is not_ context free. The joker in this deck is that no non-trivial grammar is context-free, so all real-world "context free" grammars use some kind of trick to get past it. Hence the effort to turn (1) into (k) or, better still, (inf), cf. ANTLR, Spirit, Bison 1.50 or later, or Elkhound. > I had though the other night about creating a common subtree of > semantic actions and then let the higher levels unravel that subtree. > That would probably work well here, but it is a lot more work. > Quite. My advice remains to be to use Elkhound. > David McClain > Senior Corporate Scientist > Avisere, Inc. > > david.mcclain@avisere.com > +1.520.390.7738 (USA) > Best regards, Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iEYEARECAAYFAkEc8yMACgkQbot1wzHBQBWHggCeNLjlA7AdwuvQBRZ+T5LDqvkQ WLoAniMo7jA2ISdBz24MeDUZd8aJ7bNt =JehV -----END PGP SIGNATURE----- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners