1 #ifndef fhiclcpp_parse_shims_h 2 #define fhiclcpp_parse_shims_h 6 #include "boost/spirit/include/qi.hpp" 25 BOOST_SPIRIT_TERMINAL(catchall)
30 struct use_terminal<
qi::domain, shims::tag::catchall> : mpl::true_ {};
38 return !std::isgraph(ch) || ch ==
'#' || ch ==
'/' || ch ==
',' ||
39 ch ==
']' || ch ==
'}' || ch ==
'.' || ch ==
'[' || ch ==
':';
43 : ::boost::spirit::qi::primitive_parser<catchall_parser> {
44 template <
typename Context,
typename Iterator>
50 template <
typename Iterator,
58 Skipper
const& skipper,
59 Attribute& attr)
const 61 boost::spirit::qi::skip_over(first, last, skipper);
68 (std::isalnum(*it) || *it ==
'_' || *it ==
':' || *it ==
'@'))
74 Attribute result(first, it);
75 if (result.empty() || std::isdigit(result[0]))
79 boost::spirit::traits::assign_to(result, attr);
83 template <
typename Context>
87 return boost::spirit::info(
"shims::catchall");
93 template <
typename Modifiers>
94 struct make_primitive<
shims::tag::catchall, Modifiers> {
bool maximally_munched_ass(char ch)
auto lit(std::string arg)
bool parse(Iterator &first, Iterator const &last, Context &, Skipper const &skipper, Attribute &attr) const
result_type operator()(unused_type, unused_type) const
bool isSnippetMode(bool m=false) noexcept
boost::spirit::info what(Context &) const