weaponregex.internal.model.regextree

Members list

Type members

Classlikes

case class AnyDot(location: Location) extends Leaf[Char]

Any dot . predefined character class leaf node

Any dot . predefined character class leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

Attributes

Note

This is technically a predefined character class, but because it cannot be negated nor has a \ prefix, it is handled separately here

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Char]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class AtomicGroup(expr: RegexTree, location: Location) extends Node

Atomic (independent, non-capturing) group node

Atomic (independent, non-capturing) group node

Value parameters

expr

The regex inside the group

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class BOL(location: Location) extends Leaf[Char]

Beginning of Line (BOL) leaf node

Beginning of Line (BOL) leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Char]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Boundary(boundary: String, location: Location) extends Leaf[String]

Boundary meta character leaf node

Boundary meta character leaf node

Value parameters

boundary

The literal boundary character without the \

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class CharClassIntersection(nodes: Seq[RegexTree], location: Location) extends Node

Character class intersection used inside a character class

Character class intersection used inside a character class

Value parameters

location

The weaponregex.model.Location of the node in the regex string

nodes

The nodes that are being "or-ed"

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Character(char: Char, location: Location) extends Leaf[Char]

Character literal leaf node

Character literal leaf node

Value parameters

char

The character literal value

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Char]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class CharacterClass(nodes: Seq[RegexTree], location: Location, isPositive: Boolean) extends Node

Character class node

Character class node

Value parameters

isPositive

true if the character class is positive, false otherwise

location

The weaponregex.model.Location of the node in the regex string

nodes

The child nodes contained in the character class

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class CharacterClassNaked(nodes: Seq[RegexTree], location: Location) extends Node

Character class node without the surround syntactical symbols, i.e. "naked"

Character class node without the surround syntactical symbols, i.e. "naked"

Value parameters

location

The weaponregex.model.Location of the node in the regex string

nodes

The child nodes contained in the character class

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Concat(nodes: Seq[RegexTree], location: Location) extends Node

Concatenation node

Concatenation node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

nodes

The nodes that are being concatenated

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class ControlChar(controlChar: String, location: Location) extends Leaf[String]

Control meta-characters leaf node corresponding to a given character

Control meta-characters leaf node corresponding to a given character

Value parameters

controlChar

Any character in a-z or A-Z

location

weaponregex.model.Location of the token in the regex string

Attributes

Note

This is technically a meta-character, but because it has an additional target character and a \c prefix, it is handled separately here

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class EOL(location: Location) extends Leaf[Char]

End of Line (EOL) leaf node

End of Line (EOL) leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Char]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Empty(location: Location) extends Leaf[String]

Empty string (nothing, null) leaf

Empty string (nothing, null) leaf

Value parameters

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class FlagNCGroup(flagToggle: FlagToggle, expr: RegexTree, location: Location) extends Node

Non-capturing group with flags

Non-capturing group with flags

Value parameters

expr

The regex inside the group

flagToggle

The weaponregex.internal.model.regextree.FlagToggle object associated with the group

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class FlagToggle(onFlags: Flags, hasDash: Boolean, offFlags: Flags, location: Location) extends Node

Flag toggle node that describes which flags are toggled on and/or off

Flag toggle node that describes which flags are toggled on and/or off

Value parameters

hasDash

true if there is a dash character - between the onFlags and offFlags, false otherwise

location

The weaponregex.model.Location of the node in the regex string

offFlags

The flags that are toggled off

onFlags

The flags that are toggled on

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class FlagToggleGroup(flagToggle: FlagToggle, location: Location) extends Node

Flag toggle group node

Flag toggle group node

Value parameters

flagToggle

The weaponregex.internal.model.regextree.FlagToggle object associated with the group

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Flags(flags: Seq[Character], location: Location) extends Node

A sequence of flags for use in weaponregex.internal.model.regextree.FlagToggle

A sequence of flags for use in weaponregex.internal.model.regextree.FlagToggle

Value parameters

flags

The sequence of flag weaponregex.internal.model.regextree.Character s

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case object GreedyQuantifier extends QuantifierType

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case class Group(expr: RegexTree, isCapturing: Boolean, location: Location) extends Node

(Non-)capturing group node

(Non-)capturing group node

Value parameters

expr

The regex inside the group

isCapturing

true if group is capturing, false otherwise

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
abstract class Leaf[A](val value: A, val location: Location, val prefix: String, val postfix: String) extends RegexTree

The leaf of the weaponregex.internal.model.regextree.RegexTree (terminal node) that have no children node

The leaf of the weaponregex.internal.model.regextree.RegexTree (terminal node) that have no children node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

postfix

The string that is put after the leaf's value when building

prefix

The string that is put in front of the leaf's value when building

value

The value that the leaf holds

Attributes

Supertypes
trait RegexTree
class Object
trait Matchable
class Any
Known subtypes
class AnyDot
class BOL
class Boundary
class Character
class ControlChar
class EOL
class Empty
class MetaChar
class Quote
class QuoteChar
Show all
case class Lookaround(expr: RegexTree, isPositive: Boolean, isLookahead: Boolean, location: Location) extends Node

The umbrella node for positive/negative lookahead/lookbehind

The umbrella node for positive/negative lookahead/lookbehind

Value parameters

expr

The regex inside the lookaround

isLookahead

true if this is a lookahead, false if this is a lookbehind

isPositive

true if the lookaround is positive, false otherwise

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class MetaChar(metaChar: String, location: Location) extends Leaf[String]

Meta-characters leaf node

Meta-characters leaf node

Value parameters

location

weaponregex.model.Location of the token in the regex string

metaChar

Can be any meta character as defined in the grammar

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class NameReference(name: String, location: Location) extends Leaf[String]

Reference to a named capturing group leaf node

Reference to a named capturing group leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

name

The name of the capturing group being referenced

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class NamedGroup(expr: RegexTree, name: String, location: Location) extends Node

Named capturing group node

Named capturing group node

Value parameters

expr

The regex inside the group

location

The weaponregex.model.Location of the node in the regex string

name

The name of the group

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
abstract class Node(val children: Seq[RegexTree], val location: Location, val prefix: String, val postfix: String, val sep: String) extends RegexTree

The non-terminal node of the weaponregex.internal.model.regextree.RegexTree that have at least one child node

The non-terminal node of the weaponregex.internal.model.regextree.RegexTree that have at least one child node

Value parameters

children

The children that fall under this node

location

The weaponregex.model.Location of the node in the regex string

postfix

The string that is put after the node's children when building

prefix

The string that is put in front of the node's children when building

sep

The string that is put in between the node's children when building

Attributes

Supertypes
trait RegexTree
class Object
trait Matchable
class Any
Known subtypes
class AtomicGroup
class Concat
class FlagNCGroup
class FlagToggle
class Flags
class Group
class Lookaround
class NamedGroup
class Or
Show all
case class NumberReference(num: Int, location: Location) extends Leaf[Int]

Reference to a numbered capturing group leaf node

Reference to a numbered capturing group leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

num

The order number of the capturing group being referenced

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Int]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class OneOrMore(expr: RegexTree, location: Location, quantifierType: QuantifierType) extends Node

Shorthand notation one or more + quantifier node

Shorthand notation one or more + quantifier node

Value parameters

expr

The regex that is being quantified

location

The weaponregex.model.Location of the node in the regex string

quantifierType

The type of the quantifier: greedy, reluctant, or possessive

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Or(nodes: Seq[RegexTree], location: Location) extends Node

Or node (e.g. a|b|c)

Or node (e.g. a|b|c)

Value parameters

location

The weaponregex.model.Location of the node in the regex string

nodes

The nodes that are being "or-ed"

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case object PossessiveQuantifier extends QuantifierType

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case class PredefinedCharClass(charClass: String, location: Location) extends Leaf[String]

Predefined character class leaf node

Predefined character class leaf node

Value parameters

charClass

The literal class character without the \

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Quantifier extends Node

Long quantifier node

Long quantifier node

Value parameters

expr

The regex that is being quantified

isExact

true if used to represent an exact number of repetitions (e.g. {1}), false otherwise (e.g. {1,2} or {1,})

location

The weaponregex.model.Location of the node in the regex string

max

The maximum number of repetitions

min

The minimum number of repetition

quantifierType

The type of the quantifier: greedy, reluctant, or possessive

Attributes

Note

This class constructor is private, instances must be created using the companion weaponregex.internal.model.regextree.Quantifier object

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
object Quantifier

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Quantifier.type
sealed abstract class QuantifierType(syntax: String)

The enumeration of the quantifier type

The enumeration of the quantifier type

Value parameters

syntax

The syntax used to represent the quantifier type

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
case class Quote(quote: String, hasEnd: Boolean, location: Location) extends Leaf[String]

Quote from \Q to an optional \E

Quote from \Q to an optional \E

Value parameters

hasEnd

true if quote has an end symbol \E, false otherwise

location

The weaponregex.model.Location of the node in the regex string

quote

The string being quoted

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class QuoteChar(char: Char, location: Location) extends Leaf[Char]

Quote for the following single character

Quote for the following single character

Value parameters

char

The character being quoted

location

The weaponregex.model.Location of the node in the regex string

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[Char]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class Range(from: Character, to: Character, location: Location) extends Node

Character range that is used inside of a character class

Character range that is used inside of a character class

Value parameters

from

The left bound of the range

location

The weaponregex.model.Location of the node in the regex string

to

The right bound of the range

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
sealed trait RegexTree

The abstraction of a RegexTree node

The abstraction of a RegexTree node

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Leaf[A]
class AnyDot
class BOL
class Boundary
class Character
class ControlChar
class EOL
class Empty
class MetaChar
class Quote
class QuoteChar
class Node
class AtomicGroup
class Concat
class FlagNCGroup
class FlagToggle
class Flags
class Group
class Lookaround
class NamedGroup
class Or
Show all
case object ReluctantQuantifier extends QuantifierType

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
case class UnicodeCharClass(property: String, location: Location, isPositive: Boolean, propValue: Option[String]) extends Leaf[String]

Unicode character class leaf node

Unicode character class leaf node

Value parameters

location

The weaponregex.model.Location of the node in the regex string

propValue

The value of the property

property

The class character property

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Leaf[String]
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class ZeroOrMore(expr: RegexTree, location: Location, quantifierType: QuantifierType) extends Node

Shorthand notation zero or more * quantifier node

Shorthand notation zero or more * quantifier node

Value parameters

expr

The regex that is being quantified

location

The weaponregex.model.Location of the node in the regex string

quantifierType

The type of the quantifier: greedy, reluctant, or possessive

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all
case class ZeroOrOne(expr: RegexTree, location: Location, quantifierType: QuantifierType) extends Node

Shorthand notation zero or one ? quantifier node

Shorthand notation zero or one ? quantifier node

Value parameters

expr

The regex that is being quantified

location

The weaponregex.model.Location of the node in the regex string

quantifierType

The type of the quantifier: greedy, reluctant, or possessive

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Node
trait RegexTree
class Object
trait Matchable
class Any
Show all