LArSoft  v09_90_00
Liquid Argon Software toolkit - https://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 481 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 494 of file tokens.h.

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

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

Definition at line 527 of file tokens.h.

528  {
529  return boost::spirit::info{"fhicl::binding"};
530  }

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