pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/devel/menhir
Module Name: pkgsrc
Committed By: wiz
Date: Sun Jan 18 14:04:41 UTC 2026
Modified Files:
pkgsrc/devel/menhir: Makefile distinfo
Log Message:
menhir: update to 20250912.
## 2025/09/12
* In the new code back-end, fix a problem that could lead to an internal error
in `StackLangCheck` with the message `Failed stack subtype check (jump)`.
This problem could appear only when shift/reduce conflicts were resolved in
favor of reduction, causing edges to be removed in the LR(1) automaton.
(Reported by Wiktor Kuchta; fixed by François Pottier.)
* Fix a vulnerability in the code produced by the table back-end.
With `--table` and `--external-tokens`, if the user proposed two
inconsistent views of the types of the tokens, then Menhir would
produce code that contains incorrect unsafe type casts, which the
OCaml compiler would silently accept. (Reported by Fay Carsons;
fixed by Frédéric Bour.)
## 2025/09/03
* The table back-end uses a new table compression algorithm.
This algorithm is significantly faster than the previous algorithm:
in our tests, it can be up to 8 times faster.
This results in observably faster compilation:
for example, the time required to compile the OCaml parser
drops from 1.2 seconds to 0.6 seconds.
Compared with the previous algorithm,
the new algorithm produces results of roughly similar quality:
the size of the compressed tables can increase or decrease
by a few percent, up to 20% in the most dramatic cases.
On average, we observe a 1% increase in size.
The use of the previous algorithm can be requested
by the command line switch `--pack-classic`.
This command line switch may disappear in the future.
(Contributed by Frédéric Bour; reviewed by François Pottier.)
## 2024/07/15
* Fix a bug that could in principle cause `menhir --list-errors` to produce
incorrect output in some cases. This bug was never observed in real life.
(Contributed by Frédéric Bour.)
* `menhir --coq` now generates `From Coq.extraction Require Extraction.`,
which is required for compatibility with future versions of Coq.
(Requested by Xavier Leroy; implemented by Jacques-Henri Jourdan.)
## 2023/12/31
* The new command line switch `--unparsing` (which must be used in conjunction
with `--table`) causes Menhir to generate an unparsing API. In short,
unparsing is the process of transforming abstract syntax trees back into
text. The unparsing API is intended to help users write correct unparsers,
but does not automate the whole process.
For more details, please see the paper [Correct, Fast LR(1)
Unparsing](http://cambium.inria.fr/~fpottier/publis/pottier-unparsing-2024.pdf).
The unparsing API requires linking with the library `MenhirCST`, and
requires OCaml 4.08.
* Attributes can now be attached with a production. (In previous versions of
Menhir, attributes could be attached only with a symbol, with a specific
occurrence of a symbol in the right-hand side of a production, or with the
whole grammar.) This is achieved by letting one or more attributes appear
immediately after the semantic action.
During the two grammar transformation phases (expansion of parameterized
nonterminal symbols and elimination of `%inline` nonterminal symbols), the
`[@name]` attributes attached with productions receive special treatment,
so as to allow each production to receive a unique name.
* Minor additions in `MenhirSdk`:
+ The functions `hash`, `equal`, and `compare` appear in the signature
`INDEXED`, so this signature now conforms with the standard signatures
`HashedType` and `OrderedType`.
+ The submodule `Symbol` appears in the signature `GRAMMAR`.
Thus, the type `Symbol.t` is now synonymous with `symbol`,
and the function `Symbol.name` is now synonymous with `symbol_name`.
The submodule `Symbol` contains the new functions `hash`, `equal`,
and `compare`.
+ The functor `Cmly_read.FromString` appears. This functor allows decoding
a `.cmly` file whose content is stored in a string.
* Minor changes in `MenhirSdk`:
+ In the signature `GRAMMAR`, the function `Production.attributes` now
returns the attributes of the production itself. It used to return the
attributes of the nonterminal symbol that forms the left-hand side of the
production. The previous behavior of this function can be obtained by
writing `Nonterminal.attributes (Production.lhs prod)`.
* Internal changes in `MenhirLib`:
+ The functions `lhs`, `maybe_shift_t` and `may_reduce_prod` appear
in the signature `EngineTypes.TABLE`.
## 2023/06/08
* The new command line switch `--dump-menhirLib <directory>` causes the source
files `menhirLib.ml` and `menhirLib.mli` to be created in the designated
directory. This command can be useful to users with special needs who wish
to use `menhirLib` but do not want to rely on it being installed somewhere
in the file system. (Contributed by Nicolás Ojeda Bär.)
* Changes in the public API of the library `MenhirSdk`.
(Contributed by Frédéric Bour.)
+ The function `Lr1.reductions`,
whose type is `t -> (terminal * production list) list`,
is still present but is now deprecated.
The function `Lr1.get_reductions`,
whose type is `t -> (terminal * production) list`,
should be used instead.
The library offers a view of the automaton after conflict resolution,
so, for each token, at most one production can be reduced.
+ The function `Lr1.default_reduction : Lr1.t -> production option`
appears. This function indicates which states have a default reduction.
+ The function `Cmly_read.read_channel` appears.
+ The module `Cmly_read.Lift` appears.
* The new experimental flag `--specialize-token` causes the code back-end
to perform code specialization so as to guarantee that each token is
examined exactly once (thus never more than once) by the parser. This
causes an increase in code size and does not (yet) allow a performance
increase. This feature is independent of the choice between `-O 0`,
`-O 1` and `-O 2`. It may disappear in the future.
* Inconsistent type definitions used to be produced when `--only-tokens` and
`--inspection` were passed on the command line. The type `terminal` was
defined at the toplevel, whereas it should always be defined inside the
submodule `MenhirInterpreter`. (Reported and fixed by Frédéric Bour.)
* Malformed code and type definitions used to be produced when
`--external-tokens` and `--inspection` were passed on the command line.
Fixed. (Reported by Maxime Dénès.)
* Enable OCaml warning 39 (unused rec flag) in the OCaml code produced
by Menhir's code back-end. Menhir now carefully emits `let` instead
of `let rec` when a function is not recursive.
## 2023/04/15
* When using the code back-end, the default optimization level is now `-O 1`
instead of `-O 2`. Some users reported that `-O 2` is too aggressive and
can cause a blow-up in the size of the code.
* Tweak the code for compatibility with OCaml 5.1. (Contributed by
Florian Angeletti.)
* The new function `MenhirLib.LexerUtil.tabulate` makes it easy to run
the lexer and parser in two separate phases. This can be useful when
one wishes to benchmark them separately.
* To use the interpreter and print a concrete syntax tree, it used to be
necessary to pass both `--interpret` and `--interpret-show-cst`. It is
now sufficient to pass just `--interpret-show-cst`. (If both are passed,
then only the last one is obeyed.) This fixes the assertion failure that
would be observed when `--interpret-show-cst` alone was used.
(Reported by Reed Mullanix.)
To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 pkgsrc/devel/menhir/Makefile
cvs rdiff -u -r1.14 -r1.15 pkgsrc/devel/menhir/distinfo
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/devel/menhir/Makefile
diff -u pkgsrc/devel/menhir/Makefile:1.34 pkgsrc/devel/menhir/Makefile:1.35
--- pkgsrc/devel/menhir/Makefile:1.34 Mon Aug 25 08:34:54 2025
+++ pkgsrc/devel/menhir/Makefile Sun Jan 18 14:04:41 2026
@@ -1,12 +1,11 @@
-# $NetBSD: Makefile,v 1.34 2025/08/25 08:34:54 wiz Exp $
-#
+# $NetBSD: Makefile,v 1.35 2026/01/18 14:04:41 wiz Exp $
-DISTNAME= menhir-20220210
+DISTNAME= menhir-20250912
CATEGORIES= devel
MASTER_SITES= https://gitlab.inria.fr/fpottier/${PKGBASE}/-/archive/${PKGVERSION_NOREV}/
MAINTAINER= pkgsrc-users%NetBSD.org@localhost
-HOMEPAGE= http://gallium.inria.fr/~fpottier/menhir/
+HOMEPAGE= https://gallium.inria.fr/~fpottier/menhir/
COMMENT= LR(1) parser generator in OCaml
LICENSE= qpl-v1.0
Index: pkgsrc/devel/menhir/distinfo
diff -u pkgsrc/devel/menhir/distinfo:1.14 pkgsrc/devel/menhir/distinfo:1.15
--- pkgsrc/devel/menhir/distinfo:1.14 Tue May 10 08:20:33 2022
+++ pkgsrc/devel/menhir/distinfo Sun Jan 18 14:04:41 2026
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.14 2022/05/10 08:20:33 jaapb Exp $
+$NetBSD: distinfo,v 1.15 2026/01/18 14:04:41 wiz Exp $
-BLAKE2s (menhir-20220210.tar.gz) = 73903af264345bbb8cdfa9eee7ce4cfb8c760cea16792781cdf8d3f3df0b2335
-SHA512 (menhir-20220210.tar.gz) = 55af21092fd133c2b3f84589c0f98c9a4ce718cbafaacf82b459a15d0eaee711d82fa269283cab24caaebe2a5a1c75d469650248333a2991323c49d10cfe9e7f
-Size (menhir-20220210.tar.gz) = 1304512 bytes
+BLAKE2s (menhir-20250912.tar.gz) = a62e784fc36f868f3c20be1d1c84fd7d086607c057a210bf2e3589bf7a32109b
+SHA512 (menhir-20250912.tar.gz) = 93c39c6472fec9c7e3d747abe2742153d92b71d9cf5a1eca8c903f59cee2b7a372745b9f203056ab6820f8464085b645568243790632d7c069228a392593ef6e
+Size (menhir-20250912.tar.gz) = 1471361 bytes
Home |
Main Index |
Thread Index |
Old Index