trait ParserMain extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ParserMain
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[T](p: Parser[T])(s: String): Parser[T]

    Applies parser p to input s.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def charClass(f: (Char) ⇒ Boolean, label: String = "<unspecified>"): Parser[Char]

    Defines a Parser that parses a single character only if the predicate f returns true for that character.

    Defines a Parser that parses a single character only if the predicate f returns true for that character. If this parser fails, label is used as the failure message.

  7. def chars(legal: String): Parser[Char]

    Defines a Parser that parses a single character only if it is contained in legal.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  9. def completions(p: Parser[_], s: String, level: Int): Completions

    Applies parser p to input s and returns the completions at verbosity level.

    Applies parser p to input s and returns the completions at verbosity level. The interpretation of level is up to parser definitions, but 0 is the default by convention, with increasing positive numbers corresponding to increasing verbosity. Typically no more than a few levels are defined.

  10. def derive1[T](p: Parser[T], c: Char): Parser[T]

    Applies parser p to a single character of input.

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def examples[A](a: Parser[A], completions: ExampleSource, maxNumberOfExamples: Int, removeInvalidExamples: Boolean): Parser[A]

    A

    the type of values that are returned by the parser.

    a

    the parser to decorate with a source of examples. All validation and parsing is delegated to this parser, only Parser.completions is modified.

    completions

    the source of examples when displaying completions to the user.

    maxNumberOfExamples

    limits the number of examples that the source of examples should return. This can prevent lengthy pauses and avoids bad interactive user experience.

    removeInvalidExamples

    indicates whether completion examples should be checked for validity (against the given parser). An exception is thrown if the example source contains no valid completion suggestions.

  14. def examples[A](a: Parser[A], completions: Set[String], check: Boolean = false): Parser[A]
  15. def failure(msg: ⇒ String, definitive: Boolean = false): Parser[Nothing]

    Defines a parser that always fails on any input with message msg.

    Defines a parser that always fails on any input with message msg. If definitive is true, any failures by later alternatives are discarded.

  16. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  17. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  19. def homParser[A](a: Parser[A], b: Parser[A]): Parser[A]
  20. def invalid(msgs: ⇒ Seq[String], definitive: Boolean = false): Parser[Nothing]

    Defines a parser that always fails on any input with messages msgs.

    Defines a parser that always fails on any input with messages msgs. If definitive is true, any failures by later alternatives are discarded.

  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. implicit def literal(s: String): Parser[String]

    Presents a literal String s as a Parser that only parses that exact text and provides it as the result.

  23. implicit def literal(ch: Char): Parser[Char]

    Presents a single Char ch as a Parser that only parses that exact character.

  24. implicit def literalRichCharParser(c: Char): RichParser[Char]
  25. implicit def literalRichStringParser(s: String): RichParser[String]
  26. def matched(t: Parser[_], seen: Vector[Char] = Vector.empty, partial: Boolean = false): Parser[String]
  27. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  28. def not(p: Parser[_], failMessage: String): Parser[Unit]
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. def oneOf[T](p: Seq[Parser[T]]): Parser[T]
  32. def parse[T](str: String, parser: Parser[T]): Either[String, T]

    Parses input str using parser.

    Parses input str using parser. If successful, the result is provided wrapped in Right. If unsuccessful, an error message is provided in Left.

  33. def range(r: NumericRange[Char], label: String): Parser[Char]

    Presents a Char range as a Parser.

    Presents a Char range as a Parser. A single Char is parsed only if it is in the given range.

  34. implicit def range(r: NumericRange[Char]): Parser[Char]

    Presents a Char range as a Parser.

    Presents a Char range as a Parser. A single Char is parsed only if it is in the given range.

  35. def result[T](p: Parser[T], s: String): Either[() ⇒ (Seq[String], Int), T]
  36. implicit def richParser[A](a: Parser[A]): RichParser[A]

    Provides combinators for Parsers.

  37. def sample(str: String, parser: Parser[_], completions: Boolean = false): Unit

    Convenience method to use when developing a parser.

    Convenience method to use when developing a parser. parser is applied to the input str. If completions is true, the available completions for the input are displayed. Otherwise, the result of parsing is printed using the result's toString method. If parsing fails, the error message is displayed.

    See also sampleParse and sampleCompletions.

  38. def sampleCompletions(str: String, parser: Parser[_], level: Int = 1): Unit

    Convenience method to use when developing a parser.

    Convenience method to use when developing a parser. parser is applied to the input str and the available completions are displayed on separate lines. If parsing fails, the error message is displayed.

  39. def sampleParse(str: String, parser: Parser[_]): Unit

    Convenience method to use when developing a parser.

    Convenience method to use when developing a parser. parser is applied to the input str and the result of parsing is printed using the result's toString method. If parsing fails, the error message is displayed.

  40. def seq[T](p: Seq[Parser[T]]): Parser[Seq[T]]
  41. def seq0[T](p: Seq[Parser[T]], errors: ⇒ Seq[String]): Parser[Seq[T]]
  42. def stringLiteral(s: String, start: Int): Parser[String]
  43. def success[T](value: T): Parser[T]

    Defines a parser that always succeeds on empty input with the result value.

  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def toString(): String
    Definition Classes
    AnyRef → Any
  46. def token[T](t: Parser[T], complete: TokenCompletions): Parser[T]
  47. def token[T](t: Parser[T], description: String): Parser[T]

    Establishes delegate parser t as a single token of tab completion.

    Establishes delegate parser t as a single token of tab completion. When tab completion of part of this token is requested, description is displayed for suggestions and no completions are ever performed.

  48. def token[T](t: Parser[T], hide: (Int) ⇒ Boolean): Parser[T]

    Establishes delegate parser t as a single token of tab completion.

    Establishes delegate parser t as a single token of tab completion. When tab completion of part of this token is requested, no completions are returned if hide returns true for the current tab completion level. Otherwise, the completions provided by the delegate t or a later derivative are appended to the prefix String already seen by this parser.

  49. def token[T](t: Parser[T]): Parser[T]

    Establishes delegate parser t as a single token of tab completion.

    Establishes delegate parser t as a single token of tab completion. When tab completion of part of this token is requested, the completions provided by the delegate t or a later derivative are appended to the prefix String already seen by this parser.

  50. def tokenDisplay[T](t: Parser[T], display: String): Parser[T]

    Establishes delegate parser t as a single token of tab completion.

    Establishes delegate parser t as a single token of tab completion. When tab completion of part of this token is requested, display is used as the printed suggestion, but the completions from the delegate parser t are used to complete if unambiguous.

  51. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  53. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  54. object ~

    See unapply.

Inherited from AnyRef

Inherited from Any

Ungrouped