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 CAA01915; Sat, 14 Aug 2004 02:58:00 +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 CAA03981 for ; Sat, 14 Aug 2004 02:57:59 +0200 (MET DST) Received: from smtp.syd.swiftdsl.com.au (smtp.syd.swiftdsl.com.au [202.154.83.58]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i7E0vtmL017336 for ; Sat, 14 Aug 2004 02:57:57 +0200 Received: (qmail 7692 invoked from network); 14 Aug 2004 00:57:54 -0000 Received: from unknown (HELO coltrane.mega-nerd.net) (218.214.64.136) by smtp.syd.swiftdsl.com.au with SMTP; 14 Aug 2004 00:57:54 -0000 Received: from coltrane (localhost [127.0.0.1]) by coltrane.mega-nerd.net (Postfix) with SMTP id 109567AE1 for ; Sat, 14 Aug 2004 10:57:52 +1000 (EST) Date: Sat, 14 Aug 2004 10:57:51 +1000 From: Erik de Castro Lopo To: Ocaml Mailing List Subject: Re: [Caml-list] CFG's and OCaml Message-Id: <20040814105751.22099f53.ocaml-erikd@mega-nerd.com> In-Reply-To: <200408140125.59473.jon@jdh30.plus.com> References: <200408140125.59473.jon@jdh30.plus.com> Organization: Erik Conspiracy Secret Labs X-Mailer: Sylpheed version 0.9.12 (GTK+ 1.2.10; i386-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 411D6393.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 2004:99 lalr:01 disallow:01 lalr:01 coercing:01 considers:01 productive:01 ints:01 ocaml:01 trivial:01 unlikely:02 parser:02 nospam:97 parsers:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, 14 Aug 2004 01:25:59 +0100 Jon Harrop wrote: > > I have some (probably trivial) questions about parsers: > > 1. Are most programming languages designed to be implementable using > lex and yacc? Maybe not lex and yacc, but most are designed to be parsed by LALR(1) parsers. Currently the most difficult to parse language seems to be C++. > 2. If so, are their designs restricted by this? Unlikely. > 3. If so, is the fact that most languages disallow "a 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