Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for OpAlternate (2.42 sec)

  1. src/regexp/syntax/op_string.go

    	_ = x[OpEndText-10]
    	_ = x[OpWordBoundary-11]
    	_ = x[OpNoWordBoundary-12]
    	_ = x[OpCapture-13]
    	_ = x[OpStar-14]
    	_ = x[OpPlus-15]
    	_ = x[OpQuest-16]
    	_ = x[OpRepeat-17]
    	_ = x[OpConcat-18]
    	_ = x[OpAlternate-19]
    	_ = x[opPseudo-128]
    }
    
    const (
    	_Op_name_0 = "NoMatchEmptyMatchLiteralCharClassAnyCharNotNLAnyCharBeginLineEndLineBeginTextEndTextWordBoundaryNoWordBoundaryCaptureStarPlusQuestRepeatConcatAlternate"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 11 20:24:07 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  2. src/regexp/syntax/regexp.go

    		}
    		if re.Flags&NonGreedy != 0 {
    			b.WriteRune('?')
    		}
    	case OpConcat:
    		for _, sub := range re.Sub {
    			p := printFlags(0)
    			if sub.Op == OpAlternate {
    				p = flagPrec
    			}
    			writeRegexp(b, sub, p, flags)
    		}
    	case OpAlternate:
    		for i, sub := range re.Sub {
    			if i > 0 {
    				b.WriteRune('|')
    			}
    			writeRegexp(b, sub, 0, flags)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 29 16:41:51 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  3. src/regexp/syntax/simplify.go

    // The returned regexp may share structure with or be the original.
    func (re *Regexp) Simplify() *Regexp {
    	if re == nil {
    		return nil
    	}
    	switch re.Op {
    	case OpCapture, OpConcat, OpAlternate:
    		// Simplify children, building new Regexp if children change.
    		nre := re
    		for i, sub := range re.Sub {
    			nsub := sub.Simplify()
    			if nre == re && nsub != sub {
    				// Start a copy.
    				nre = new(Regexp)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 02 00:13:47 UTC 2016
    - 4.2K bytes
    - Viewed (0)
  4. src/regexp/syntax/parse_test.go

    	OpNoWordBoundary: "nwb",
    	OpCapture:        "cap",
    	OpStar:           "star",
    	OpPlus:           "plus",
    	OpQuest:          "que",
    	OpRepeat:         "rep",
    	OpConcat:         "cat",
    	OpAlternate:      "alt",
    }
    
    // dumpRegexp writes an encoding of the syntax tree for the regexp re to b.
    // It is used during testing to distinguish between parses that might print
    // the same using re's String method.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:02:30 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  5. src/regexp/syntax/compile.go

    			return c.nop()
    		}
    		var f frag
    		for i, sub := range re.Sub {
    			if i == 0 {
    				f = c.compile(sub)
    			} else {
    				f = c.cat(f, c.compile(sub))
    			}
    		}
    		return f
    	case OpAlternate:
    		var f frag
    		for _, sub := range re.Sub {
    			f = c.alt(f, c.compile(sub))
    		}
    		return f
    	}
    	panic("regexp: unhandled case in compile")
    }
    
    func (c *compiler) inst(op InstOp) frag {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 13 14:52:20 UTC 2021
    - 6.8K bytes
    - Viewed (0)
  6. src/regexp/syntax/parse.go

    		size = 2 + p.calcSize(re.Sub[0], false)
    	case OpPlus, OpQuest:
    		size = 1 + p.calcSize(re.Sub[0], false)
    	case OpConcat:
    		for _, sub := range re.Sub {
    			size += p.calcSize(sub, false)
    		}
    	case OpAlternate:
    		for _, sub := range re.Sub {
    			size += p.calcSize(sub, false)
    		}
    		if len(re.Sub) > 1 {
    			size += int64(len(re.Sub)) - 1
    		}
    	case OpRepeat:
    		sub := p.calcSize(re.Sub[0], false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 13:59:01 UTC 2024
    - 52.1K bytes
    - Viewed (0)
  7. src/regexp/regexp.go

    	case syntax.OpRepeat:
    		return re.Min * minInputLen(re.Sub[0])
    	case syntax.OpConcat:
    		l := 0
    		for _, sub := range re.Sub {
    			l += minInputLen(sub)
    		}
    		return l
    	case syntax.OpAlternate:
    		l := minInputLen(re.Sub[0])
    		var lnext int
    		for _, sub := range re.Sub[1:] {
    			lnext = minInputLen(sub)
    			if lnext < l {
    				l = lnext
    			}
    		}
    		return l
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  8. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"InstRuneAnyNotNL", Const, 0},
    		{"IsWordChar", Func, 0},
    		{"Literal", Const, 0},
    		{"MatchNL", Const, 0},
    		{"NonGreedy", Const, 0},
    		{"OneLine", Const, 0},
    		{"Op", Type, 0},
    		{"OpAlternate", Const, 0},
    		{"OpAnyChar", Const, 0},
    		{"OpAnyCharNotNL", Const, 0},
    		{"OpBeginLine", Const, 0},
    		{"OpBeginText", Const, 0},
    		{"OpCapture", Const, 0},
    		{"OpCharClass", Const, 0},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  9. api/go1.txt

    pkg regexp/syntax, const Literal Flags
    pkg regexp/syntax, const MatchNL Flags
    pkg regexp/syntax, const NonGreedy Flags
    pkg regexp/syntax, const OneLine Flags
    pkg regexp/syntax, const OpAlternate Op
    pkg regexp/syntax, const OpAnyChar Op
    pkg regexp/syntax, const OpAnyCharNotNL Op
    pkg regexp/syntax, const OpBeginLine Op
    pkg regexp/syntax, const OpBeginText Op
    pkg regexp/syntax, const OpCapture Op
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 14 18:58:28 UTC 2013
    - 1.7M bytes
    - Viewed (0)
  10. api/go1.1.txt

    pkg regexp/syntax, const Literal = 2
    pkg regexp/syntax, const MatchNL = 12
    pkg regexp/syntax, const NonGreedy = 32
    pkg regexp/syntax, const OneLine = 16
    pkg regexp/syntax, const OpAlternate = 19
    pkg regexp/syntax, const OpAnyChar = 6
    pkg regexp/syntax, const OpAnyCharNotNL = 5
    pkg regexp/syntax, const OpBeginLine = 7
    pkg regexp/syntax, const OpBeginText = 9
    pkg regexp/syntax, const OpCapture = 13
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 31 20:37:15 UTC 2022
    - 2.6M bytes
    - Viewed (0)
Back to top