This interprets a raw line from the aliases file.
14071
def interpret(line)
      # is it a comment?
      return nil if line.strip.start_with?("#")

      keyword, command = line.split("=", 2).collect(&:strip)

      # validate the keyword
      if keyword.match(/\s/i)
        raise Errors::AliasInvalidError, alias: line, message: "Alias keywords must not contain any whitespace."
      end

      [keyword, command]
    end
130605
def parse_data_line(self, line):
            
            it = self._generate(line)
            reader = csv.DictReader(it, fieldnames=self.headers)
            values = reader.next()
            values['DefaultResult'] = 'ResidualError'
            values['LineName'] = re.sub(r'\W', '', values['LineName'].strip())
            values['Concentration'] = values['Cc'].strip()
            values['StandardDeviation'] = values['SD'].strip()
            values['ResidualError'] = values['RSD'].strip()
            values['NetIntensity'] = values['Net_Intensity'].strip().split('/')
            values['Remarks'] = ''
            values['TestLine'] = ''
            self._addRawResult(self._resid, {values['LineName']: values}, False)
            return 0
1010331
function processAliases(aliases) {
	const result = {
		long: {},
		short: {}
	};

	if (!aliases) {
		return result;
	}

	if (!Array.isArray(aliases)) {
		if (typeof aliases === 'object') {
			if (aliases.long && typeof aliases.long === 'object') {
				Object.assign(result.long, aliases.long);
			}
			if (aliases.short && typeof aliases.short === 'object') {
				Object.assign(result.short, aliases.short);
			}
			return result;
		}

		aliases = [ aliases ];
	}

	for (const alias of aliases) {
		if (!alias || typeof alias !== 'string') {
			throw E.INVALID_ALIAS('Expected aliases to be a string or an array of strings',
				{ name: 'aliases', scope: 'Option.constructor', value: alias });
		}

		for (const a of alias.split(/[ ,|]+/)) {
			const m = a.match(aliasRegExp);
			if (!m) {
				throw E.INVALID_ALIAS(`Invalid alias format "${alias}"`, { name: 'aliases', scope: 'Option.constructor', value: alias });
			}

			if (m[2]) {
				result.short[m[2]] = !m[1];
			} else if (m[3]) {
				result.long[m[3]] = !m[1];
			}
		}
	}

	return result;
}
1059533
private function parseUseStatement()
    {
        $class = '';
        $alias = '';
        $statements = array();
        $explicitAlias = false;
        while (($token = $this->next())) {
            $isNameToken = $token[0] === T_STRING || $token[0] === T_NS_SEPARATOR;
            if (!$explicitAlias && $isNameToken) {
                $class .= $token[1];
                $alias = $token[1];
            } else if ($explicitAlias && $isNameToken) {
                $alias .= $token[1];
            } else if ($token[0] === T_AS) {
                $explicitAlias = true;
                $alias = '';
            } else if ($token === ',') {
                $statements[$alias] = $class;
                $class = '';
                $alias = '';
                $explicitAlias = false;
            } else if ($token === ';') {
                $statements[$alias] = $class;
                break;
            } else {
                break;
            }
        }

        return $statements;
    }
991321
def raw(self):
        
        return RawTrace(self.filehandle,
                        self.dtype,
                        len(self),
                        self.shape,
                        self.readonly,
                       )
1195003
def strip_line(line, sep=os.linesep):
    

    try:
        return line.strip(sep)
    except TypeError:
        return line.decode('utf-8').strip(sep)
1374456
def parse_values_from_lines(self,lines):
        
        assert len(lines) == 3,"SvdData.parse_values_from_lines: expected " + \
                               "3 lines, not {0}".format(len(lines))
        try:
            self.svdmode = int(lines[0].strip().split()[0])
        except Exception as e:
            raise Exception("SvdData.parse_values_from_lines: error parsing" + \
                            " svdmode from line {0}: {1} \n".format(lines[0],str(e)))
        try:
            raw = lines[1].strip().split()
            self.maxsing = int(raw[0])
            self.eigthresh = float(raw[1])
        except Exception as e:
            raise Exception("SvdData.parse_values_from_lines: error parsing" + \
                            " maxsing and eigthresh from line {0}: {1} \n"\
                            .format(lines[1],str(e)))
        # try:
        #     self.eigwrite = int(lines[2].strip())
        # except Exception as e:
        #     raise Exception("SvdData.parse_values_from_lines: error parsing" + \
        #                     " eigwrite from line {0}: {1} \n".format(lines[2],str(e)))
        self.eigwrite = lines[2].strip()
199469
def _validate_alias_file_content(alias_file_path, url=''):
    
    alias_table = get_config_parser()
    try:
        alias_table.read(alias_file_path)
        for alias_name, alias_command in reduce_alias_table(alias_table):
            _validate_alias_name(alias_name)
            _validate_alias_command(alias_command)
            _validate_alias_command_level(alias_name, alias_command)
            _validate_pos_args_syntax(alias_name, alias_command)
    except Exception as exception:  # pylint: disable=broad-except
        error_msg = CONFIG_PARSING_ERROR % AliasManager.process_exception_message(exception)
        error_msg = error_msg.replace(alias_file_path, url or alias_file_path)
        raise CLIError(error_msg)
1006847
public void parse( String line, File sourceFile, int lineNumber ) {

		// Reset
		this.rawNameToVariables.clear();
		this.errors.clear();
		this.cursor = 0;

		// Parse
		while( this.cursor < line.length()) {

			char c = line.charAt( this.cursor );
			if( Character.isWhitespace( c ) || c == ',' )
				this.cursor ++;

			recognizeVariable( line, sourceFile, lineNumber );
		}
	}
918083
def interpret(self):
        """"""
        strn = self.lineEdit().text()
        suf = self.opts['suffix']
        if len(suf) > 0:
            if strn[-len(suf):] != suf:
                return False
            #raise Exception("Units are invalid.")
            strn = strn[:-len(suf)]
        try:
            val = fn.siEval(strn)
        except:
            #sys.excepthook(*sys.exc_info())
            #print "invalid"
            return False
        #print val
        return val
74059
def parse_data_line(self, sline):
        
        # if there are less values founded than headers, it's an error
        if len(sline) != len(self._columns):
            self.err("One data line has the wrong number of items")
            return -1
        rawdict = {}
        for idx, result in enumerate(sline):
            rawdict[self._columns[idx]] = result.replace(' ', '')

        resid = rawdict['Sample ID'].replace('.', '')
        rawdict['DefaultResult'] = 'Result'
        rawdict['Remarks'] = rawdict['Sample Details']
        del rawdict['Sample Details']
        name = rawdict['Test Name'].replace('.', '')
        del rawdict['Test Name']
        self._addRawResult(resid, {name: rawdict}, False)
        return 0
1176467
def get_aliases(lines):
    
    aliases = {}
    for line in lines:
        line = line.strip()
        if len(line) > 0 and line.startswith(SIG_ALIAS):
            _, content = line.split(SIG_ALIAS)
            alias, signature = [t.strip() for t in content.split("=")]
            aliases[alias] = signature
    return aliases
151188
def raw_shell(s):
    ''
    if isinstance(s, ShellQuoted):
        return s.do_not_use_raw_str
    raise RuntimeError('{0} should have been ShellQuoted'.format(s))
288638
def collect_aliases(self):
        
        self.aliases = get_aliases(self._code_lines)
        for alias, signature in self.aliases.items():
            _, _, requires = parse_signature(signature)
            self.required_types |= requires
            self.defined_types |= {alias}
77118
def _parse_line(self, line):
        
        msg_info = {'raw_message': line}
        if ': ' in line:
            info, msg = [i.strip() for i in line.split(': ', 1)]
            msg_info['message'] = msg

            info_splits = info.split()
            if len(info_splits) == 5:
                msg_info['timestamp'] = ' '.join(info_splits[:3])
                msg_info['hostname'] = info_splits[3]
                msg_info['procname'] = info_splits[4]
        return msg_info
1113541
def source(self, getline=linecache.getline):
        
        try:
            return getline(self.filename, self.lineno)
        except Exception as exc:
            return "??? NO SOURCE: {!r}".format(exc)
568845
def parse_ss_def_file(self, contents):
        ''''''
        mapping = {}
        for l in [l.strip() for l in contents.split('\n') if l.strip() and not(l.strip().startswith('#'))]:
            tokens = l.split()
            if len(tokens) != 2:
                raise RosettaFileParsingException('Lines in a secondary structure definition file must have exactly two entries.')

            positions = parse_range(tokens[0])
            ss = sorted(set(tokens[1].upper()))
            for p in positions:
                if mapping.get(p) and mapping[p] != ss:
                    raise RosettaFileParsingException('There are conflicting definitions for residue %d (%s and %s).' % (p, ''.join(mapping[p]), ''.join(ss)))
                mapping[p] = ss
        self.data = mapping