scala.util.parsing.combinator

JavaTokenParsers

trait JavaTokenParsers extends RegexParsers

source: JavaTokenParsers.scala
Inherited
  1. Hide All
  2. Show all
  1. RegexParsers
  2. Parsers
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Type Members

  1. type Elem = Char

    the type of input elements the provided parsers consume (When consuming invidual characters, a parser is typically called a scanner, which produces tokens that are consumed by what is normally called a parser. Nonetheless, the same principles apply, regardless of the input type.)

  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[Char]

    The parser input is an abstract reader of input elements, i .

  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. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  7. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  8. object NoSuccess extends AnyRef

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

  9. def OnceParser[T](f: (Reader[Char]) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

  10. def Parser[T](f: (Reader[Char]) ⇒ ParseResult[T]): Parser[T]

  11. def accept[U](expected: String, f: PartialFunction[Char, 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. Example: The parser accept("name", {case Identifier(n) => Name(n)}) accepts an Identifier(n) and returns a Name(n).

  12. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Char]): Parser[List[Char]]

    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'.

  13. implicit def accept(e: Char): Parser[Char]

    A parser that matches only the given element e' The method is implicit so that elements can automatically be lifted to their parsers. For example, when parsing Token's, Identifier("new") (which is a Token') can be used directly, instead of first creating a Parser' using accept(Identifier("new")).

  14. def acceptIf(p: (Char) ⇒ Boolean)(err: (Char) ⇒ String): Parser[Char]

  15. def acceptMatch[U](expected: String, f: PartialFunction[Char, U]): Parser[U]

  16. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Char]): Parser[List[Char]]

  17. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  18. 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.

  19. 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. From: J. Fokker. Functional parsers. In J. Jeuring and E. Meijer, editors, Advanced Functional Programming, volume 925 of Lecture Notes in Computer Science, pages 1--23. Springer, 1995.

  20. 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. Additionally, The right-most (last) element and the left-most combining function have to be supplied. rep1sep(p: Parser[T], q) corresponds to chainr1(p, q ^^ cons, cons, Nil) (where val cons = (x: T, y: List[T]) => x :: y)

  21. def clone(): AnyRef

    This method creates and returns a copy of the receiver object .

  22. 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)

  23. def decimalNumber: Parser[String]

  24. def elem(e: Char): Parser[Char]

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

  25. def elem(kind: String, p: (Char) ⇒ Boolean): Parser[Char]

    A parser matching input elements that satisfy a given predicate

  26. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  27. def equals(arg0: Any): Boolean

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

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

    A parser that results in an error

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

    A parser that always fails

  30. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object .

  31. def floatingPointNumber: Parser[String]

  32. def getClass(): java.lang.Class[_ <: java.lang.Object]

    Returns a representation that corresponds to the dynamic class of the receiver object .

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

    A parser generator for guard expressions .

  34. def handleWhiteSpace(source: CharSequence, offset: Int): Int

  35. def hashCode(): Int

    Returns a hash code value for the object .

  36. def ident: Parser[String]

  37. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  38. var lastNoSuccess: NoSuccess

  39. implicit def literal(s: String): Parser[String]

    A parser that matches a literal string

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

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

  42. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  43. 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

  44. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor .

  45. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor .

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

    A parser generator for optional sub-phrases .

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

    Parse some prefix of reader in' with parser p'

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

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

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

    Parse some prefix of reader in' with parser p'

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

    Parse all of character sequence in' with parser p'

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

    Parse all of reader in' with parser p'

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

    Parse all of reader in' with parser p'

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

    A parser generator delimiting whole phrases (i .

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

    positioned' decorates a parser's result with the start position of the input it consumed. If whitespace is being skipped, then it is skipped before the start position is recorded.

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

    A parser that matches a regex string

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

    A parser generator for repetitions .

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

    A parser generator for non-empty repetitions .

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

    A parser generator for non-empty repetitions .

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

    A parser generator for non-empty repetitions .

  60. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    A parser generator for a specified number of repetitions .

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

    A parser generator for interleaved repetitions .

  62. def skipWhitespace: Boolean

  63. def stringLiteral: Parser[String]

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

    A parser that always succeeds

  65. def synchronized[T0](arg0: T0): T0

  66. def toString(): String

    Returns a string representation of the object .

  67. def wait(): Unit

  68. def wait(arg0: Long, arg1: Int): Unit

  69. def wait(arg0: Long): Unit

  70. val whiteSpace: Regex

  71. def wholeNumber: Parser[String]