scala.util.parsing.combinator.Parsers

trait OnceParser

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

trait OnceParser[+T]
extends Parser[T]
A parser whose ~ combinator disallows back-tracking.
Method Summary
override def ~ [U](p : => Parser[U]) : Parser[~[T, U]]
A parser combinator for sequential composition
Methods inherited from Parser
apply (abstract), named, toString, flatMap, map, append, ~>, <~, ~!, |, |||, ^^, ^^^, ^?, ^?, into, >>, *, *, +, ?
Methods inherited from Function1
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](p : => 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.~