Classes | Public Member Functions | List of all members
shims::catchall_parser Struct Reference

#include <parse_shims.h>

Inheritance diagram for shims::catchall_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 45 of file parse_shims.h.

Member Function Documentation

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

Definition at line 58 of file parse_shims.h.

63  {
64  boost::spirit::qi::skip_over(first, last, skipper);
65 
66  if (!::shims::isSnippetMode())
67  return false;
68 
69  Iterator it = first;
70  while (it != last &&
71  (std::isalnum(*it) || *it == '_' || *it == ':' || *it == '@'))
72  ++it;
73 
74  if (it != last && !maximally_munched_ass(*it))
75  return false;
76 
77  Attribute result(first, it);
78  if (result.empty() || std::isdigit(result[0]))
79  return false;
80 
81  first = it;
82  boost::spirit::traits::assign_to(result, attr);
83  return true;
84  }
bool maximally_munched_ass(char ch)
Definition: parse_shims.h:39
bool isSnippetMode(bool m)
Definition: parse_shims.cc:9
static QCString result
template<typename Context >
boost::spirit::info shims::catchall_parser::what ( Context &  ) const
inline

Definition at line 88 of file parse_shims.h.

89  {
90  return boost::spirit::info("shims::catchall");
91  }

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