class ParserJVM extends Parser
Concrete parser for JVM flavor of regex
- Note
This class constructor is private, instances must be created using the companion weaponregex.parser.Parser object
- See also
https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/util/regex/Pattern.html
- Alphabetic
- By Inheritance
- ParserJVM
- Parser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def Indexed[_, T](p: => P[T])(implicit arg0: P[Any]): P[(Location, T)]
A higher order parser that add weaponregex.model.Location index information of the parse of the given parser
A higher order parser that add weaponregex.model.Location index information of the parse of the given parser
- p
the parser to be indexed
- returns
A tuple of the weaponregex.model.Location of the parse, and the return of the given parser
p
- Definition Classes
- Parser
- def RE[_](implicit arg0: P[Any]): P[RegexTree]
The top-level parsing rule which can parse either
or
orsimpleRE
The top-level parsing rule which can parse either
or
orsimpleRE
- returns
- Definition Classes
- Parser
any supported regex
Example: - def anyDot[_](implicit arg0: P[Any]): P[AnyDot]
Parse an any(dot) (
.
) predefined character classParse an any(dot) (
.
) predefined character class- returns
weaponregex.model.regextree.AnyDot tree node
- Definition Classes
- Parser
"."
Example: - final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atomicGroup[_](implicit arg0: P[Any]): P[AtomicGroup]
Parse an independent non-capturing group
Parse an independent non-capturing group
- Definition Classes
- Parser
"(?>abc)"
- Note
This is a Scala/Java-only regex syntax
Example: - def basicRE[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule which can parse either
quantifier
orelementaryRE
Intermediate parsing rule which can parse either
quantifier
orelementaryRE
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def bol[_](implicit arg0: P[Any]): P[BOL]
Parse a beginning of line character (
^
)
Parse a beginning of line character (
^
)
- returns
weaponregex.model.regextree.BOL tree node
- Definition Classes
- Parser
"^"
Example: - def boundary[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for boundary tokens which can parse either
bol
,eol
orboundaryMetaChar
Intermediate parsing rule for boundary tokens which can parse either
bol
,eol
orboundaryMetaChar
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def boundaryMetaChar[_](implicit arg0: P[Any]): P[Boundary]
Parse a boundary meta-character character
Parse a boundary meta-character character
- returns
weaponregex.model.regextree.BOL tree node
- Definition Classes
- Parser
"\z"
- See also
Example: - val boundaryMetaChars: String
Allowed boundary meta-characters
- def capturing[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for capturing-related tokens which can parse either
group
orspecialConstruct
Intermediate parsing rule for capturing-related tokens which can parse either
group
orspecialConstruct
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def charClass[_](implicit arg0: P[Any]): P[CharacterClass]
Parse a character class
Parse a character class
- returns
- def charClassCharLiteral[_](implicit arg0: P[Any]): P[Character]
Parse a single literal character that is allowed to be in a character class
Parse a single literal character that is allowed to be in a character class
- returns
weaponregex.model.regextree.Character tree node
- Definition Classes
- Parser
"{"
- See also
Example: - def charClassCharLiteralSpecialCases[_](implicit arg0: P[Any]): P[String]
Parse special cases of a character literal in a character class
- def charClassIntersection[_](implicit arg0: P[Any]): P[CharClassIntersection]
Parse a character class intersection used inside a character class.
Parse a character class intersection used inside a character class.
- returns
"abc&&[^bc]&&a-z"
Example: - def charClassNaked[_](implicit arg0: P[Any]): P[CharacterClassNaked]
Parse a character class content without the surround syntactical symbols, i.e.
Parse a character class content without the surround syntactical symbols, i.e. "naked"
- returns
- Note
This is used only inside the weaponregex.parser.ParserJVM.charClassIntersection
- val charClassSpecialChars: String
Special characters within a character class
- def charHex[_](implicit arg0: P[Any]): P[MetaChar]
Parse a character with hexadecimal value
\xhh
Parse a character with hexadecimal value
\xhh
- returns
weaponregex.model.regextree.MetaChar tree node
- Definition Classes
- Parser
"\x01"
Example: - def charHexBrace[_](implicit arg0: P[Any]): P[MetaChar]
Parse a character with hexadecimal value with braces
\x{h...h}
(Character.MIN_CODE_POINT <= 0xh...h <= Character.MAX_CODE_POINT)Parse a character with hexadecimal value with braces
\x{h...h}
(Character.MIN_CODE_POINT <= 0xh...h <= Character.MAX_CODE_POINT)- returns
weaponregex.model.regextree.MetaChar tree node
- Definition Classes
- Parser
"\x{0123}"
Example: - def charLiteral[_](implicit arg0: P[Any]): P[Character]
Parse a single literal character that is not a regex special character
Parse a single literal character that is not a regex special character
- returns
weaponregex.model.regextree.Character tree node
- Definition Classes
- Parser
"a"
- See also
Example: - def charLiteralSpecialCases[_](implicit arg0: P[Any]): P[String]
Parse special cases of a character literal
Parse special cases of a character literal
- returns
The captured character as a string
- Definition Classes
- Parser
- def charOct[_](implicit arg0: P[Any]): P[MetaChar]
Parse a character with octal value
\0n
,\0nn
,\0mnn
(0 <= m <= 3, 0 <= n <= 7)Parse a character with octal value
\0n
,\0nn
,\0mnn
(0 <= m <= 3, 0 <= n <= 7)- returns
weaponregex.model.regextree.MetaChar tree node
- def charUnicode[_](implicit arg0: P[Any]): P[MetaChar]
Parse a unicode character
\ uhhhh
Parse a unicode character
\ uhhhh
- returns
weaponregex.model.regextree.MetaChar tree node
- Definition Classes
- Parser
"\ u0020"
Example: - def character[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for character-related tokens which can parse either
metaCharacter
orcharLiteral
Intermediate parsing rule for character-related tokens which can parse either
metaCharacter
orcharLiteral
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def classItem[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for character class item tokens which can parse either
charClass
,preDefinedCharClass
,metaCharacter
,range
,quoteChar
, orcharClassCharLiteral
Intermediate parsing rule for character class item tokens which can parse either
charClass
,preDefinedCharClass
,metaCharacter
,range
,quoteChar
, orcharClassCharLiteral
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def concat[_](implicit arg0: P[Any]): P[Concat]
Parse a concatenation of
basicRE
sParse a concatenation of
basicRE
s- returns
weaponregex.model.regextree.Concat tree node
- Definition Classes
- Parser
"abc"
Example: - def controlChar[_](implicit arg0: P[Any]): P[ControlChar]
Parse an control meta-character based on caret notation
Parse an control meta-character based on caret notation
- returns
weaponregex.model.regextree.ControlChar tree node
- Definition Classes
- Parser
"\cA"
- See also
Example: - def elementaryRE[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule which can parse either
capturing
,anyDot
,preDefinedCharClass
,boundary
,charClass
,reference
,character
orquote
Intermediate parsing rule which can parse either
capturing
,anyDot
,preDefinedCharClass
,boundary
,charClass
,reference
,character
orquote
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def empty[_](implicit arg0: P[Any]): P[Empty]
Parse an empty string
Parse an empty string
- returns
weaponregex.model.regextree.Empty tree node
- Definition Classes
- Parser
""
Example: - def entry[_](implicit arg0: P[Any]): P[RegexTree]
The entry point of the parser that should parse from the start to the end of the regex string
The entry point of the parser that should parse from the start to the end of the regex string
- returns
- Definition Classes
- Parser
- def eol[_](implicit arg0: P[Any]): P[EOL]
Parse a beginning of line character (
$
)Parse a beginning of line character (
$
)- returns
weaponregex.model.regextree.EOL tree node
- Definition Classes
- Parser
"$"
Example: - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def escapeChar[_](implicit arg0: P[Any]): P[MetaChar]
Parse an escape meta-character
Parse an escape meta-character
- returns
weaponregex.model.regextree.MetaChar tree node
- Definition Classes
- Parser
"\n"
- See also
Example: - val escapeChars: String
Allowed escape characters
- def flagNCGroup[_](implicit arg0: P[Any]): P[FlagNCGroup]
Parse a non-capturing group with flags
Parse a non-capturing group with flags
- Definition Classes
- Parser
"(?id-mu:abc)"
- Note
This is a Scala/Java-only regex syntax
Example: - def flagToggle[_](fs: String)(implicit arg0: P[Any]): P[FlagToggle]
Parse a flag toggle (
idmsuxU-idmsuxU
)Parse a flag toggle (
idmsuxU-idmsuxU
)- returns
weaponregex.model.regextree.FlagToggle tree node
- Definition Classes
- Parser
"idmsuxU-idmsuxU"
- Note
This is a Scala/Java-only regex syntax
Example: - def flagToggleGroup[_](implicit arg0: P[Any]): P[FlagToggleGroup]
Parse a flag toggle group
Parse a flag toggle group
- Definition Classes
- Parser
"(?id-mu)"
- Note
This is a Scala/Java-only regex syntax
Example: - def flags[_](fs: String)(implicit arg0: P[Any]): P[Flags]
Parse flag literal characters given a string contains all allowed flags
Parse flag literal characters given a string contains all allowed flags
- fs
The string contains all allowed flags
- returns
weaponregex.model.regextree.Flags tree node
- Definition Classes
- Parser
- Annotations
- @SuppressWarnings()
"idmsuxU"
- Note
This is a Scala/Java-only regex syntax
Example: - final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def group[_](implicit arg0: P[Any]): P[Group]
Parse a capturing group
Parse a capturing group
- returns
weaponregex.model.regextree.Group tree node
- Definition Classes
- Parser
"(a)"
Example: - def groupName[_](implicit arg0: P[Any]): P[String]
Parse a group name that starts with a letter and followed by zero or more alphanumeric characters
Parse a group name that starts with a letter and followed by zero or more alphanumeric characters
- returns
the parsed name string
- Definition Classes
- Parser
"name1"
Example: - def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def lookaround[_](implicit arg0: P[Any]): P[Lookaround]
Parse a positive or negative lookahead or lookbehind
Parse a positive or negative lookahead or lookbehind
- Definition Classes
- Parser
"(?=abc)"
(positive lookahead)
Example: - def metaCharacter[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for meta-character tokens which can parse either
charOct
,charHex
,charUnicode
,charHexBrace
orescapeChar
Intermediate parsing rule for meta-character tokens which can parse either
charOct
,charHex
,charUnicode
,charHexBrace
orescapeChar
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- val minCharClassItem: Int
Minimum number of character class items of a valid character class
- def nameReference[_](implicit arg0: P[Any]): P[NameReference]
Parse a reference to a named capturing group
Parse a reference to a named capturing group
- Definition Classes
- Parser
"\k<name1>"
Example: - def namedGroup[_](implicit arg0: P[Any]): P[NamedGroup]
Parse a named-capturing group
Parse a named-capturing group
- returns
weaponregex.model.regextree.NamedGroup tree node
- Definition Classes
- Parser
"(?<name1>hello)"
Example: - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nonCapturingGroup[_](implicit arg0: P[Any]): P[Group]
Parse a non-capturing group
Parse a non-capturing group
- returns
weaponregex.model.regextree.Group tree node
- Definition Classes
- Parser
"(?:hello)"
Example: - final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def numReference[_](implicit arg0: P[Any]): P[NumberReference]
Parse a numbered reference to a capture group
Parse a numbered reference to a capture group
- Definition Classes
- Parser
"\13"
Example: - def number[_](implicit arg0: P[Any]): P[Int]
Parse an integer with any number of digits between 0 and 9
Parse an integer with any number of digits between 0 and 9
- returns
the parsed integer
- Definition Classes
- Parser
"123"
Example: - def or[_](implicit arg0: P[Any]): P[Or]
Parse an 'or' (
|
) ofsimpleRE
Parse an 'or' (
|
) ofsimpleRE
- returns
weaponregex.model.regextree.Or tree node
- Definition Classes
- Parser
"a|b|c"
Example: - def parse: Try[RegexTree]
Parse the given regex pattern
Parse the given regex pattern
- returns
A
Success
of parsed weaponregex.model.regextree.RegexTree if can be parsed, aFailure
otherwise
- Definition Classes
- Parser
- val pattern: String
- Definition Classes
- Parser
- def posixCharClass[_](implicit arg0: P[Any]): P[POSIXCharClass]
Parse a posix character class
Parse a posix character class
- returns
- Definition Classes
- Parser
"\p{Alpha}"
- Note
This does not check for the validity of the property inside
\p{}
Example: - def preDefinedCharClass[_](implicit arg0: P[Any]): P[PredefinedCharClass]
Parse a predefined character class
- val predefCharClassChars: String
Allowed predefined character class characters
- def quantifier[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for quantifier tokens which can parse either
quantifierShort
orquantifierLong
Intermediate parsing rule for quantifier tokens which can parse either
quantifierShort
orquantifierLong
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def quantifierLong[_](implicit arg0: P[Any]): P[Quantifier]
Parse a (full) quantifier (
{n}
,{n,}
,{n,m}
)Parse a (full) quantifier (
{n}
,{n,}
,{n,m}
)- returns
weaponregex.model.regextree.Quantifier tree node
- Definition Classes
- Parser
- Annotations
- @SuppressWarnings()
"a{1}"
Example: - def quantifierLongTail[_](implicit arg0: P[Any]): P[(Int, Option[Option[Int]])]
Parse the tail part of a long quantifier
Parse the tail part of a long quantifier
- returns
A tuple of the quantifier minimum and optional maximum part
- Definition Classes
- Parser
- def quantifierShort[_](implicit arg0: P[Any]): P[RegexTree]
Parse a shorthand notation for quantifier (
?
,*
,+
)Parse a shorthand notation for quantifier (
?
,*
,+
)- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
"a*"
Example: - def quantifierType[_, T](p: => P[T])(implicit arg0: P[Any]): P[(T, QuantifierType)]
A higher order parser that add weaponregex.model.regextree.QuantifierType information of the parse of the given (quantifier) parser
A higher order parser that add weaponregex.model.regextree.QuantifierType information of the parse of the given (quantifier) parser
- p
the quantifier parser
- returns
A tuple of the return of the given (quantifier) parser
p
, and its weaponregex.model.regextree.QuantifierType
- Definition Classes
- Parser
- def quote[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for quoting tokens which can parse either
quoteLong
orquoteChar
Intermediate parsing rule for quoting tokens which can parse either
quoteLong
orquoteChar
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def quoteChar[_](implicit arg0: P[Any]): P[QuoteChar]
Parse a quoted character (any character)
Parse a quoted character (any character)
- Definition Classes
- Parser
"$"
Example: - def quoteLong[_](implicit arg0: P[Any]): P[Quote]
Parse a 'long' quote, using
\Q
and\E
Parse a 'long' quote, using
\Q
and\E
- returns
weaponregex.model.regextree.Quote tree node
- Definition Classes
- Parser
"\Qquoted\E"
Example: - def range[_](implicit arg0: P[Any]): P[Range]
Parse a character range inside a character class
Parse a character range inside a character class
- returns
weaponregex.model.regextree.Range tree node
- Definition Classes
- Parser
"a-z"
Example: - def reference[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for reference tokens which can parse either
nameReference
ornumReference
Intermediate parsing rule for reference tokens which can parse either
nameReference
ornumReference
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- def simpleRE[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule which can parse either
concat
,basicRE
orempty
Intermediate parsing rule which can parse either
concat
,basicRE
orempty
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- Definition Classes
- Parser
- val specialChars: String
Regex special characters
- def specialConstruct[_](implicit arg0: P[Any]): P[RegexTree]
Intermediate parsing rule for special construct tokens which can parse either
namedGroup
,nonCapturingGroup
,flagToggleGroup
,flagNCGroup
,lookaround
oratomicGroup
Intermediate parsing rule for special construct tokens which can parse either
namedGroup
,nonCapturingGroup
,flagToggleGroup
,flagNCGroup
,lookaround
oratomicGroup
- returns
weaponregex.model.regextree.RegexTree (sub)tree
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated