Process one line from the text format question section.
9311
def _question_line(self, section):
        """"""

        token = self.tok.get(want_leading = True)
        if not token.is_whitespace():
            self.last_name = dns.name.from_text(token.value, None)
        name = self.last_name
        token = self.tok.get()
        if not token.is_identifier():
            raise dns.exception.SyntaxError
        # Class
        try:
            rdclass = dns.rdataclass.from_text(token.value)
            token = self.tok.get()
            if not token.is_identifier():
                raise dns.exception.SyntaxError
        except dns.exception.SyntaxError:
            raise dns.exception.SyntaxError
        except Exception:
            rdclass = dns.rdataclass.IN
        # Type
        rdtype = dns.rdatatype.from_text(token.value)
        self.message.find_rrset(self.message.question, name,
                                rdclass, rdtype, create=True,
                                force_unique=True)
        if self.updating:
            self.zone_rdclass = rdclass
        self.tok.get_eol()
1205516
def _parse_line(line=''):
    '''
    
    '''
    parts = line.split()
    key = parts.pop(0)
    value = ' '.join(parts)
    return key, value
247304
def _get_from(self, required_for=None):
        """"""
        line = self.next_line()
        if line is None:
            return None
        elif line.startswith(b'from '):
            return line[len(b'from '):]
        elif required_for:
            self.abort(errors.MissingSection, required_for, 'from')
        else:
            self.push_line(line)
            return None
717033
boolean scanSingleLineComment() {
		while (true) {
			switch (state) {
			case 100:
				if (peek() == '#' && next() == '#' && next() == '#') {
					state = 101;
					continue ;
				}
				return fail();
			case 101:
				for (char c=next(); true; c=next()) {
					if (c == '\n') {
						if (deletePreviousTextTokenBlankTails()) {
							return prepareNextScan(1);
						} else {
							return prepareNextScan(0);
						}
					}
					if (c == EOF) {
						deletePreviousTextTokenBlankTails();
						return prepareNextScan(0);
					}
				}
			default :
				return fail();
			}
		}
	}
379262
def process_line(self, record):
        ""
        cleaned = []

        for key in self.vcf_fields:
            out = self.process_column(key, getattr(record, key))
            if isinstance(out, (list, tuple)):
                cleaned.extend(out)
            else:
                cleaned.append(out)

        for key in self.info_fields:
            out = self.process_column(key, record.INFO.get(key, None))
            if isinstance(out, (list, tuple)):
                cleaned.extend(out)
            else:
                cleaned.append(out)

        return cleaned
838762
def chunk(line, mapping={None: 'text', '${': 'escape', '#{': 'bless', '&{': 'args', '%{': 'format', '@{': 'json'}):
	
	
	skipping = 0  # How many closing parenthesis will we need to skip?
	start = None  # Starting position of current match.
	last = 0
	
	i = 0
	
	text = line.line
	
	while i < len(text):
		if start is not None:
			if text[i] == '{':
				skipping += 1
			
			elif text[i] == '}':
				if skipping:
					skipping -= 1
				else:
					yield line.clone(kind=mapping[text[start-2:start]], line=text[start:i])
					start = None
					last = i = i + 1
					continue
		
		elif text[i:i+2] in mapping:
			if last is not None and last != i:
				yield line.clone(kind=mapping[None], line=text[last:i])
				last = None
			
			start = i = i + 2
			continue
		
		i += 1
	
	if last < len(text):
		yield line.clone(kind=mapping[None], line=text[last:])
280159
def readline(self, size=-1):
        ""
        line = self.fin.readline()
        if not line:
            return ''
        return self.process_line(line.rstrip('\n'))
158179
def process(self, line):
        ''''''
        self.raw = self.raw + line
        try:
            if not line[-1] == self.eol_char:
                # Should always be here, but add it just in case.
                line = line + self.eol_char
        except IndexError:
            # Thrown if line == ''
            line = self.eol_char
                
        for char in line:
            if char == self.escape_char:
                # Always handle escaped characters.
                self.last_process_char = self.process_char
                self.process_char = self.process_escape
                continue
            self.process_char(char)
        if not self.complete:
            # Ask for more.
            self.process( self.handler.readline(prompt=self.handler.CONTINUE_PROMPT) )
137194
def _read_parsed(self, lines):
        
        self.log(u"Parsing fragments from parsed text format")
        pairs = []
        for line in lines:
            pieces = line.split(gc.PARSED_TEXT_SEPARATOR)
            if len(pieces) == 2:
                identifier = pieces[0].strip()
                text = pieces[1].strip()
                if len(identifier) > 0:
                    pairs.append((identifier, [text]))
        self._create_text_fragments(pairs)
190866
def _process_data(self, line):
        
        skip = False
        if self._raw_data:
            return skip, line
        line = unicode_(line)
        if not line:
            if (self._options.get('heartbeat', False) and
                    self._options.get('feed') in ('continuous', 'longpoll') and
                    not self._last_seq):
                line = None
            else:
                skip = True
        elif line in ('{"results":[', '],'):
            skip = True
        elif line[-1] == ',':
            line = line[:-1]
        elif line[:10] == ('"last_seq"'):
            line = '{' + line
        try:
            if line:
                data = json.loads(line)
                if data.get('last_seq'):
                    self._last_seq = data['last_seq']
                    skip = True
            else:
                data = None
        except ValueError:
            data = {"error": "Bad JSON line", "line": line}
        return skip, data
1055322
def process_data(self, text, colsep=u"\t", rowsep=u"\n",
                     transpose=False, skiprows=0, comments='#'):
        """"""
        data = self._shape_text(text, colsep, rowsep, transpose, skiprows,
                                comments)
        self._model = PreviewTableModel(data)
        self.setModel(self._model)
338893
def parse(text) -> Optional['Response']:
        """"""

        # Trim the start and end markers, and ensure only lowercase is used
        if text.startswith(MARKER_START) and text.endswith(MARKER_END):
            text = text[1:len(text)-1].lower()

        # No-op; can just ignore these
        if not text:
            return None

        if text.startswith(CMD_DATETIME):
            return DateTimeResponse(text)

        elif text.startswith(CMD_OPMODE):
            return OpModeResponse(text)

        elif text.startswith(CMD_DEVBYIDX_PREFIX):
            if RESPONSE_ERROR == text[2:] or text[2:4] == '00':
                return DeviceNotFoundResponse(text)
            return DeviceInfoResponse(text)

        elif text.startswith(CMD_DEVICE_PREFIX):
            action = next((a for a in [ACTION_ADD, ACTION_DEL, ACTION_SET]
                           if a == text[2:3]), ACTION_NONE)
            args = text[2+len(action):]
            if RESPONSE_ERROR == args:
                return DeviceNotFoundResponse(text)
            elif action == ACTION_ADD:
                if not args:
                    return DeviceAddingResponse(text)
                return DeviceAddedResponse(text)
            elif action == ACTION_SET:
                return DeviceChangedResponse(text)
            elif action == ACTION_DEL:
                return DeviceDeletedResponse(text)
            else:
                return DeviceInfoResponse(text)

        elif text.startswith(CMD_CLEAR_STATUS):
            return ClearedStatusResponse(text)

        elif text.startswith(CMD_ROMVER):
            return ROMVersionResponse(text)

        elif text.startswith(CMD_EXIT_DELAY):
            return ExitDelayResponse(text)

        elif text.startswith(CMD_ENTRY_DELAY):
            return EntryDelayResponse(text)

        elif text.startswith(CMD_SWITCH_PREFIX) and is_ascii_hex(text[1:2]):
            return SwitchResponse(text)

        elif text.startswith(CMD_EVENT_LOG):
            if RESPONSE_ERROR == text[2:]:
                return EventLogNotFoundResponse(text)
            return EventLogResponse(text)

        elif text.startswith(CMD_SENSOR_LOG):
            if RESPONSE_ERROR == text[2:]:
                return SensorLogNotFoundResponse(text)
            return SensorLogResponse(text)

        else:
            raise ValueError("Response not recognised: " + text)
105931
def process_Text( self, text, **kwargs ):
        ''' 
        ''' 
        mrf_lines = convert_Text_to_mrf( text )
        return self.process_mrf_lines( mrf_lines, **kwargs )
117244
void skipLine() {
        int ch;
        do {
            try {
                ch = reader.read();
            } catch( IOException ex ) {
                throw new LessException( ex );
            }
            incLineColumn( ch );
        } while( ch != '\n' && ch != -1 );
    }
167459
def RetryQuestion(question_text, output_re="", default_val=None):
  """"""
  while True:
    if default_val is not None:
      new_text = "%s [%s]: " % (question_text, default_val)
    else:
      new_text = "%s: " % question_text
    # pytype: disable=wrong-arg-count
    output = builtins.input(new_text) or str(default_val)
    # pytype: enable=wrong-arg-count
    output = output.strip()
    if not output_re or re.match(output_re, output):
      break
    else:
      print("Invalid input, must match %s" % output_re)
  return output
19872
def process(self, stream):
        """"""
        EOS_TTYPE = T.Whitespace, T.Comment.Single

        # Run over all stream tokens
        for ttype, value in stream:
            # Yield token if we finished a statement and there's no whitespaces
            # It will count newline token as a non whitespace. In this context
            # whitespace ignores newlines.
            # why don't multi line comments also count?
            if self.consume_ws and ttype not in EOS_TTYPE:
                yield sql.Statement(self.tokens)

                # Reset filter and prepare to process next statement
                self._reset()

            # Change current split level (increase, decrease or remain equal)
            self.level += self._change_splitlevel(ttype, value)

            # Append the token to the current statement
            self.tokens.append(sql.Token(ttype, value))

            # Check if we get the end of a statement
            if self.level <= 0 and ttype is T.Punctuation and value == ';':
                self.consume_ws = True

        # Yield pending statement (if any)
        if self.tokens:
            yield sql.Statement(self.tokens)
285817
def from_text(self, line, line_index, column, is_escaped):
        """"""
        begin = self._begin
        end = self._end
        single = self._single

        single_len = len(single)
        start_len = len(begin)

        if _token_at_col_in_line(line, column, single, single_len):
            return (STATE_IN_COMMENT,
                    (line_index, column + single_len),
                    ParserState.EOL)
        elif _token_at_col_in_line(line, column, begin, start_len):
            return (STATE_IN_COMMENT,
                    (line_index, column + single_len),
                    end)
        elif ((_token_at_col_in_line(line, column, "\"") or
               _token_at_col_in_line(line, column, "'")) and
              not _is_escaped(line, column, is_escaped)):
            # Check here to see whether this is a quote or if this
            # is a spellcheckable line
            if (_token_at_col_in_line(line, column, "\"\"\"") or
                    _token_at_col_in_line(line, column, "'''")):
                return (STATE_IN_COMMENT,
                        (line_index, column + 3),
                        line[column:column + 3])
            else:
                return (STATE_IN_QUOTE,
                        (line_index, column + 1),
                        line[column:column + 1])

        return (STATE_IN_TEXT,
                (0, 0),
                None)