// lexCommand lexes a single command. Commands can either be unquoted and on a
// single line, or quoted and span multiple lines.
965441
func lexCommand(l *lexer) stateFn {
	for {
		n := l.next()
		if n == '\n' {
			l.errorf("empty command specification")
			return nil
		} else if any(n, quotes) {
			err := l.acceptQuotedString(n)
			if err != nil {
				l.errorf("%s", err)
				return nil
			}
			l.emit(itemQuotedString)
			return lexInside
		} else if any(n, spaces) {
			l.acceptRun(spaces)
			l.emit(itemSpace)
		} else {
			l.acceptLine(true)
			l.emit(itemBareString)
			return lexInside
		}
	}
}
403023
func lexQuote(l *lexer) stateFn {
Loop:
	for {
		switch l.next() {
		case '\\':
			if r := l.next(); r != eof && r != '\n' {
				break
			}
			fallthrough
		case eof, '\n':
			return l.errorf("unterminated quoted string")
		case '"':
			break Loop
		}
	}
	l.emit(itemString)
	return lexInsideAction
}
1344943
func (f *Flaeg) AddCommand(command *Command) {
	f.commands = append(f.commands, command)
}
1127414
func lex(input string, capacity int) (*lexer, <-chan Token) {
	l := &lexer{
		input:  input,
		tokens: make(chan Token, capacity),
	}
	go l.run() // Concurrently run state machine.
	return l, l.tokens
}
96401
func CreateCommands() []cli.Command {
	return []cli.Command{
		createRun(),
		createRevoke(),
		createRenew(),
		createDNSHelp(),
		createList(),
	}
}
707049
func lex(name string, input []byte) *lexer {
	l := &lexer{
		name:  name,
		input: string(input),
		items: make(chan item),
		line:  1,
	}
	go l.run()
	return l
}
1133932
func (v *VTY) Commands(cmds []string) error {
	for _, cmd := range cmds {
		if _, err := v.Command(cmd); err != nil {
			return err
		}
	}
	return nil
}
1233495
func lex(name, input, left, right string) *lexer {
	if left == "" {
		left = leftDelim
	}
	if right == "" {
		right = rightDelim
	}
	l := &lexer{
		name:       name,
		input:      input,
		leftDelim:  left,
		rightDelim: right,
		items:      make(chan item),
	}
	go l.run()
	return l
}
25879
func (c *commander) Command(name string) (command func(map[string]interface{}) interface{}) {
	command, _ = c.commands[name]
	return
}
872873
func Command(name string, arg ...string) *Cmd {
	return &Cmd{
		cmd: exec.Command(name, arg...),
	}
}
1058710
func lexMode(v []byte) lexModeValue {
	var (
		r      rune
		w      int
		offset int
	)

	for {
		r, w = utf8.DecodeRune(v[offset:])
		offset += w
		if unicode.IsSpace(r) {
			continue
		}
		if r == '{' {
			return lexModeJson
		}
		break
	}

	return lexModeHcl
}
1042603
func lex(name, input string) *lexer {
	input = strings.Replace(input, "\r\n", "\n", -1)
	l := &lexer{
		name:  name,
		input: input,
		items: make(chan item),
	}
	go l.run()
	return l
}
1002133
func lexSpace(l *lexer) stateFn {
	for {
		if r := l.next(); !unicode.IsSpace(r) || r == eof {
			break
		}
	}
	l.backup()
	l.ignore()
	return lexToken
}
1040276
func NewCommand(name, shortDescription string, action actionFunc) *Command {
	cmd := &Command{
		Name:             name,
		ShortDescription: shortDescription,
		Action:           action,
	}

	return cmd
}
1023783
func (f *Facade) AddCommand(name string, command cli.Command) {
	f.commands[name] = func() (cli.Command, error) {
		return command, nil
	}
}
255210
func lexComment(l *lexer) stateFn {
	l.pos += Pos(len(leftComment))
	i := strings.Index(l.input[l.pos:], rightComment)
	if i < 0 {
		return l.errorf("unclosed comment")
	}
	l.pos += Pos(i + len(rightComment))
	if !strings.HasPrefix(l.input[l.pos:], l.rightDelim) {
		return l.errorf("comment ends before closing delimiter")

	}
	l.pos += Pos(len(l.rightDelim))
	l.ignore()
	return lexText
}
944919
func NewSLACommand() cmd.Command {
	slaCommand := &slaCommand{
		newSLAClient:           newSLAClient,
		newAuthorizationClient: newAuthorizationClient,
	}
	slaCommand.newAPIRoot = slaCommand.NewAPIRoot
	return modelcmd.Wrap(slaCommand)
}