Module: stdgo.regexp.syntax
(view library index)
import stdgo.regexp.syntax.Syntax
final classNL:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_classNL.classNL
final dotNL:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_dotNL.dotNL
final emptyBeginLine:stdgo.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyBeginLine.emptyBeginLine
final emptyBeginText:stdgo._internal.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyBeginText.emptyBeginText
final emptyEndLine:stdgo._internal.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyEndLine.emptyEndLine
final emptyEndText:stdgo._internal.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyEndText.emptyEndText
final emptyNoWordBoundary:stdgo._internal.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyNoWordBoundary.emptyNoWordBoundary
final emptyWordBoundary:stdgo._internal.regexp.syntax.EmptyOp = stdgo._internal.regexp.syntax.Syntax_emptyWordBoundary.emptyWordBoundary
final errInternalError:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInternalError.errInternalError
final errInvalidCharClass:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidCharClass.errInvalidCharClass
final errInvalidCharRange:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidCharRange.errInvalidCharRange
final errInvalidEscape:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidEscape.errInvalidEscape
final errInvalidNamedCapture:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidNamedCapture.errInvalidNamedCapture
final errInvalidPerlOp:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidPerlOp.errInvalidPerlOp
final errInvalidRepeatOp:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidRepeatOp.errInvalidRepeatOp
final errInvalidRepeatSize:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidRepeatSize.errInvalidRepeatSize
final errInvalidUTF8:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errInvalidUTF8.errInvalidUTF8
final errLarge:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errLarge.errLarge
final errMissingBracket:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errMissingBracket.errMissingBracket
final errMissingParen:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errMissingParen.errMissingParen
final errMissingRepeatArgument:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errMissingRepeatArgument.errMissingRepeatArgument
final errNestingDepth:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errNestingDepth.errNestingDepth
final errTrailingBackslash:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errTrailingBackslash.errTrailingBackslash
final errUnexpectedParen:stdgo.regexp.syntax.ErrorCode = stdgo._internal.regexp.syntax.Syntax_errUnexpectedParen.errUnexpectedParen
final foldCase:stdgo.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_foldCase.foldCase
final instAlt:stdgo.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instAlt.instAlt
final instAltMatch:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instAltMatch.instAltMatch
final instCapture:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instCapture.instCapture
final instEmptyWidth:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instEmptyWidth.instEmptyWidth
final instFail:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instFail.instFail
final instMatch:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instMatch.instMatch
final instNop:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instNop.instNop
final instRune:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instRune.instRune
final instRune1:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instRune1.instRune1
final instRuneAny:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instRuneAny.instRuneAny
final instRuneAnyNotNL:stdgo._internal.regexp.syntax.InstOp = stdgo._internal.regexp.syntax.Syntax_instRuneAnyNotNL.instRuneAnyNotNL
final literal:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_literal.literal
final matchNL:stdgo.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_matchNL.matchNL
final nonGreedy:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_nonGreedy.nonGreedy
final oneLine:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_oneLine.oneLine
final opAlternate:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opAlternate.opAlternate
final opAnyChar:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opAnyChar.opAnyChar
final opAnyCharNotNL:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opAnyCharNotNL.opAnyCharNotNL
final opBeginLine:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opBeginLine.opBeginLine
final opBeginText:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opBeginText.opBeginText
final opCapture:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opCapture.opCapture
final opCharClass:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opCharClass.opCharClass
final opConcat:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opConcat.opConcat
final opEmptyMatch:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opEmptyMatch.opEmptyMatch
final opEndLine:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opEndLine.opEndLine
final opEndText:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opEndText.opEndText
final opLiteral:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opLiteral.opLiteral
final opNoMatch:stdgo.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opNoMatch.opNoMatch
final opNoWordBoundary:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opNoWordBoundary.opNoWordBoundary
final opPlus:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opPlus.opPlus
final opQuest:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opQuest.opQuest
final opRepeat:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opRepeat.opRepeat
final opStar:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opStar.opStar
final opWordBoundary:stdgo._internal.regexp.syntax.Op = stdgo._internal.regexp.syntax.Syntax_opWordBoundary.opWordBoundary
final perl:stdgo.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_perl.perl
final perlX:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_perlX.perlX
final posix:stdgo.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_posix.posix
final simple:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_simple.simple
final unicodeGroups:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_unicodeGroups.unicodeGroups
final wasDollar:stdgo._internal.regexp.syntax.Flags = stdgo._internal.regexp.syntax.Syntax_wasDollar.wasDollar
import stdgo.regexp.syntax.*
{
pc_3532873 = uint32(p.Start)
i_3532896 = &p.Inst[pc_3532873]
gotoNext = 3532913
_ = gotoNext == 3532913
_ = 0
LoopBreak = false
gotoNext = 3532920
_ = gotoNext == 3532920
if !LoopBreak {
gotoNext = 3532924
_ = gotoNext == 3532924
_ = 0
gotoNext = 3532928
_ = gotoNext == 3532928
switch i_3532896.Op {
case 3:
gotoNext = 3532944
_ = gotoNext == 3532944
flag_3532859 |= EmptyOp(i_3532896.Arg)
gotoNext = 3533101
case 5:
gotoNext = 3532993
_ = gotoNext == 3532993
return 255
gotoNext = 3533101
case 2, 6:
gotoNext = 3533032
_ = gotoNext == 3533032
gotoNext = 3533101
default:
gotoNext = 3533072
_ = gotoNext == 3533072
LoopBreak = true
gotoNext = 3532920
gotoNext = 3533101
}
_ = gotoNext == 3533101
pc_3532873 = i_3532896.Out
i_3532896 = &p.Inst[pc_3532873]
gotoNext = 3532920
} else {
gotoNext = 3533134
}
_ = gotoNext == 3533134
return flag_3532859
gotoNext = -1
}
function benchmarkEmptyOpContext(_b:stdgo._internal.testing.B):Void
(view code)
function benchmarkIsWordChar(_b:stdgo._internal.testing.B):Void
(view code)
function compile(_re:stdgo.regexp.syntax.Regexp):stdgo.Tuple<stdgo.regexp.syntax.Prog, stdgo.Error>
Compile compiles the regexp into a program to be executed.
The regexp should have been simplified already (returned from re.Simplify).
(view code)
function emptyOpContext(_r1:Int, _r2:Int):stdgo.regexp.syntax.EmptyOp
EmptyOpContext returns the zero-width assertions
satisfied at the position between the runes r1 and r2.
Passing r1 == -1 indicates that the position is
at the beginning of the text.
Passing r2 == -1 indicates that the position is
at the end of the text.
(view code)
function isWordChar(_r:Int):Bool
IsWordChar reports whether r is considered a “word character”
during the evaluation of the \b and \B zero-width assertions.
These assertions are ASCII-only: the word characters are [A-Za-z0-9_].
(view code)
function parse(_s:String, _flags:stdgo.regexp.syntax.Flags):stdgo.Tuple<stdgo.regexp.syntax.Regexp, stdgo.Error>
Parse parses a regular expression string s, controlled by the specified
Flags, and returns a regular expression parse tree. The syntax is
described in the top-level comment.
(view code)
function testAppendRangeCollapse(_t:stdgo._internal.testing.T_):Void
(view code)
function testCompile(_t:stdgo._internal.testing.T_):Void
(view code)
function testFoldConstants(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseFoldCase(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseInvalidRegexps(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseLiteral(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseMatchNL(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseNoMatchNL(_t:stdgo._internal.testing.T_):Void
(view code)
function testParseSimple(_t:stdgo._internal.testing.T_):Void
(view code)
function testSimplify(_t:stdgo._internal.testing.T_):Void
(view code)
function testToStringEquivalentParse(_t:stdgo._internal.testing.T_):Void
(view code)
import stdgo.regexp.syntax.*
typedef EmptyOp = stdgo._internal.regexp.syntax.EmptyOp;
typedef ErrorCode = stdgo._internal.regexp.syntax.ErrorCode;
typedef Flags = stdgo._internal.regexp.syntax.Flags;
typedef InstOp = stdgo._internal.regexp.syntax.InstOp;
typedef Op = stdgo._internal.regexp.syntax.Op;
typedef T__struct_0
typedef T__struct_0 = stdgo._internal.regexp.syntax.T__struct_0;
typedef T__struct_1
typedef T__struct_1 = stdgo._internal.regexp.syntax.T__struct_1;
typedef T__struct_2
typedef T__struct_2 = stdgo._internal.regexp.syntax.T__struct_2;
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)
(view file containing code)