blob: a54b5088fe931f1f7ad58874d8bbbc0560cece67 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
% vim: set spelllang=nl:
\subsection{\texttt{Cat}}
\label{sec:rules:cat}
\begin{quote}
+ - concatenates the top two strings on the stack. The string pushed earlier
appears earlier in the resulting string, eg \smurfinline{"Zork" "mid" +}
would result in the string \texttt{Zorkmid} being placed on the stack.
\end{quote}
De string bovenop de stack wordt toegevoegd aan de string hieronder. Het
resultaat wordt op de stack gezet.
Dit geeft de volgende regel:
$$
\begin{prooftree}
\trans
{\pgm}{\ip}{(\push{s1~s2}{\stk''}, \str)}
{\ip'}{\op}{\st}
\justifies
\trans
{\StmCat:\pgm}{\ip}{(\stk,\str)}
{\ip'}{\op}{\st}
\using{\rcatns}
\qquad
\text{met\enspace
\parbox{36mm}{$(s_2,\stk') = \pop{\stk}$,\\$(s_1,\stk'') = \pop{\stk'}$.}
}
\end{prooftree}
$$
|