This is an automated email from the git hooks/post-receive script. treinen pushed a commit to branch master in repository menhir.
commit 62d86238bb5229da054dc58e60c8cfef9f606bac Author: Ralf Treinen <trei...@free.fr> Date: Tue Jan 2 19:19:05 2018 +0100 New upstream version 20171222 --- CHANGES.md | 12 +++++++++--- doc/macros.tex | 1 + doc/main.tex | 17 ++++++++++------- doc/version.tex | 2 +- manual.pdf | Bin 433383 -> 433515 bytes src/META | 2 +- src/StaticVersion.ml | 2 +- src/StaticVersion.mli | 2 +- src/grammarFunctor.ml | 6 ++++-- src/settings.ml | 7 +++++++ src/settings.mli | 4 ++++ src/version.ml | 2 +- 12 files changed, 40 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index af4c4db..c60d4fc 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,12 +1,18 @@ # Changes +## 2017/12/22 + +* Add a flag `--unused-precedence-levels` to suppress all warnings about + useless `%left`, `%right`, `%nonassoc` and `%prec` declarations. + (Suggested by Zachary Tatlock.) + ## 2017/12/06 * Fix the termination test that takes place before parameterized symbols are expanded away. The previous test was both unsound (it would accept grammars - whose termination did not terminate) and incomplete (it would reject - grammars whose termination did terminate). The new test is believed to be - sound and complete. + whose expansion did not terminate) and incomplete (it would reject grammars + whose expansion did terminate). The new test is believed to be sound and + complete. (Thanks to Martin Bodin for prompting us to look into this issue.) ## 2017/11/12 diff --git a/doc/macros.tex b/doc/macros.tex index 5158246..9a07f5b 100644 --- a/doc/macros.tex +++ b/doc/macros.tex @@ -127,6 +127,7 @@ \newcommand{\ograph}{\texttt{-{}-graph}\xspace} \newcommand{\oignoreone}{\texttt{-{}-unused-token}\xspace} \newcommand{\oignoreall}{\texttt{-{}-unused-tokens}\xspace} +\newcommand{\oignoreprec}{\texttt{-{}-unused-precedence-levels}\xspace} \newcommand{\oinfer}{\texttt{-{}-infer}\xspace} \newcommand{\oinspection}{\texttt{-{}-inspection}\xspace} \newcommand{\ointerpret}{\texttt{-{}-interpret}\xspace} diff --git a/doc/main.tex b/doc/main.tex index 091d6da..e51e3ed 100644 --- a/doc/main.tex +++ b/doc/main.tex @@ -183,13 +183,6 @@ vertices are the grammar's nonterminal symbols. There is a directed edge from vertex $A$ to vertex $B$ if the definition of $A$ refers to $B$. The file is in a format that is suitable for processing by the \emph{graphviz} toolkit. -\docswitch{\oignoreone \nt{symbol}} This switch suppresses the warning that -is normally emitted when \menhir finds that the terminal symbol \nt{symbol} is -unused. - -\docswitch{\oignoreall} This switch suppresses all of the warnings that are -normally emitted when \menhir finds that some terminal symbols are unused. - \docswitch{\oinfer} This switch causes the semantic actions to be checked for type consistency \emph{before} the parser is generated. This is done by invoking the \ocaml compiler. Use of \oinfer is \textbf{strongly recommended}, @@ -364,6 +357,16 @@ logged to the standard error channel. This is analogous to \texttt{ocamlrun}'s \texttt{p=1} parameter, except this switch must be enabled at compile time: one cannot selectively enable or disable tracing at runtime. +\docswitch{\oignoreprec} This switch suppresses all warnings about +useless \dleft, \dright, \dnonassoc and \dprec declarations. + +\docswitch{\oignoreone \nt{symbol}} This switch suppresses the warning that +is normally emitted when \menhir finds that the terminal symbol \nt{symbol} is +unused. + +\docswitch{\oignoreall} This switch suppresses all of the warnings that are +normally emitted when \menhir finds that some terminal symbols are unused. + \docswitch{\oupdateerrors \nt{filename}} This switch causes \menhir to read the \messages file \nt{filename} and to produce on the standard output channel a new \messages file that is identical, except the auto-generated diff --git a/doc/version.tex b/doc/version.tex index 0b9be45..9a1cced 100644 --- a/doc/version.tex +++ b/doc/version.tex @@ -1 +1 @@ -\gdef\menhirversion{20171206} +\gdef\menhirversion{20171222} diff --git a/manual.pdf b/manual.pdf index 4d523c1..6f7f139 100644 Binary files a/manual.pdf and b/manual.pdf differ diff --git a/src/META b/src/META index eb19a03..a0d56d6 100644 --- a/src/META +++ b/src/META @@ -1 +1 @@ -version = "20171206" +version = "20171222" diff --git a/src/StaticVersion.ml b/src/StaticVersion.ml index 195dfe9..975ae5c 100644 --- a/src/StaticVersion.ml +++ b/src/StaticVersion.ml @@ -1 +1 @@ -let require_20171206 = () +let require_20171222 = () diff --git a/src/StaticVersion.mli b/src/StaticVersion.mli index 9b76fff..519e0a4 100644 --- a/src/StaticVersion.mli +++ b/src/StaticVersion.mli @@ -1 +1 @@ -val require_20171206 : unit +val require_20171222 : unit diff --git a/src/grammarFunctor.ml b/src/grammarFunctor.ml index 4c85631..e07ea5e 100644 --- a/src/grammarFunctor.ml +++ b/src/grammarFunctor.ml @@ -1508,8 +1508,10 @@ end should be invoked after only the automaton has been constructed. *) let diagnostics () = - TokPrecedence.diagnostics(); - Production.diagnostics() + if not Settings.ignore_all_unused_precedence_levels then begin + TokPrecedence.diagnostics(); + Production.diagnostics() + end (* ------------------------------------------------------------------------ *) (* %on_error_reduce declarations. *) diff --git a/src/settings.ml b/src/settings.ml index 4adb505..1fc33f3 100644 --- a/src/settings.ml +++ b/src/settings.ml @@ -203,6 +203,9 @@ let ignore_unused_token t = let ignore_all_unused_tokens = ref false +let ignore_all_unused_precedence_levels = + ref false + let list_errors = ref false @@ -294,6 +297,7 @@ let options = Arg.align [ "--table", Arg.Set table, " Use the table-based back-end"; "--timings", Arg.Set timings, " Display internal timings"; "--trace", Arg.Set trace, " Generate tracing instructions"; + "--unused-precedence-levels", Arg.Set ignore_all_unused_precedence_levels, " Do not warn about unused precedence levels"; "--unused-token", Arg.String ignore_unused_token, "<token> Do not warn that <token> is unused"; "--unused-tokens", Arg.Set ignore_all_unused_tokens, " Do not warn about any unused token"; "--update-errors", Arg.String set_update_errors, "<filename> Update auto-comments in a .messages file"; @@ -497,6 +501,9 @@ let ignored_unused_tokens = let ignore_all_unused_tokens = !ignore_all_unused_tokens +let ignore_all_unused_precedence_levels = + !ignore_all_unused_precedence_levels + let list_errors = !list_errors diff --git a/src/settings.mli b/src/settings.mli index f989406..b220a73 100644 --- a/src/settings.mli +++ b/src/settings.mli @@ -192,6 +192,10 @@ val ignored_unused_tokens: StringSet.t val ignore_all_unused_tokens: bool +(* This flag suppresses all warnings about unused precedence levels. *) + +val ignore_all_unused_precedence_levels: bool + (* This flag causes Menhir to produce a list of erroneous input sentences. Enough sentences are computed to produce exactly one error in every state where an error can occur. *) diff --git a/src/version.ml b/src/version.ml index 22aa4da..1cd500b 100644 --- a/src/version.ml +++ b/src/version.ml @@ -1 +1 @@ -let version = "20171206" +let version = "20171222" -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/menhir.git _______________________________________________ Pkg-ocaml-maint-commits mailing list Pkg-ocaml-maint-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits