Scalax

This document is the API specification for Scalax

Class Summary
trait ApplicativeArrows extends Arrows
class ArrayInput [A](val array : scala.Array[A], val index : Int) extends Input[A]
trait ArrowMonads extends ApplicativeArrows with Monads
trait Arrows extends UnitFunctors
trait DefaultMemoisable extends Memoisable with AnyRef
case class Error [+X](val x : X) extends Result[Nothing, Nothing, X] with scala.Product
trait Filter [+A] extends AnyRef
trait Functor [+A] extends AnyRef
trait Functors extends AnyRef
class InRule [In, +Out, +A, +X](rule : Rule[In, Out, A, X]) extends AnyRef
A workaround for the difficulties of dealing with a contravariant 'In' parameter type...
class IncrementalInput [A] extends Input[A] with DefaultMemoisable with scala.Ordered[IncrementalInput[A]]
trait IncrementalParsers [A] extends Parsers[A] with MemoisableRules
trait IncrementalScanners extends IncrementalParsers[Char] with Scanners
trait Input [+A] extends scala.Iterable[A]
class IterableInput [A](iterator : scala.Iterator[A], val index : Int) extends Input[A]
trait Memoisable extends AnyRef
trait MemoisableRules extends Rules
trait Monad [+A] extends Functor[A]
trait Monads extends UnitFunctors
trait Monoidals extends UnitFunctors
trait Name extends AnyRef
trait OrElse [+A] extends AnyRef
trait Parsers [T] extends RulesWithState
Rules that operate on sequential input
trait Plus [+A] extends AnyRef
sealed abstract class Result [+Out, +A, +X] extends AnyRef
trait Rule [-In, +Out, +A, +X] extends (In) => Result[Out, A, X]
A Rule is a function from some input to a Result. The result may be:
  • Success, with a value of some type and an output that may serve as the input to subsequent rules.
  • Failure. A failure may result in some alternative rule being applied.
  • Error. No further rules should be attempted.
trait Rules extends AnyRef
A factory for rules.
trait RulesWithState extends Rules with StateRules
trait Scanners extends Parsers[Char]
Rules that operate on a sequence of characters.
class SeqRule [S, +A, +X](rule : Rule[S, S, A, X]) extends AnyRef
trait StateReader extends Monads
trait StateRules extends AnyRef
A factory for rules that apply to a particular context. @requires S the context to which rules apply.
trait StringScanners extends Scanners
case class Success [+Out, +A](val out : Out, val value : A) extends Result[Out, A, Nothing] with scala.Product
class Thunk [-In, +Out, +A, +X](rule : Rule[In, Out, A, X], in : In) extends Rule[Unit, Out, A, X] with () => Result[Out, A, X]
trait UnitFunctors extends Units with Functors
One of the 'unit' definitions must be overriden in concrete subclasses
trait Units extends AnyRef
class View [A, B](transform : (Input[A]) => Result[Input[A], B, Nothing], val input : Input[A], val index : Int) extends Input[B]
View one type of input as another based on a transformation rule
trait Zero extends AnyRef
case class ~ [+A, +B](val _1 : A, val _2 : B) extends scala.Product
Represents the combined value of two rules applied in sequence.
Object Summary
object DefaultMemoisable extends AnyRef
object Error extends AnyRef
case object Failure extends Result[Nothing, Nothing, Nothing] with scala.Product
object Success extends AnyRef
object ~ extends AnyRef