Scala Library
|
|
abstract
class
UnitParser
extends
(Reader) => ParseResult[Unit]Unit
These compose differently from normal parsers in that the Unit
result in a sequential or function composition is dropped.Method Summary | |
def
|
^^
[U](v : U) : Parser[U]
A parser combinator for function application
|
abstract def
|
apply
(in : Reader) : ParseResult[Unit]
An unspecified method that defines the behaviour of this parser.
|
def
|
|
[Q](q : => Q)(implicit view$6 : (Q) => UnitParser) : UnitParser
A parser combinator for alternative composition
|
def
|
|||
[Q](q : => Q)(implicit view$7 : (Q) => UnitParser) : UnitParser
A parser combinator for alternative with longest match composition
|
def
|
~
[A](q : => A)(implicit view$4 : (A) => UnitParser) : UnitParser
A parser combinator for sequential composition with a unit-parser
|
def
|
~
[U](q : => Parser[U]) : Parser[U]
A parser combinator for sequential composition
|
def
|
~!
[Q](q : => Q)(implicit view$5 : (Q) => UnitParser) : UnitParser
A parser combinator for non-back-tracking sequential composition with a unit-parser
|
def
|
~!
[U](q : => Parser[U]) : Parser[U]
A parser combinator for non-back-tracking sequential composition
|
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 |
abstract
def
apply(in : Reader) : ParseResult[Unit]
`p ~ q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'.
q -
a parser that will be executed after `p' (this parser) succeeds
def
~[A](q : => A)(implicit
view$4 : (A) => UnitParser) : UnitParser
`p ~ q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'.
q -
a parser (convertible to a UnitParser) that will be executed after `p' (this parser) succeeds`p ~! q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'. In case of failure, no back-tracking is performed (in an earlier parser produced by the | combinator).
q -
a parser that will be executed after `p' (this parser) succeeds
def
~(implicit
view$5 : (Q) => UnitParser) : UnitParser
`p ~! q' succeeds if `p' succeeds and `q' succeeds on the input left over by `p'. In case of failure, no back-tracking is performed (in an earlier parser produced by the | combinator).
q -
a parser that will be executed after `p' (this parser) succeeds
def
|[Q](q : => Q)(implicit
view$6 : (Q) => UnitParser) : UnitParser
`p | q' succeeds if `p' succeeds or `q' succeeds Note that `q' is only tried if `p's failure is non-fatal (i.e., back-tracking is allowed).
q -
a parser that will be executed if `p' (this parser) fails (and allows back-tracking)
def
|||[Q](q : => Q)(implicit
view$7 : (Q) => UnitParser) : UnitParser
`p ||| q' succeeds if `p' succeeds or `q' succeeds If `p' and `q' both succeed, the parser that consumed the most characters accepts.
q -
a parser that accepts if p consumes less characters.`p ^^ v' succeeds if `p' succeeds; it returns `v'.
v -
a value that's used as the result of the returned Parser (if it was successful).
Scala Library
|
|