aboutsummaryrefslogtreecommitdiff
path: root/parsing/pcoq.ml
diff options
context:
space:
mode:
authorPierre-Marie Pédrot2016-03-19 03:01:26 +0100
committerPierre-Marie Pédrot2016-03-19 03:01:26 +0100
commitfff96bb174df956bc38c207d716d7f8019ca04d8 (patch)
tree842afc28f891fa8516cbb86d1051b41686eb67a6 /parsing/pcoq.ml
parentf63cf9d72c7feb6aa65e525bf6262559a355435f (diff)
parentce2ffd090bd64963279cbbb84012d1b266ed9918 (diff)
Removing the VernacSolve entry of the vernacular AST.
This is an important step into making Ltac a plugin. It also allows to see what the important entry points in the Coq codebase for a tactic language are.
Diffstat (limited to 'parsing/pcoq.ml')
-rw-r--r--parsing/pcoq.ml9
1 files changed, 9 insertions, 0 deletions
diff --git a/parsing/pcoq.ml b/parsing/pcoq.ml
index 91f933987b..9c2f09db84 100644
--- a/parsing/pcoq.ml
+++ b/parsing/pcoq.ml
@@ -383,6 +383,7 @@ module Vernac_ =
let rec_definition = gec_vernac "Vernac.rec_definition"
(* Main vernac entry *)
let main_entry = Gram.entry_create "vernac"
+ let noedit_mode = gec_vernac "noedit_command"
let () =
let act_vernac = Gram.action (fun v loc -> Some (!@loc, v)) in
@@ -393,10 +394,18 @@ module Vernac_ =
] in
maybe_uncurry (Gram.extend main_entry) (None, make_rule rule)
+ let command_entry_ref = ref noedit_mode
+ let command_entry =
+ Gram.Entry.of_parser "command_entry"
+ (fun strm -> Gram.parse_tokens_after_filter !command_entry_ref strm)
+
end
let main_entry = Vernac_.main_entry
+let set_command_entry e = Vernac_.command_entry_ref := e
+let get_command_entry () = !Vernac_.command_entry_ref
+
(**********************************************************************)
(* This determines (depending on the associativity of the current
level and on the expected associativity) if a reference to constr_n is