parse a line and return the remainder.
496540
function parseLine(line, lineno, options) {
	let command = null;
	const lineContinuationRegex = (options && options.lineContinuationRegex
		|| TOKEN_LINE_CONTINUATION);

	line = line.trim();

	if (!line) {
		// Ignore empty lines
		return { command: null, remainder: '' };
	}

	if (isComment(line)) {
		// Handle comment lines.
		command = { name: 'COMMENT', args: line, lineno: lineno };
		return { command: command, remainder: '' };
	}

	if (line.match(lineContinuationRegex)) {
		// Line continues on next line.
		const remainder = line.replace(lineContinuationRegex, '', 'g');
		return { command: null, remainder: remainder };
	}

	command = splitCommand(line);
	command.lineno = lineno;

	let commandParserFn = commandParsers[command.name];
	if (!commandParserFn) {
		// Invalid Dockerfile instruction, but allow it and move on.
		// log.debug('Invalid Dockerfile command:', command.name);
		commandParserFn = parseString;
	}

	if (commandParserFn(command)) {
		// Successfully converted the arguments.
		command.raw = line;
		delete command.rest;
	}

	return { command: command, remainder: '' };
}
865038
def parse(self, ascii_listing):
        
        self.parsed_lines = ParsedBASIC()
        for match in self.regex_line_no.finditer(ascii_listing):
            log.info("_" * 79)
            log.info("parse line >>>%r<<<", match.group())
            line_no = int(match.group("no"))
            line_content = match.group("content")

            self.line_data = []
            self._parse_code(line_content)
            log.info("*** line %s result: %r", line_no, self.line_data)

            self.parsed_lines[line_no] = self.line_data

        return self.parsed_lines
242386
def parse (cls, line, lineno, log, cmddict=None):
    
    delay = -1
    token = line.split()[0]
    start = line.find(token)
    pos   = SeqPos(line, lineno, start + 1, start + len(token))

    try:
      delay = float(token)
    except ValueError:
      msg = 'String "%s" could not be interpreted as a numeric time delay.'
      log.error(msg % token, pos)

    return cls(delay, pos)
1253905
def parse_lines(self, lines: Iterable[str]) -> List[ParseResults]:
        """"""
        return [
            self.parseString(line, line_number)
            for line_number, line in enumerate(lines)
        ]
290782
def parse(self, string, evaluate_result=True):
        '''
        '''
        m = self._match_re.match(string)
        if m is None:
            return None

        if evaluate_result:
            return self.evaluate_result(m)
        else:
            return Match(self, m)
1092535
def parse(line)
      line = line.dup
      match = /^([A-Z]+)(\b|$)/.match(line)
      cmd = match && match[0]

      return nil unless cmd

      # strip off the command and any whitespace
      line.sub! /^#{cmd}\s*/, ""

      args = []
      until line.empty? do
        line =~ /^(\S+)(\s|$)/
        if $1
          if $1.start_with?(":")
            args << line[1..-1]
            break
          else
            args << $1
            line = line[$1.size..-1]
            line = line.sub(/^\s+/,"")
          end
        else
          break
        end
      end

      return {cmd.downcase.to_sym => args }
    end
13565
def readline(self):
        """"""
        line = self.file.readline()
        if self.grammar and line:
            try:
                return self.grammar.parseString(line).asDict()
            except ParseException:
                return self.readline()
        else:
            return line
821702
def _line_parse(line):
    
    if line[-2:] in ['\r\n', b'\r\n']:
        return line[:-2], True
    elif line[-1:] in ['\r', '\n', b'\r', b'\n']:
        return line[:-1], True
    return line, False
1029967
def parse_sam(sam, qual):
    
    for line in sam:
        if line.startswith('@'):
            continue
        line = line.strip().split()
        if int(line[4]) == 0 or int(line[4]) < qual:
            continue
        yield line
418054
def parse(self, line, **options):
        
        line = line.strip()
        if not line:
            return (False, (), {})
        split = line.split()
        cmd, args = split[0], split[1:]
        return (cmd, args, {})
695373
def read_line(self, sep=six.b('\n')):
        
        start = 0
        while not self._stream.closed:
            loc = self._buffer.find(sep, start)
            if loc >= 0:
                return self._pop(loc + len(sep))
            else:
                start = len(self._buffer)
            self._buffer += self._stream.read(self._chunk_size)
        return six.b('')
173045
def parse(self, lines):
    

    if isinstance(lines, str):
      lines = lines.split('\n')
    sub = _re.sub
    for line in lines:
      if line.endswith('\n'):
        line = line[:-1]
      line = line.lstrip()
      if not line.startswith('#'):
        invert = False
        if line.startswith('!'):
          line = line[1:]
          invert = True
        while line.endswith(' ') and line[-2:] != '\ ':
          line = line[:-1]
        line = sub(r'\\([!# ])', r'\1', line)
        if '/' in line and not line.startswith('/'):
          # Patterns with a slash can only be matched absolute.
          line = '/' + line
        self.patterns.append(Pattern(line, invert))
491779
def readline(self, f):
        """"""
        while True:
            line = f.readline()
            if len(line) == 0:
                raise EOFError
            line = line[:line.find('#')]
            line = line.strip()
            if len(line) > 0:
                return line
100667
function parseProgressLine(line) {
  var progress = {};

  // Remove all spaces after = and trim
  line  = line.replace(/=\s+/g, '=').trim();
  var progressParts = line.split(' ');

  // Split every progress part by "=" to get key and value
  for(var i = 0; i < progressParts.length; i++) {
    var progressSplit = progressParts[i].split('=', 2);
    var key = progressSplit[0];
    var value = progressSplit[1];

    // This is not a progress line
    if(typeof value === 'undefined')
      return null;

    progress[key] = value;
  }

  return progress;
}
1051027
function parsePart( str ){

    if ( str ){
        return getFullLines( str ).reduce( getDict, {} );
    } else {
        return {};
    }

    function getDict( r, line ){

        if ( line.indexOf( ":" ) === -1 ){
            r[line] =           line;
        } else {
            line =              line.split( ":" );
            r[line.shift().trim()] =   line.join( ":" ).trim();
        }

        return r;
    }///
}
763365
def split_call(lines, open_paren_line=0):
    """"""
    num_open = 0
    num_closed = 0
    for i, line in enumerate(lines):
        c = line.count('(')
        num_open += c
        if not c and i==open_paren_line:
            raise Exception('Exception open parenthesis in line %d but there is not one there: %s' % (i, str(lines)))
        num_closed += line.count(')')

        if num_open == num_closed:
            return (lines[:i+1], lines[i+1:])

    print(''.join(lines))
    raise Exception('parenthesis are mismatched (%d open, %d closed found)' % (num_open, num_closed))
465995
def parse_output(self, line):
        """"""

        try:
            key, value = line.split(":")
            self.update_value(key.strip(), value.strip())
        except ValueError:
            pass