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 c5ff346549e7 (Postfix) with ESMTPS id 79F0B5D5 for ; Wed, 12 Feb 2020 15:36:33 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.70,433,1574118000"; d="scan'208";a="435656946" Received: from sympa.inria.fr ([193.51.193.213]) by mail2-relais-roc.national.inria.fr with ESMTP; 12 Feb 2020 16:36:30 +0100 Received: by sympa.inria.fr (Postfix, from userid 20132) id 803FF7F426; Wed, 12 Feb 2020 16:36:30 +0100 (CET) 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 617787F3E0; Wed, 12 Feb 2020 16:36:28 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.70,433,1574118000"; d="scan'208";a="435656918" Received: from dt-64014.paris.inria.fr (HELO [128.93.64.14]) ([128.93.64.14]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 12 Feb 2020 16:36:27 +0100 To: menhir-list , caml users From: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= Message-ID: <9043ac18-4718-69a0-ab19-0cdcc50ed308@inria.fr> Date: Wed, 12 Feb 2020 16:36:27 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: [Caml-list] [ANN] New release of Menhir, including bug fixes Reply-To: =?UTF-8?Q?Fran=c3=a7ois_Pottier?= X-Loop: caml-list@inria.fr X-Sequence: 18000 Errors-to: caml-list-owner@inria.fr Precedence: list Precedence: bulk Sender: caml-list-request@inria.fr X-no-archive: yes List-Id: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Dear users of OCaml & Menhir, It is my pleasure to announce a new release of Menhir. opam update opam upgrade menhir This release fixes two bugs in our implementation of Pager's algorithm. Menhir relies on this algorithm to build an LR automaton and to decide which states can safely be merged, where "safely" means "without creating unexplainable conflicts". One bug (which had been known for a long time, but not fixed) would cause Menhir to sometimes make an unsafe merge decision, thereby creating an unexplainable conflict. The other bug (which had never been discovered until now) would cause Menhir to sometimes miss a safe merge decision, thereby creating an automaton with needlessly many states. In summary, after upgrading to this version, you may find (in some cases) that the parser produced by Menhir for your grammar has changed. It may have slightly more or slightly fewer states than the parser produced by previous versions of Menhir. Even in cases where the parser hasn't changed, the numbering of the states can be different. Feedback is welcome. Happy parsing, -- François Pottier francois.pottier@inria.fr http://cambium.inria.fr/~fpottier/ ## 2020/02/11 * Re-implement Menhir's default algorithm for constructing LR(1) automata, namely Pager's algorithm. This closes issue #21 (reported by Andrej Bauer), a bug that would sometimes cause unexplainable conflicts to appear, because states were merged too aggressively. This also removes an unreported bug that would cause the automaton to have too many states, because states were *not* merged aggressively enough. In summary, the old and new construction algorithms differ: in many cases, the resulting automaton is unchanged, but in some cases, the automaton produced by the new algorithm may have slightly more or slightly fewer states. * Re-implement Menhir's algorithm for constructing automata in `--no-pager` mode. In this (undocumented) mode, Menhir does not merge any states, but allows itself to redirect a transition from a state `s` to a *larger* state `s'`. This method yields an automaton whose states form a subset of the states of the canonical LR(1) automaton. It usually has significantly fewer states than the canonical automaton, and significantly more states than the automaton produced by Pager's algorithm. The new construction method removes an unreported bug that would cause the automaton to have too many states. The automaton produced by the new algorithm will usually have significantly fewer states than the automaton produced by the previous algorithm. * Re-implement Menhir's algorithms for constructing automata in `--lalr` and `--canonical` modes. The previous algorithms were correct, as far as we know, so the output of the new algorithms is the same, up to a possible renumbering of the states. The new algorithms are slightly faster. * Increase the maximum length of a production, which used to be 127, up to 1023. Display a polite error message if this length is exceeded. (Problem reported by Andreas Abel.) * The new switch `--timings-to ` causes internal timing information to be written to the file ``. * A version of the library `fix` is now vendored (included) inside Menhir. This should have no impact for end users, but implies that `dune` 2.2.0 or later is required.