File indexing completed on 2025-01-31 10:01:54
0001
0002
0003
0004
0005
0006
0007
0008
0009 #if !defined(BOOST_SPIRIT_PARSER_IPP)
0010 #define BOOST_SPIRIT_PARSER_IPP
0011
0012 namespace boost { namespace spirit {
0013
0014 BOOST_SPIRIT_CLASSIC_NAMESPACE_BEGIN
0015
0016
0017
0018
0019
0020
0021 template <typename IteratorT, typename DerivedT>
0022 inline parse_info<IteratorT>
0023 parse(
0024 IteratorT const& first_
0025 , IteratorT const& last
0026 , parser<DerivedT> const& p)
0027 {
0028 IteratorT first = first_;
0029 scanner<IteratorT, scanner_policies<> > scan(first, last);
0030 match<nil_t> hit = p.derived().parse(scan);
0031 return parse_info<IteratorT>(
0032 first, hit, hit && (first == last), hit.length());
0033 }
0034
0035
0036
0037
0038
0039
0040 template <typename CharT, typename DerivedT>
0041 inline parse_info<CharT const*>
0042 parse(CharT const* str, parser<DerivedT> const& p)
0043 {
0044 CharT const* last = str;
0045 while (*last)
0046 last++;
0047 return parse(str, last, p);
0048 }
0049
0050 BOOST_SPIRIT_CLASSIC_NAMESPACE_END
0051
0052 }}
0053
0054 #endif
0055