defs.tex 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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{\FType}{\itm{ftype}}
  8. \newcommand{\Instr}{\itm{instr}}
  9. \newcommand{\Block}{\itm{block}}
  10. \newcommand{\Tail}{\itm{tail}}
  11. \newcommand{\Prog}{\itm{prog}}
  12. \newcommand{\Arg}{\itm{arg}}
  13. \newcommand{\Reg}{\itm{reg}}
  14. \newcommand{\Int}{\itm{int}}
  15. \newcommand{\Var}{\itm{var}}
  16. \newcommand{\Op}{\itm{op}}
  17. \newcommand{\key}[1]{\texttt{#1}}
  18. \newcommand{\code}[1]{\texttt{#1}}
  19. \newcommand{\READ}{\key{(Prim}\;\code{'read}\;\key{'())}}
  20. \newcommand{\NEG}[1]{\key{(Prim}\;\code{'-}\;\code{(list}\;#1\;\code{))}}
  21. \newcommand{\PROGRAM}[2]{\code{(Program}\;#1\;#2\code{)}}
  22. \newcommand{\ADD}[2]{\key{(Prim}\;\code{'+}\;\code{(list}\;#1\;#2\code{))}}
  23. \newcommand{\UNIOP}[2]{(\key{#1}~#2)}
  24. \newcommand{\BINOP}[3]{(\key{#1}~#2~#3)}
  25. \newcommand{\LET}[3]{(\key{let}~([#1\;#2])~#3)}
  26. \newcommand{\ASSIGN}[2]{(\key{assign}~#1\;#2)}
  27. \newcommand{\RETURN}[1]{(\key{return}~#1)}
  28. \newcommand{\INT}[1]{\key{(Int}\;#1\key{)}}
  29. \newcommand{\REG}[1]{\key{(Reg}\;#1\key{)}}
  30. \newcommand{\VAR}[1]{\key{(Var}\;#1\key{)}}
  31. \newcommand{\STACKLOC}[1]{(\key{stack}\;#1)}
  32. \newcommand{\IF}[3]{(\key{if}\,#1\;#2\;#3)}
  33. \newcommand{\TTKEY}[1]{{\normalfont\tt #1}}