C# Класс Pchp.Library.PerlRegex.RegexRunner

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
runcrawl int[]
runcrawlpos int
runmatch Match
runregex Regex
runstack int[]
runstackpos int
runtext string
runtextbeg int
runtextend int
runtextpos int
runtextstart int
runtrack int[]
runtrackcount int
runtrackpos int

Защищенные методы

Метод Описание
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 ( ) : System
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
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

Приватные методы

Метод Описание
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.

Описание методов

Capture() защищенный Метод

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
Результат void

CharInClass() защищенный статический Метод

protected static CharInClass ( char ch, string charClass ) : bool
ch char
charClass string
Результат bool

CharInSet() защищенный статический Метод

protected static CharInSet ( char ch, string set, string category ) : bool
ch char
set string
category string
Результат bool

CheckTimeout() защищенный Метод

protected CheckTimeout ( ) : void
Результат void

Crawl() защищенный Метод

Save a number on the longjump unrolling stack
protected Crawl ( int i ) : void
i int
Результат void

Crawlpos() защищенный Метод

Get the height of the stack
protected Crawlpos ( ) : int
Результат int

DoubleCrawl() защищенный Метод

Increases the size of the longjump unrolling stack.
protected DoubleCrawl ( ) : void
Результат void

DoubleStack() защищенный Метод

Called by the implementation of Go() to increase the size of the grouping stack.
protected DoubleStack ( ) : void
Результат void

DoubleTrack() защищенный Метод

Called by the implementation of Go() to increase the size of the backtracking stack.
protected DoubleTrack ( ) : void
Результат void

EnsureStorage() защищенный Метод

Called by the implementation of Go() to increase the size of storage
protected EnsureStorage ( ) : void
Результат void

FindFirstChar() защищенный абстрактный Метод

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
Результат bool

Go() защищенный абстрактный Метод

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
Результат void

InitTrackCount() защищенный абстрактный Метод

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
Результат void

IsBoundary() защищенный Метод

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
Результат bool

IsECMABoundary() защищенный Метод

protected IsECMABoundary ( int index, int startpos, int endpos ) : bool
index int
startpos int
endpos int
Результат bool

IsMatched() защищенный Метод

Call out to runmatch to get around visibility issues
protected IsMatched ( int cap ) : bool
cap int
Результат bool

MatchIndex() защищенный Метод

Call out to runmatch to get around visibility issues
protected MatchIndex ( int cap ) : int
cap int
Результат int

MatchLength() защищенный Метод

Call out to runmatch to get around visibility issues
protected MatchLength ( int cap ) : int
cap int
Результат int

Popcrawl() защищенный Метод

Remove a number from the longjump unrolling stack
protected Popcrawl ( ) : int
Результат int

RegexRunner() защищенный Метод

protected RegexRunner ( ) : System
Результат System

Scan() защищенный Метод

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
Результат Match

Scan() защищенный Метод

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
Результат Match

TransferCapture() защищенный Метод

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
Результат void

Uncapture() защищенный Метод

protected Uncapture ( ) : void
Результат void

Описание свойств

runcrawl защищенное свойство

protected int[] runcrawl
Результат int[]

runcrawlpos защищенное свойство

protected int runcrawlpos
Результат int

runmatch защищенное свойство

protected Match,Pchp.Library.PerlRegex runmatch
Результат Match

runregex защищенное свойство

protected Regex runregex
Результат Regex

runstack защищенное свойство

protected int[] runstack
Результат int[]

runstackpos защищенное свойство

protected int runstackpos
Результат int

runtext защищенное свойство

protected string runtext
Результат string

runtextbeg защищенное свойство

protected int runtextbeg
Результат int

runtextend защищенное свойство

protected int runtextend
Результат int

runtextpos защищенное свойство

protected int runtextpos
Результат int

runtextstart защищенное свойство

protected int runtextstart
Результат int

runtrack защищенное свойство

protected int[] runtrack
Результат int[]

runtrackcount защищенное свойство

protected int runtrackcount
Результат int

runtrackpos защищенное свойство

protected int runtrackpos
Результат int