MCPcopy Create free account

hub / github.com/dlclark/regexp2 / functions

Functions1,370 in github.com/dlclark/regexp2

↓ 1 callersMethodemitCapture
(node *RegexNode)
syntax/writer.go:539
↓ 1 callersMethodemitFragment
The main RegexCode generator. It does a depth-first walk through the tree and calls EmitFragment to emits code before and after each child of an inter
syntax/writer.go:268
↓ 1 callersMethodemptyOptionsStack
True if options stack is empty.
syntax/parser.go:2624
↓ 1 callersMethodemptyStack
True if the group stack is empty.
syntax/parser.go:2805
↓ 1 callersMethodemptyStack
Returns true if the stack is empty.
syntax/writer.go:557
↓ 1 callersFunctionequalInts
(left, right []int)
runner_codegen_test.go:37
↓ 1 callersFunctionexecuteDefault
(r *Runner)
runner.go:241
↓ 1 callersFunctionextendClock
extendClock ensures that clock is live and will run until at least end.
fastclock.go:74
↓ 1 callersMethodextendSet
extendSet reports whether the runes from the current start to end are in Set. It reads only as far as end.
runner.go:2084
↓ 1 callersMethodextractCommonPrefixOneNotoneSet
This function optimizes out prefix nodes from alternation branches that are the same across multiple contiguous branches. e.g. \w12|\d34|\d56|\w78|\w9
syntax/tree.go:1302
↓ 1 callersMethodextractCommonPrefixText
Analyzes all the branches of the alternation for text that's identical at the beginning of every branch. That text is then pulled out into its own on
syntax/tree.go:1187
↓ 1 callersFunctionextractRequiredLandmark
(node *RegexNode)
syntax/prefixanalyzer.go:1346
↓ 1 callersFunctionextractRequiredLandmarkAlternative
(node *RegexNode)
syntax/prefixanalyzer.go:1371
↓ 1 callersMethodfcIsEmpty
True if the stack is empty.
syntax/prefix.go:135
↓ 1 callersMethodfinalOptimize
Performs additional optimizations on an entire tree prior to being used. Some optimizations are performed by the parser while parsing, and others are
syntax/tree.go:305
↓ 1 callersMethodfindAndMakeLoopsAtomic
Finds {one/notone/set}loop nodes in the concatenation that can be automatically upgraded to {one/notone/set}loopatomic nodes. Such changes avoid pote
syntax/tree.go:373
↓ 1 callersFunctionfindFixedDistanceCharLeftToRight
(r *Runner, ch rune, distance int)
runner.go:1627
↓ 1 callersFunctionfindFixedDistanceSets
arbitrary cut-off to avoid generating lots of sets unnecessarily Finds sets at fixed-offsets from the beginning of the pattern/</summary> set "thoroug
syntax/prefixanalyzer.go:724
↓ 1 callersFunctionfindFixedDistanceSetsLeftToRight
(r *Runner, sets []syntax.FixedDistanceSet)
runner.go:1679
↓ 1 callersFunctionfindFixedDistanceString
Analyzes a list of fixed-distance sets to extract a case-sensitive string at a fixed distance.</summary>
syntax/optimizations.go:693
↓ 1 callersFunctionfindFixedDistanceStringLeftToRight
(r *Runner, literal []rune, distance int)
runner.go:1651
↓ 1 callersFunctionfindLeadingOrTrailingAnchor
(node *RegexNode, leading bool)
syntax/prefix.go:883
↓ 1 callersFunctionfindLeadingPositiveLookahead
Returns a leading positive lookahead if found and whether to keep examining subsequent nodes in a concatenation.
syntax/prefixanalyzer.go:1457
↓ 1 callersFunctionfindLeadingStringLeftToRight
(r *Runner, prefix []rune, ignoreCase, ascii bool)
runner.go:1527
↓ 1 callersMethodfindLiteral
(input []rune, startAt, endAt, limit, readEnd int, alt *syntax.RequiredLandmarkAlternative)
runner.go:1984
↓ 1 callersFunctionfindLiteralAfterLoopLeftToRight
(r *Runner, literal *syntax.LiteralAfterLoop)
runner.go:1709
↓ 1 callersFunctionfindLiteralFollowingLeadingLoop
The above table was generated programmatically with the following. This can be augmented to incorporate additional data sources, though it is only in
syntax/prefixanalyzer.go:1131
↓ 1 callersFunctionfindPrefixesCore
Updates the results list with found prefixes. All existing strings in the list are treated as existing discovered prefixes prior to the node being pro
syntax/prefixanalyzer.go:471
↓ 1 callersFunctionfindRequiredLandmarkChain
(node *RegexNode)
syntax/prefixanalyzer.go:1262
↓ 1 callersFunctionfindRequiredLandmarkChainLeftToRight
(r *Runner, chain *syntax.RequiredLandmarkChain)
runner.go:1737
↓ 1 callersMethodfindSet
findSet looks for the shortest core at each start. The VM can backtrack a longer one, so a longer core could pass the whitespace required after it or
runner.go:2033
↓ 1 callersFunctionfixedDistanceSetDescription
(set FixedDistanceSet)
syntax/optimizations.go:286
↓ 1 callersFunctionfixedDistanceSetsMatchAt
(r *Runner, sets []syntax.FixedDistanceSet, start int)
runner.go:2253
↓ 1 callersMethodforwardcharnext
()
runner.go:1373
↓ 1 callersMethodforwardchars
()
runner.go:1366
↓ 1 callersFunctiongenerate
(db database)
internal/unicodegen/main.go:99
↓ 1 callersMethodget
(neededSize, maxSize int)
bufferpool.go:38
↓ 1 callersFunctiongetAnchors
(tree *RegexTree)
syntax/prefix.go:785
↓ 1 callersFunctiongetCharSetFromCategoryString
(negateSet bool, negateCat bool, cats ...string)
syntax/charclass.go:116
↓ 1 callersFunctiongetCharSetFromOldString
(setText []rune, negate bool)
syntax/charclass.go:135
↓ 1 callersMethodgetDispatchCandidates
(node *RegexNode)
syntax/writer.go:582
↓ 1 callersFunctiongetEngineRegexp
(pattern string, c compileConfig)
regexp_codegen.go:66
↓ 1 callersMethodgetExact
getExact uses size classes to share slice wrappers, but allocates exactly the requested capacity. A returned match can then take the buffer without re
bufferpool.go:65
↓ 1 callersFunctiongetFindMode
(rtl bool, t NodeType)
syntax/optimizations.go:664
↓ 1 callersMethodgetFirstChars
()
syntax/prefix.go:286
↓ 1 callersFunctiongetFirstCharsPrefix
It takes a RegexTree and computes the set of chars that can start it.
syntax/prefix.go:18
↓ 1 callersFunctiongetPrefix
This is a related computation: it takes a RegexTree and computes the leading substring if it sees one. It's quite trivial and gives up easily.
syntax/prefix.go:321
↓ 1 callersFunctiongetRangeLength
(r *SingleRange, negated bool)
syntax/prefixanalyzer.go:1043
↓ 1 callersMethodgetReplacerData
(replacement string)
regexp.go:226
↓ 1 callersMethodgoTo
(newpos int)
runner.go:1136
↓ 1 callersMethodgroupNameFromSlot
groupNameFromSlot returns the name of the group stored in capture slot i. The slot differs from the group number when explicit numbers leave gaps.
regexp.go:600
↓ 1 callersMethodgrowTrack
()
runner.go:1186
↓ 1 callersMethodhasDisjointStartingSets
hasDisjointStartingSets reports whether every branch is non-nullable and begins with a character set that cannot overlap any other branch. In that cas
syntax/tree.go:709
↓ 1 callersFunctionhasExtendedPictographicZWJBefore
(text []rune, pos int)
syntax/grapheme.go:199
↓ 1 callersFunctionhasIndicConjunctBefore
(text []rune, pos int)
syntax/grapheme.go:181
↓ 1 callersFunctionhexDigit
Returns n <= 0xF for a hex digit.
regexp_corpus_pcre_test.go:362
↓ 1 callersMethodindex
(input string)
stringprefixfilter.go:141
↓ 1 callersFunctionindexOfLiteralAfterLoop
(r *Runner, literal *syntax.LiteralAfterLoop, searchStart int)
runner.go:2195
↓ 1 callersFunctionindexOfRuneBytes
(haystack []byte, find rune)
helpers/indexof.go:364
↓ 1 callersFunctionindexOfSet
(chars []rune, set syntax.FixedDistanceSet)
runner.go:2224
↓ 1 callersMethodinitMatch
(textInfo *matchText)
runner.go:2307
↓ 1 callersMethodinitTrackCount
()
runner.go:2585
↓ 1 callersMethodintIsEmpty
True if the stack is empty.
syntax/prefix.go:111
↓ 1 callersFunctionisASCIIText
(s string)
syntax/optimizations.go:426
↓ 1 callersFunctionisAsciiRunes
(in []rune)
syntax/charclass.go:1508
↓ 1 callersMethodisECMAQuantifiable
Returns false for assertions, which cannot be quantified in ECMAScript except for lookaheads without the Unicode option.
syntax/parser.go:2870
↓ 1 callersFunctionisGraphemeBoundary
(text []rune, pos int)
syntax/grapheme.go:147
↓ 1 callersFunctionisGraphemeBoundaryForward
(previous graphemeBreakClass, current graphemeProperties, state graphemeForwardState)
syntax/grapheme.go:119
↓ 1 callersMethodisIntrinsicallyAtomic
isIntrinsicallyAtomic reports whether a successful match of this node has no alternative input-consuming path to explore if something later fails.
syntax/tree.go:783
↓ 1 callersFunctionisOnlyTopOption
Returns true for options allowed only at the top level
syntax/parser.go:2216
↓ 1 callersFunctionisQuantifier
Returns true for those characters that begin a quantifier.
syntax/parser.go:2865
↓ 1 callersFunctionisRustRegexQuote
(c byte)
regexp_corpus_rust_test.go:550
↓ 1 callersFunctionisSpace
(ch rune)
syntax/parser.go:2850
↓ 1 callersFunctionisSpecial
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2855
↓ 1 callersFunctionisStopperX
Returns true for those characters that terminate a string of ordinary chars.
syntax/parser.go:2860
↓ 1 callersMethodisTrueQuantifier
()
syntax/parser.go:2880
↓ 1 callersFunctionisUnboundedSetLoop
(node *RegexNode)
syntax/prefixanalyzer.go:1339
↓ 1 callersMethodisUseful
()
syntax/optimizations.go:639
↓ 1 callersFunctionisZeroWidthLandmarkGap
(node *RegexNode)
syntax/prefixanalyzer.go:1319
↓ 1 callersFunctionkeepCacheBytes
(maxBytes, actualBytes int)
options.go:89
↓ 1 callersFunctionknownDistinctSets
(set1, set2 *CharSet)
syntax/charclass.go:1301
↓ 1 callersFunctionlandmarkChainDescription
(chain *RequiredLandmarkChain)
syntax/optimizations.go:317
↓ 1 callersFunctionlastIndexOfRuneBytes
(haystack []byte, find rune)
helpers/indexof.go:381
↓ 1 callersFunctionleadingPrefixFirstRunes
(prefixes [][]rune)
syntax/optimizations.go:654
↓ 1 callersMethodleftchars
()
runner.go:1351
↓ 1 callersFunctionliteralAfterLoopDescription
(literal *LiteralAfterLoop)
syntax/optimizations.go:299
↓ 1 callersFunctionmakeQuickCode
(code *syntax.Code)
regexp.go:139
↓ 1 callersFunctionmakeText
(n int)
helpers/searchvalues_test.go:71
↓ 1 callersMethodmatchPattern
(text []rune, index int)
syntax/prefix.go:748
↓ 1 callersFunctionmatchRuneIndexes
(m *regexp2.Match, offsets []int)
compat/regexp.go:332
↓ 1 callersFunctionmatchString
(t *testing.T, re *Regexp, toMatch string)
regexp_corpus_pcre_test.go:241
↓ 1 callersMethodmatchStringAt
(s string, startAt int)
regexp.go:482
↓ 1 callersFunctionmaxLessThanTwiceMin
(max, min int)
syntax/tree.go:1584
↓ 1 callersFunctionmayOverlapByEnumeration
(set1, set2 *CharSet)
syntax/charclass.go:1325
↓ 1 callersFunctionmerge
(input ranges)
internal/unicodegen/main.go:85
↓ 1 callersFunctionmultiplyMaxLength
(x, y int)
syntax/tree.go:1571
↓ 1 callersFunctionmultiplyMinLength
(x, y int)
syntax/tree.go:1553
↓ 1 callersFunctionnewASCIISetStringScanner
(set syntax.FixedDistanceSet)
stringprefixfilter.go:83
↓ 1 callersFunctionnewBmPrefix
(pattern []rune, caseInsensitive, rightToLeft bool)
syntax/prefix.go:415
↓ 1 callersFunctionnewFindOptimizations
(tree *RegexTree, opt ParseOptions)
syntax/optimizations.go:358
← previousnext →501–600 of 1,370, ranked by callers