LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
fhicl::binding_parser Struct Reference

#include "tokens.h"

Inheritance diagram for fhicl::binding_parser:

Classes

struct  attribute
 

Public Member Functions

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

Detailed Description

Definition at line 489 of file tokens.h.

Member Function Documentation

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

Definition at line 502 of file tokens.h.

References fhicl::NONE, fhicl::PROTECT_ERROR, and fhicl::PROTECT_IGNORE.

507  {
509  boost::spirit::qi::skip_over(first, last, skipper);
510 
511  Attribute result = binding_modifier::NONE;
512  boost::spirit::qi::symbols<char, binding_modifier> modifiers;
513  modifiers.add("@protect_ignore", binding_modifier::PROTECT_IGNORE);
514  modifiers.add("@protect_error", binding_modifier::PROTECT_ERROR);
515 #if 0 /* Preparation for issue #7231. */
516  modifiers.add("@initial", binding_modifier::INITIAL);
517  modifiers.add("@replace", binding_modifier::REPLACE);
518  modifiers.add("@replace_compat", binding_modifier::REPLACE_COMPAT);
519  modifiers.add("@add_or_replace_compat", binding_modifier::ADD_OR_REPLACE_COMPAT);
520 #endif
521  if (((*first) == ':') ||
522  (modifiers.parse(first, last, c, skipper, result) &&
523  (*first) == ':')) {
524  ++first;
525  } else {
526  return false;
527  }
528  boost::spirit::traits::assign_to(result, attr);
529  return true;
530  }
template<typename Context >
boost::spirit::info fhicl::binding_parser::what ( Context &  ) const
inline

Definition at line 535 of file tokens.h.

536  {
537  return boost::spirit::info{"fhicl::binding"};
538  }

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