From ab85be0ab41251ece3b583c3ff38f08f546f6414 Mon Sep 17 00:00:00 2001 From: gareuselesinge Date: Thu, 8 Aug 2013 18:52:29 +0000 Subject: Vernac classification streamlined (handles VERNAC EXTEND) The warning output by vernacextend when the classifier is missing is the documentation of this commit: Warning: Vernac entry "Foo" misses a classifier. A classifier is a function that returns an expression of type vernac_classification (see Vernacexpr). You can: - Use '... EXTEND Foo CLASSIFIED AS QUERY ...' if the new vernacular command does not alter the system state; - Use '... EXTEND Foo CLASSIFIED AS SIDEFF ...' if the new vernacular command alters the system state but not the parser nor it starts a proof or ends one; - Use '... EXTEND Foo CLASSIFIED BY f ...' to specify a global function f. The function f will be called passing "Foo" as the only argument; - Add a specific classifier in each clause using the syntax: '[...] => [ f ] -> [...]'. Specific classifiers have precedence over global classifiers. Only one classifier is called. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16680 85f007b7-540e-0410-9357-904b9bb8a0f7 --- intf/vernacexpr.mli | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'intf') diff --git a/intf/vernacexpr.mli b/intf/vernacexpr.mli index 9a26668cd0..5bfea4e344 100644 --- a/intf/vernacexpr.mli +++ b/intf/vernacexpr.mli @@ -422,7 +422,7 @@ and located_vernac_expr = Loc.t * vernac_expr a query like Check *) type vernac_type = | VtStartProof of vernac_start - | VtSideff + | VtSideff of vernac_sideff_type | VtQed of vernac_qed_type | VtProofStep | VtQuery of vernac_part_of_script @@ -430,6 +430,7 @@ type vernac_type = | VtUnknown and vernac_qed_type = KeepProof | DropProof (* Qed, Admitted/Abort *) and vernac_start = string * Id.t list +and vernac_sideff_type = Id.t list and vernac_is_alias = bool and vernac_part_of_script = bool and vernac_control = -- cgit v1.2.3