1 #ifndef fhiclcpp_parse_shims_h 2 #define fhiclcpp_parse_shims_h 6 #include "boost/spirit/include/qi.hpp" 25 BOOST_SPIRIT_TERMINAL(catchall)
31 struct use_terminal<::boost::spirit::qi::domain, shims::tag::catchall>
41 return !std::isgraph(ch) || ch ==
'#' || ch ==
'/' || ch ==
',' ||
42 ch ==
']' || ch ==
'}' || ch ==
'.' || ch ==
'[' || ch ==
':';
46 : ::boost::spirit::qi::primitive_parser<catchall_parser> {
47 template <
typename Context,
typename Iterator>
53 template <
typename Iterator,
61 Skipper
const& skipper,
62 Attribute& attr)
const 64 boost::spirit::qi::skip_over(first, last, skipper);
71 (std::isalnum(*it) || *it ==
'_' || *it ==
':' || *it ==
'@'))
77 Attribute
result(first, it);
78 if (result.empty() || std::isdigit(result[0]))
82 boost::spirit::traits::assign_to(result, attr);
86 template <
typename Context>
98 template <
typename Modifiers>
99 struct make_primitive<
shims::tag::catchall, Modifiers> {
103 return result_type();
bool maximally_munched_ass(char ch)
bool isSnippetMode(bool m)
auto lit(std::string arg)
shims::catchall_parser result_type
bool parse(Iterator &first, Iterator const &last, Context &, Skipper const &skipper, Attribute &attr) const
result_type operator()(unused_type, unused_type) const
boost::spirit::info what(Context &) const