這個問題太多人問了,
所以還是先寫下來當成 FAQ 用;
官方文件的 quick start 這一章是類似下面這樣教:
| 1 | parse("ffff 1234 abcde", +hex_p, space_p); | 
加上 The Scanner and Parsing 那一小節也提到 pharse-level parsing 有兩種版本:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |     template <typename IteratorT, typename ParserT, typename SkipT>     parse_info<IteratorT>     parse     (         IteratorT const&        first,         IteratorT const&        last,         parser<ParserT> const&  p,         parser<SkipT> const&    skip     );     template <typename CharT, typename ParserT, typename SkipT>     parse_info<CharT const*>     parse     (         CharT const*            str,         parser<ParserT> const&  p,         parser<SkipT> const&    skip     ); | 
導致有人寫出這種 code 來結果編不過在那邊哭:
| 1 2 3 4 | rule<> r = +hex_p; string str("ffff 1234 abcde"); parse(str.begin(), str.end(), r, space_p); |