bpo-41762: Fix usage of productionlist markup in the doc (GH-22281)


Use an unique identifier for the different grammars documented using
the Sphinx productionlist markup.

productionlist markups of the same grammar, like "expressions" or
"compound statements", use the same identifier "python-grammar".
(cherry picked from commit 8af239eacfcf52e4e0e2b0223e7cea4672309483)

Co-authored-by: Victor Stinner <vstinner@python.org>
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index b88c56e..124085e 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -582,7 +582,7 @@
    input must conform to the following grammar after leading and trailing
    whitespace characters are removed:
 
-   .. productionlist::
+   .. productionlist:: float
       sign: "+" | "-"
       infinity: "Infinity" | "inf"
       nan: "nan"