(p)
ref_type : IDENTIFIER
ref_type : IDENTIFIER
ref_type : IDENTIFIER
def p_ref_type(p):
    '''ref_type : IDENTIFIER'''
    ref_type = thrift_stack[-1]

    for name in p[1].split('.'):
        ref_type = getattr(ref_type, name, None)
        if ref_type is None:
            raise ThriftParserError('No type found: %r, at line %d' %
                                    (p[1], p.lineno(1)))

    if hasattr(ref_type, '_ttype'):
        p[0] = getattr(ref_type, '_ttype'), ref_type
    else:
        p[0] = ref_type
def p_ref_type ( p ) : ref_type = thrift_stack [ - 1 ] for name in p [ 1 ] . split ( '.' ) : ref_type = getattr ( ref_type , name , None ) if ref_type is None : raise ThriftParserError ( 'No type found: %r, at line %d' % ( p [ 1 ] , p . lineno ( 1 ) ) ) if hasattr ( ref_type , '_ttype' ) : p [ 0 ] = getattr ( ref_type , '_ttype' ) , ref_type else : p [ 0 ] = ref_type