// Parse implements Parser.
669
func (parser *SourceParser) Parse(req *http.Request, params imageserver.Params) error {
	ParseQueryString(imageserver_source.Param, req, params)
	return nil
}
215070
func (p *parser) Parse(r io.Reader) (err error) {
	cr := newChecksumReader(r)

	if err = readMagicString(cr); err != nil {
		return err
	}

	var rdbVersion int
	if rdbVersion, err = readVersionNumber(cr); err != nil {
		return err
	}

	for {
		if err = p.readDatabase(cr); err != nil && err != errNoMoreDatabases {
			return err
		} else if err != nil && err == errNoMoreDatabases {
			break
		}

		for {
			if err = p.readKeyValuePair(cr); err != nil && err != errNoMoreKeyValuePair {
				return err
			} else if err != nil && err == errNoMoreKeyValuePair {
				break
			}
		}

		if p.scratch[0] == 0xFF {
			break
		}
	}

	// Read the CRC64 checksum with RDB version >= 5
	if rdbVersion >= 5 {
		sum := cr.checksum

		var checksum uint64
		if err := binary.Read(cr, binary.LittleEndian, &checksum); err != nil {
			return err
		}

		if sum != checksum {
			return ErrInvalidChecksum
		}
	}

	p.ctx.closeChannels()

	return nil
}
30606
func (pp *primitiveParser) Parse() map[string]*data {
	pp.loadTypeComments()
	pp.loadStructs()

	visible := make(map[string]*data)
	for k := range pp.structmap {
		if strings.ToUpper(string(k[0])) != string(k[0]) { // not exported
			continue
		}
		pp.visitStruct(visible, k, false)
	}

	return visible
}
248036
func (f *Flaeg) Parse(cmd *Command) (*Command, error) {
	if f.calledCommand == nil {
		f.commandArgs = f.args
	}

	if err := LoadWithCommand(cmd, f.commandArgs, f.customParsers, f.commands); err != nil {
		return cmd, err
	}
	return cmd, nil
}
1267327
func (c *Compiler) Parse(input string) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = errors.New(r.(string))
		}
	}()

	parser, err := parser.StringParser(input)
    parser.FileName(c.filename)

	if err != nil {
		return
	}

	c.node = parser.Parse()
	return
}
1049431
func (parser *TransitionParser) Parse(data []byte, state string) ([]byte, ParserStateID) {
	currentStateID := parser.GetStateID(state)

	if currentStateID == ParserStateStop {
		return nil, currentStateID // ### return, immediate stop ###
	}

	currentState := parser.tokens[currentStateID]
	dataLen := len(data)
	readStartIdx := 0
	continueIdx := 0

	for parseIdx := 0; parseIdx < dataLen; parseIdx++ {
		node := currentState.MatchStart(data[parseIdx:])
		if node == nil {
			continue // ### continue, no match ###
		}

		t := node.Payload.(Transition)
		if t.callback != nil {
			if t.flags&ParserFlagInclude != 0 {
				t.callback(data[readStartIdx:parseIdx+node.PathLen], currentStateID)
			} else {
				t.callback(data[readStartIdx:parseIdx], currentStateID)
			}
		}

		// Move the reader
		if t.flags&ParserFlagContinue == 0 {
			parseIdx += node.PathLen - 1
		} else {
			parseIdx--
		}
		continueIdx = parseIdx + 1

		if t.flags&ParserFlagAppend == 0 {
			readStartIdx = continueIdx
		}

		nextStateID := t.nextState

		// Pop before push to allow both at the same time
		if t.flags&ParserFlagPop != 0 {
			stackLen := len(parser.stack)
			if stackLen > 0 {
				nextStateID = parser.stack[stackLen-1]
				parser.stack = parser.stack[:stackLen-1]
			}
		}

		if t.flags&ParserFlagPush != 0 {
			parser.stack = append(parser.stack, currentStateID)
		}

		// Transition to next
		currentStateID = nextStateID
		if currentStateID == ParserStateStop {
			break // ### break, stop state ###
		}

		currentState = parser.tokens[currentStateID]
	}

	if readStartIdx == dataLen {
		return nil, currentStateID // ### return, everything parsed ###
	}

	return data[readStartIdx:], currentStateID
}
858116
func (p *Parser) Parse() (*ast.File, error) {
	f := &ast.File{}
	var err, scerr error
	p.sc.Error = func(pos token.Pos, msg string) {
		scerr = &PosError{Pos: pos, Err: errors.New(msg)}
	}

	f.Node, err = p.objectList(false)
	if scerr != nil {
		return nil, scerr
	}
	if err != nil {
		return nil, err
	}

	f.Comments = p.comments
	return f, nil
}
926318
func (parser IntTypeParser) Parse(d DataType) error {
	if value, ok := AsInt(d); ok {
		parser.setter(value)
	} else {
		return fmt.Errorf("Error parsing type of %#v as an Integer", d)
	}
	return nil
}
514080
func Parse(err string) *Error {
	e := new(Error)
	errr := json.Unmarshal([]byte(err), e)
	if errr != nil {
		e.Detail = err
	}
	return e
}
841152
func (env *Env) Parse(name string) (*parse.Tree, error) {
	return env.load(name)
}
1251068
func (c *Client) Parse(url string) (*Result, error) {
	header := make(map[string]string)
	bytes, err := c.session.Get(url, header)
	if err != nil {
		return nil, err
	}

	rssType, err := c.detector.detect(bytes)
	if err != nil {
		return nil, err
	}

	parser, err := getParser(rssType)
	if err != nil {
		return nil, err
	}

	mappableFeed, err := parser.Parse(bytes)
	if err != nil {
		return nil, err
	}

	feedBytes, err := mappableFeed.ToJSON()
	if err != nil {
		return nil, err
	}

	feed := Feed{}
	err = feed.Map(feedBytes)
	if err != nil {
		return nil, err
	}

	ret := makeResult(rssType, feed, mappableFeed)
	return &ret, nil
}
694224
func Parse(cfg API, reader io.Reader, bufSize int) *Iterator {
	return &Iterator{
		cfg:    cfg.(*frozenConfig),
		reader: reader,
		buf:    make([]byte, bufSize),
		head:   0,
		tail:   0,
	}
}
169955
func (ns *Namespace) Parse(rawurl interface{}) (*url.URL, error) {
	s, err := cast.ToStringE(rawurl)
	if err != nil {
		return nil, _errors.Wrap(err, "Error in Parse")
	}

	return url.Parse(s)
}
450119
func Parse(str, sep string) *Pair {
	return parse(str, strings.Index(str, sep))
}
347320
func Parse(data string) (map[string]interface{}, error) {
	p, err := parse(data, "", false)
	if err != nil {
		return nil, err
	}
	return p.mapping, nil
}
1062848
func (rp *Parser) Parse(feed io.Reader) (*Feed, error) {
	p := xpp.NewXMLPullParser(feed, false, shared.NewReaderLabel)
	rp.base = &shared.XMLBase{}

	_, err := rp.base.FindRoot(p)
	if err != nil {
		return nil, err
	}

	return rp.parseRoot(p)
}
1059516
func Parse(r io.Reader) (*html.Node, error) {
	return html.Parse(r)
}