From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 A533A7EE88 for ; Sun, 8 May 2016 23:29:11 +0200 (CEST) IronPort-PHdr: 9a23:uiBt5xc8f7wYjxDppCbNY4qulGMj4u6mDksu8pMizoh2WeGdxc+7ZR7h7PlgxGXEQZ/co6odzbGG4ua5ASdZvMnJmUtBWaIPfidNsd8RkQ0kDZzNImzAB9muURYHGt9fXkRu5XCxPBsdMs//Y1rPvi/6tmZKSV3BPAZ4bt74BpTVx5zukbviqtuKO04R2WX1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu3SNp41Rr1ADTkgL3t9pIiy7UGCHkOz4S4wW38XlVJ0DgnV4RDgV9+lviLgt+07xCSbLcD3V7kcXzCv/rtmTlnjjyJRZBAj92SCqMV7lb9Wu1eBqhplwsb2Z5yPOPN4NvffdNgDWGdaG8ZcUTZARIG7cpEDBuwpO+FCqoD5qkATtV25Hwb6V7Cn8SNBmnKjhf5y6O8mCwyTmVV4R98= Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=jacques-henri.jourdan@normalesup.org; spf=Neutral smtp.mailfrom=jacques-henri.jourdan@normalesup.org; spf=None smtp.helo=postmaster@ulminfo.fr Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of jacques-henri.jourdan@normalesup.org) identity=pra; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; x-conformance=sidf_compatible Received-SPF: Neutral (mail3-smtp-sop.national.inria.fr: domain of jacques-henri.jourdan@normalesup.org does not assert whether or not 5.135.188.139 is permitted sender) identity=mailfrom; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="jacques-henri.jourdan@normalesup.org"; 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@ulminfo.fr) identity=helo; client-ip=5.135.188.139; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="jacques-henri.jourdan@normalesup.org"; x-sender="postmaster@ulminfo.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0C4CwDmri9X/4u8hwVdgzhoAxW7X4YQAgiBFjsRAQEBAQEBAQFkJ4ItghUBAQMBeQULCzQSVwYNCAEBF4gICAS9bQELFgiIFgiCToUihHYFmCKDKIFomCOPOzYsg22JcgEBAQ X-IPAS-Result: A0C4CwDmri9X/4u8hwVdgzhoAxW7X4YQAgiBFjsRAQEBAQEBAQFkJ4ItghUBAQMBeQULCzQSVwYNCAEBF4gICAS9bQELFgiIFgiCToUihHYFmCKDKIFomCOPOzYsg22JcgEBAQ X-IronPort-AV: E=Sophos;i="5.24,597,1454972400"; d="asc'?scan'208";a="177018740" Received: from ulminfo.fr ([5.135.188.139]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 08 May 2016 23:29:10 +0200 Received: from nounours.mketjh.fr (dhcp-149-74.mpi-sws.org [139.19.149.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ulminfo.fr (Postfix) with ESMTPSA id CB232C12C3; Sun, 8 May 2016 23:29:09 +0200 (CEST) To: Dario Teixeira References: <0a49598f1e0c8838fa69cd4d803af83d@nleyten.com> <43a466d4c7f145b0a6de709185ced949@nleyten.com> Cc: caml-list@inria.fr From: Jacques-Henri Jourdan Message-ID: <814dd903-513b-2846-346a-4b5909e9c564@normalesup.org> Date: Sun, 8 May 2016 23:29:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <43a466d4c7f145b0a6de709185ced949@nleyten.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SmcsgIDAcq65bSBmF80JDGnoAEp31tvoW" Subject: Re: [Caml-list] Menhir grammar with sequences delimited by same token This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --SmcsgIDAcq65bSBmF80JDGnoAEp31tvoW Content-Type: multipart/mixed; boundary="T7tnKmQclM8BaEUvwcVsLdH16ctNt4IM9" From: Jacques-Henri Jourdan To: Dario Teixeira Cc: caml-list@inria.fr Message-ID: <814dd903-513b-2846-346a-4b5909e9c564@normalesup.org> Subject: Re: [Caml-list] Menhir grammar with sequences delimited by same token References: <0a49598f1e0c8838fa69cd4d803af83d@nleyten.com> <43a466d4c7f145b0a6de709185ced949@nleyten.com> In-Reply-To: <43a466d4c7f145b0a6de709185ced949@nleyten.com> --T7tnKmQclM8BaEUvwcVsLdH16ctNt4IM9 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable >> I have, however, another proposition : if you allow markup areas not be >> well nested, then you can simply have an environment recording, for each >> style, whether it is currently in use or not. > > In the old version, the top-most parsing layer (generated via Menhir) > would > only see tokens such as BEGIN_BOLD/END_BOLD. There was an intermediate > layer between the lexer and the parser which had a simple state machine > that translated raw BOLD tokens into the BEGIN_BOLD/END_BOLD tokens. > I'm now trying to minimise the "magic" in the intermediate layer, which > is why I wondered if there was an elegant pure Menhir solution. > I see. Even if you could find a way to tell menhir what you want, AFAICT, the size of the automaton will grow exponentially with the number of kinds of tags, so this does not seems to be a good idea. I think that you can either do it by hand just before parsing (as you do) or just after parsing (as Sebastien proposed). --=20 JH > Best regards, > Dario Teixeira --T7tnKmQclM8BaEUvwcVsLdH16ctNt4IM9-- --SmcsgIDAcq65bSBmF80JDGnoAEp31tvoW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJXL6+gAAoJEGHoGlEY1GjFDk4IAKj5Nv5mr6IeX7at3M4ablsP mx2KJhcFObvqirQjYX8Up/WMQX3T4xABb0VtXq3eSbg1AjE5ADqbEG6mcEHsEDm0 rIl6sGLrYUmot9s9C+Dp7mt6Z4wlCRVi0z626SDHrrfUHrycgVDCU8fksljWs71g Au9eA4cxkFkG913Drwvy2tuz9lsnG3+V1nvME11O80WTusFDs0xUx96+CopqHlk6 zLfy4NWDrdguobM5H8Kr3DSNONaSsRfB8wCEUMW+aih//mTYHWn9hJTgDgoPm7+R L3bZMcjwpn/ulgtL2IFMRaVc4xUOvd1IfAIcCAnCJRCb4cdpPeQBuwQbg2NTAa4= =6BjR -----END PGP SIGNATURE----- --SmcsgIDAcq65bSBmF80JDGnoAEp31tvoW--