Exemplo n.º 1
0
def p_instrucciones_lista(t):
    'instrucciones :  instrucciones instruccion '
    t[0] = t[1]
    t[0].agregar(t[2])
    global Ts
    Ts.nueva_instruaccion(t[2])
    Ts.rp_nuevo_nodo('instrucciones :  instrucciones instruccion ', "t[0] = Etiqueta(t[3], t[1])")
Exemplo n.º 2
0
def p_instrucciones_lista_sin_recursividad(t):
    'instruccionesp : instruccion instruccionesp'
    t[0] = t[2]
    t[0].lst.insert(0, t[1])
    global Ts
    Ts.nueva_instruaccion(t[1])

    Ts.rp_nuevo_nodo('instruccionesp : instruccion instruccionesp',
                     "t[0] = t[2] \n t[0].lst.insert(0, t[1])")