io.dylemma.spac

ContextMatcher

object ContextMatcher

Source
ContextMatcher.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ContextMatcher
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Chained[H, T, F](headM: ContextMatcher[H], tailM: ContextMatcher[T])(implicit reduce: Aux[H, T, F]) extends ContextMatcher[F] with Product with Serializable

    Matcher implementation for headM \ tailM

  2. case class Mapped[A, B](inner: ContextMatcher[A], op: String = "map")(f: (A) ⇒ Option[B]) extends ContextMatcher[B] with Product with Serializable

    Matcher implementation for the map, flatMap, and filter operations.

  3. case class Or[A](left: ContextMatcher[A], right: ContextMatcher[A]) extends ContextMatcher[A] with Product with Serializable

    Matcher implementation for left | right.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def greedy[A](f: (IndexedSeq[StartElement], Int, Int) ⇒ Option[(A, Int)]): ContextMatcher[A]

    A matcher that uses a custom function f to consume the first N elements from the input before passing the remainder to the next matcher in the chain.

    A matcher that uses a custom function f to consume the first N elements from the input before passing the remainder to the next matcher in the chain.

    For example:

    Matcher.greedy { (stack, offset, avail) =>
    if(avail >= 2 && stack(offset) == "foo" && stack(offset + 1) == "bar"){
      Some("yes!" -> 2)
    } else {
      None
    }
    }
    A

    The matcher function's result type

    f

    The matching function. Given a reference to the stack elements, an offset position, and the number of elements available starting from the offset, f should return an option containing a pair of the matched value and the unconsumed portion of the stack.

    returns

    A new matcher which uses f to determine how (and how much of) the stack is matched

  13. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. val noopFailure: ContextMatcher[Unit]

    A matcher that quickly rejects any input

  17. val noopSuccess: ContextMatcher[Unit]

    A matcher that quickly matches any input as () without consuming any stack.

  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  21. def toString(): String

    Definition Classes
    AnyRef → Any
  22. val variableLength: ContextMatcher[Unit]

    A matcher that matches any input as long as the next matcher in the chain will match some segment of that input.

  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped