go/src/regexp/syntax/regexp.go

type Regexp

type Op

const OpNoMatch

const OpEmptyMatch

const OpLiteral

const OpCharClass

const OpAnyCharNotNL

const OpAnyChar

const OpBeginLine

const OpEndLine

const OpBeginText

const OpEndText

const OpWordBoundary

const OpNoWordBoundary

const OpCapture

const OpStar

const OpPlus

const OpQuest

const OpRepeat

const OpConcat

const OpAlternate

const opPseudo

// Equal reports whether x and y have identical structure.
func (x *Regexp) Equal(y *Regexp) bool {}

type printFlags

const flagI

const flagM

const flagS

const flagOff

const flagPrec

const negShift

// addSpan enables the flags f around start..last,
// by setting flags[start] = f and flags[last] = flagOff.
func addSpan(start, last *Regexp, f printFlags, flags *map[*Regexp]printFlags) {}

// calcFlags calculates the flags to print around each subexpression in re,
// storing that information in (*flags)[sub] for each affected subexpression.
// The first time an entry needs to be written to *flags, calcFlags allocates the map.
// calcFlags also calculates the flags that must be active or can't be active
// around re and returns those flags.
func calcFlags(re *Regexp, flags *map[*Regexp]printFlags) (must, cant printFlags) {}

// writeRegexp writes the Perl syntax for the regular expression re to b.
func writeRegexp(b *strings.Builder, re *Regexp, f printFlags, flags map[*Regexp]printFlags) {}

func (re *Regexp) String() string {}

const meta

func escape(b *strings.Builder, r rune, force bool) {}

// MaxCap walks the regexp to find the maximum capture index.
func (re *Regexp) MaxCap() int {}

// CapNames walks the regexp to find the names of capturing groups.
func (re *Regexp) CapNames() []string {}

func (re *Regexp) capNames(names []string) {}