Advertisement
Guest User

Python - VMTranslator

a guest
Apr 22nd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.00 KB | None | 0 0
  1.  self._CT_table = {'add': CT.C_ARITHMETIC,
  2.                           'sub': CT.C_ARITHMETIC,
  3.                           'neg': CT.C_ARITHMETIC,
  4.                           'eq': CT.C_ARITHMETIC,
  5.                           'gt': CT.C_ARITHMETIC,
  6.                           'lt': CT.C_ARITHMETIC,
  7.                           'and': CT.C_ARITHMETIC,
  8.                           'or': CT.C_ARITHMETIC,
  9.                           'not': CT.C_ARITHMETIC,
  10.                           'push': CT.C_PUSH,
  11.                           'pop': CT.C_POP,
  12.                           'label': CT.C_LABEL,
  13.                           'goto': CT.C_GOTO,
  14.                           'if-goto': CT.C_IF,
  15.                           'function': CT.C_FUNCTION,
  16.                           'call': CT.C_CALL,
  17.                           'return': CT.C_RETURN}
  18.  
  19. self.segments = {'local': 'LCL',
  20.                  'argument': 'ARG',
  21.                  'this': 'THIS',
  22.                  'that': 'THAT',
  23.                  'temp': '5'}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement