forked from IUCompilerCourse/Essentials-of-Compilation
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdefs.tex
34 lines (28 loc) · 1.04 KB
/
defs.tex
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
33
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newcommand{\itm}[1]{\ensuremath{\mathit{#1}}}
\newcommand{\Stmt}{\itm{stmt}}
\newcommand{\Exp}{\itm{exp}}
\newcommand{\Def}{\itm{def}}
\newcommand{\Type}{\itm{type}}
\newcommand{\FType}{\itm{ftype}}
\newcommand{\Instr}{\itm{instr}}
\newcommand{\Prog}{\itm{prog}}
\newcommand{\Arg}{\itm{arg}}
\newcommand{\Reg}{\itm{reg}}
\newcommand{\Int}{\itm{int}}
\newcommand{\Var}{\itm{var}}
\newcommand{\Op}{\itm{op}}
\newcommand{\key}[1]{\texttt{#1}}
\newcommand{\code}[1]{\texttt{#1}}
\newcommand{\READ}{(\key{read})}
\newcommand{\UNIOP}[2]{(\key{#1}~#2)}
\newcommand{\BINOP}[3]{(\key{#1}~#2~#3)}
\newcommand{\LET}[3]{(\key{let}~([#1\;#2])~#3)}
\newcommand{\ASSIGN}[2]{(\key{assign}~#1\;#2)}
\newcommand{\RETURN}[1]{(\key{return}~#1)}
\newcommand{\INT}[1]{(\key{int}\;#1)}
\newcommand{\REG}[1]{(\key{reg}\;#1)}
\newcommand{\VAR}[1]{(\key{var}\;#1)}
\newcommand{\STACKLOC}[1]{(\key{stack}\;#1)}
\newcommand{\IF}[3]{(\key{if}\,#1\;#2\;#3)}
\newcommand{\TTKEY}[1]{{\normalfont\tt #1}}