Skip to content

Commit

Permalink
Consistently quote in grammar (and remove one spurious ;).
Browse files Browse the repository at this point in the history
Note that some code fragments are Modelica and some "grammar"; that may be a bit confusing.
Closes modelica#2988
  • Loading branch information
HansOlsson committed Sep 2, 2021
1 parent 80f268a commit 3e01fae
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion chapters/annotations.tex
Expand Up @@ -1119,7 +1119,7 @@ \section{Annotations for the Graphical User Interface}\label{annotations-for-the

\begin{lstlisting}[language=grammar]
preferred-view-annotation:
annotation "(" preferredView "=" ("info" | "diagram" | "text") ")"
annotation "(" preferredView "=" ("""info""" | """diagram""" | """text""") ")"
\end{lstlisting}

The \fmtannotationindex{preferredView} annotation defines the default view when selecting the class.
Expand Down
2 changes: 1 addition & 1 deletion chapters/connectors.tex
Expand Up @@ -10,7 +10,7 @@ \section{Connect-Equations and Connectors}\label{connect-equations-and-connector
Connections between objects are introduced by \lstinline!connect!-equations in the equation part of a class.
A \lstinline!connect!-equation\index{connect@\robustinline{connect}!equation} has the following syntax:
\begin{lstlisting}[language=grammar]
connect(component-reference, component-reference);
connect "(" component-reference "," component-reference ")" ";"
\end{lstlisting}

\begin{nonnormative}
Expand Down
4 changes: 2 additions & 2 deletions chapters/functions.tex
Expand Up @@ -1459,7 +1459,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline[language=grammar]!zeroDerivative = $\mathit{inputVar}_{1}$ { , zeroDerivative = $\mathit{inputVar}_{2}$ }!
\lstinline[language=grammar]!"zeroDerivative" "=" $\mathit{inputVar}_{1}$ { "," "zeroDerivative" "=" $\mathit{inputVar}_{2}$ }!
\end{itemize}

The derivative function is only valid if $\mathit{inputVar}_{1}$ (and $\mathit{inputVar}_{2}$ etc.) are independent of the variables the function call is differentiated with respect to (i.e.\ that the derivative of $\mathit{inputVar}_{1}$ is zero).
Expand Down Expand Up @@ -1539,7 +1539,7 @@ \subsection{Using the Derivative Annotation}\label{using-the-derivative-annotati

\begin{itemize}
\item
\lstinline[language=grammar]!noDerivative = $\mathit{inputVar}_{1}$!
\lstinline[language=grammar]!"noDerivative" "=" $\mathit{inputVar}_{1}$!
\end{itemize}

The derivative of $\mathit{inputVar}_{1}$ is excluded from the argument list of the derivative-function.
Expand Down
2 changes: 1 addition & 1 deletion chapters/statements.tex
Expand Up @@ -336,7 +336,7 @@ \subsection{If-Statement}\label{if-statement}
[ else
{ statement ";" }
]
end if;
end if
\end{lstlisting}

The \lstinline!expression! of an \lstinline!if!- or \lstinline!elseif!-clause must be scalar \lstinline!Boolean! expression.
Expand Down
3 changes: 2 additions & 1 deletion chapters/unitexpressions.tex
Expand Up @@ -69,7 +69,8 @@ \section{The Syntax of Unit Expressions}\label{the-syntax-of-unit-expressions}
unit_symbol | unit_prefix unit_symbol

unit_prefix:
Y | Z | E | P | T | G | M | k | h | da | d | c | m | u | n | p | f | a | z | y
"Y" | "Z" | "E" | "P" | "T" | "G" | "M" | "k" | "h" | "da"
| "d" | "c | "m" | "u" | "n" | "p" | "f" | "a" | "z" | "y"
\end{lstlisting}

A \lstinline!unit_symbol! is a string of letters. A basic support of units in
Expand Down

0 comments on commit 3e01fae

Please sign in to comment.