import symbol2


# Corresponds to 4 operand instructions
# x is multiply and * is dereference
type_4 = ['+', '-', 'x', '/', '%', '&', '|', '^', '==', '<', '>', '!=', '<=', '>=']

# Corresponds to 3 operand instructions
type_3 = ['=', '+=', '-=', 'x=', '&=',
          '|=', '^=', '<<=', '>>=',
           'ifgoto', 'callint', 'load', 'store', 'array', 'pload', 'addr']

# Corresponds to 2 operand instructions
type_2 = ['++', '!', '--', 'label', 'printint', 'printstr', 'scan', 'callvoid', 'goto', 'retint', 'push', 'pop']

type_1 = ['retvoid']

instr_types = type_4 + type_3 + type_2 + type_1

# Symbol Table object
ST = symbol2.symbolTable()

# IR instructions list
ir = []

# Register Descriptor
regDes = {
    'esp': None,
    'ebp': None,
    'eax': None,
    'ebx': None,
    'ecx': None,
    'edx': None,
    'esi': None,
    'edi': None
}
   #  'r8D': None,
   #  'r9D': None,
   #  'r10D': None,
   #  'r11D': None,
   #  'r12D': None,
   #  'r13D': None,
   #  'r14D': None,
   #  'r15D': None

# Address Descriptor
addrDes = {}

# Stack of symbols to keep track of the function return variables, implemented through list.
stack = []

def check_int(s):
    if s[0] in ('-', '+'):
        return s[1:].isdigit()
    return s.isdigit()


e44e08fab3ea04dcea05b900c6163cfb4545eb94
<mask token>

<mask token>


def check_int(s):
    if s[0] in ('-', '+'):
        return s[1:].isdigit()
    return s.isdigit()

<mask token>
type_4 = ['+', '-', 'x', '/', '%', '&', '|', '^', '==', '<', '>', '!=',
    '<=', '>=']
type_3 = ['=', '+=', '-=', 'x=', '&=', '|=', '^=', '<<=', '>>=', 'ifgoto',
    'callint', 'load', 'store', 'array', 'pload', 'addr']
type_2 = ['++', '!', '--', 'label', 'printint', 'printstr', 'scan',
    'callvoid', 'goto', 'retint', 'push', 'pop']
type_1 = ['retvoid']
instr_types = type_4 + type_3 + type_2 + type_1
ST = symbol2.symbolTable()
ir = []
regDes = {'esp': None, 'ebp': None, 'eax': None, 'ebx': None, 'ecx': None,
    'edx': None, 'esi': None, 'edi': None}
addrDes = {}
stack = []


def check_int(s):
    if s[0] in ('-', '+'):
        return s[1:].isdigit()
    return s.isdigit()

import symbol2
type_4 = ['+', '-', 'x', '/', '%', '&', '|', '^', '==', '<', '>', '!=',
    '<=', '>=']
type_3 = ['=', '+=', '-=', 'x=', '&=', '|=', '^=', '<<=', '>>=', 'ifgoto',
    'callint', 'load', 'store', 'array', 'pload', 'addr']
type_2 = ['++', '!', '--', 'label', 'printint', 'printstr', 'scan',
    'callvoid', 'goto', 'retint', 'push', 'pop']
type_1 = ['retvoid']
instr_types = type_4 + type_3 + type_2 + type_1
ST = symbol2.symbolTable()
ir = []
regDes = {'esp': None, 'ebp': None, 'eax': None, 'ebx': None, 'ecx': None,
    'edx': None, 'esi': None, 'edi': None}
addrDes = {}
stack = []


def check_int(s):
    if s[0] in ('-', '+'):
        return s[1:].isdigit()
    return s.isdigit()

import symbol2


# Corresponds to 4 operand instructions
# x is multiply and * is dereference
type_4 = ['+', '-', 'x', '/', '%', '&', '|', '^', '==', '<', '>', '!=', '<=', '>=']

# Corresponds to 3 operand instructions
type_3 = ['=', '+=', '-=', 'x=', '&=',
          '|=', '^=', '<<=', '>>=',
           'ifgoto', 'callint', 'load', 'store', 'array', 'pload', 'addr']

# Corresponds to 2 operand instructions
type_2 = ['++', '!', '--', 'label', 'printint', 'printstr', 'scan', 'callvoid', 'goto', 'retint', 'push', 'pop']

type_1 = ['retvoid']

instr_types = type_4 + type_3 + type_2 + type_1

# Symbol Table object
ST = symbol2.symbolTable()

# IR instructions list
ir = []

# Register Descriptor
regDes = {
    'esp': None,
    'ebp': None,
    'eax': None,
    'ebx': None,
    'ecx': None,
    'edx': None,
    'esi': None,
    'edi': None
}
   #  'r8D': None,
   #  'r9D': None,
   #  'r10D': None,
   #  'r11D': None,
   #  'r12D': None,
   #  'r13D': None,
   #  'r14D': None,
   #  'r15D': None

# Address Descriptor
addrDes = {}

# Stack of symbols to keep track of the function return variables, implemented through list.
stack = []

def check_int(s):
    if s[0] in ('-', '+'):
        return s[1:].isdigit()
    return s.isdigit()

