Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsWordChar ¶
IsWordChar reports whether r is considered a “word” character during the evaluation of the \b and \B zero-width assertions. These characters are [A-Za-z0-9_].
Types ¶
type EmptyOp ¶
EmptyOp is a bitmask of empty-width assertions.
const ( EmptyBeginLine EmptyOp = gosyntax.EmptyBeginLine EmptyEndLine EmptyOp = gosyntax.EmptyEndLine EmptyBeginText EmptyOp = gosyntax.EmptyBeginText EmptyEndText EmptyOp = gosyntax.EmptyEndText EmptyWordBoundary EmptyOp = gosyntax.EmptyWordBoundary EmptyNoWordBoundary EmptyOp = gosyntax.EmptyNoWordBoundary )
func EmptyOpContext ¶
EmptyOpContext returns the EmptyOp at the position between r1 and r2.
type Error ¶
An Error describes a failure to parse a regular expression and gives the offending expression.
type ErrorCode ¶
An ErrorCode describes a category of parsing error.
const ( ErrInternalError ErrorCode = gosyntax.ErrInternalError // Parse errors ErrInvalidRepeatOp ErrorCode = gosyntax.ErrInvalidRepeatOp ErrInvalidRepeatSize ErrorCode = gosyntax.ErrInvalidRepeatSize ErrInvalidEscape ErrorCode = gosyntax.ErrInvalidEscape ErrInvalidNamedCapture ErrorCode = gosyntax.ErrInvalidNamedCapture ErrInvalidCharClass ErrorCode = gosyntax.ErrInvalidCharClass ErrInvalidCharRange ErrorCode = gosyntax.ErrInvalidCharRange ErrMissingBracket ErrorCode = gosyntax.ErrMissingBracket ErrMissingParen ErrorCode = gosyntax.ErrMissingParen ErrMissingRepeatArgument ErrorCode = gosyntax.ErrMissingRepeatArgument ErrTrailingBackslash ErrorCode = gosyntax.ErrTrailingBackslash ErrUnexpectedParen ErrorCode = gosyntax.ErrUnexpectedParen )
type Flags ¶
const ( FoldCase Flags = gosyntax.FoldCase Literal Flags = gosyntax.Literal ClassNL Flags = gosyntax.ClassNL DotNL Flags = gosyntax.DotNL OneLine Flags = gosyntax.OneLine NonGreedy Flags = gosyntax.NonGreedy PerlX Flags = gosyntax.PerlX UnicodeGroups Flags = gosyntax.UnicodeGroups WasDollar Flags = gosyntax.WasDollar Simple Flags = gosyntax.Simple MatchNL = gosyntax.MatchNL Perl = gosyntax.Perl POSIX = gosyntax.POSIX )
type InstOp ¶
InstOp is an instruction opcode.
const ( InstAlt InstOp = gosyntax.InstAlt InstAltMatch InstOp = gosyntax.InstAltMatch InstCapture InstOp = gosyntax.InstCapture InstEmptyWidth InstOp = gosyntax.InstEmptyWidth InstMatch InstOp = gosyntax.InstMatch InstFail InstOp = gosyntax.InstFail InstNop InstOp = gosyntax.InstNop InstRune InstOp = gosyntax.InstRune InstRune1 InstOp = gosyntax.InstRune1 InstRuneAny InstOp = gosyntax.InstRuneAny InstRuneAnyNotNL InstOp = gosyntax.InstRuneAnyNotNL )
type Op ¶
Op is a regular expression operator.
const ( OpNoMatch Op = gosyntax.OpNoMatch OpEmptyMatch Op = gosyntax.OpEmptyMatch OpLiteral Op = gosyntax.OpLiteral OpCharClass Op = gosyntax.OpCharClass OpAnyCharNotNL Op = gosyntax.OpAnyCharNotNL OpAnyChar Op = gosyntax.OpAnyChar OpBeginLine Op = gosyntax.OpBeginLine OpEndLine Op = gosyntax.OpEndLine OpBeginText Op = gosyntax.OpBeginText OpEndText Op = gosyntax.OpEndText OpWordBoundary Op = gosyntax.OpWordBoundary OpNoWordBoundary Op = gosyntax.OpNoWordBoundary OpCapture Op = gosyntax.OpCapture OpStar Op = gosyntax.OpStar OpPlus Op = gosyntax.OpPlus OpQuest Op = gosyntax.OpQuest OpRepeat Op = gosyntax.OpRepeat OpConcat Op = gosyntax.OpConcat OpAlternate Op = gosyntax.OpAlternate )
type Regexp ¶
type UnsupportedError ¶
type UnsupportedError struct {
Op string
}
func (*UnsupportedError) Error ¶
func (e *UnsupportedError) Error() string
Click to show internal directories.
Click to hide internal directories.