| Home | Libraries | People | FAQ | More

##### NaryParser

###### Description

NaryParser is a composite parser that has one or more subjects. The NaryParser allows its subjects to be treated in the same way as a single instance of a `Parser` following the Composite Design Pattern.

###### Refinement of

> `Parser`

Notation

`p`

  A NaryParser.

`P`

  A NaryParser type.

###### Valid Expressions

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

Expression | Semantics | Return type
--- | --- | ---
`p.elements` | The tuple of elements. | A Boost.Fusion Sequence of `Parser` types.

###### Type Expressions

Expression | Description
--- | ---
`p.elements_type` | Elements tuple type.
`traits::is_nary_parser<P>::type` | Metafunction that evaluates to `mpl::true_` if a certain type, `P` is a NaryParser, `mpl::false_` otherwise (See MPL Boolean Constant).

###### Invariants

For each element, `E`, in any NaryParser, `P`, the following invariant always holds:

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

###### Models

- Alternative
- Expectation operator
- Permutation
- Sequence
- Sequential Or