| Home | Libraries | People | FAQ | More

##### Inhibiting Skipping Without Pre-skip (`no_skip[]`)

###### Description

The `no_skip[]` directive turns off white space skipping. The difference to `lexeme` is that it does not do pre-skipping in any case. Otherwise it is completely equivalent to the `lexeme` directive.

###### Header

    // forwards to <boost/spirit/home/qi/directive/no_skip.hpp>
    #include <boost/spirit/include/qi_no_skip.hpp>

Also, see Include Structure.

###### Namespace

Name
`boost::spirit::no_skip // alias: boost::spirit::qi::no_skip`

###### Model of

> `UnaryParser`

Notation

`a`

  A `Parser`.

###### Expression Semantics

Semantics of an expression is defined only where it differs from, or is not defined in `UnaryParser`.

Expression | Semantics
--- | ---
`no_skip[a]` | Turns off white space skipping for the subject parser, `a` (and all its children). This directive does not pre-skips.

###### Attributes

See Compound Attribute Notation.

Expression | Attribute
--- | ---
`no_skip[a]` |
    a: A --> no_skip[a]: A
    a: Unused --> no_skip[a]: Unused

###### Complexity

> The complexity is defined by the complexity of the subject parser, `a`

###### Example

| Note
The test harness for the example(s) below is presented in the Basics Examples section.

Some using declarations:

    using boost::spirit::qi::no_skip;
    using boost::spirit::qi::char_;

Simple usage of `no_skip[]`:

The use of no_skip here will prevent skipping of whitespace in front and in between the characters of the string `' abc '`.

    std::string str;
    test_phrase_parser_attr("'  abc  '",
        '\'' >> no_skip[+~char_('\'')] >> '\'', str);
    std::cout << str << std::endl;    // will output: >  abc  <