Conversation
chapters/statements.tex
Outdated
| ( component-reference ( ":=" expression | function-call-args ) | ||
| | der "(" component-reference ")" ":=" expression | ||
| | "(" output-expression-list ")" ":=" | ||
| component-reference function-call-args |
There was a problem hiding this comment.
Align with how it is written in the grammar, or take the opportunity to replace outdated duplicated grammar with cross reference to \cref{equations1}.
More generally, I would actually be in favor of making each production rule in syntax.tex its own listing, with a systematic way of creating a cross reference to a specific production rule with something like \cref{production:statement}. With precise cross references like that, the need to duplicate the production in other places of the document is more or less eliminated.
There was a problem hiding this comment.
I added the simple reference; a more precise cross-referencing would be good, but I think that should be a separate PR and prioritized.
chapters/statements.tex
Outdated
| The syntax of \firstuse[assignment statement!simple]{simple assignment statement} is as follows: | ||
| \begin{lstlisting}[language=grammar] | ||
| component-reference ":=" expression | ||
| ( component-reference | der "(" component-reference ")" ) ":=" expression |
There was a problem hiding this comment.
Without "repeating" the grammar:
A \firstuse[assignment statement!simple]{simple assignment statement} is an assignment statement where the left-hand side of the \lstinline!:=! is a component reference or a derivative.
(The restriction that \lstinline!der! is not allowed inside \lstinline!function! classes also applies to assignments.)
The right-hand side of the \lstinline!:=! is evaluated, and the resulting value is stored into the left-hand side variable or derivative.
There was a problem hiding this comment.
I copied that without the middle-line, and some update of the next paragraph (that already contained the restriction on derivatives.)
As previously discussed.
Closes #3764