7 |
\section{Global declarations} |
\section{Global declarations} |
8 |
|
|
9 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
10 |
\section{Actor definitions} |
\section{Strand definitions} |
11 |
|
|
12 |
\subsection{Actor state} |
\subsection{Strand state} |
13 |
|
|
14 |
\subsection{The update method} |
\subsection{The update method} |
15 |
|
|
24 |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
25 |
\section{Expressions} |
\section{Expressions} |
26 |
|
|
27 |
|
In this section, we describe Diderot's expression syntax. |
28 |
|
The section is organized from lowest to highest precedence. |
29 |
|
|
30 |
\subsection{Conditional expressions} |
\subsection{Conditional expressions} |
31 |
There are three conditional expression forms in Diderot: |
There are three conditional expression forms in Diderot: |
32 |
\emph{if-else} expressions, \emph{or-else} expressions, and \emph{and-also} |
\emph{if-else} expressions, \emph{or-else} expressions, and \emph{and-also} |
83 |
\subsection{Binary expressions} |
\subsection{Binary expressions} |
84 |
\begin{Grammar} |
\begin{Grammar} |
85 |
\CmpExprRULES{} |
\CmpExprRULES{} |
|
\AddExprRULES{} |
|
|
\MulExprRULES{} |
|
86 |
\CmpOpRULES{} |
\CmpOpRULES{} |
87 |
|
\AddExprRULES{} |
88 |
\AddOpRULES{} |
\AddOpRULES{} |
89 |
|
\MulExprRULES{} |
90 |
\MulOpRULES{} |
\MulOpRULES{} |
91 |
\end{Grammar}% |
\PowerExprRULES{} |
|
|
|
|
\subsection{Field-probe expressions} |
|
|
\begin{Grammar} |
|
92 |
\ProbeExprRULES{} |
\ProbeExprRULES{} |
93 |
\end{Grammar}% |
\end{Grammar}% |
94 |
|
|
95 |
\subsection{Unary expressions} |
\subsection{Prefix-operator expressions} |
96 |
\begin{Grammar} |
\begin{Grammar} |
97 |
\PrefixExprRULES{} |
\PrefixExprRULES{} |
98 |
\end{Grammar}% |
\end{Grammar}% |
99 |
|
|
100 |
\subsection{Tensor-slice expressions} |
\subsection{Suffix-operator expressions} |
101 |
\begin{Grammar} |
\begin{Grammar} |
102 |
\SliceExprRULES{} |
\SuffixExprRULES{} |
103 |
|
\SuffixRULES{} |
104 |
\IndexRULES{} |
\IndexRULES{} |
105 |
\end{Grammar}% |
\end{Grammar}% |
106 |
|
|
107 |
|
\subsection{Derivative expressions} |
108 |
|
\begin{Grammar} |
109 |
|
\DerivExprRULES{} |
110 |
|
\end{Grammar}% |
111 |
|
|
112 |
\subsection{Atomic expressions} |
\subsection{Atomic expressions} |
113 |
\begin{Grammar} |
\begin{Grammar} |
114 |
\AtomExpRULES{} |
\AtomExprRULES{} |
115 |
\ArgumentsRULES{} |
\ArgumentsRULES{} |
116 |
\end{Grammar}% |
\end{Grammar}% |