scala.util.parsing.combinatorold.Parsers

trait OnceParser

[source: scala/util/parsing/combinatorold/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
override def ~ [Q](q : => Q)(implicit view$20 : (Q) => UnitParser) : Parser[T]
A parser combinator for sequential composition with a unit-parser
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.~

override def ~[Q](q : => Q)(implicit view$20 : (Q) => UnitParser) : Parser[T]
A parser combinator for sequential composition with a unit-parser

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

Parameters
q - a parser (convertible to a UnitParser) that will be executed after `p' (this parser) succeeds
Returns
a `Parser' that -- on success -- returns the result of `p'. The resulting parser fails if either `p' or `q' fails.
Overrides
Parser.~