blob: f36f0ec0a66bb5c2f4d6cfb14a480a7b8bf43aef (
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
|
% 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{s_1~s_2}{\stk''}, \str)}
{\ip'}{\op}{\st}
\justifies
\trans
{\StmCat:\pgm}{\ip}{(\stk,\str)}
{\ip'}{\op}{\st}
\using{\rcatns}
\qquad
\text{met\enspace
\parbox{36mm}{$\pop{\stk} = (s_2,\stk') $,\\$ \pop{\stk'} = (s_1,\stk'')$.}}
\end{prooftree}
$$
|