diff options
| author | Juan Marín Noguera <juan.marinn@um.es> | 2020-03-23 16:01:48 +0100 |
|---|---|---|
| committer | Juan Marín Noguera <juan.marinn@um.es> | 2020-03-23 16:01:48 +0100 |
| commit | b711ef397f9ff9b8bbe724977d1a04d31023df89 (patch) | |
| tree | 4c7a19682aefdf372f2633928f06c7a29ab65ea3 /cc | |
| parent | 3e3cb72b3bf2fb2a39068d3ced65130bd4b93e2b (diff) | |
Refactoring
Diffstat (limited to 'cc')
| -rw-r--r-- | cc/n.lyx | 2 | ||||
| -rw-r--r-- | cc/spec.tex | 11 |
2 files changed, 12 insertions, 1 deletions
@@ -6,7 +6,7 @@ \origin unavailable \textclass book \begin_preamble -\usepackage{tikz} +\input{spec} \end_preamble \use_default_options true \maintain_unincluded_children false diff --git a/cc/spec.tex b/cc/spec.tex new file mode 100644 index 0000000..a320b4f --- /dev/null +++ b/cc/spec.tex @@ -0,0 +1,11 @@ +\usepackage{tikz} +\def\program#1#2{-- ++(1.5,0) -- ++(0,1) arc(-90:90:0.5) -- ++(-1.5,0) arc(90:270:0.5) -- ++(0,-1) ++(0.75,0.5) node{#2} ++(0,1) node{#1} ++(-0.75,-1.5)} +\def\translator#1#2#3{-- ++(1.5,0) -- ++(0,1) -- ++(0.7,0) -- ++(0,1) -- ++(-2.9,0) -- ++(0,-1) -- ++(0.7,0) -- ++(0,-1) ++(0,1.5) node{#1} ++(0.75,0) node{$\longrightarrow$} ++(0.75,0) node{#2} ++(-0.75,-1) node{#3} ++(-0.75,-0.5)} +\def\machine#1{-- ++(0.75,-0.5) -- ++(0.75,0.5) -- ++(0,1) -- ++(-1.5,0) -- ++(0,-1) ++(0.75,0.5) node{#1} ++(-0.75,-0.5)} +\def\run#1{++(0,1) #1 ++(0,-1)} +\def\runover#1{++(0,-1) \machine{#1} ++(0,1)} +\def\source#1{++(-2.2,1) #1 ++(2.2,-1)} +\def\object#1{++(2.2,1) #1 ++(-2.2,-1)} +\def\interpreter#1#2{-- ++(1.5,0) -- ++(0,2) -- ++(-1.5,0) -- ++(0,-2) ++(0.75,0.5) node{#2} ++(0,1) node{#1} ++(-0.75,-1.5)} +\def\interpret#1{++(0,2) #1 ++(0,-2)} +\def\nexttranslator#1{++(4.4,0) #1 ++(-4.4,0)} |
