Commit fb929433 authored by POTTIER Francois's avatar POTTIER Francois

Remove the trailing space at the end of every sentence in auto-generated `.messages` files.

parent 00b85891
# Changes
## 2018/09/18
## 2018/09/20
* Install `.cmxs` files for menhirLib and menhirSdk.
......@@ -11,6 +11,9 @@
* Coq back-end: add a few newlines in the generated file for readability.
(Suggested by Bernhard Schommer.)
* Remove the trailing space at the end of every sentence in
auto-generated `.messages` files. (Suggested by Xavier Leroy.)
* At verbosity level `-lg 2`, for each nonterminal symbol `N`, display
a sentence (composed of terminal symbols) of minimal length generated
by `N`.
......
......@@ -83,8 +83,9 @@ let print_sentence (nto, terminals) : string =
Option.iter (fun nt ->
Printf.bprintf b "%s: " (Nonterminal.print false nt)
) nto;
let separator = Misc.once "" " " in
List.iter (fun t ->
Printf.bprintf b "%s " (Terminal.print t)
Printf.bprintf b "%s%s" (separator()) (Terminal.print t)
) terminals;
Printf.bprintf b "\n";
Buffer.contents b
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment