org.parboiled.scala

Parser

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. Hide All
  2. Show all
  1. Parser
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def anyOf (chars: Characters): Rule0

    Creates a rule that matches any single character in the given { @link org.

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

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

    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.

  8. def anyOf (s: String): Rule0

    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.

  9. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  10. def buildParseTree : Boolean

    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.

  11. def ch (c: Char): CharRule

    Creates a rule that matches the given character.

  12. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  14. def equals (arg0: Any): Boolean

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

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  17. def hashCode (): Int

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

    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.

  19. def ignoreCase (s: String): Rule0

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

  20. def ignoreCase (c: Char): Rule0

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

  21. def isInstanceOf [T0] : Boolean

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

    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, B] (times: Int, sub: Rule2[A, B]): Rule1[List[(A, B)]]

    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.

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

    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] (times: Int, sub: Rule1[A]): Rule1[List[A]]

    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 [Z] (times: Int, sub: ReductionRule1[Z, Z], separator: Rule0): ReductionRule1[Z, Z]

    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 [Z] (times: Int, sub: ReductionRule1[Z, Z]): ReductionRule1[Z, Z]

    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. def nTimes (times: Int, sub: Rule0, separator: Rule0): Rule0

    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.

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

    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.

  30. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  31. def noneOf (chars: Array[Char]): Rule0

    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.

  32. def noneOf (s: String): Rule0

    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.

  33. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  34. def notifyAll (): Unit

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

    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.

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

    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.

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

    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}
    • ...
  38. def oneOrMore [A, B] (sub: Rule2[A, B]): Rule1[List[(A, B)]]

    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.

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

    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.

  40. def oneOrMore [Z] (sub: ReductionRule1[Z, Z]): ReductionRule1[Z, Z]

    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.

  41. def oneOrMore (sub: Rule0): Rule0

    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.

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

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

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

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

  44. def optional [Z] (sub: ReductionRule1[Z, Z]): ReductionRule1[Z, Z]

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

  45. def optional (sub: Rule0): Rule0

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

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

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

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

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

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

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

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

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

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

    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.

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

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

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

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

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

    Creates a simple parser action.

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

    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.

  55. def str (s: String): Rule0

    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.

  56. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  57. def test (f: ⇒ Boolean): Rule0

    Creates a simple semantic predicate.

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

    Converts the given symbol into a corresponding parser rule.

    Converts the given symbol into a corresponding parser rule.

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

    Converts the given character array into a corresponding parser rule.

    Converts the given character array into a corresponding parser rule.

    Attributes
    implicit
  60. implicit def toRule (string: String): Rule0

    Converts the given string into a corresponding parser rule.

    Converts the given string into a corresponding parser rule.

    Attributes
    implicit
  61. def toString (): String

    Definition Classes
    AnyRef → Any
  62. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  65. 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]

  66. 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]

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

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

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

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

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

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

    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.

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

    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.

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

    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}
    • ...
  75. def zeroOrMore [A, B] (sub: Rule2[A, B]): Rule1[List[(A, B)]]

    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.

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

    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.

  77. def zeroOrMore [Z] (sub: ReductionRule1[Z, Z]): ReductionRule1[Z, Z]

    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.

  78. def zeroOrMore (sub: Rule0): Rule0

    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