Packages

c

antimirov.Rx

Concat

case class Concat(r1: Rx, r2: Rx) extends Rx with Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, Rx, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Concat
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Rx
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Concat(r1: Rx, r2: Rx)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def &(rhs: Rx): Rx

    Intersection operator.

    Intersection operator.

    Definition Classes
    Rx
  4. def *(rhs: Rx): Rx

    Concatenation operator.

    Concatenation operator.

    The expression x * y means that x and then y will be used in a given production in that order. In regular expression syntax this is written as 'xy'.

    The operator is called * because it corresponds to multiplication in the Kleene algebra of regular expressions.

    Definition Classes
    Rx
  5. def +(rhs: Rx): Rx

    Choice operator.

    Choice operator.

    The expression x + y (also written as x | y), means that either x or y (but not both) will be used in a given production. In regular expression syntax this is written as 'x|y'. This is also sometimes known as alternation.

    The operator is called + because it corresponds to addition in the Kleene algebra of regular expressions.

    Definition Classes
    Rx
  6. def -(rhs: Rx): Rx

    Difference operator.

    Difference operator.

    Definition Classes
    Rx
  7. def <(rhs: Rx): Boolean

    Is lhs' accepted set a proper subset of rhs' accepted set?

    Is lhs' accepted set a proper subset of rhs' accepted set?

    Definition Classes
    Rx
  8. def <=(rhs: Rx): Boolean

    Is lhs' accepted set a subset of rhs' accepted set?

    Is lhs' accepted set a subset of rhs' accepted set?

    Definition Classes
    Rx
  9. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def ===(rhs: Rx): Boolean

    Do lhs and rhs accept the same set of strings?

    Do lhs and rhs accept the same set of strings?

    Definition Classes
    Rx
  11. def >(rhs: Rx): Boolean

    Is lhs' accepted set a proper superset of rhs' accepted set?

    Is lhs' accepted set a proper superset of rhs' accepted set?

    Definition Classes
    Rx
  12. def >=(rhs: Rx): Boolean

    Is lhs' accepted set a superset of rhs' accepted set?

    Is lhs' accepted set a superset of rhs' accepted set?

    Definition Classes
    Rx
  13. def ^(rhs: Rx): Rx

    Exclusive-or (XOR) operator.

    Exclusive-or (XOR) operator.

    Definition Classes
    Rx
  14. def accepts(s: String): Boolean

    Decide whether the regex accepts the string s.

    Decide whether the regex accepts the string s.

    Definition Classes
    Rx
  15. lazy val acceptsEmpty: Boolean

    Does this regular expression accept the empty string ("")?

    Does this regular expression accept the empty string ("")?

    Definition Classes
    Rx
  16. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  17. def canonical: Rx

    Attempt to put a regular expression in a canonical form.

    Attempt to put a regular expression in a canonical form.

    This is not guaranteed to be a "minimal" form (in fact it will often expand the size of the regex). However, two regular exprssions that are equal should have equivalent representations after canonicalization is performed.

    Definition Classes
    Rx
  18. def cardRepr: String

    Represent the cardinality of this expression as a string.

    Represent the cardinality of this expression as a string.

    For finite cardinalities, just return that number.

    For infinite star depths, we show ∞ and then display the first cardinalities where we limit star expansions.

    Definition Classes
    Rx
  19. def cardinality: Size

    Compute the size of the set of strings matched by this regular expression.

    Compute the size of the set of strings matched by this regular expression.

    In expressions using the Kleene star operator the cardinality will often be unbounded, since the set is infinite (at least in theory). To get a sense of the relative complexity of an expression using Kleene stars, consider exploring how the values of limitStars(i).cardinality increase as i does.

    This method traverses the expression to avoid double-counting the same string which can be produced by two different paths

    Definition Classes
    Rx
  20. def choices: Set[Rx]

    Return a list of nodes to be chosen between.

    Return a list of nodes to be chosen between.

    If this node is a Choice node, the list will have two or more elements. Otherwise it will have exactly one element.

    Definition Classes
    Rx
  21. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  22. def concats: List[Rx]

    Return a list of nodes to be concatenated.

    Return a list of nodes to be concatenated.

    If this node is a Concat node, the list will have two or more elements. Otherwise it will have exactly one element.

    Definition Classes
    Rx
  23. def deriv(c: Char): Rx

    Compute the derivative with respect to c.

    Compute the derivative with respect to c.

    The derivative of a regular expressions with respect to c is a new regular expression that accepts a string s if and only if the original expression accepts c + s.

    For example, the derivative of '(abc)*' with respect to 'a' is '(bc)(abc)*'

    Definition Classes
    Rx
  24. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  26. lazy val firstSet: List[LetterSet]

    Set of "first characters" which this regex can accept.

    Set of "first characters" which this regex can accept.

    If a character is not in the firstSet, this regex cannot match strings starting with that character.

    Each LetterSet represents one or more contiguous character ranges. We represent the first set as a list of LetterSets to ensure that each letter set is either completely valid, or completely invalid, for every internal Rx value. For this regex, we can treat each element of the list as a congruence class of characters (which are all treated the same by this regex and all its children). This is very important for efficiency.

    For example, the first set for the expression ([a-c]|[b-d])e* would be List([a], [b-c], [d]). This is because [a] is only matched by [a-c], [d] is only matched by [b-d], and [b-c] is matched by both. If we instead returned something like List([a-c], [d]), then [b-d] would partially (but not completely) match [a-c].

    Definition Classes
    Rx
  27. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  28. def isEmpty: Boolean

    Is this regular expression equivalent to ε (empty)?

    Is this regular expression equivalent to ε (empty)?

    Definition Classes
    Rx
  29. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  30. def isPhi: Boolean

    Is this regular expressions equivalent to ϕ (phi)?

    Is this regular expressions equivalent to ϕ (phi)?

    Definition Classes
    Rx
  31. def limitStars(count: Int): Rx

    Limit applications of the Kleene star operator.

    Limit applications of the Kleene star operator.

    Replaces Star(r) nodes with Repeat(r, 0, count) nodes. This has the effect of limiting any Kleene star in the expression to being expanded at most count times.

    Definition Classes
    Rx
  32. lazy val matchSizes: Option[(Size, Size)]

    Return the range of string lenghts (if any) matched by this regular expression.

    Return the range of string lenghts (if any) matched by this regular expression.

    ϕ (or regular expressions equivalent to ϕ) will return None. All other expressions will return Some((x, y)), where 0 <= x <= y < ∞.

    Definition Classes
    Rx
  33. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  34. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  35. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  36. def optional: Rx

    Optionality operator.

    Optionality operator.

    The expression x.optional means that x will be applied zero-or-one times. In regular expression syntax this would be written as 'x?'.

    Definition Classes
    Rx
  37. def partialCompare(rhs: Rx): Double

    Partial comparison using a subset relation between regular expressions.

    Partial comparison using a subset relation between regular expressions.

    The return value represents the relationship:

    <0 means (lhs < rhs) means lhs is a subset of rhs 0 means (lhs = rhs) means lhs is equivalent to rhs >0 means (lhs > rhs) means lhs is a supserset of rhs NaN means none of the above

    Definition Classes
    Rx
  38. def partialDeriv(x: Char): Set[Rx]

    Compute the partial derivatives with respect to x.

    Compute the partial derivatives with respect to x.

    A partial derivative of a regular expression with respect to x is a new regular expression that only accepts a string s if the original expression accepts x + s.

    Unlike a derivative, if a partial derivative does not match s that does not mean that the original regular expression would not match x + s -- there may be some other partial derivative that does match s.

    If you calculate all the partial derivatives and union them together, you get a regular expression that is equivalent to the derivative. (In fact, this is how Antimirov implements the derivative operation.)

    We use a Set here to avoid duplicate partial derivatives.

    Definition Classes
    Rx
  39. def plus: Rx

    Kleene plus operator.

    Kleene plus operator.

    The expression x.plus means that x will be applied one-or-more times. In regular expression syntax this would be written as 'x+'.

    Kleene plus is implemented in terms of Kleene star:

    x.plus = x * x.star

    Kleene plus also satisfies the self-referential relation:

    x.plus = x * (Empty + x.plus)

    Definition Classes
    Rx
  40. def pow(k: Int): Rx

    Exponentiation operator.

    Exponentiation operator.

    x.pow(k) is equivalent to x * x *... * x k times. This can be written in regular expression syntax as x{k}.

    x.pow(k) is equivalent to x.repeat(k, k) in the same way that 'x{k}' is equivalent to 'x{k,k}' in regular expression syntax.

    Definition Classes
    Rx
  41. def properSubsetOf(rhs: Rx): Boolean

    Is lhs a proper subset of rhs?

    Is lhs a proper subset of rhs?

    Definition Classes
    Rx
  42. def properSupersetOf(rhs: Rx): Boolean

    Is lhs a proper superset of rhs?

    Is lhs a proper superset of rhs?

    Definition Classes
    Rx
  43. val r1: Rx
  44. val r2: Rx
  45. def reRepr: String

    Represent this value using traditional "regex" syntax.

    Represent this value using traditional "regex" syntax.

    The output of this method should be readable by Rx.parse.

    Definition Classes
    Rx
  46. def rejects(s: String): Boolean

    Decide whether the regex rejects the string s.

    Decide whether the regex rejects the string s.

    Definition Classes
    Rx
  47. def rejectsEmpty: Boolean

    Does this regular expression reject the empty string ("")?

    Does this regular expression reject the empty string ("")?

    Definition Classes
    Rx
  48. def repeat(m: Int, n: Int): Rx

    Repetition operator.

    Repetition operator.

    This repeats the given regex for at least m times and no more than n times (so 0 <= m <= n). If n=0 this is equivalent to the empty string.

    This method is equivalent to m concatenations followed by (n - m) choice operations and concatenations, e.g.

    x{3,5} = xxx(|x(|x))

    Definition Classes
    Rx
  49. def reverse: Rx

    Reverse the regular expression.

    Reverse the regular expression.

    For every string matched by the original expression, the reversed expression matches the reversed string. There are no other differences, and .reverse.reverse is a no-op.

    Definition Classes
    Rx
  50. def scalaRepr: String

    Represent this value using Scala syntax.

    Represent this value using Scala syntax.

    The output of this method should be usable in the REPL.

    Definition Classes
    Rx
  51. def star: Rx

    Kleene star operator.

    Kleene star operator.

    The expression x.star means that x will be applied zero-or-more times. In regular expression syntax this would be written as 'x*'.

    Kleene star satisfies the self-referential relation:

    x.star = Empty + (x * x.star)

    Definition Classes
    Rx
  52. def starDepth: Int

    The deepest number of nested Kleene star operators in this expression.

    The deepest number of nested Kleene star operators in this expression.

    This can be used as a complexity measure.

    Definition Classes
    Rx
  53. def subsetOf(rhs: Rx): Boolean

    Is lhs a subset of rhs?

    Is lhs a subset of rhs?

    Definition Classes
    Rx
  54. def supersetOf(rhs: Rx): Boolean

    Is lhs a superset of rhs?

    Is lhs a superset of rhs?

    Definition Classes
    Rx
  55. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  56. def toDfa: Dfa

    Definition Classes
    Rx
  57. def toJava: Pattern

    Compile this regular expression to a java.util.regex.Pattern.

    Compile this regular expression to a java.util.regex.Pattern.

    Definition Classes
    Rx
  58. def toNfa: Nfa

    Definition Classes
    Rx
  59. def toScala: Regex

    Compile this regular expression to a scala.util.matching.Regex.

    Compile this regular expression to a scala.util.matching.Regex.

    Definition Classes
    Rx
  60. def toString(): String

    String representation of Rx.

    String representation of Rx.

    Definition Classes
    Rx → AnyRef → Any
  61. def unary_~: Rx

    Complement (negation) operator.

    Complement (negation) operator.

    Definition Classes
    Rx
  62. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  64. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  65. def |(rhs: Rx): Rx

    Alias for the choice operator.

    Alias for the choice operator.

    Definition Classes
    Rx

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Rx

Inherited from AnyRef

Inherited from Any

Ungrouped