From 53e19f76624b7a18792af799e970e9478f8e90a9 Mon Sep 17 00:00:00 2001 From: Maxime Dénès Date: Tue, 16 Jun 2020 17:09:40 +0200 Subject: Fix #11121: Simultaneous definition of term and notation in custom grammar --- doc/changelog/03-notations/12523-term-notation-custom.rst | 4 ++++ doc/sphinx/user-extensions/syntax-extensions.rst | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 doc/changelog/03-notations/12523-term-notation-custom.rst (limited to 'doc') diff --git a/doc/changelog/03-notations/12523-term-notation-custom.rst b/doc/changelog/03-notations/12523-term-notation-custom.rst new file mode 100644 index 0000000000..1a611f3fb1 --- /dev/null +++ b/doc/changelog/03-notations/12523-term-notation-custom.rst @@ -0,0 +1,4 @@ +- **Added:** + Simultaneous definition of terms and notations now support custom entries. + Fixes `#11121 `_. + (`#12523 `_, by Maxime Dénès). diff --git a/doc/sphinx/user-extensions/syntax-extensions.rst b/doc/sphinx/user-extensions/syntax-extensions.rst index 3c92206fd2..fcd5ecc070 100644 --- a/doc/sphinx/user-extensions/syntax-extensions.rst +++ b/doc/sphinx/user-extensions/syntax-extensions.rst @@ -368,13 +368,14 @@ a :token:`decl_notations` clause after the definition of the (co)inductive type (co)recursive term (or after the definition of each of them in case of mutual definitions). The exact syntax is given by :n:`@decl_notation` for inductive, co-inductive, recursive and corecursive definitions and in :ref:`record-types` -for records. +for records. Note that only syntax modifiers that do not require to add or +change a parsing rule are accepted. .. insertprodn decl_notations decl_notation .. prodn:: decl_notations ::= where @decl_notation {* and @decl_notation } - decl_notation ::= @string := @one_term {? ( only parsing ) } {? : @scope_name } + decl_notation ::= @string := @one_term {? ( {+, @syntax_modifier } ) } {? : @scope_name } Here are examples: -- cgit v1.2.3