scala.util.parsing.combinator.testing

RegexTest

object RegexTest extends RegexParsers

Inherits

  1. RegexParsers
  2. Parsers
  3. AnyRef
  4. Any

Type Members

  1. type Elem = Char

    the type of input elements

  2. class Error(msg: String, next: Reader[Elem]) extends NoSuccess with Product

    The fatal failure case of ParseResult: contains an error-message and the remaining input

  3. class Failure(msg: String, next: Reader[Elem]) extends NoSuccess with Product

    The failure case of ParseResult: contains an error-message and the remaining input

  4. type Input = Reader[Elem]

    The parser input is an abstract reader of input elements

  5. class NoSuccess extends ParseResult[Nothing]

    A common super-class for unsuccessful parse results

  6. trait OnceParser[+T] extends Parser[T]

    A parser whose ~ combinator disallows back-tracking

  7. class ParseResult[+T] extends AnyRef

    A base class for parser results

  8. class Parser[+T] extends (Reader[Elem]) ⇒ ParseResult[T]

    The root class of parsers

  9. class Success[+T](result: T, next: Reader[Elem]) extends ParseResult[T] with Product

    The success case of ParseResult: contains the result and the remaining input

  10. class ~[+a, +b](_1: a, _2: b) extends Product

Value Members

  1. object NoSuccess extends AnyRef

    An extractor so NoSuccess(msg, next) can be used in matches

  2. def OnceParser[T](f: (Reader[Elem]) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

  3. def Parser[T](f: (Reader[Elem]) ⇒ ParseResult[T]): Parser[T]

  4. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    The parser that matches an element in the domain of the partial function f' If f' is defined on the first element in the input, f' is applied to it to produce this parser's result

  5. def accept[ES](es: ES)(arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    A parser that matches only the given list of element es' accept(es) succeeds if the input subsequently provides the elements in the list es'

  6. def accept(e: Elem): Parser[Elem]

    A parser that matches only the given element e' The method is implicit so that elements can automatically be lifted to their parsers

  7. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

  8. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

  9. def acceptSeq[ES](es: ES)(arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

  10. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    A parser generator that, roughly, generalises the rep1sep generator so that q', which parses the separator, produces a left-associative function that combines the elements it separates

  11. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    A parser generator that, roughly, generalises the rep1sep generator so that q', which parses the separator, produces a left-associative function that combines the elements it separates

  12. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    A parser generator that generalises the rep1sep generator so that q', which parses the separator, produces a right-associative function that combines the elements it separates

  13. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Wrap a parser so that its failures become errors (the | combinator will give up as soon as it encounters an error, on failure it simply tries the next alternative)

  14. def elem(e: Elem): Parser[Elem]

    A parser that matches only the given element e' elem(e) succeeds if the input starts with an element e'

  15. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    A parser matching input elements that satisfy a given predicate

  16. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence

  17. def err(msg: String): Parser[Nothing]

    A parser that results in an error

  18. def failure(msg: String): Parser[Nothing]

    A parser that always fails

  19. def guard[T](p: ⇒ Parser[T]): Parser[T]

    A parser generator for guard expressions

  20. def hashCode(): Int

    Returns a hash code value for the object

  21. val ident: Parser[Any]

  22. var lastNoSuccess: NoSuccess

  23. def literal(s: String): Parser[String]

    A parser that matches a literal string

  24. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

  25. def main(args: Array[String]): Unit

  26. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

  27. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Wrap a parser so that its failures&errors become success and vice versa -- it never consumes any input

  28. val number: Parser[Any]

  29. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    A parser generator for optional sub-phrases

  30. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Parse some prefix of reader in' with parser p'

  31. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Parse some prefix of character sequence in' with parser p'

  32. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Parse some prefix of reader in' with parser p'

  33. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Parse all of character sequence in' with parser p'

  34. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Parse all of reader in' with parser p'

  35. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Parse all of reader in' with parser p'

  36. val parser: Parser[List[Any]]

  37. def phrase[T](p: Parser[T]): Parser[T]

    A parser generator delimiting whole phrases (i

  38. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    positioned' decorates a parser's result with the start position of the input it consumed

  39. def regex(r: Regex): Parser[String]

    A parser that matches a regex string

  40. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    A parser generator for repetitions

  41. def rep1[T](first: ⇒ Parser[T], p: ⇒ Parser[T]): Parser[List[T]]

    A parser generator for non-empty repetitions

  42. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    A parser generator for non-empty repetitions

  43. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    A parser generator for non-empty repetitions

  44. def repN[T](n: Int, p: ⇒ Parser[T]): Parser[List[T]]

    A parser generator for a specified number of repetitions

  45. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    A parser generator for interleaved repetitions

  46. def skipWhitespace: Boolean

  47. val string: Parser[Any]

  48. def success[T](v: T): Parser[T]

    A parser that always succeeds

  49. def toString(): String

    Returns a string representation of the object