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.
- Alphabetic
- By Inheritance
- Parser
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def anyOf(chars: Characters): Rule0
Creates a rule that matches any single character in the given { @link org.parboiled.support.Characters } instance.
- 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.
- 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.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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.
- def ch(c: Char): CharRule
Creates a rule that matches the given character.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- 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.
- def ignoreCase(s: String): Rule0
Creates a rule that matches the given string case-independently.
- def ignoreCase(c: Char): Rule0
Creates a rule that matches the given character independently of its case.
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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.
- 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.
- 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.
- 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.
- def nTimes[A, B <: A](times: Int, sub: ReductionRule1[A, B], separator: Rule0): ReductionRule1[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.
- def nTimes[A, B <: A](times: Int, sub: ReductionRule1[A, B]): ReductionRule1[A, B]
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.
- 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.
- 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.
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- 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.
- 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.
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- 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.
- 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.
- 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}
- ...
- 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.
- 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.
- def oneOrMore[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[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.
- 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.
- 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.
- 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.
- def optional[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[A, B]
Creates a rule that tries the given sub rule and always matches, even if the sub rule did not match.
- 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.
- 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.
- 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.
- def push[A](f: => A): Rule1[A]
Create a parser action whose result value is pushed onto the value stack.
- 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.
- 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.
- 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).
- 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.
- def run(f: => Unit): Rule0
Creates a simple parser action.
- 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.
- 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.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def test(f: => Boolean): Rule0
Creates a simple semantic predicate.
- implicit def toRule(symbol: Symbol): Rule0
Converts the given symbol into a corresponding parser rule.
- implicit def toRule(chars: Array[Char]): Rule0
Converts the given character array into a corresponding parser rule.
- implicit def toRule(string: String): Rule0
Converts the given string into a corresponding parser rule.
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- 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]
- 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]
- def withContext[A, B, C, D, E, R](f: (A, B, C, D, E, Context[Any]) => R): WithContextAction5[A, B, C, D, E, R]
- def withContext[A, B, C, D, R](f: (A, B, C, D, Context[Any]) => R): WithContextAction4[A, B, C, D, R]
- def withContext[A, B, C, R](f: (A, B, C, Context[Any]) => R): WithContextAction3[A, B, C, R]
- def withContext[A, B, R](f: (A, B, Context[Any]) => R): WithContextAction2[A, B, R]
- def withContext[A, R](f: (A, Context[Any]) => R): WithContextAction1[A, R]
- 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.
- 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.
- 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}
- ...
- 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.
- 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.
- def zeroOrMore[A, B <: A](sub: ReductionRule1[A, B]): ReductionRule1[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.
- 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.
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)