scala.util.parsing.combinator1.Parsers

trait OnceParser

[source: scala/util/parsing/combinator1/Parsers.scala]

trait OnceParser[+T]
extends Parser[T]
A parser whose ~ combinator disallows back-tracking.
Method Summary
override def ~ [U](q : => Parser[U]) : Parser[~[T, U]]
A parser combinator for sequential composition

`p ~ q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'.

Methods inherited from Parser
apply (abstract), ~>, <~, ~!, |, ^^, ^^^, ^?, ^?, into, >>, *, *, +, ?
Methods inherited from Function1
toString, compose, andThen
Methods inherited from AnyRef
getClass, hashCode, equals, clone, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def ~[U](q : => Parser[U]) : Parser[~[T, U]]
A parser combinator for sequential composition

`p ~ q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'.

Parameters
q - a parser that will be executed after `p' (this parser) succeeds
Returns
a `Parser' that -- on success -- returns a `~' (like a Pair, but easier to pattern match on) that contains the result of `p' and that of `q'. The resulting parser fails if either `p' or `q' fails.
Overrides
Parser.~