From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 2C4857FB38 for ; Fri, 26 Dec 2014 12:13:35 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of darioteixeira@yahoo.com) identity=pra; client-ip=98.138.91.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="darioteixeira@yahoo.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of darioteixeira@yahoo.com designates 98.138.91.182 as permitted sender) identity=mailfrom; client-ip=98.138.91.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="darioteixeira@yahoo.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nm22-vm4.bullet.mail.ne1.yahoo.com) identity=helo; client-ip=98.138.91.182; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="darioteixeira@yahoo.com"; x-sender="postmaster@nm22-vm4.bullet.mail.ne1.yahoo.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoYAAGBBnVRiilu2lGdsb2JhbABPDYIGgioMgnm0IpU3AoEDBxYBAQEBAREBAQEBBwsLCRIwhA0BBAELGAgVAQI2AQEDCwYFGgINGQICLwEOAQYSBogqAQECCQizeoFrBIJzgXGIXAEjAwEjA4UTAQEBAQEBAQEBAQEBAQEBAQEBAQEBEAEGDAEBAYESiyaCfDQHgmiBQQEElwyGAB9Ygl6HKE+EEG+CQwEBAQ X-IPAS-Result: AoYAAGBBnVRiilu2lGdsb2JhbABPDYIGgioMgnm0IpU3AoEDBxYBAQEBAREBAQEBBwsLCRIwhA0BBAELGAgVAQI2AQEDCwYFGgINGQICLwEOAQYSBogqAQECCQizeoFrBIJzgXGIXAEjAwEjA4UTAQEBAQEBAQEBAQEBAQEBAQEBAQEBEAEGDAEBAYESiyaCfDQHgmiBQQEElwyGAB9Ygl6HKE+EEG+CQwEBAQ X-IronPort-AV: E=Sophos;i="5.07,647,1413237600"; d="scan'208";a="94745870" Received: from nm22-vm4.bullet.mail.ne1.yahoo.com ([98.138.91.182]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Dec 2014 12:13:34 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1419592411; bh=gtmq1VLmISBV6FEUJoDMQbgGBU2EHvCFgPJO4GJOj3Q=; h=Date:From:Reply-To:To:Cc:In-Reply-To:References:Subject:From:Subject; b=lpUr6sLx2GdpBypBzyFhOg3Z8/U8Vrt0NdLsWwbobegfloWo+0/5oqp7X/2Bo6XVK4igaJ6Mi7EmPaEEwkztyPk+N3GQlyyHxF+aGy5adrSv46JztVhfzsur1zEEXF8tHuvehjMf3POfaz83QH0yseIHNvlroN4/j387WLQFFNTnx/4LEDkr5JUuhwX0jdWNmbr1LI5mzX56qGJo+CRBJj3/pOEOo/c10y9QMjzJvXu+sugOAnwFXT+zNgfkslAOQSzisf2H8pUCrRjZHWtTXiMgwMLAw2lFjZYP1h6eKdbmYUDRKFdHwXKurNnfid8qf5bs7HSLWzZvkqXakXnu1g== DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s2048; d=yahoo.com; b=Fllk1FzL6IJfzOTMuH0WHrfqH6GmuHkNExCv+KL2lPnkGetuvv6IK1LxpPFx+OrvSzIdMbS8i+uMOZHxdi/kC6xYmITkaoe2ZyHzDr/EH+qskXVWHh1/n43oaVo/ZKh+FtRYs6J6/m1q1Ig4+oodDd3Abkp/+qKFszK0Ac+wfZvKFNcI+iz23gohZxSu9K/rI592hOvlm1wkAesKflalWtf2SM06RMowmfpa3PnXT/78wAEq5ypkIjlnefBHbffdzeaTbt/pwSmwNwYg9z3EHyuu3r6kHTCTtl31vacP8CzNPBW+AiiBt7l5eabVRsDjNJ/VyFtMVPkn3TkcBcMavQ==; Received: from [98.138.100.117] by nm22.bullet.mail.ne1.yahoo.com with NNFMP; 26 Dec 2014 11:13:31 -0000 Received: from [98.138.89.166] by tm108.bullet.mail.ne1.yahoo.com with NNFMP; 26 Dec 2014 11:13:31 -0000 Received: from [127.0.0.1] by omp1022.mail.ne1.yahoo.com with NNFMP; 26 Dec 2014 11:13:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 572678.96812.bm@omp1022.mail.ne1.yahoo.com X-YMail-OSG: dBlm5mMVM1mx8zQ9auhh9_yti6MXnhvx4Khh296jXX6ujvPnqrSlzVpBUM7rCuZ 4Ah.75LNTZTHZVUtmRsNOsaNKbpPkLIZuhFBExgwTvHdKvH1GYfppjILLu4vDciHGVdLwuYH5K2N eWUujyF3TBKSQpIKalL5PY2ZRrF89N_PTZT7ek4wKC_2O8x8_pydH6kABjRvejly1YXOMTZctfa3 hWu7BGt7DMBtDZgwK0wJsqOJnVlzBw31egPwHzI2FDvnLSCutvr0TyJVdIiokhbtK9PufPpIN3jY Pc.btKRGz_6tqCPfD_QqueuG3e35v8fRUEJ5BKE48FKw0DMDFaJubvpqqKRwwEL78JohjP03E7L2 T3rBKqVswF5zYJT0j4raBO4mRI_NTA.RDURi2hrTcy5mLsqhJkRnF9Lb3PI_TEOgvwCa18eqRz97 oKJNpJFRbxhO3EoBmKe_reKh7qiyWFhKrS5KM1O7fSinGCcOCmdS8qi95WC2SIiV1ueOKBsZydrT Zh9NeGn.PD3x.rTDTFWiNznxq Received: by 98.138.105.248; Fri, 26 Dec 2014 11:13:31 +0000 Date: Fri, 26 Dec 2014 11:13:30 +0000 (UTC) From: Dario Teixeira Reply-To: Dario Teixeira To: "Francois.Pottier@inria.fr" Cc: "caml-list@inria.fr" Message-ID: <1100699448.864923.1419592410621.JavaMail.yahoo@jws100188.mail.ne1.yahoo.com> In-Reply-To: <20141224233002.GE7225@yquem.inria.fr> References: <20141224233002.GE7225@yquem.inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] New release of Menhir (20141215) Hi, > Hmm, maybe. The new API will probably allow you to inspect the stack (which is > basically a list of pairs of a state and a semantic value) and to inspect a > state (which can be viewed as a set of LR(1) items). I don't know whether that > would offer you a simple way of deciding when to switch from one lexer to > another... I suspect it will *at least* be an improvement over the current situation. Consider the following rule: inline: | ... | LINK OPEN RAW END OPEN inline* END | ... Suppose that by default I'm using a 'general' lexer. However, upon encountering that first OPEN token, I must switch to a 'raw' lexer and then switch back to the 'general' lexer upon encountering the first END token. This lexer dance won't happen with the second OPEN token, though. Anyway, as long as I know which state Menhir is in, choosing the right lexer should be an easy task. It may require a large lookup table on my part to map state to lexer, but at least that's a lot less hairy than the current approach. Best regards, Dario Teixeira