diff options
| author | Emilio Jesus Gallego Arias | 2019-08-19 03:17:25 +0200 |
|---|---|---|
| committer | Emilio Jesus Gallego Arias | 2020-03-25 23:45:00 -0400 |
| commit | 767ecfec49543b70a605d20b1dae8252e1faabfe (patch) | |
| tree | 2b91f76b9f6c5148c7ba5e2b7cab14218d569259 /plugins | |
| parent | 13929f39f8560cfcb3aacf20c84c6dcb5295cec5 (diff) | |
[parsing] Make grammar rules private.
After the gramlib merge and the type-safe interface added to it, the
grammar extension type is redundant; we thus make it private as a
first step on consolidating it with the one in gramlib's.
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/ltac/tacentries.ml | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/plugins/ltac/tacentries.ml b/plugins/ltac/tacentries.ml index 53b5386375..6b83590b1d 100644 --- a/plugins/ltac/tacentries.ml +++ b/plugins/ltac/tacentries.ml @@ -406,15 +406,21 @@ let create_ltac_quotation name cast (e, l) = let level = None in let assoc = None in let rule = - Next (Next (Next (Next (Next (Stop, - Pcoq.G.Symbol.token (CLexer.terminal name)), - Pcoq.G.Symbol.token (CLexer.terminal ":")), - Pcoq.G.Symbol.token (CLexer.terminal "(")), - entry), - Pcoq.G.Symbol.token (CLexer.terminal ")")) + Pcoq.G.( + Rule.next + (Rule.next + (Rule.next + (Rule.next + (Rule.next + Rule.stop + (Symbol.token (CLexer.terminal name))) + (Symbol.token (CLexer.terminal ":"))) + (Symbol.token (CLexer.terminal "("))) + entry) + (Symbol.token (CLexer.terminal ")"))) in let action _ v _ _ _ loc = cast (Some loc, v) in - let gram = (level, assoc, [Rule (rule, action)]) in + let gram = (level, assoc, [Pcoq.G.Production.make rule action]) in Pcoq.grammar_extend Pltac.tactic_arg (None, [gram]) (** Command *) |
