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

#include <tokens.h>

Inheritance diagram for fhicl::ass_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 386 of file tokens.h.

Member Function Documentation

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

Definition at line 399 of file tokens.h.

404  {
405  boost::spirit::qi::skip_over(first, last, skipper);
406 
407  Iterator it = first;
408  while (it != last && (std::isalnum(*it) || *it == '_'))
409  ++it;
410 
411  if (it != last && !maximally_munched_ass(*it))
412  return false;
413 
414  Attribute result(first, it);
415  if (result.empty() || std::isdigit(result[0]))
416  return false;
417 
418  first = it;
419  boost::spirit::traits::assign_to(result, attr);
420  return true;
421  }
static QCString result
bool maximally_munched_ass(char const ch)
Definition: tokens.h:41
template<typename Context >
boost::spirit::info fhicl::ass_parser::what ( Context &  ) const
inline

Definition at line 426 of file tokens.h.

427  {
428  return boost::spirit::info{"fhicl::ass"};
429  }

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