Packages

class ParserJS extends Parser

Concrete parser for JS flavor of regex

Note

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

See also

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions/Cheatsheet

Linear Supertypes
Parser, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParserJS
  2. Parser
  3. AnyRef
  4. 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

    Definition Classes
    Parser
  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

    Definition Classes
    Parser
    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

    Definition Classes
    Parser
    Example:
    1. "."

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

    Parse an independent non-capturing group

    Parse an independent non-capturing group

    returns

    weaponregex.model.regextree.AtomicGroup

    Definition Classes
    Parser
    Example:
    1. "(?>abc)"

    Note

    This is a Scala/Java-only regex syntax

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

    Definition Classes
    Parser
  10. 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:
    1. "^"

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

    Definition Classes
    Parser
  12. 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
    Example:
    1. "\z"

    See also

    weaponregex.parser.Parser.boundaryMetaChars

  13. val boundaryMetaChars: String

    Allowed boundary meta-characters

    Allowed boundary meta-characters

    Definition Classes
    ParserJSParser
  14. 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

    Definition Classes
    Parser
  15. def charClass[_](implicit arg0: P[Any]): P[CharacterClass]

    Parse a character class

    Parse a character class

    returns

    weaponregex.model.regextree.CharacterClass tree node

    Definition Classes
    Parser
    Example:
    1. "[abc]"

  16. 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
    Example:
    1. "{"

    See also

    weaponregex.parser.Parser.charClassSpecialChars

  17. val charClassSpecialChars: String

    Special characters within a character class

    Special characters within a character class

    Definition Classes
    ParserJSParser
  18. 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
    Example:
    1. "\x01"

  19. 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
    Example:
    1. "\x{0123}"

  20. 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
    Example:
    1. "a"

    See also

    weaponregex.parser.Parser.specialChars

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

    Parse a character with octal value \n, \nn, \mnn (0 <= m,n <= 9)

    Parse a character with octal value \n, \nn, \mnn (0 <= m,n <= 9)

    returns

    weaponregex.model.regextree.MetaChar tree node

    Definition Classes
    ParserJSParser
    Example:
    1. "\012"

    Note

    This syntax will correctly match if 0 <= m <= 3, 0 <= n <= 7; but m and/or n outside of this range will still be parsable.

  22. 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
    Example:
    1. "\ u0020"

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

    Definition Classes
    Parser
  24. def classItem[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for character class item tokens which can parse either preDefinedCharClass, metaCharacter, range, quoteChar, or charClassCharLiteral

    Intermediate parsing rule for character class item tokens which can parse either preDefinedCharClass, metaCharacter, range, quoteChar, or charClassCharLiteral

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    ParserJSParser
    Note

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

  25. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  26. 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

    Definition Classes
    Parser
    Example:
    1. "abc"

  27. 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
    Example:
    1. "\cA"

    See also

    https://en.wikipedia.org/wiki/Caret_notation

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

    Definition Classes
    Parser
  29. 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:
    1. ""

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

    weaponregex.model.regextree.RegexTree tree

    Definition Classes
    Parser
  31. 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:
    1. "$"

  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  34. 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
    Example:
    1. "\n"

    See also

    weaponregex.parser.Parser.escapeChars

  35. val escapeChars: String

    Allowed escape characters

    Allowed escape characters

    Definition Classes
    ParserJSParser
  36. 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

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

    Note

    This is a Scala/Java-only regex syntax

  37. 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
    Example:
    1. "idmsuxU-idmsuxU"

    Note

    This is a Scala/Java-only regex syntax

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

    Parse a flag toggle group

    Parse a flag toggle group

    returns

    weaponregex.model.regextree.FlagToggleGroup

    Definition Classes
    Parser
    Example:
    1. "(?id-mu)"

    Note

    This is a Scala/Java-only regex syntax

  39. 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()
    Example:
    1. "idmsuxU"

    Note

    This is a Scala/Java-only regex syntax

  40. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  41. 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
    Example:
    1. "(a)"

  42. 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
    Example:
    1. "name1"

  43. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  44. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  45. 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

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

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

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

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

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    ParserJSParser
  47. val minCharClassItem: Int

    Minimum number of character class items of a valid character class

    Minimum number of character class items of a valid character class

    Definition Classes
    ParserJSParser
  48. 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

    Definition Classes
    Parser
    Example:
    1. "\k<name1>"

  49. 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
    Example:
    1. "(?<name1>hello)"

  50. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  51. 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
    Example:
    1. "(?:hello)"

  52. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  53. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  54. 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

    Definition Classes
    Parser
    Example:
    1. "\13"

  55. 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
    Example:
    1. "123"

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

    Definition Classes
    Parser
    Example:
    1. "a|b|c"

  57. 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, a Failure otherwise

    Definition Classes
    Parser
  58. val pattern: String
    Definition Classes
    Parser
  59. def posixCharClass[_](implicit arg0: P[Any]): P[POSIXCharClass]

    Parse a posix character class

    Parse a posix character class

    returns

    weaponregex.model.regextree.POSIXCharClass tree node

    Definition Classes
    Parser
    Example:
    1. "\p{Alpha}"

    Note

    This does not check for the validity of the property inside \p{}

  60. def preDefinedCharClass[_](implicit arg0: P[Any]): P[PredefinedCharClass]

    Parse a predefined character class

    Parse a predefined character class

    returns

    weaponregex.model.regextree.PredefinedCharClass tree node

    Definition Classes
    Parser
    Example:
    1. "\d"

    See also

    weaponregex.parser.Parser.predefCharClassChars

  61. val predefCharClassChars: String

    Allowed predefined character class characters

    Allowed predefined character class characters

    Definition Classes
    ParserJSParser
  62. 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

    Definition Classes
    Parser
  63. 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
    Example:
    1. "a{1}"

  64. 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
    Example:
    1. "a*"

  65. 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
  66. def quote[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule for quoting tokens which can parse only quoteChar

    Intermediate parsing rule for quoting tokens which can parse only quoteChar

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    ParserJSParser
  67. 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

    Definition Classes
    Parser
    Example:
    1. "$"

  68. 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
    Example:
    1. "\Qquoted\E"

  69. 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
    Example:
    1. "a-z"

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

    Intermediate parsing rule for reference tokens which can parse only nameReference

    Intermediate parsing rule for reference tokens which can parse only nameReference

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    ParserJSParser
  71. def simpleRE[_](implicit arg0: P[Any]): P[RegexTree]

    Intermediate parsing rule which can parse either concat, basicRE or empty

    Intermediate parsing rule which can parse either concat, basicRE or empty

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    Parser
  72. val specialChars: String

    Regex special characters

    Regex special characters

    Definition Classes
    ParserJSParser
  73. def specialConstruct[_](implicit arg0: P[Any]): P[RegexTree]

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

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

    returns

    weaponregex.model.regextree.RegexTree (sub)tree

    Definition Classes
    Parser
  74. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  75. def toString(): String
    Definition Classes
    AnyRef → Any
  76. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  77. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  78. 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 Parser

Inherited from AnyRef

Inherited from Any

Ungrouped