Revise the markup related to the grammar productions to increase the
level of predictability. This is not really "good" markup, but is arguably
better than we had before.
This closes SF bug #523117.
diff --git a/Doc/ref/ref5.tex b/Doc/ref/ref5.tex
index 9ed9337..6005f51 100644
--- a/Doc/ref/ref5.tex
+++ b/Doc/ref/ref5.tex
@@ -54,8 +54,8 @@
\production{atom}
{\token{identifier} | \token{literal} | \token{enclosure}}
\production{enclosure}
- {\token{parenth_form} | \token{list_display}
- | \token{dict_display} | \token{string_conversion}}
+ {\token{parenth_form} | \token{list_display}}
+ \productioncont{| \token{dict_display} | \token{string_conversion}}
\end{productionlist}
@@ -112,9 +112,8 @@
\begin{productionlist}
\production{literal}
- {\token{stringliteral} | \token{integer}
- | \token{longinteger} | \token{floatnumber}
- | \token{imagnumber}}
+ {\token{stringliteral} | \token{integer} | \token{longinteger}}
+ \productioncont{| \token{floatnumber} | \token{imagnumber}}
\end{productionlist}
Evaluation of a literal yields an object of the given type (string,
@@ -439,13 +438,12 @@
\production{call}
{\token{primary} "(" [\token{argument_list} [","]] ")"}
\production{argument_list}
- {\token{positional_arguments} ["," \token{keyword_arguments}
- ["," "*" \token{expression} ["," "**" \token{expression}]]]
- | \token{keyword_arguments} ["," "*" \token{expression}
- ["," "**" \token{expression}]]
- | "*" \token{expression} ["," "**" \token{expression}]
- | "**" \token{expression}
- }
+ {\token{positional_arguments} ["," \token{keyword_arguments}}
+ \productioncont{ ["," "*" \token{expression} ["," "**" \token{expression}]]]}
+ \productioncont{| \token{keyword_arguments} ["," "*" \token{expression}}
+ \productioncont{ ["," "**" \token{expression}]]}
+ \productioncont{| "*" \token{expression} ["," "**" \token{expression}]}
+ \productioncont{| "**" \token{expression}}
\production{positional_arguments}
{\token{expression} ("," \token{expression})*}
\production{keyword_arguments}
@@ -666,8 +664,8 @@
\begin{productionlist}
\production{m_expr}
{\token{u_expr} | \token{m_expr} "*" \token{u_expr}
- | \token{m_expr} "/" \token{u_expr}
- | \token{m_expr} "\%" \token{u_expr}}
+ | \token{m_expr} "/" \token{u_expr}}
+ \productioncont{| \token{m_expr} "\%" \token{u_expr}}
\production{a_expr}
{\token{m_expr} | \token{aexpr} "+" \token{m_expr}
\token{aexpr} "-" \token{m_expr}}
@@ -801,8 +799,8 @@
\production{comparison}
{\token{or_expr} ( \token{comp_operator} \token{or_expr} )*}
\production{comp_operator}
- {"<" | ">" | "==" | ">=" | "<=" | "<>" | "!="
- | "is" ["not"] | ["not"] "in"}
+ {"<" | ">" | "==" | ">=" | "<=" | "<>" | "!="}
+ \productioncont{| "is" ["not"] | ["not"] "in"}
\end{productionlist}
Comparisons yield integer values: \code{1} for true, \code{0} for false.