Commit 081abe25 authored by POTTIER Francois's avatar POTTIER Francois

More general syntax of actuals.

Not useful in practice; preparation for further changes.
parent eb09e1cc
......@@ -372,9 +372,8 @@ must be fully qualified.
\optional{\nt{lid} \dequal} \nt{actual} \\
\nt{actual} \is
\nt{id}
\optional{\dlpar\sepcommalist{\nt{actual}}\drpar}
\optional{\dquestion \barre \dplus \barre \dstar} \\
\nt{id} \optional{\dlpar\sepcommalist{\nt{actual}}\drpar} \\
&& \nt{actual} \optional{\dquestion \barre \dplus \barre \dstar} \\
\end{tabular}
\end{center}
......@@ -564,7 +563,7 @@ keyword (\kw{\$1}, etc.).
\subsubsection{Actuals}
\label{sec:actual}
In its simplest form, an actual simply consists of a terminal or nonterminal
In its simplest form, an actual is just a terminal or nonterminal
symbol. The optional actual parameters
$\dlpar\sepcommalist{\nt{actual}}\drpar$ and the optional modifier
(\dquestion, \dplus, or \dstar) are explained further on
......
......@@ -321,8 +321,10 @@ producer:
"*" shortcuts. */
actual_parameter:
symbol = symbol actuals = plist(actual_parameter) modifier = modifier?
{ Parameters.oapp1 modifier (Parameters.app symbol actuals) }
symbol = symbol actuals = plist(actual_parameter)
{ Parameters.app symbol actuals }
| p = actual_parameter m = modifier
{ ParameterApp (m, [ p ]) }
/* ------------------------------------------------------------------------- */
/* Formal or actual parameter lists are delimited with parentheses and
......
......@@ -217,8 +217,10 @@ actual_parameters_comma:
{ $1 :: $3 }
actual_parameter:
symbol optional_actual_parameters optional_modifier
{ Parameters.oapp1 $3 (Parameters.app $1 $2) }
symbol optional_actual_parameters
{ Parameters.app $1 $2 }
| actual_parameter modifier
{ ParameterApp ($2, [ $1 ]) }
actual_parameters:
/* epsilon */
......@@ -236,12 +238,6 @@ optional_bar:
/* The "?", "+", and "*" modifiers are short-hands for applications of
certain parameterized nonterminals, defined in the standard library. */
optional_modifier:
/* epsilon */
{ None }
| modifier
{ Some $1 }
modifier:
QUESTION
{ unknown_pos "option" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment