Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for Onepass (0.13 sec)

  1. src/regexp/onepass.go

    var anyRune = []rune{0, unicode.MaxRune}
    
    // makeOnePass creates a onepass Prog, if possible. It is possible if at any alt,
    // the match engine can always tell which branch to take. The routine may modify
    // p if it is turned into a onepass Prog. If it isn't possible for this to be a
    // onepass Prog, the Prog nil is returned. makeOnePass is recursive
    // to the size of the Prog.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. src/regexp/onepass_test.go

    		re, err := Compile(test.re)
    		if err != nil {
    			t.Errorf("Compile(%q): got err: %s", test.re, err)
    			continue
    		}
    		if re.onepass == nil {
    			t.Errorf("Compile(%q): got nil, want one-pass", test.re)
    			continue
    		}
    		if !re.MatchString(test.match) {
    			t.Errorf("onepass %q did not match %q", test.re, test.match)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  3. src/regexp/exec.go

    	if r != endOfText {
    		r1, width1 = i.step(pos + width)
    	}
    	var flag lazyFlag
    	if pos == 0 {
    		flag = newLazyFlag(-1, r)
    	} else {
    		flag = i.context(pos)
    	}
    	pc := re.onepass.Start
    	inst := &re.onepass.Inst[pc]
    	// If there is a simple literal prefix, skip over it.
    	if pos == 0 && flag.match(syntax.EmptyOp(inst.Arg)) &&
    		len(re.prefix) > 0 && i.canCheckPrefix() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 04 20:10:54 UTC 2022
    - 12.3K bytes
    - Viewed (0)
  4. src/regexp/exec_test.go

    			})
    		}
    	}
    }
    
    func BenchmarkMatch_onepass_regex(b *testing.B) {
    	isRaceBuilder := strings.HasSuffix(testenv.Builder(), "-race")
    	r := MustCompile(`(?s)\A.*\z`)
    	if r.onepass == nil {
    		b.Fatalf("want onepass regex, but %q is not onepass", r)
    	}
    	for _, size := range benchSizes {
    		if (isRaceBuilder || testing.Short()) && size.n > 1<<10 {
    			continue
    		}
    		t := makeText(size.n)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  5. src/regexp/backtrack.go

    // state multiple times. This limits the search to run in time linear in
    // the length of the test.
    //
    // backtrack is a fast replacement for the NFA code on small
    // regexps when onepass cannot be used.
    
    package regexp
    
    import (
    	"regexp/syntax"
    	"sync"
    )
    
    // A job is an entry on the backtracker's job stack. It holds
    // the instruction pc and the position in the input.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 17:25:39 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  6. src/regexp/regexp.go

    // except for configuration methods, such as [Regexp.Longest].
    type Regexp struct {
    	expr           string       // as passed to Compile
    	prog           *syntax.Prog // compiled program
    	onepass        *onePassProg // onepass program or nil
    	numSubexp      int
    	maxBitStateLen int
    	subexpNames    []string
    	prefix         string         // required prefix in unanchored matches
    	prefixBytes    []byte         // prefix, as a []byte
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  7. src/regexp/all_test.go

    	s := "abcdefghijklmnopqrstuvwxyz"
    	b.SetBytes(int64(len(s)))
    	b.ResetTimer()
    	for i := 0; i < b.N; i++ {
    		sink = QuoteMeta(s)
    	}
    }
    
    var compileBenchData = []struct{ name, re string }{
    	{"Onepass", `^a.[l-nA-Cg-j]?e$`},
    	{"Medium", `^((a|b|[d-z0-9])*(日){4,5}.)+$`},
    	{"Hard", strings.Repeat(`((abc)*|`, 50) + strings.Repeat(`)`, 50)},
    }
    
    func BenchmarkCompile(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  8. tests/scanner_valuer_test.go

    	if err := DB.Model(&data).Update("password", EncryptedData("xnewpass")).Error; err == nil {
    		t.Errorf("Should failed to update data with invalid data")
    	}
    
    	if err := DB.Model(&data).Update("password", EncryptedData("newpass")).Error; err != nil {
    		t.Errorf("Should got no error update data with valid data, but got %v", err)
    	}
    
    	AssertEqual(t, data.Password, EncryptedData("newpass"))
    }
    
    type ScannerValuerStruct struct {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed Jun 07 07:02:07 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/unmarshal/unmarshal.go

    	// without directly importing their packages. So we cannot just skip this package
    	// when !analysisutil.Imports(pass.Pkg, "encoding/...").
    	// TODO(taking): Consider using a prepass to collect typeutil.Callees.
    
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/timeformat/timeformat.go

    	// Note: (time.Time).Format is a method and can be a typeutil.Callee
    	// without directly importing "time". So we cannot just skip this package
    	// when !analysisutil.Imports(pass.Pkg, "time").
    	// TODO(taking): Consider using a prepass to collect typeutil.Callees.
    
    	inspect := pass.ResultOf[inspect.Analyzer].(*inspector.Inspector)
    
    	nodeFilter := []ast.Node{
    		(*ast.CallExpr)(nil),
    	}
    	inspect.Preorder(nodeFilter, func(n ast.Node) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top