LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::dss_parser Struct Reference

#include "tokens.h"

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

Member Function Documentation

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

Definition at line 454 of file tokens.h.

References fhicl::maximally_munched_dss().

459  {
460  boost::spirit::qi::skip_over(first, last, skipper);
461 
462  bool all_digits = true;
463  Iterator it = first;
464  for (; it != last && (std::isalnum(*it) || *it == '_'); ++it)
465  all_digits = all_digits && std::isdigit(*it);
466 
467  if (it != last && !maximally_munched_dss(*it))
468  return false;
469 
470  Attribute result(first, it);
471  if (result.empty() || all_digits || !std::isdigit(result[0]))
472  return false;
473 
474  first = it;
475  boost::spirit::traits::assign_to(result, attr);
476  return true;
477  }
bool maximally_munched_dss(char const ch)
Definition: tokens.h:47
template<typename Context >
boost::spirit::info fhicl::dss_parser::what ( Context &  ) const
inline

Definition at line 482 of file tokens.h.

483  {
484  return boost::spirit::info{"fhicl::dss"};
485  }

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