parses the msgstr singular line

 msgstr is required in singular translations
435939
def msgstr
      begin
        if @scanner.scan(/msgstr/)
          skip_whitespace
          text = message_line
          add_result(:msgstr, text)
          message_multiline(:msgstr) if text.empty?
          skip_whitespace
          raise PoSyntaxError, "Unexpected content after expected message end #{@scanner.peek(10).inspect}" unless @scanner.eos?
        else
         raise PoSyntaxError, "Singular message without msgstr is not allowed. Line started unexpectedly with #{@scanner.peek(10).inspect}."
        end
      rescue PoSyntaxError => pe
        raise PoSyntaxError, "Syntax error in msgstr\n" + pe.message, pe.backtrace
      end
    end
366873
function _parseMessage() {
    let message = [].slice.call(arguments).join("|");
    try {
        message = (typeof message === "string") ? message : JSON.stringify(message);
    } catch(e) {
        logger.error(e.stack);
    }

    return message;
}
614316
def parselinenos(spec, nlines=None):
    

    items = {}
    parts = spec.split(',')

    for part in parts:
        line_class = LINECLASS_RE.match(part)
        start = int(line_class.group('start'))

        if line_class.group('range'):
            if line_class.group('end'):
                end = int(line_class.group('end'))
            else:
                end = nlines

            for line_no in range(start, end + 1):
                items[line_no] = line_class.group('class')

        else:
            items[start] = line_class.group('class')

    return items
1211760
def msgid
      begin
        if @scanner.scan(/msgid/)
          skip_whitespace
          text = message_line
          add_result(:msgid, text)
          message_multiline(:msgid) if text.empty?
          if msgid_plural
            msgstr_plural
          else
            msgstr
          end
        else
          err_msg = "Message without msgid is not allowed."
          err_msg += "The Line started unexpectedly with #{@scanner.peek(10).inspect}."
          raise PoSyntaxError, err_msg
        end
      rescue PoSyntaxError => pe
        raise PoSyntaxError, "Syntax error in msgid\n" + pe.message, pe.backtrace
      end

    end
834184
def msg2repr(msg, processor, **config):
    
    fmt = u"{title} -- {subtitle} {link}"
    title = msg2title(msg, **config)
    subtitle = processor.subtitle(msg, **config)
    link = processor.link(msg, **config) or ''
    return fmt.format(**locals())
1120969
def parse_move(self, move_msg):
        
        # TODO: some condition check
        type_idx = move_msg.index(":")
        move_type = move_msg[:type_idx]
        pos_idx = move_msg.index(",")
        move_x = int(move_msg[type_idx+1:pos_idx])
        move_y = int(move_msg[pos_idx+1:])

        return move_type, move_x, move_y
432328
function parse_BrtCellIsst(data, length) {
	var cell = parse_XLSBCell(data);
	var isst = data.read_shift(4);
	return [cell, isst, 's'];
}
849341
def parse_line(line):
    
    if not line.startswith(b'PROXY'):
        raise exc.InvalidLine('Missing "PROXY" prefix', line)
    if not line.endswith(CRLF):
        raise exc.InvalidLine('Missing "\\r\\n" terminal', line)
    parts = line[:-len(CRLF)].split(b' ')
    if len(parts) != 6:
        raise exc.InvalidLine('Expected 6 " " delimited parts', line)

    inet, src_addr, dst_addr = parts[1:4]
    if inet == b'TCP4':
        try:
            socket.inet_pton(socket.AF_INET, src_addr)
            socket.inet_pton(socket.AF_INET, dst_addr)
        except socket.error:
            raise exc.InvalidLine('Invalid INET {0} address(es)'.format(inet), line)
    elif inet == b'TCP6':
        try:
            socket.inet_pton(socket.AF_INET6, src_addr)
            socket.inet_pton(socket.AF_INET6, dst_addr)
        except socket.error:
            raise exc.InvalidLine('Invalid INET {0} address(es)'.format(inet), line)
    else:
        raise exc.InvalidLine('Unsupported INET "{0}"'.format(inet), line)
    try:
        src_port = int(parts[4])
        dst_port = int(parts[5])
    except (TypeError, ValueError):
        raise exc.InvalidLine(line, 'Invalid port')

    return ProxyInfo(
        source_address=src_addr,
        source_port=src_port,
        destination_address=dst_addr,
        destination_port=dst_port,
    )
1107289
function parseSrv(val, msg) {
  val.priority = msg.readUInt16BE();
  val.weight = msg.readUInt16BE();
  val.port = msg.readUInt16BE();
  val.target = nameUnpack(msg);
  return PARSE_RESOURCE_DONE;
}
218818
function parseStatementListItem() {
        if (lookahead.type === Token.Keyword) {
            switch (lookahead.value) {
            case 'export':
                if (state.sourceType !== 'module') {
                    tolerateUnexpectedToken(lookahead, Messages.IllegalExportDeclaration);
                }
                return parseExportDeclaration();
            case 'import':
                if (state.sourceType !== 'module') {
                    tolerateUnexpectedToken(lookahead, Messages.IllegalImportDeclaration);
                }
                return parseImportDeclaration();
            case 'const':
                return parseLexicalDeclaration({inFor: false});
            case 'function':
                return parseFunctionDeclaration(new Node());
            case 'class':
                return parseClassDeclaration();
            }
        }

        if (matchKeyword('let') && isLexicalDeclaration()) {
            return parseLexicalDeclaration({inFor: false});
        }

        return parseStatement();
    }
668938
function (msgStr) {
            var msg;
            try {
                msg = JSON.parse(msgStr);
            } catch (e) {
                console.log("[Brackets LiveDev] Malformed message received: ", msgStr);
                return;
            }
            // delegates handling/routing to MessageBroker.
            MessageBroker.trigger(msg);
        }
1316637
def parse_line
      s0 = @current_pos
      match_spaces
      s2 = parse_te
      if s2 != :failed
        match_spaces
        s4 = @current_pos
        s5 = parse_fugou
        if s5 != :failed
          s6 = parse_from
          if s6 != :failed
            @reported_pos = s4
            s4 = transform_teban_fugou_from(s2, s5, s6)
          else
            @current_pos = s4
            s4 = :failed
          end
        else
          @current_pos = s4
          s4 = :failed
        end
        if s4 == :failed
          s4 = @current_pos
          s5 = []
          s6 = match_regexp(/^[^\r\n ]/)
          while s6 != :failed
            s5 << s6
            s6 = match_regexp(/^[^\r\n ]/)
          end
          @reported_pos = s4
          s4 = s5.join
        end
        if s4 != :failed
          match_spaces
          s6 = parse_time
          s6 = nil if s6 == :failed
          match_str("+")
          if parse_nl != :failed
            @reported_pos = s0
            s0 = { "move" => s4, "time" => s6 }
          else
            @current_pos = s0
            s0 = :failed
          end
        else
          @current_pos = s0
          s0 = :failed
        end
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
365524
def _parse(self, line):
        """"""
        try:
            result = line.split(':', maxsplit=4)
            filename, line_num_txt, column_txt, message_type, text = result
        except ValueError:
            return

        try:
            self.line_num = int(line_num_txt.strip())
            self.column = int(column_txt.strip())
        except ValueError:
            return

        self.filename = filename
        self.message_type = message_type.strip()
        self.text = text.strip()
        self.valid = True
1081642
def parsemsg(s): # stolen from twisted.words
    
    prefix = ''
    trailing = []
    if not s:
        raise Exception("Empty line.")
    if s[0] == ':':
        prefix, s = s[1:].split(' ', 1)
    if s.find(' :') != -1:
        s, trailing = s.split(' :', 1)
        args = s.split()
        args.append(trailing)
    else:
        args = s.split()
    command = args.pop(0)
    return prefix, command, args
756627
def parse_skipline
      s0 = @current_pos
      s1 = match_str("#")
      if s1 != :failed
        s2 = parse_nonls
        s3 = parse_newline
        s0 = if s3 != :failed
               [s1, s2, s3]
             else
               @current_pos = s0
               :failed
             end
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
124774
def parse(raw_line)
      line = decompose(raw_line)

      if line.command =~ /^(PRIVMSG|NOTICE)$/ && line.args[1] =~ /\x01/
        return handle_ctcp_message(line)
      end

      msg_class = case
      when line.command =~ /^\d{3}$/
        begin
          constantize("IRCSupport::Message::Numeric#{line.command}")
        rescue
          constantize("IRCSupport::Message::Numeric")
        end
      when line.command == "MODE"
        if @isupport['CHANTYPES'].include?(line.args[0][0])
          constantize("IRCSupport::Message::ChannelModeChange")
        else
          constantize("IRCSupport::Message::UserModeChange")
        end
      when line.command == "NOTICE" && (!line.prefix || line.prefix !~ /!/)
        constantize("IRCSupport::Message::ServerNotice")
      when line.command == "CAP" && %w{LS LIST ACK}.include?(line.args[0])
        constantize("IRCSupport::Message::CAP::#{line.args[0]}")
      else
        begin
          constantize("IRCSupport::Message::#{line.command.capitalize}")
        rescue
          constantize("IRCSupport::Message")
        end
      end

      message = msg_class.new(line, @isupport, @capabilities)

      case message.type
      when :'005'
        @isupport.merge! message.isupport
      when :cap_ack
        message.capabilities.each do |capability, options|
          if options.include?(:disable)
            @capabilities = @capabilities - [capability]
          elsif options.include?(:enable)
            @capabilities = @capabilities + [capability]
          end
        end
      end

      return message
    end
497927
def ParseLines(self, lines, message):
    """"""
    self._allow_multiple_scalars = False
    self._ParseOrMerge(lines, message)
    return message