Try : TRY COLON Terminator Block Catch
        | TRY COLON Terminator Block Catch FINALLY COLON Terminator Block

def p_Try(p):
    '''
    Try : TRY COLON Terminator Block Catch
        | TRY COLON Terminator Block Catch FINALLY COLON Terminator Block
    '''
    if len(p) <= 6:
        p[0] = Try(p[3], p[4], p[5], None, None)
    else:
        p[0] = Try(p[3], p[4], p[5], p[8], p[9])