Esempio n. 1
0
def p_param_decl(p):
    'param_decl : var_type id'
    symboltable.decl(p[2],p[1],0)
Esempio n. 2
0
def p_var_decl(p):
    'var_decl : var_type id_list SEMICOLON'
    for i in p[2]:
        symboltable.decl(i,p[1], 0)
Esempio n. 3
0
def p_string_decl(p):
    'string_decl : STRING id ASSIGN str SEMICOLON'
#    symbolTable[p[2]][p[4]] = (p[1],symbolTableInUse)
    symboltable.decl(p[2],p[1],p[4])
def p_param_decl(p):
    'param_decl : var_type id'
    symboltable.decl(p[2], p[1], 0)
def p_var_decl(p):
    'var_decl : var_type id_list SEMICOLON'
    for i in p[2]:
        symboltable.decl(i, p[1], 0)
def p_string_decl(p):
    'string_decl : STRING id ASSIGN str SEMICOLON'
    #    symbolTable[p[2]][p[4]] = (p[1],symbolTableInUse)
    symboltable.decl(p[2], p[1], p[4])