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 FAA08646; Sat, 14 Aug 2004 05:25: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 FAA06574 for ; Sat, 14 Aug 2004 05:25:22 +0200 (MET DST) Received: from herd.plethora.net (herd.plethora.net [205.166.146.1]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i7E3PLmL028034 for ; Sat, 14 Aug 2004 05:25:21 +0200 Received: from bhurt.plethora.net (bhurt.plethora.net [205.166.146.49]) by herd.plethora.net (8.11.6/8.10.1) with ESMTP id i7E3PHJ08133; Fri, 13 Aug 2004 22:25:17 -0500 (CDT) Date: Fri, 13 Aug 2004 22:33:10 -0500 (CDT) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Jon Harrop cc: Ocaml Mailing List Subject: Re: [Caml-list] CFG's and OCaml In-Reply-To: <200408140125.59473.jon@jdh30.plus.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 411D8621.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 disallow:01 coercing:01 coercing:01 productive:01 ocaml:01 ocaml:01 imho:01 trivial:01 constructs:02 parsers:03 wrote:03 redirect:95 lex:04 lex:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 14 Aug 2004, Jon Harrop wrote: My answers (YMMV): > > I have some (probably trivial) questions about parsers: > > 1. Are most programming languages designed to be implementable using lex and > yacc? They used to be... > > 2. If so, are their designs restricted by this? Less so than you might think, IMHO. Mainly they push languages away from "bad" constructs. > > 3. If so, is the fact that most languages disallow "a > 4. Could that be added to OCaml? ;-) Not my call. Technically, yes it could. Practically is a different question. > 5. Is it productive to think in terms of coercing lex and yacc into doing as > much of the work as possible and then using postprocessing to do the rest > (e.g. this is the way I'd implement a