(p)
const : CONST field_type IDENTIFIER '=' const_value
             | CONST field_type IDENTIFIER '=' const_value sep
const : CONST field_type IDENTIFIER '=' const_value
             | CONST field_type IDENTIFIER '=' const_value sep
const : CONST field_type IDENTIFIER = const_value | CONST field_type IDENTIFIER = const_value sep
def p_const(p):
    '''const : CONST field_type IDENTIFIER '=' const_value
             | CONST field_type IDENTIFIER '=' const_value sep'''

    try:
        val = _cast(p[2])(p[5])
    except AssertionError:
        raise ThriftParserError('Type error for constant %s at line %d' %
                                (p[3], p.lineno(3)))
    setattr(thrift_stack[-1], p[3], val)
    _add_thrift_meta('consts', val)
def p_const ( p ) : try : val = _cast ( p [ 2 ] ) ( p [ 5 ] ) except AssertionError : raise ThriftParserError ( 'Type error for constant %s at line %d' % ( p [ 3 ] , p . lineno ( 3 ) ) ) setattr ( thrift_stack [ - 1 ] , p [ 3 ] , val ) _add_thrift_meta ( 'consts' , val )