Trait

org.parboiled.scala

Parser

Related Doc: package scala

Permalink

trait Parser extends AnyRef

The main Parser trait for scala parboiled parsers. Defines the basic rule building methods as well as the caching and proxying logic.

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

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def anyOf(chars: Characters): Rule0

    Permalink

    Creates a rule that matches any single character in the given { @link org.parboiled.support.Characters } instance.

  5. def anyOf(chars: Array[Char]): Rule0

    Permalink

    Creates a rule that matches any single character in the given character array.

    Creates a rule that matches any single character in the given character array. If the array is empty the rule is equivalent to the NOTHING rule.

  6. def anyOf(s: String): Rule0

    Permalink

    Creates a rule that matches any single character in the given string.

    Creates a rule that matches any single character in the given string. If the string is empty the rule is equivalent to the NOTHING rule.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def buildParseTree: Boolean

    Permalink

    Indicates whether parboiled will create a parse tree during a parsing run of this parser.

    Indicates whether parboiled will create a parse tree during a parsing run of this parser. Override and return true (you can also do this with a "override val buildParseTree = true") to enable parse tree building.

  9. def ch(c: Char): CharRule

    Permalink

    Creates a rule that matches the given character.

  10. def clone(): AnyRef

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

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def ignoreCase(chars: Array[Char]): Rule0

    Permalink

    Creates a rule that matches the given character array case-independently.

    Creates a rule that matches the given character array case-independently. If the array is empty the rule is equivalent to the EMPTY rule.

  17. def ignoreCase(s: String): Rule0

    Permalink

    Creates a rule that matches the given string case-independently.

  18. def ignoreCase(c: Char): Rule0

    Permalink

    Creates a rule that matches the given character independently of its case.

  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def nTimes[A, B](times: Int, sub: Rule2[A, B], separator: Rule0): Rule1[List[(A, B)]]

    Permalink

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule.

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule. If the given number is zero the result is equivalent to the EMPTY match.

  21. def nTimes[A, B](times: Int, sub: Rule2[A, B]): Rule1[List[(A, B)]]

    Permalink

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule.

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule. If the given number is zero the result is equivalent to the EMPTY match.

  22. def nTimes[A](times: Int, sub: Rule1[A], separator: Rule0): Rule1[List[A]]

    Permalink

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule.

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule. If the given number is zero the result is equivalent to the EMPTY match.

  23. def nTimes[A](times: Int, sub: Rule1[A]): Rule1[List[A]]

    Permalink

    Matches the given sub rule a specified number of times.

    Matches the given sub rule a specified number of times. If the given number is zero the result is equivalent to the EMPTY match.

  24. def nTimes[A, B <: A](times: Int, sub: ReductionRule1[A, B], separator: Rule0): ReductionRule1[A, B]

    Permalink

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule.

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule. If the given number is zero the result is equivalent to the EMPTY match.

  25. def nTimes[A, B <: A](times: Int, sub: ReductionRule1[A, B]): ReductionRule1[A, B]

    Permalink

    Matches the given sub rule a specified number of times.

    Matches the given sub rule a specified number of times. If the given number is zero the result is equivalent to the EMPTY match.

  26. def nTimes(times: Int, sub: Rule0, separator: Rule0): Rule0

    Permalink

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule.

    Matches the given sub rule a specified number of times, whereby two rule matches have to be separated by a match of the given separator rule. If the given number is zero the result is equivalent to the EMPTY match.

  27. def nTimes(times: Int, sub: Rule0): Rule0

    Permalink

    Matches the given sub rule a specified number of times.

    Matches the given sub rule a specified number of times. If the given number is zero the result is equivalent to the EMPTY match.

  28. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  29. def noneOf(chars: Array[Char]): Rule0

    Permalink

    Creates a rule that matches any single character except the ones in the given character array and EOI.

    Creates a rule that matches any single character except the ones in the given character array and EOI. If the array is empty the rule is equivalent to the ANY rule.

  30. def noneOf(s: String): Rule0

    Permalink

    Creates a rule that matches any single character except the ones in the given string and EOI.

    Creates a rule that matches any single character except the ones in the given string and EOI. If the string is empty the rule is equivalent to the ANY rule.

  31. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  32. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. def oneOrMore[A, B](sub: Rule2[A, B], separator: Rule0): Rule1[List[(A, B)]]

    Permalink

    Creates a rule that one or more times tries to match a given sub rule.

    Creates a rule that one or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...

    This overload automatically builds a list from the return values of the sub rule and pushes it onto the value stack.

  34. def oneOrMore[A](sub: Rule1[A], separator: Rule0): Rule1[List[A]]

    Permalink

    Creates a rule that one or more times tries to match a given sub rule.

    Creates a rule that one or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...

    This overload automatically builds a list from the return values of the sub rule and pushes it onto the value stack.

  35. def oneOrMore(sub: Rule0, separator: Rule0): Rule0

    Permalink

    Creates a rule that one or more times tries to match a given sub rule.

    Creates a rule that one or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...
  36. def oneOrMore[A, B](sub: Rule2[A, B]): Rule1[List[(A, B)]]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches if the sub rule matched at least once. This overload automatically builds a list from the return values of its sub rule and pushes it onto the value stack. If the sub rule did not match at all the pushed list will be empty.

  37. def oneOrMore[A](sub: Rule1[A]): Rule1[List[A]]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches if the sub rule matched at least once. This overload automatically builds a list from the return values of its sub rule and pushes it onto the value stack. If the sub rule did not match at all the pushed list will be empty.

  38. def oneOrMore[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[A, B]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches if the sub rule matched at least once.

  39. def oneOrMore(sub: Rule0): Rule0

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches if the sub rule matched at least once.

  40. def optional[A, B](sub: Rule2[A, B]): Rule1[Option[(A, B)]]

    Permalink

    Creates a rule that tries the given sub rule and always matches, even if the sub rule did not match.

  41. def optional[A](sub: Rule1[A]): Rule1[Option[A]]

    Permalink

    Creates a rule that tries the given sub rule and always matches, even if the sub rule did not match.

  42. def optional[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[A, B]

    Permalink

    Creates a rule that tries the given sub rule and always matches, even if the sub rule did not match.

  43. def optional(sub: Rule0): Rule0

    Permalink

    Creates a rule that tries the given sub rule and always matches, even if the sub rule did not match.

  44. def push[A, B, C](a: ⇒ A, b: ⇒ B, c: ⇒ C): Rule3[A, B, C]

    Permalink

    Create a parser action whose three result values are pushed onto the value stack.

  45. def push[A, B](a: ⇒ A, b: ⇒ B): Rule2[A, B]

    Permalink

    Create a parser action whose two result values are pushed onto the value stack.

  46. def push[A](f: ⇒ A): Rule1[A]

    Permalink

    Create a parser action whose result value is pushed onto the value stack.

  47. def pushFromContext[A](f: (Context[Any]) ⇒ A): Rule1[A]

    Permalink

    Create a parser action from the given function whose result value is pushed onto the value stack.

  48. def rule[T <: Rule](label: String, options: RuleOption*)(block: ⇒ T)(implicit creator: (Matcher) ⇒ T): T

    Permalink

    Defines a parser rule wrapping the given rule construction block with caching and recursion protection.

    Defines a parser rule wrapping the given rule construction block with caching and recursion protection. Labels the constructed rule with the given label and optionally marks it according to the given rule options.

  49. def rule[T <: Rule](firstOption: RuleOption, more: RuleOption*)(block: ⇒ T)(implicit creator: (Matcher) ⇒ T): T

    Permalink

    Defines a parser rule wrapping the given rule construction block with caching and recursion protection using the given rule option(s).

  50. def rule[T <: Rule](block: ⇒ T)(implicit creator: (Matcher) ⇒ T): T

    Permalink

    Defines a parser rule wrapping the given rule construction block with caching and recursion protection.

  51. def run(f: ⇒ Unit): Rule0

    Permalink

    Creates a simple parser action.

  52. def str(chars: Array[Char]): Rule0

    Permalink

    Creates a rule that matches the given character array.

    Creates a rule that matches the given character array. If the array is empty the rule is equivalent to the EMPTY rule.

  53. def str(s: String): Rule0

    Permalink

    Creates a rule that matches the given string.

    Creates a rule that matches the given string. If the string is empty the rule is equivalent to the EMPTY rule.

  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  55. def test(f: ⇒ Boolean): Rule0

    Permalink

    Creates a simple semantic predicate.

  56. implicit def toRule(symbol: Symbol): Rule0

    Permalink

    Converts the given symbol into a corresponding parser rule.

  57. implicit def toRule(chars: Array[Char]): Rule0

    Permalink

    Converts the given character array into a corresponding parser rule.

  58. implicit def toRule(string: String): Rule0

    Permalink

    Converts the given string into a corresponding parser rule.

  59. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  60. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  63. def withContext[A, B, C, D, E, F, G, R](f: (A, B, C, D, E, F, G, Context[Any]) ⇒ R): WithContextAction7[A, B, C, D, E, F, G, R]

    Permalink
  64. def withContext[A, B, C, D, E, F, R](f: (A, B, C, D, E, F, Context[Any]) ⇒ R): WithContextAction6[A, B, C, D, E, F, R]

    Permalink
  65. def withContext[A, B, C, D, E, R](f: (A, B, C, D, E, Context[Any]) ⇒ R): WithContextAction5[A, B, C, D, E, R]

    Permalink
  66. def withContext[A, B, C, D, R](f: (A, B, C, D, Context[Any]) ⇒ R): WithContextAction4[A, B, C, D, R]

    Permalink
  67. def withContext[A, B, C, R](f: (A, B, C, Context[Any]) ⇒ R): WithContextAction3[A, B, C, R]

    Permalink
  68. def withContext[A, B, R](f: (A, B, Context[Any]) ⇒ R): WithContextAction2[A, B, R]

    Permalink
  69. def withContext[A, R](f: (A, Context[Any]) ⇒ R): WithContextAction1[A, R]

    Permalink
  70. def zeroOrMore[A, B](sub: Rule2[A, B], separator: Rule0): Rule1[List[(A, B)]]

    Permalink

    Creates a rule that zero or more times tries to match a given sub rule.

    Creates a rule that zero or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {nothing}
    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...

    This overload automatically builds a list from the return values of the sub rule and pushes it onto the value stack.

  71. def zeroOrMore[A](sub: Rule1[A], separator: Rule0): Rule1[List[A]]

    Permalink

    Creates a rule that zero or more times tries to match a given sub rule.

    Creates a rule that zero or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {nothing}
    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...

    This overload automatically builds a list from the return values of the sub rule and pushes it onto the value stack.

  72. def zeroOrMore(sub: Rule0, separator: Rule0): Rule0

    Permalink

    Creates a rule that zero or more times tries to match a given sub rule.

    Creates a rule that zero or more times tries to match a given sub rule. Between two sub rule matches the given separator rule has to match. So this rule matches following sequences:

    • {nothing}
    • {sub}
    • {sub} {separator} {sub}
    • {sub} {separator} {sub} {separator} {sub}
    • ...
  73. def zeroOrMore[A, B](sub: Rule2[A, B]): Rule1[List[(A, B)]]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches even if the sub rule did not match once. This overload automatically builds a list from the return values of its sub rule and pushes it onto the value stack.

  74. def zeroOrMore[A](sub: Rule1[A]): Rule1[List[A]]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches even if the sub rule did not match once. This overload automatically builds a list from the return values of its sub rule and pushes it onto the value stack.

  75. def zeroOrMore[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[A, B]

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches even if the sub rule did not match once.

  76. def zeroOrMore(sub: Rule0): Rule0

    Permalink

    Creates a rule that tries the given sub rule repeatedly until it fails.

    Creates a rule that tries the given sub rule repeatedly until it fails. Matches even if the sub rule did not match once.

Inherited from AnyRef

Inherited from Any

Ungrouped