aboutsummaryrefslogtreecommitdiff
path: root/gramlib
diff options
context:
space:
mode:
authorHugo Herbelin2020-02-11 22:30:36 +0100
committerHugo Herbelin2020-02-11 22:34:04 +0100
commit6884867957d1cc361030cffd18d24cb8a231dd10 (patch)
tree90edbcd57b1971bdd1237ef065cd7c2123c79892 /gramlib
parentcbf5e7e49cfa243b6eac808241894fc504d84e5f (diff)
Fixing extra space in "Print Grammar" (i.e. Grammar.Entry.print in Gramlib).
Diffstat (limited to 'gramlib')
-rw-r--r--gramlib/grammar.ml3
1 files changed, 2 insertions, 1 deletions
diff --git a/gramlib/grammar.ml b/gramlib/grammar.ml
index ff0b90dcff..e1b9c6b7cb 100644
--- a/gramlib/grammar.ml
+++ b/gramlib/grammar.ml
@@ -831,8 +831,9 @@ let rec print_symbol : type s tr r. formatter -> (s, tr, r) ty_symbol -> unit =
fprintf ppf "LIST1 %a SEP %a%s" print_symbol1 s print_symbol1 t
(if osep then " OPT_SEP" else "")
| Sopt s -> fprintf ppf "OPT %a" print_symbol1 s
- | Stoken p when L.tok_pattern_strings p <> ("", None) ->
+ | Stoken p ->
begin match L.tok_pattern_strings p with
+ | "", Some s -> print_str ppf s
| con, Some prm -> fprintf ppf "%s@ %a" con print_str prm
| con, None -> fprintf ppf "%s" con end
| Snterml (e, l) ->