Packages

class Parser extends AnyRef

Note

This class constructor is private, instances must be created using the companion weaponregex.parser.Parser object

,

The parsing rules methods inside this class is created based on the defined grammar

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Parser
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. 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

  5. def RE[_](implicit arg0: P[Any]): P[RegexTree]

    The top-level parsing rule which can parse either or or simpleRE

    The top-level parsing rule which can parse either or or simpleRE

    returns

    weaponregex.model.regextree.RegexTree tree

    Example:
    1. any supported regex

  6. def anyDot[_](implicit arg0: P[Any]): P[AnyDot]

    Parse an any(dot) (.) predefined character class

    Parse an any(dot) (.) predefined character class

    returns

    weaponregex.model.regextree.AnyDot tree node

    Example:
    1. "."

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def basicRE[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule which can parse either quantifier or elementaryRE

    Intermediate parsing rule which can parse either quantifier or elementaryRE

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  9. 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

    Example:
    1. "^"

  10. def boundary[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for boundary tokens which can parse either bol, eol or boundaryMetaChar

    Intermediate parsing rule for boundary tokens which can parse either bol, eol or boundaryMetaChar

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  11. def boundaryMetaChar[_](implicit arg0: P[Any]): P[Boundary]

    Parse a boundary meta-character character (\b, \B, \A, \G, \z, \Z)

    Parse a boundary meta-character character (\b, \B, \A, \G, \z, \Z)

    returns

    weaponregex.model.regextree.BOL tree node

    Example:
    1. "\z"

  12. def capturing[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for capturing-related tokens which can parse either group or specialConstruct

    Intermediate parsing rule for capturing-related tokens which can parse either group or specialConstruct

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  13. def charClass[_](implicit arg0: P[Any]): P[CharacterClass]

    Parse a character class

    Parse a character class

    returns

    weaponregex.model.regextree.CharacterClass tree node

    Example:
    1. "[abc]"

  14. 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

    Example:
    1. "\x01"

  15. 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

    Example:
    1. "\x{0123}"

  16. 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

    Example:
    1. "a"

  17. def charOct[_](implicit arg0: P[Any]): P[MetaChar]

    Parse a character with octal value \0n, \0nn, \0mn (0 <= m <= 3, 0 <= n <= 7)

    Parse a character with octal value \0n, \0nn, \0mn (0 <= m <= 3, 0 <= n <= 7)

    returns

    weaponregex.model.regextree.MetaChar tree node

    Example:
    1. "\0123"

  18. 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

    Example:
    1. "\ u0020"

  19. def character[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for character-related tokens which can parse either metaCharacter or charLiteral

    Intermediate parsing rule for character-related tokens which can parse either metaCharacter or charLiteral

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  20. def classItem[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for character class item tokens which can parse either range, charClass, preDefinedCharClass or charLiteral

    Intermediate parsing rule for character class item tokens which can parse either range, charClass, preDefinedCharClass or charLiteral

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Note

    Nested character class is a Scala/Java-only regex syntax

  21. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  22. def concat[_](implicit arg0: P[Any]): P[Concat]

    Parse a concatenation of basicREs

    Parse a concatenation of basicREs

    returns

    weaponregex.model.regextree.Concat tree node

    Example:
    1. "abc"

  23. def elementaryRE[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule which can parse either capturing, anyDot, preDefinedCharClass, boundary, charClass, reference, character or quote

    Intermediate parsing rule which can parse either capturing, anyDot, preDefinedCharClass, boundary, charClass, reference, character or quote

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  24. 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

    Example:
    1. "$"

  25. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  26. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  27. def escapeChar[_](implicit arg0: P[Any]): P[MetaChar]

    Parse an escape meta-character (\\, \t, \n, \r, \f)

    Parse an escape meta-character (\\, \t, \n, \r, \f)

    returns

    weaponregex.model.regextree.MetaChar tree node

    Example:
    1. "\n"

    Note

    \a, \c, and \e is not supported. \a and \e are valid but interpreted differently in Scala/Java and JavaScript.

  28. def flagNCGroup[_](implicit arg0: P[Any]): P[FlagNCGroup]

    Parse a non-capturing group with flags

    Parse a non-capturing group with flags

    returns

    weaponregex.model.regextree.FlagNCGroup

    Example:
    1. "(?id-mu:abc)"

    Note

    This is a Scala/Java-only regex syntax

  29. 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

    Example:
    1. "idmsuxU-idmsuxU"

    Note

    This is a Scala/Java-only regex syntax

  30. def flagToggleGroup[_](implicit arg0: P[Any]): P[FlagToggleGroup]

    Parse a flag toggle group

    Parse a flag toggle group

    returns

    weaponregex.model.regextree.FlagToggleGroup

    Example:
    1. "(?id-mu)"

    Note

    This is a Scala/Java-only regex syntax

  31. 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

    Annotations
    @SuppressWarnings()
    Example:
    1. "idmsuxU"

    Note

    This is a Scala/Java-only regex syntax

  32. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  33. def group[_](implicit arg0: P[Any]): P[Group]

    Parse a capturing group

    Parse a capturing group

    returns

    weaponregex.model.regextree.Group tree node

    Example:
    1. "(a)"

  34. 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

    Example:
    1. "name1"

  35. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  36. def incGroup[_](implicit arg0: P[Any]): P[INCGroup]

    Parse an independent non-capturing group

    Parse an independent non-capturing group

    returns

    weaponregex.model.regextree.INCGroup

    Example:
    1. "(?>abc)"

    Note

    This is a Scala/Java-only regex syntax

  37. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  38. def lookaround[_](implicit arg0: P[Any]): P[Lookaround]

    Parse a positive or negative lookahead or lookbehind

    Parse a positive or negative lookahead or lookbehind

    returns

    weaponregex.model.regextree.Lookaround

    Example:
    1. "(?=abc)" (positive lookahead)

  39. def metaCharacter[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for meta-character tokens which can parse either charOct, charHex, charUnicode, charHexBrace or escapeChar

    Intermediate parsing rule for meta-character tokens which can parse either charOct, charHex, charUnicode, charHexBrace or escapeChar

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  40. def nameReference[_](implicit arg0: P[Any]): P[NameReference]

    Parse a reference to a named capturing group

    Parse a reference to a named capturing group

    returns

    weaponregex.model.regextree.NameReference

    Example:
    1. "\k<name1>"

  41. 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

    Example:
    1. "(?<name1>hello)"

  42. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  43. 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

    Example:
    1. "(?:hello)"

  44. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  45. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  46. def numReference[_](implicit arg0: P[Any]): P[NumberReference]

    Parse a numbered reference to a capture group

    Parse a numbered reference to a capture group

    returns

    weaponregex.model.regextree.NumberReference

    Example:
    1. "\13"

  47. 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

    Example:
    1. "123"

  48. def or[_](implicit arg0: P[Any]): P[Or]

    Parse an 'or' (|) of simpleRE

    Parse an 'or' (|) of simpleRE

    returns

    weaponregex.model.regextree.Or tree node

    Example:
    1. "a|b|c"

  49. def parse: Option[RegexTree]

    Parse the given regex pattern

    Parse the given regex pattern

    returns

    An Optional parsed weaponregex.model.regextree.RegexTree

  50. val pattern: String
  51. def preDefinedCharClass[_](implicit arg0: P[Any]): P[PredefinedCharClass]

    Parse a predefined character class (\d, \D, \s, \S, \w, \W)

    Parse a predefined character class (\d, \D, \s, \S, \w, \W)

    returns

    weaponregex.model.regextree.PredefinedCharClass tree node

    Example:
    1. "\d"

  52. def quantifier[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for quantifier tokens which can parse either quantifierShort or quantifierLong

    Intermediate parsing rule for quantifier tokens which can parse either quantifierShort or quantifierLong

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  53. 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

    Example:
    1. "a{1}"

  54. 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

    Example:
    1. "a*"

  55. 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

  56. def quote[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for quoting tokens which can parse either quoteLong or quoteChar

    Intermediate parsing rule for quoting tokens which can parse either quoteLong or quoteChar

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  57. def quoteChar[_](implicit arg0: P[Any]): P[QuoteChar]

    Parse a quoted character (any character)

    Parse a quoted character (any character)

    returns

    weaponregex.model.regextree.QuoteChar

    Example:
    1. "$"

  58. 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

    Example:
    1. "\Qquoted\E"

  59. 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

    Example:
    1. "a-z"

  60. def reference[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for reference tokens which can parse either nameReference or numReference

    Intermediate parsing rule for reference tokens which can parse either nameReference or numReference

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  61. def simpleRE[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule which can parse either concat or basicRE

    Intermediate parsing rule which can parse either concat or basicRE

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  62. def specialConstruct[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for special construct tokens which can parse either namedGroup, nonCapturingGroup, flagToggleGroup, flagNCGroup, lookaround or incGroup

    Intermediate parsing rule for special construct tokens which can parse either namedGroup, nonCapturingGroup, flagToggleGroup, flagNCGroup, lookaround or incGroup

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

  63. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  64. def toString(): String
    Definition Classes
    AnyRef → Any
  65. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  66. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  67. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped