C# Class System.Text.RegularExpressions.RegexRunner

Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Protected Properties

Свойство Type Description
runcrawl int[]
runcrawlpos int
runmatch Match
runmatch System.Text.RegularExpressions.Match
runregex Regex
runregex System.Text.RegularExpressions.Regex
runstack int[]
runstackpos int
runtext string
runtextbeg int
runtextend int
runtextpos int
runtextstart int
runtrack int[]
runtrackcount int
runtrackpos int

Méthodes protégées

Méthode Description
Capture ( int capnum, int start, int end ) : void

Called by Go() to capture a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWriter).

CharInClass ( char ch, string charClass ) : bool
CharInSet ( char ch, string set, string category ) : bool
CheckTimeout ( ) : void
Crawl ( int i ) : void

Save a number on the longjump unrolling stack

Crawlpos ( ) : int

Get the height of the stack

DoubleCrawl ( ) : void

Increases the size of the longjump unrolling stack.

DoubleStack ( ) : void

Called by the implementation of Go() to increase the size of the grouping stack.

DoubleTrack ( ) : void

Called by the implementation of Go() to increase the size of the backtracking stack.

EnsureStorage ( ) : void

Called by the implementation of Go() to increase the size of storage

FindFirstChar ( ) : bool

The responsibility of FindFirstChar() is to advance runtextpos until it is at the next position which is a candidate for the beginning of a successful match.

Go ( ) : void

The responsibility of Go() is to run the regular expression at runtextpos and call Capture() on all the captured subexpressions, then to leave runtextpos at the ending position. It should leave runtextpos where it started if there was no match.

InitTrackCount ( ) : void

InitTrackCount must initialize the runtrackcount field; this is used to know how large the initial runtrack and runstack arrays must be.

IsBoundary ( int index, int startpos, int endpos ) : bool

Called by the implementation of Go() to decide whether the pos at the specified index is a boundary or not. It's just not worth emitting inline code for this logic.

IsECMABoundary ( int index, int startpos, int endpos ) : bool
IsMatched ( int cap ) : bool

Call out to runmatch to get around visibility issues

MatchIndex ( int cap ) : int

Call out to runmatch to get around visibility issues

MatchLength ( int cap ) : int

Call out to runmatch to get around visibility issues

Popcrawl ( ) : int

Remove a number from the longjump unrolling stack

RegexRunner ( )
RegexRunner ( ) : System.Diagnostics
Scan ( Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick ) : Match

Scans the string to find the first match. Uses the Match object both to feed text in and as a place to store matches that come out. All the action is in the abstract Go() method defined by subclasses. Our responsibility is to load up the class members (as done here) before calling Go. The optimizer can compute a set of candidate starting characters, and we could use a separate method Skip() that will quickly scan past any characters that we know can't match.

Scan ( Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, System.TimeSpan timeout ) : Match
Scan ( System regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick ) : System.Text.RegularExpressions.Match
Scan ( System regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, System timeout ) : System.Text.RegularExpressions.Match
TransferCapture ( int capnum, int uncapnum, int start, int end ) : void

Called by Go() to capture a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWriter).

Uncapture ( ) : void

Private Methods

Méthode Description
DoCheckTimeout ( ) : void
DumpState ( ) : void

Dump the current state

InitMatch ( ) : void

Initializes all the data members that are used by Go()

StackDescription ( int a, int index ) : string
StartTimeoutWatch ( ) : void
TextposDescription ( ) : string
TidyMatch ( bool quick ) : Match

Put match in its canonical form before returning it.

Method Details

Capture() protected méthode

Called by Go() to capture a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWriter).
protected Capture ( int capnum, int start, int end ) : void
capnum int
start int
end int
Résultat void

CharInClass() protected static méthode

protected static CharInClass ( char ch, string charClass ) : bool
ch char
charClass string
Résultat bool

CharInSet() protected static méthode

protected static CharInSet ( char ch, string set, string category ) : bool
ch char
set string
category string
Résultat bool

CheckTimeout() protected méthode

protected CheckTimeout ( ) : void
Résultat void

Crawl() protected méthode

Save a number on the longjump unrolling stack
protected Crawl ( int i ) : void
i int
Résultat void

Crawlpos() protected méthode

Get the height of the stack
protected Crawlpos ( ) : int
Résultat int

DoubleCrawl() protected méthode

Increases the size of the longjump unrolling stack.
protected DoubleCrawl ( ) : void
Résultat void

DoubleStack() protected méthode

Called by the implementation of Go() to increase the size of the grouping stack.
protected DoubleStack ( ) : void
Résultat void

DoubleTrack() protected méthode

Called by the implementation of Go() to increase the size of the backtracking stack.
protected DoubleTrack ( ) : void
Résultat void

EnsureStorage() protected méthode

Called by the implementation of Go() to increase the size of storage
protected EnsureStorage ( ) : void
Résultat void

FindFirstChar() protected abstract méthode

The responsibility of FindFirstChar() is to advance runtextpos until it is at the next position which is a candidate for the beginning of a successful match.
protected abstract FindFirstChar ( ) : bool
Résultat bool

Go() protected abstract méthode

The responsibility of Go() is to run the regular expression at runtextpos and call Capture() on all the captured subexpressions, then to leave runtextpos at the ending position. It should leave runtextpos where it started if there was no match.
protected abstract Go ( ) : void
Résultat void

InitTrackCount() protected abstract méthode

InitTrackCount must initialize the runtrackcount field; this is used to know how large the initial runtrack and runstack arrays must be.
protected abstract InitTrackCount ( ) : void
Résultat void

IsBoundary() protected méthode

Called by the implementation of Go() to decide whether the pos at the specified index is a boundary or not. It's just not worth emitting inline code for this logic.
protected IsBoundary ( int index, int startpos, int endpos ) : bool
index int
startpos int
endpos int
Résultat bool

IsECMABoundary() protected méthode

protected IsECMABoundary ( int index, int startpos, int endpos ) : bool
index int
startpos int
endpos int
Résultat bool

IsMatched() protected méthode

Call out to runmatch to get around visibility issues
protected IsMatched ( int cap ) : bool
cap int
Résultat bool

MatchIndex() protected méthode

Call out to runmatch to get around visibility issues
protected MatchIndex ( int cap ) : int
cap int
Résultat int

MatchLength() protected méthode

Call out to runmatch to get around visibility issues
protected MatchLength ( int cap ) : int
cap int
Résultat int

Popcrawl() protected méthode

Remove a number from the longjump unrolling stack
protected Popcrawl ( ) : int
Résultat int

RegexRunner() protected méthode

protected RegexRunner ( )

RegexRunner() protected méthode

protected RegexRunner ( ) : System.Diagnostics
Résultat System.Diagnostics

Scan() protected méthode

Scans the string to find the first match. Uses the Match object both to feed text in and as a place to store matches that come out. All the action is in the abstract Go() method defined by subclasses. Our responsibility is to load up the class members (as done here) before calling Go. The optimizer can compute a set of candidate starting characters, and we could use a separate method Skip() that will quickly scan past any characters that we know can't match.
protected Scan ( Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick ) : Match
regex Regex
text string
textbeg int
textend int
textstart int
prevlen int
quick bool
Résultat Match

Scan() protected méthode

protected Scan ( Regex regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, System.TimeSpan timeout ) : Match
regex Regex
text string
textbeg int
textend int
textstart int
prevlen int
quick bool
timeout System.TimeSpan
Résultat Match

Scan() protected méthode

protected Scan ( System regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick ) : System.Text.RegularExpressions.Match
regex System
text string
textbeg int
textend int
textstart int
prevlen int
quick bool
Résultat System.Text.RegularExpressions.Match

Scan() protected méthode

protected Scan ( System regex, string text, int textbeg, int textend, int textstart, int prevlen, bool quick, System timeout ) : System.Text.RegularExpressions.Match
regex System
text string
textbeg int
textend int
textstart int
prevlen int
quick bool
timeout System
Résultat System.Text.RegularExpressions.Match

TransferCapture() protected méthode

Called by Go() to capture a subexpression. Note that the capnum used here has already been mapped to a non-sparse index (by the code generator RegexWriter).
protected TransferCapture ( int capnum, int uncapnum, int start, int end ) : void
capnum int
uncapnum int
start int
end int
Résultat void

Uncapture() protected méthode

protected Uncapture ( ) : void
Résultat void

Property Details

runcrawl protected_oe property

protected int[] runcrawl
Résultat int[]

runcrawlpos protected_oe property

protected int runcrawlpos
Résultat int

runmatch protected_oe property

protected Match,System.Text.RegularExpressions runmatch
Résultat Match

runmatch protected_oe property

protected System.Text.RegularExpressions.Match runmatch
Résultat System.Text.RegularExpressions.Match

runregex protected_oe property

protected Regex,System.Text.RegularExpressions runregex
Résultat Regex

runregex protected_oe property

protected System.Text.RegularExpressions.Regex runregex
Résultat System.Text.RegularExpressions.Regex

runstack protected_oe property

protected int[] runstack
Résultat int[]

runstackpos protected_oe property

protected int runstackpos
Résultat int

runtext protected_oe property

protected string runtext
Résultat string

runtextbeg protected_oe property

protected int runtextbeg
Résultat int

runtextend protected_oe property

protected int runtextend
Résultat int

runtextpos protected_oe property

protected int runtextpos
Résultat int

runtextstart protected_oe property

protected int runtextstart
Résultat int

runtrack protected_oe property

protected int[] runtrack
Résultat int[]

runtrackcount protected_oe property

protected int runtrackcount
Résultat int

runtrackpos protected_oe property

protected int runtrackpos
Résultat int