From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 62F38BC37 for ; Tue, 10 Nov 2009 18:36:02 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMBAMYz+UpRZ90xkWdsb2JhbACEcpcRAQEBAQkLCgcTA7EtkRWBMoI4VAQ X-IronPort-AV: E=Sophos;i="4.44,717,1249250400"; d="scan'208";a="50122395" Received: from mtaout03-winn.ispmail.ntl.com ([81.103.221.49]) by mail4-smtp-sop.national.inria.fr with ESMTP; 10 Nov 2009 18:35:56 +0100 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20091110173555.ICLI17277.mtaout03-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Tue, 10 Nov 2009 17:35:55 +0000 Received: from romulus.metastack.com ([81.102.132.77]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20091110173555.LAGZ21638.aamtaout02-winn.ispmail.ntl.com@romulus.metastack.com>; Tue, 10 Nov 2009 17:35:55 +0000 Received: from Tenor ([172.16.0.8]) (authenticated bits=0) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id nAAHZmM0020788 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 10 Nov 2009 17:35:49 GMT From: "David Allsopp" To: "'Dario Teixeira'" , References: <514622.64398.qm@web111510.mail.gq1.yahoo.com> In-Reply-To: <514622.64398.qm@web111510.mail.gq1.yahoo.com> Subject: RE: [Caml-list] The lexer hack Date: Tue, 10 Nov 2009 17:35:54 -0000 Message-ID: <003001ca622c$41f99840$c5ecc8c0$@metastack.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcpiFBhMu0tnIWSxT9+vHaAuVMC4qwAFxuYA Content-Language: en-gb Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 81.102.132.77 X-Cloudmark-Analysis: v=1.0 c=1 a=oy8_9sOl9I9IajqihNcA:9 a=ZfmiUHgh8jW1Lar2d2hRAZm-PNkA:4 X-Spam: no; 0.00; lexer:01 parser:01 expander:01 syntax:01 caml-list:01 tex:01 tex:01 grammar:02 parse:02 parse:02 macro:03 macro:03 guess:04 hack:04 correctly:04 > I'm creating a parser for a LaTeX-ish language that features verbatim = blocks. Out of interest, how LaTeX-ish do you mean? I would hazard a guess that = it's impossible to parse an unrestricted TeX file using an LR grammar = (or at least no more clear than a hand-coded automaton) because you have = to execute the macro expander in order to parse the file *completely* = correctly. However, if you only mean LaTeX-ish in syntax (i.e. the files = aren't actually TeX files) then you don't have to worry about TeX's = elegant (by which I mean terrifying) \catcode mechanism and macro = language! David