UnaryParser

| Home | Libraries | People | FAQ | More

##### UnaryParser

###### Description

UnaryParser is a composite parser that has a single subject. The UnaryParser may change the behavior of its subject following the Delegate Design Pattern.

###### Refinement of

> `Parser`

Notation

`p`

  A UnaryParser.

`P`

  A UnaryParser type.

###### Valid Expressions

In addition to the requirements defined in `Parser`, for any UnaryParser the following must be met:

Expression | Semantics | Return type
--- | --- | ---
`p.subject` | Subject parser. | `Parser`

###### Type Expressions

Expression | Description
--- | ---
`P::subject_type` | The subject parser type.
`traits::is_unary_parser<P>::type` | Metafunction that evaluates to `mpl::true_` if a certain type, `P` is a UnaryParser, `mpl::false_` otherwise (See MPL Boolean Constant).

###### Invariants

For any UnaryParser, `P`, the following invariant always holds:

- `traits::is_parser<P::subject_type>::type` evaluates to `mpl::true_`

###### Models

- And Predicate
- Kleene
- `lexeme`
- Not Predicate
- `omit`
- Plus
- `raw`
- `repeat`
- `skip`