syck_parser_read
161418
public int read() throws java.io.IOException {
        int len = 0;
        int skip = 0;
        
        switch(io_type) {
        case Str:
            skip = moveTokens();
            len = ((JechtIO.Str)io).read.read(buffer, ((JechtIO.Str)io), YAML.BUFFERSIZE-1, skip);
            break;
        case File:
            skip = moveTokens();
            len = ((JechtIO.File)io).read.read(buffer, ((JechtIO.File)io), YAML.BUFFERSIZE-1, skip);
            break;
        default:
            break;
        }
        checkLimit(len);
        return len;
    }
1347147
def p_read(p):
    
    gl.DATA_IS_USED = True
    reads = []

    if p[2] is None:
        return

    for arg in p[2]:
        entry = arg.value
        if entry is None:
            p[0] = None
            return

        if isinstance(entry, symbols.VARARRAY):
            api.errmsg.syntax_error(p.lineno(1), "Cannot read '%s'. It's an array" % entry.name)
            p[0] = None
            return

        if isinstance(entry, symbols.VAR):
            if entry.class_ != CLASS.var:
                api.errmsg.syntax_error_cannot_assing_not_a_var(p.lineno(2), entry.name)
                p[0] = None
                return

            entry.accessed = True
            if entry.type_ == TYPE.auto:
                entry.type_ = _TYPE(gl.DEFAULT_TYPE)
                api.errmsg.warning_implicit_type(p.lineno(2), p[2], entry.type_)

            reads.append(make_sentence('READ', entry))
            continue

        if isinstance(entry, symbols.ARRAYLOAD):
            reads.append(make_sentence('READ', symbols.ARRAYACCESS(entry.entry, entry.args, entry.lineno)))
            continue

        api.errmsg.syntax_error(p.lineno(1), "Syntax error. Can only read a variable or an array element")
        p[0] = None
        return

    p[0] = make_block(*reads)
1318416
def _read_until(infile=sys.stdin, maxchars=20, end=RS):
    '''   '''
    chars = []
    read = infile.read
    if not isinstance(end, tuple):
        end = (end,)

    # count down, stopping at 0
    while maxchars:
        char = read(1)
        if char in end:
            break
        chars.append(char)
        maxchars -= 1

    return ''.join(chars)
1270287
def read(message):
    """"""
    require_compatible_version(message.physt_compatible)

    # Currently the only implementation
    a_dict = _dict_from_v0342(message)
    return create_from_dict(a_dict, "Message")
425298
def sym_reads_new_config(self, newDir, sym=False, mv=False):
        """"""
        newParams = copy.copy(self)
        for i in range(0,len(self.params["lib_seq"])):
            lib_seq = self.params["lib_seq"][i]
            #update the glob
            newParams.params["lib_seq"][i]["globs"] = [os.path.join(
                newDir,os.path.basename(x)) for x in lib_seq["globs"]]
            #now update the file paths and move/symlink if necessary
            for j in range(0, len(lib_seq["pairs"])):
                forward, reverse = lib_seq["pairs"][j]
                new_forward = os.path.join(newDir, os.path.basename(forward))
                new_reverse = os.path.join(newDir, os.path.basename(reverse))
                #move or symlink the files
                if sym:
                    for each in [new_forward, new_reverse]:
                        if os.path.exists(each):
                            raise ValueError("""Attempted to make a symlink for
                            a reads file, but it already exists. Chances are
                            that you used the same reads for two lines in the
                            Meraculous config file""")
                    os.symlink(forward, new_forward)
                    os.symlink(reverse, new_reverse)
                #update the reads in the new config
                newParams.params["lib_seq"][i]["pairs"][j] = [new_forward, new_reverse]
        return newParams
75027
def _read(self):
        
        stream = self.path.read_text()
        data = yaml.load(stream)
        return data
1168968
def parser_from_buffer(cls, fp):
        """"""
        yaml = YAML(typ="safe")
        return cls(yaml.load(fp))
805218
def read(src):
	''
	parser, buff_agg = Parser(), ''
	while True:
		buff = parser.read(src)
		if not buff: break # EOF
		buff_agg += buff
		while True:
			buff_agg, ev = parser.process(buff_agg)
			if ev is None: break
			yield ev
10668
def read_symbol
      logger.debug "  read symbol"
      skip_whitespace
      r = ""
      while !empty? && (c = text[position]) =~ /[-a-zA-Z_0-9]/
        r << c
        increase
      end
      s = STRING_TO_TOKEN[r]
      s = r.to_sym unless s
      s = true if s == :true
      s = false if s == :false
      logger.debug "  resulting symbol: #{s}"
      s
    end
1081091
def _read_single(parser, filepath):
    
    from os import path
    global packages
    if path.isfile(filepath):
        parser.readfp(open(filepath))
1115278
def Read(f):
  
  try:
    yaml_data = yaml.load(f)
  except yaml.YAMLError as e:
    raise ParseError('%s' % e)
  except IOError as e:
    raise YAMLLoadError('%s' % e)

  _CheckData(yaml_data)

  try:
    return Config(
        yaml_data.get('blacklist', ()),
        yaml_data.get('whitelist', ('*')))
  except UnicodeDecodeError as e:
    raise YAMLLoadError('%s' % e)
543952
def read(self, num_bytes, debug_info=None):
        
        if self.debug:
            if not debug_info:
                debug_info = str(num_bytes)
            sys.stderr.write("%s: READING %s\n" %(
                    self.__class__.__name__,
                    debug_info
                    ))
        res = self.ser.read(num_bytes)
        if self.debug:
            sys.stderr.write("%s: READ %i:\n%s\n" %(
                    self.__class__.__name__,
                    len(res),
                    pyhsm.util.hexdump(res)
                    ))
        self.num_read_bytes += len(res)
        return res
1279367
def _load_sym(sym, logger=logging):
    """"""
    if isinstance(sym, str):  # sym is a symbol file path
        cur_path = os.path.dirname(os.path.realpath(__file__))
        symbol_file_path = os.path.join(cur_path, sym)
        logger.info('Loading symbol from file %s' % symbol_file_path)
        return sym_load(symbol_file_path)
    elif isinstance(sym, Symbol):
        return sym
    else:
        raise ValueError('_load_sym only accepts Symbol or path to the symbol file,'
                         ' while received type %s' % str(type(sym)))
457950
def read_stdin(self):
        
        text = sys.stdin.read()

        # Decode the bytes returned from earlier Python STDIN implementations
        if sys.version_info[0] < 3 and text is not None:
            text = text.decode(sys.stdin.encoding or 'utf-8')

        return text
1236257
def read(self, *args, **kwargs):
        
        buf = io.BufferedReader.read(self, *args, **kwargs)
        self.increment(len(buf))
        return buf
925391
def __parse(self) -> object:
        """"""
        char = self.data[self.idx: self.idx + 1]
        if char in [b'1', b'2', b'3', b'4', b'5', b'6', b'7', b'8', b'9', b'0']:
            str_len = int(self.__read_to(b':'))
            return self.__read(str_len)
        elif char == b'i':
            self.idx += 1
            return int(self.__read_to(b'e'))
        elif char == b'd':
            return self.__parse_dict()
        elif char == b'l':
            return self.__parse_list()
        elif char == b'':
            raise bencodepy.DecodingError('Unexpected End of File at index position of {0}.'.format(str(self.idx)))
        else:
            raise bencodepy.DecodingError(
                'Invalid token character ({0}) at position {1}.'.format(str(char), str(self.idx)))
1325953
def can_read(self, timeout=0):
        ""
        sock = self._sock
        if not sock:
            self.connect()
            sock = self._sock
        return self._parser.can_read() or \
            bool(select([sock], [], [], timeout)[0])