std.regex.internal.ir

Types 22

aliasTrie = CodepointSetTrie!(13, 8)
aliasmakeTrie = codepointSetTrie!(13, 8)
enumRegexOption : uint
global = 0x1
casefold = 0x2
freeform = 0x4
nonunicode = 0x8
multiline = 0x10
singleline = 0x20
aliasRegexOptionNames = AliasSeq!('g', 'i', 'x', 'U', 'm', 's')
enumRegexInfo : uint
oneShot = 0x80
enumIR : uint
Char = 0b1_00000_00
Any = 0b1_00001_00
CodepointSet = 0b1_00010_00
Trie = 0b1_00011_00
OrChar = 0b1_00100_00
Nop = 0b1_00101_00
End = 0b1_00110_00
Bol = 0b1_00111_00
Eol = 0b1_01000_00
Wordboundary = 0b1_01001_00
Notwordboundary = 0b1_01010_00
Backref = 0b1_01011_00
GroupStart = 0b1_01100_00
GroupEnd = 0b1_01101_00
Option = 0b1_01110_00
GotoEndOr = 0b1_01111_00
Bof = 0b1_10000_00
Eof = 0b1_10001_00
OrStart = 0b1_00000_01
OrEnd = 0b1_00000_10
InfiniteStart = 0b1_00001_01
InfiniteEnd = 0b1_00001_10
InfiniteQStart = 0b1_00010_01
InfiniteQEnd = 0b1_00010_10
InfiniteBloomStart = 0b1_00011_01
InfiniteBloomEnd = 0b1_00011_10
RepeatStart = 0b1_00100_01
RepeatEnd = 0b1_00100_10
RepeatQStart = 0b1_00101_01
RepeatQEnd = 0b1_00101_10
LookaheadStart = 0b1_00110_01
LookaheadEnd = 0b1_00110_10
NeglookaheadStart = 0b1_00111_01
NeglookaheadEnd = 0b1_00111_10
LookbehindStart = 0b1_01000_01
LookbehindEnd = 0b1_01000_10
NeglookbehindStart = 0b1_01001_01
NeglookbehindEnd = 0b1_01001_10
structBytecode
Fields
uint raw
2 + 4 maxSequence
1 << 22 maxData
1 << 31 maxRaw
Methods
Bytecode fromRaw(uint data)
uint data()() @property const
void data()(uint val) @property
uint sequence()() @property const
IR code()() @property const
bool hotspot() @property const
bool isAtom() @property const
bool isStart() @property const
bool isEnd() @property const
int args() @property const
bool backreference() @property const
bool localRef() @property const
string mnemonic()() @trusted @property const
uint length() @property const
uint pairedLength() @property const
Bytecode paired() @property const
uint indexOfPair(uint pc) const
Constructors
this(IR code, uint data)
this(IR code, uint data, uint seq)
Fields
string name
uint group
structGroup(DataIndex)
Fields
DataIndex begin
DataIndex end
Methods
bool opCast(T : bool)() const
string toString()() @trusted const
interfaceMatcherFactory(Char)
Methods
Matcher!Char create(const ref Regex!Char, in Char[] input) const;
Matcher!Char dup(Matcher!Char m, in Char[] input) const;
size_t incRef(Matcher!Char m) const;
size_t decRef(Matcher!Char m) const;
classGenericFactory(alias EngineType, Char) : MatcherFactory!Char
Fields
(__traits(classInstanceSize, EngineType!Char) + size_t.sizeof - 1) & ~(size_t.sizeof - 1) classSize
Methods
EngineType!Char construct(const ref Regex!Char re, in Char[] input, void[] memory) const;
EngineType!Char create(const ref Regex!Char re, in Char[] input) const @trusted
EngineType!Char dup(Matcher!Char engine, in Char[] input) const @trusted
size_t incRef(Matcher!Char m) const
size_t decRef(Matcher!Char m) const @trusted
classRuntimeFactory(alias EngineType, Char) : GenericFactory!(EngineType, Char)
Methods
EngineType!Char construct(const ref Regex!Char re, in Char[] input, void[] memory) const
classCtfeFactory(alias EngineType, Char, alias func) : GenericFactory!(EngineType, Char)
Methods
EngineType!Char construct(const ref Regex!Char re, in Char[] input, void[] memory) const
classMatcher(Char)
Methods
int match(Group!size_t[] matches) pure;
size_t refCount() @property ref @safe
void dupTo(Matcher!Char m, void[] memory)
const(Regex!Char) pattern() @property ref @safe
Matcher rearm(in Char[] stream)
structRegex(Char)

Regex object holds regular expression pattern in compiled form. Instances of this object are constructed via calls to regex. This is an intended form for caching and storage of frequently used regular expressions.

Fields
CodepointSet[] charsets
const(NamedGroup)[] dict
uint ngroup
uint maxCounterDepth
uint hotspotTableSize
uint threadCount
uint flags
const(CharMatcher)[] matchers
const(BitTable)[] filters
uint[] backrefed
Kickstart!Char kickstart
MatcherFactory!Char factory
immutable(Char)[] pattern
Methods
bool empty() @safe @property const nothrow
@safe @property auto namedCaptures()`namedCaptures` returns a range of all named captures in a given regular expression.
const(Regex) withFactory(MatcherFactory!Char factory) pure const @trusted
const(Regex) withFlags(uint newFlags) pure const @trusted
const(Regex) withCode(const(Bytecode)[] code) pure const @trusted
const(Regex) withNGroup(uint nGroup) pure const @trusted
uint isBackref(uint n)
string toString()() const
structInput(Char) if (is(Char : dchar))
Fields
bool isLoopback
String _origin
size_t _index
Methods
bool nextChar(ref dchar res, ref size_t pos)
bool atEnd(){ @property
bool search(Kickstart)(ref const Kickstart kick, ref dchar res, ref size_t pos)
size_t lastIndex(){ @property
void reset(size_t index){
String opSlice(size_t start, size_t end){
auto loopBack(size_t index){
Constructors
this(String input, size_t idx = 0)
Fields
bool isLoopback
String _origin
size_t _index
Methods
bool nextChar(ref dchar res, ref size_t pos) @trusted
@property atEnd(){
auto loopBack(size_t index){
void reset(size_t index){
String opSlice(size_t start, size_t end){
size_t lastIndex(){ @property
Constructors
this(Input input, size_t index)
this(String input)
classRegexException : Exception

Exception object thrown in case of errors during regex compilation.

structBitTable
Fields
uint[4] filter
Methods
void add()(dchar ch){
bool opIndex()(dchar ch) const{
uint index()(dchar ch){
Constructors
this(CodepointSet set){
Fields
BitTable ascii
Trie trie
Methods
bool opIndex()(dchar ch) const
Constructors
this(CodepointSet set)
structSmallFixedArray(T, uint SMALL = 3) if (!hasElaborateDestructor!T)
Fields
size_t _sizeMask
size_t(1) <<(8 * size_t.sizeof - 1) BIG_MASK
~ BIG_MASK SIZE_MASK
Methods
bool isBig() @property const
size_t length() @property const
private inout(T)[] internalSlice() @trusted @property inout
size_t toHash() const
inout(T) opIndex(size_t idx) ref inout
@trusted ref opAssign(SmallFixedArray arr)
void mutate(scope void delegate(T[]) pure filler)
private void abandonRef() @trusted
Constructors
this(size_t size)
Destructors
Nested Templates
Payload

Functions 18

fnCharMatcher getMatcher(CodepointSet set) @trusted
fn@property ref wordMatcher()() pure
fnstring regexOptionsToString()(uint flags) nothrow pure @safe
fnint immediateParamsIR(IR i) @safe pure nothrow @nogc
fnint lengthOfIR(IR i) @safe pure nothrow @nogc
fnint lengthOfPairedIR(IR i) @safe pure nothrow @nogc
fnbool hasMerge(IR i) @safe pure nothrow @nogc
fnbool isStartIR(IR i) @safe pure nothrow @nogc
fnbool isEndIR(IR i) @safe pure nothrow @nogc
fnbool isAtomIR(IR i) @safe pure nothrow @nogc
fnIR pairedIR(IR i) @safe pure nothrow @nogc
private fnauto defaultFactoryImpl(Char)(const ref Regex!Char re)
fnauto assumePureFunction(T)(T t) if (isFunctionPointer!T)
fnT[] mallocArray(T)(size_t len) @system pure
fnT[] arrayInChunk(T)(size_t len, ref void[] chunk) @system
fnuint lookupNamedGroup(String)(const(NamedGroup)[] dict, String name) @trusted
fnbool endOfLine()(dchar front, bool seenCr)
fnbool startOfLine()(dchar back, bool seenNl)

Variables 5

enumvarprivateUseStart = '\U000F0000'
enumvarmaxCharsetUsed = 6
enumvarmaxCachedMatchers = 8
varCharMatcher[CodepointSet] matcherCache
private enumvarNEL = '\u0085'

Templates 3

tmplIRL(IR code)
tmpldefaultFactory(Char)
Functions
MatcherFactory!Char defaultFactory(const ref Regex!Char re)
tmplBackLooper(E)