aboutsummaryrefslogtreecommitdiff
path: root/doc/sphinx
diff options
context:
space:
mode:
Diffstat (limited to 'doc/sphinx')
-rw-r--r--doc/sphinx/user-extensions/syntax-extensions.rst31
1 files changed, 19 insertions, 12 deletions
diff --git a/doc/sphinx/user-extensions/syntax-extensions.rst b/doc/sphinx/user-extensions/syntax-extensions.rst
index edec13f681..cda228a7da 100644
--- a/doc/sphinx/user-extensions/syntax-extensions.rst
+++ b/doc/sphinx/user-extensions/syntax-extensions.rst
@@ -327,22 +327,29 @@ symbols.
Reserving notations
~~~~~~~~~~~~~~~~~~~
-A given notation may be used in different contexts. Coq expects all
-uses of the notation to be defined at the same precedence and with the
-same associativity. To avoid giving the precedence and associativity
-every time, it is possible to declare a parsing rule in advance
-without giving its interpretation. Here is an example from the initial
-state of Coq.
+.. cmd:: Reserved Notation @string {? (@modifiers) }
-.. coqtop:: in
+ A given notation may be used in different contexts. Coq expects all
+ uses of the notation to be defined at the same precedence and with the
+ same associativity. To avoid giving the precedence and associativity
+ every time, this command declares a parsing rule (:token:`string`) in advance
+ without giving its interpretation. Here is an example from the initial
+ state of Coq.
+
+ .. coqtop:: in
+
+ Reserved Notation "x = y" (at level 70, no associativity).
+
+ Reserving a notation is also useful for simultaneously defining an
+ inductive type or a recursive constant and a notation for it.
- Reserved Notation "x = y" (at level 70, no associativity).
+ .. note:: The notations mentioned in the module :ref:`init-notations` are reserved. Hence
+ their precedence and associativity cannot be changed.
-Reserving a notation is also useful for simultaneously defining an
-inductive type or a recursive constant and a notation for it.
+ .. cmdv:: Reserved Infix "@symbol" {* @modifiers}
-.. note:: The notations mentioned in the module :ref:`init-notations` are reserved. Hence
- their precedence and associativity cannot be changed.
+ This command declares an infix parsing rule without giving its
+ interpretation.
Simultaneous definition of terms and notations
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~