// AcceptRunExcept takes a string, and moves the cursor forward as 
// long as the input DOES NOT match one of the given runes in the string
179167
func (l *ReaderLexer) AcceptRunExcept(valid string) bool {
	guard := Mark("AcceptRunExcept")
	defer guard()
	return AcceptRunExcept(l, valid)
}
1233573
func (l *lexer) accept(r rune) bool {
	if unicode.ToLower(l.next()) == unicode.ToLower(r) {
		return true
	}
	l.backup()
	return false
}
1172134
func (sc *scanner) peekRune() rune {
	if len(sc.rest) == 0 {
		return 0
	}

	// fast path: ASCII
	if b := sc.rest[0]; b < utf8.RuneSelf {
		if b == '\r' {
			return '\n'
		}
		return rune(b)
	}

	r, _ := utf8.DecodeRune(sc.rest)
	return r
}
721435
func (l *lexer) acceptBareString() {
	l.acceptFunc(
		func(r rune) bool {
			return !any(r, bareStringDisallowed) && r != eof
		},
	)
}
1235552
func (lx *lexer) accept(valid rune) bool {
	if lx.next() == valid {
		return true
	}
	lx.backup()
	return false
}
892282
func (s *InvokeEndpointInput) SetAccept(v string) *InvokeEndpointInput {
	s.Accept = &v
	return s
}
1054875
func (t *typeChecker) AcceptInclusion(v tree.Inclusion) {
	if !t.expectBoolean {
		t.result = fmt.Errorf("expected numeric expression but found: %s", tree.ExpressionString(v))
		return
	}

	res := typeCheckExpectingNumeric(v.Left)
	for _, r := range v.Rights {
		res2 := typeCheckExpectingNumeric(r)
		if res == nil {
			res = res2
		}
	}

	if res != nil {
		t.result = res
	}

}
1307229
func (p *parseContext) Accept(branch *parseContext) {
	p.apply = append(p.apply, branch.apply...)
	p.rewinder = branch.rewinder
}
933378
func (this *Request) processAccepted(a string) (list []string) {
	for _, accept := range httphelp.ParseAccept(a) {
		if len(accept.SubType) > 0 {
			list = append(list, accept.Type+"/"+accept.SubType)
		} else {
			list = append(list, accept.Type)
		}
	}
	return
}
1327520
func (l *lexer) acceptRun(valid string) bool {
	pos := l.pos
	for strings.IndexRune(valid, l.next()) >= 0 {
	}
	l.backup()
	return l.pos > pos
}
1028926
func keyRuneFilter(r rune) rune {
	if r <= ' ' || r == '=' || r == '"' || r == utf8.RuneError {
		return -1
	}
	return r
}
512656
func checkAcceptFromNonce(accept, nonce []byte) bool {
	if len(accept) != acceptSize {
		return false
	}
	// NOTE: expect does not escapes.
	expect := make([]byte, acceptSize)
	initAcceptFromNonce(expect, nonce)
	return bytes.Equal(expect, accept)
}
1308483
func AcceptString(l Lexer, word string, rewind bool) (ok bool) {
	i := 0
	defer func() {
		if rewind {
			Trace("Rewinding AccepString(%q) (%d runes)\n", word, i)
			for j := i; j > 0; j-- {
				l.Backup()
			}
		}
		Trace("AcceptString returning %s\n", ok)
	}()

	for pos := 0; pos < len(word); {
		r, width := utf8.DecodeRuneInString(word[pos:])
		pos += width
		var n rune
		if pos == 0 {
			n = l.Current()
		} else {
			n = l.Next()
		}
		i++
		Trace("r (%q) == n (%q) %s ? \n", r, n, r == n)
		if r != n {
			rewind = true
			ok = false
			return
		}
	}
	ok = true
	return
}
896956
func (aa Acceptors) Accept(from interface{}) bool {
	for _, a := range aa {
		if !a.Accept(from) {
			return false
		}
	}
	return true
}
951406
func (s *booleanCompilerVisitor) AcceptComparison(v tree.Comparison) {
	// At this point in the cycle, only EQL, NEQL, GT and GTE are valid comparisons
	if err := compileNumeric(s.ctx, v.Right); err != nil {
		s.err = err
		return
	}

	if err := s.ctx.pushAToStack(); err != nil {
		s.err = err
		return
	}

	if err := compileNumeric(s.ctx, v.Left); err != nil {
		s.err = err
		return
	}

	if err := s.ctx.popStackToX(); err != nil {
		s.err = err
		return
	}

	compOp, ok := compOps[v.Op]
	if !ok {
		s.err = fmt.Errorf("this comparison type is not allowed - this is probably a programmer error: %s", tree.ExpressionString(v))
		return
	}

	jt, jf := s.jt, s.jf
	if v.Op == tree.NEQL {
		jt, jf = jf, jt
	}

	s.ctx.opWithJumps(compOp, 0, jt, jf)
}
1104860
func (l *Listener) Accept() (net.Conn, error) {
	c, err := l.l.Accept()
	if err != nil {
		return nil, l.opError(opAccept, err)
	}

	return c, nil
}
979097
func (t *typeChecker) AcceptArithmetic(v tree.Arithmetic) {
	if t.expectBoolean {
		t.result = fmt.Errorf("expected boolean expression but found: %s", tree.ExpressionString(v))
		return
	}

	res := either(
		typeCheckExpectingNumeric(v.Left),
		typeCheckExpectingNumeric(v.Right))
	if res != nil {
		t.result = res
	}
}