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>
42 return !std::isgraph(ch) || ch ==
'#' || ch ==
'/' || ch ==
',' ||
43 ch ==
']' || ch ==
'}' || ch ==
'.' || ch ==
'[' || ch ==
':';
47 : ::boost::spirit::qi::primitive_parser<catchall_parser> {
48 template <
typename Context,
typename Iterator>
54 template <
typename Iterator,
62 Skipper
const& skipper,
63 Attribute& attr)
const 65 boost::spirit::qi::skip_over(first, last, skipper);
72 (std::isalnum(*it) || *it ==
'_' || *it ==
':' || *it ==
'@'))
78 Attribute result(first, it);
79 if (result.empty() || std::isdigit(result[0]))
83 boost::spirit::traits::assign_to(result, attr);
87 template <
typename Context>
91 return boost::spirit::info(
"shims::catchall");
99 template <
typename Modifiers>
100 struct make_primitive<
shims::tag::catchall, Modifiers> {
104 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