From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 1D1C37EE88 for ; Sun, 8 May 2016 13:57:44 +0200 (CEST) IronPort-PHdr: 9a23:Gn7hdxUpha5iGRvTUDJc/pK5avjV8LGtZVwlr6E/grcLSJyIuqrYZhGHt8tkgFKBZ4jH8fUM07OQ6PCxHzVYqs3e+Fk5M7VyFDY9wf0MmAIhBMPXQWbaF9XNKxIAIcJZSVV+9Gu6O0UGUOz3ZlnVv2HgpWVKQka3CwN5K6zPF5LIiIzvjqbpq8yVOl0D32X1SIgxBSv1hD2ZjtMRj4pmJ/R54TryiVwMRd5rw3h1L0mYhRf265T41pdi9yNNp6BprJYYAu2pN5g/GLdRCTBjN2Eu+OXqswPCRE2B/CgySGITxyHJCQHe8BD3WN/Rsy32u/BwwmHOBsD8RKsoWDmkqYdqThPlkiodHz8/6mDezMJq2vEI6Cm9rgByltaHKLqeM+BzK/vQ Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Sebastien.Hinderer@inria.fr; spf=None smtp.mailfrom=SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org; spf=Pass smtp.helo=postmaster@sonata.ens-lyon.org Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of Sebastien.Hinderer@inria.fr) identity=pra; client-ip=140.77.166.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org"; x-sender="Sebastien.Hinderer@inria.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org) identity=mailfrom; client-ip=140.77.166.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org"; x-sender="SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@sonata.ens-lyon.org designates 140.77.166.138 as permitted sender) identity=helo; client-ip=140.77.166.138; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="SRS0=R88g=RB=inria.fr=Sebastien.Hinderer@bounce.ens-lyon.org"; x-sender="postmaster@sonata.ens-lyon.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B9AAAqKS9XjYqmTYxehHuxG4d+AQ2JWxQBAQEBAQEBAREBAQEBCQsLByEvgi2CFQEFIw8BQRULGgIFEw4CAg8tGzSIEAStY5AyfIlwhQuCNCuCLgWYIo4SgXOET4hfjzkCHgEBgXgMgiuJIgMBAQE X-IPAS-Result: A0B9AAAqKS9XjYqmTYxehHuxG4d+AQ2JWxQBAQEBAQEBAREBAQEBCQsLByEvgi2CFQEFIw8BQRULGgIFEw4CAg8tGzSIEAStY5AyfIlwhQuCNCuCLgWYIo4SgXOET4hfjzkCHgEBgXgMgiuJIgMBAQE X-IronPort-AV: E=Sophos;i="5.24,595,1454972400"; d="scan'208";a="217287845" Received: from domu-toccata.ens-lyon.fr (HELO sonata.ens-lyon.org) ([140.77.166.138]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 08 May 2016 13:57:43 +0200 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 40D9020119; Sun, 8 May 2016 13:57:43 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZlzqacPSUdMn; Sun, 8 May 2016 13:57:43 +0200 (CEST) Received: from pema.homeunix.org (AMontsouris-551-1-80-155.w90-24.abo.wanadoo.fr [90.24.255.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id 1AF772010A; Sun, 8 May 2016 13:57:43 +0200 (CEST) Received: from seb by pema.homeunix.org with local (Exim 4.86) (envelope-from ) id 1azNLC-0003ix-F0; Sun, 08 May 2016 13:57:42 +0200 Date: Sun, 8 May 2016 13:57:42 +0200 From: =?utf-8?Q?S=C3=A9bastien?= Hinderer To: caml-list@inria.fr Message-ID: <20160508115742.GA14227@pema> Mail-Followup-To: caml-list@inria.fr References: <0a49598f1e0c8838fa69cd4d803af83d@nleyten.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Caml-list] Menhir grammar with sequences delimited by same token Hi, Jacques-Henri Jourdan (2016/05/08 12:27 +0200): > Hi, > > > The priority mechanism won't help, because the LR1 automaton does not > contain the necessary information for deciding whether to shift or reduce. > > The solution might be to use parameterized non-terminals, but all the > non-exponential solutions I can think of do not pass the termination > checker for parameterized non-terminals. > > 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. Jacques-Henri (or anybody else) please correct me if I am wrong. Sometimes one way of dealing with such problems is to recognize (at the syntactic stage) a language that is a bit bigger than the desired one and then to check, at the semantic level, that the real constraints are satisfied. Sébastien.