Classes | Public Member Functions | List of all members
fhicl::dbid_parser Struct Reference

#include <tokens.h>

Inheritance diagram for fhicl::dbid_parser:

Classes

struct  attribute
 

Public Member Functions

template<typename Iterator , typename Context , typename Skipper , typename Attribute >
bool parse (Iterator &first, Iterator const &last, Context &, Skipper const &skipper, Attribute &attr) const
 
template<typename Context >
boost::spirit::info what (Context &) const
 

Detailed Description

Definition at line 271 of file tokens.h.

Member Function Documentation

template<typename Iterator , typename Context , typename Skipper , typename Attribute >
bool fhicl::dbid_parser::parse ( Iterator &  first,
Iterator const &  last,
Context &  ,
Skipper const &  skipper,
Attribute &  attr 
) const
inline

Definition at line 284 of file tokens.h.

289  {
290  boost::spirit::qi::skip_over(first, last, skipper);
291 
292  static std::string const allowed{"0123456789abcdefABCDEF"};
293  Iterator it = first;
294 
295  if (it == last)
296  return false;
297 
298  while (it != last && allowed.find(*it) != std::string::npos)
299  ++it;
300 
301  if (it != last && !maximally_munched_number(*it))
302  return false;
303 
304  Attribute result(first, it);
306  return false;
307 
308  first = it;
309  boost::spirit::traits::assign_to(result, attr);
310  return true;
311  }
static QCString result
std::string string
Definition: nybbler.cc:12
uint size() const
Definition: qcstring.h:201
static constexpr std::size_t max_str_size() noexcept
bool maximally_munched_number(char const ch)
Definition: tokens.h:35
template<typename Context >
boost::spirit::info fhicl::dbid_parser::what ( Context &  ) const
inline

Definition at line 316 of file tokens.h.

317  {
318  return boost::spirit::info{"fhicl::dbid"};
319  }

The documentation for this struct was generated from the following file: