// Parse instantiates a GUID from a text representation of the same GUID.
// This is the inverse of function family String()
482309
func Parse(value string) (GUID, error) {
	var guid GUID
	for _, fullFormat := range knownFormats {
		parity, err := fmt.Sscanf(
			value,
			fullFormat,
			&guid.timeLow,
			&guid.timeMid,
			&guid.timeHighAndVersion,
			&guid.clockSeqHighAndReserved,
			&guid.clockSeqLow,
			&guid.node[0],
			&guid.node[1],
			&guid.node[2],
			&guid.node[3],
			&guid.node[4],
			&guid.node[5])
		if parity == 11 && err == nil {
			return guid, err
		}
	}
	return emptyGUID, fmt.Errorf("\"%s\" is not in a recognized format", value)
}
673769
func Parse(s string) (r T, err error) {
	_, err = fmt.Sscan(s,
		&r[0][0], &r[0][1], &r[0][2],
		&r[1][0], &r[1][1], &r[1][2],
		&r[2][0], &r[2][1], &r[2][2],
	)
	return r, err
}
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
}
403947
func (kv *KvSource) Parse(cmd *flaeg.Command) (*flaeg.Command, error) {
	err := kv.LoadConfig(cmd.Config)
	if err != nil {
		return nil, err
	}
	return cmd, nil
}
948667
func Parse(name, text string) (*Parser, error) {
	p := NewParser(name)
	err := p.Parse(text)
	if err != nil {
		p = nil
	}
	return p, err
}
25746
func Parse(s string) (*ACL, error) {
	cs := C.CString(s)
	cacl, _ := C.acl_from_text(cs)
	if cacl == nil {
		return nil, fmt.Errorf("unable to parse ACL")
	}
	return &ACL{cacl}, nil
}
1240321
func Parse(buf string) (*Tree, error) {
	t := new(Tree)
	t.scanner = new(scanner)
	return t.Parse(buf)
}
332635
func (t *Tree) parse(treeSet map[string]*Tree) (next Node) {
	t.Root = t.newList(t.peek().pos)
	for t.peek().typ != itemEOF {
		if t.peek().typ == itemLeftDelim {
			delim := t.next()
			if t.nextNonSpace().typ == itemDefine {
				newT := New("definition") // name will be updated once we know it.
				newT.text = t.text
				newT.ParseName = t.ParseName
				newT.startParse(t.funcs, t.lex)
				newT.parseDefinition(treeSet)
				continue
			}
			t.backup2(delim)
		}
		n := t.textOrAction()
		if n.Type() == nodeEnd {
			t.errorf("unexpected %s", n)
		}
		t.Root.append(n)
	}
	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
}
486767
func (u *U2F) Parse() (*services.U2F, error) {
	// If no appID specified, default to hostname
	appID := u.AppID
	if appID == "" {
		hostname, err := os.Hostname()
		if err != nil {
			return nil, trace.Wrap(err, "failed to automatically determine U2F AppID from hostname")
		}
		appID = fmt.Sprintf("https://%s:%d", strings.ToLower(hostname), defaults.HTTPListenPort)
	}

	// If no facets specified, default to AppID
	facets := u.Facets
	if len(facets) == 0 {
		facets = []string{appID}
	}

	return &services.U2F{
		AppID:  appID,
		Facets: facets,
	}, nil
}
1151408
func (l *Parser) Parse() int {
	// init
	l.Lexer.Errors = nil
	l.rootNode = nil
	l.positionBuilder = &parser.PositionBuilder{}

	// parse

	return yyParse(l)
}
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,
	}
}
682065
func (p StringParser) Parse(field string) (result interface{}, err error) {
	return field, nil
}
1068351
func Parse(text string) Parameter {
	var splits []string
	var name, data string

	name = strings.Replace(text, "<", "", -1)
	name = strings.Replace(name, ">", "", -1)
	data = "string"

	if strings.Contains(name, ":") {
		splits = strings.Split(name, ":")

		name = splits[0]
		data = splits[1]
	}

	return NewParameterWithType(name, data)
}
961350
func Parse(data string) (out String, _ error) {
	var (
		// Variables used by Ragel
		cs  = 0 // current state
		p   = 0 // current position in data
		pe  = len(data)
		eof = pe // eof == pe if this is the last data block

		// We use the following variables to actually build the String.

		// Index in data where the currently captured string started.
		idx int

		v variable // variable being read, if any
		l literal  // literal being read, if any

		// Current term. This is either the variable that we just read or the
		// literal. We will append it to `out` and move on.
		t term
	)

	{
		cs = interpolate_start
	}

	{
		if p == pe {
			goto _test_eof
		}
		switch cs {
		case 8:
			goto st_case_8
		case 9:
			goto st_case_9
		case 1:
			goto st_case_1
		case 10:
			goto st_case_10
		case 2:
			goto st_case_2
		case 3:
			goto st_case_3
		case 0:
			goto st_case_0
		case 4:
			goto st_case_4
		case 5:
			goto st_case_5
		case 6:
			goto st_case_6
		case 7:
			goto st_case_7
		}
		goto st_out
	st_case_8:
		switch data[p] {
		case 36:
			goto st1
		case 92:
			goto st2
		}
		goto tr12
	tr12:
		idx = p
		l = literal(data[idx : p+1])
		t = l
		goto st9
	tr15:
		l = literal(data[idx : p+1])
		t = l
		goto st9
	tr18:
		out = append(out, t)
		idx = p
		l = literal(data[idx : p+1])
		t = l
		goto st9
	st9:
		if p++; p == pe {
			goto _test_eof9
		}
	st_case_9:
		switch data[p] {
		case 36:
			goto tr16
		case 92:
			goto tr17
		}
		goto tr15
	tr16:
		out = append(out, t)
		goto st1
	st1:
		if p++; p == pe {
			goto _test_eof1
		}
	st_case_1:
		if data[p] == 123 {
			goto st3
		}
		goto tr0
	tr0:
		l = literal(data[p-1 : p+1])
		t = l
		goto st10
	tr2:
		l = literal(data[p : p+1])
		t = l
		goto st10
	tr8:
		t = v
		goto st10
	tr10:
		idx = p
		t = v
		goto st10
	st10:
		if p++; p == pe {
			goto _test_eof10
		}
	st_case_10:
		switch data[p] {
		case 36:
			goto tr16
		case 92:
			goto tr17
		}
		goto tr18
	tr17:
		out = append(out, t)
		goto st2
	st2:
		if p++; p == pe {
			goto _test_eof2
		}
	st_case_2:
		goto tr2
	st3:
		if p++; p == pe {
			goto _test_eof3
		}
	st_case_3:
		if data[p] == 95 {
			goto tr3
		}
		switch {
		case data[p] > 90:
			if 97 <= data[p] && data[p] <= 122 {
				goto tr3
			}
		case data[p] >= 65:
			goto tr3
		}
		goto st0
	st_case_0:
	st0:
		cs = 0
		goto _out
	tr3:
		idx = p
		v.Name = data[idx : p+1]
		goto st4
	tr6:
		v.Name = data[idx : p+1]
		goto st4
	st4:
		if p++; p == pe {
			goto _test_eof4
		}
	st_case_4:
		switch data[p] {
		case 58:
			goto tr7
		case 95:
			goto tr6
		case 125:
			goto tr8
		}
		switch {
		case data[p] < 48:
			if 45 <= data[p] && data[p] <= 46 {
				goto st5
			}
		case data[p] > 57:
			switch {
			case data[p] > 90:
				if 97 <= data[p] && data[p] <= 122 {
					goto tr6
				}
			case data[p] >= 65:
				goto tr6
			}
		default:
			goto tr6
		}
		goto st0
	st5:
		if p++; p == pe {
			goto _test_eof5
		}
	st_case_5:
		if data[p] == 95 {
			goto tr6
		}
		switch {
		case data[p] < 65:
			if 48 <= data[p] && data[p] <= 57 {
				goto tr6
			}
		case data[p] > 90:
			if 97 <= data[p] && data[p] <= 122 {
				goto tr6
			}
		default:
			goto tr6
		}
		goto st0
	tr7:
		v.HasDefault = true
		goto st6
	st6:
		if p++; p == pe {
			goto _test_eof6
		}
	st_case_6:
		if data[p] == 125 {
			goto tr10
		}
		goto tr9
	tr9:
		idx = p
		v.Default = data[idx : p+1]
		goto st7
	tr11:
		v.Default = data[idx : p+1]
		goto st7
	st7:
		if p++; p == pe {
			goto _test_eof7
		}
	st_case_7:
		if data[p] == 125 {
			goto tr8
		}
		goto tr11
	st_out:
	_test_eof9:
		cs = 9
		goto _test_eof
	_test_eof1:
		cs = 1
		goto _test_eof
	_test_eof10:
		cs = 10
		goto _test_eof
	_test_eof2:
		cs = 2
		goto _test_eof
	_test_eof3:
		cs = 3
		goto _test_eof
	_test_eof4:
		cs = 4
		goto _test_eof
	_test_eof5:
		cs = 5
		goto _test_eof
	_test_eof6:
		cs = 6
		goto _test_eof
	_test_eof7:
		cs = 7
		goto _test_eof

	_test_eof:
		{
		}
		if p == eof {
			switch cs {
			case 9, 10:
				out = append(out, t)
			}
		}

	_out:
		{
		}
	}


	if cs < 8 {
		return out, fmt.Errorf("cannot parse string %q", data)
	}

	return out, nil
}
556349
func parse(r io.Reader) *htmlDocument {
	htmlDoc := &htmlDocument{}
	tokenizer := html.NewTokenizer(r)
	for {
		if errorToken, _, _ := parseToken(tokenizer, htmlDoc, nil); errorToken {
			break
		}
	}
	return htmlDoc
}
402696
func Parse(s string) (*Cursor, error) {
	poss, ps, err := parseMulti(s)
	if err != nil {
		return nil, err
	}
	if len(ps) == 1 {
		c := NewCursor(ps)
		if err := c.Set(&poss[0]); err != nil {
			return nil, err
		}
		return c, nil
	}
	return NewCursor(ps), nil
}