defs.tex 1.0 KB

123456789101112131415161718192021222324252627282930313233
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. \newcommand{\itm}[1]{\ensuremath{\mathit{#1}}}
  3. \newcommand{\Stmt}{\itm{stmt}}
  4. \newcommand{\Exp}{\itm{exp}}
  5. \newcommand{\Def}{\itm{def}}
  6. \newcommand{\Type}{\itm{type}}
  7. \newcommand{\Instr}{\itm{instr}}
  8. \newcommand{\Prog}{\itm{prog}}
  9. \newcommand{\Arg}{\itm{arg}}
  10. \newcommand{\Reg}{\itm{reg}}
  11. \newcommand{\Int}{\itm{int}}
  12. \newcommand{\Var}{\itm{var}}
  13. \newcommand{\Op}{\itm{op}}
  14. \newcommand{\key}[1]{\texttt{#1}}
  15. \newcommand{\code}[1]{\texttt{#1}}
  16. \newcommand{\READ}{(\key{read})}
  17. \newcommand{\UNIOP}[2]{(\key{#1}~#2)}
  18. \newcommand{\BINOP}[3]{(\key{#1}~#2~#3)}
  19. \newcommand{\LET}[3]{(\key{let}~([#1\;#2])~#3)}
  20. \newcommand{\ASSIGN}[2]{(\key{assign}~#1\;#2)}
  21. \newcommand{\RETURN}[1]{(\key{return}~#1)}
  22. \newcommand{\INT}[1]{(\key{int}\;#1)}
  23. \newcommand{\REG}[1]{(\key{reg}\;#1)}
  24. \newcommand{\VAR}[1]{(\key{var}\;#1)}
  25. \newcommand{\STACKLOC}[1]{(\key{stack}\;#1)}
  26. \newcommand{\IF}[3]{(\key{if}\,#1\;#2\;#3)}
  27. \newcommand{\TTKEY}[1]{{\normalfont\tt #1}}