Symbol

case
class Symbol[+A](a: A, n: Int, m: IntOrUnbounded) extends Rbe[A]

Represents a symbol that is repeated between n and m times (m can be unbounded)

trait Rbe[A]
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Inherited methods

def deriv[U >: A](x: U, open: Boolean, controlled: Seq[U])(implicit r: Show[U]): Rbe[U]

derivative of this RBE with regards to a symbol

derivative of this RBE with regards to a symbol

Value Params
controlled

defines the symbols that are allowed in closed expressions

open

allows extra symbols

x

symbol

Inherited from
Rbe
def derivBag[U >: A](bag: Bag[U], open: Boolean, controlled: Seq[U])(implicit r: Show[U]): Rbe[U]

Derivative over a bag of symbols

Derivative over a bag of symbols

Value Params
controlled

limits the extra symbols to those that don't appear in controlled

open

allows extra symbols

Inherited from
Rbe
def nullable[U >: A]: Either[Map[U, Int], Unit]

Checks if a rbe is nullable

Checks if a rbe is nullable

Inherited from
Rbe
def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Inherited fields

lazy
val containsRepeats: Boolean

Checks if a RBE contains repetitions

Checks if a RBE contains repetitions

Inherited from
Rbe
lazy
val symbols: Seq[A]

Symbols that contains this rbe

Symbols that contains this rbe

Example:

symbols(Or(And(Symbol("a",1,3),Symbol("b",1,1)),Symbol("b",2,3))) == Seq("a","b")
Inherited from
Rbe