'ODTONE - Open Dot Twenty One'

PrevUpHomeNext

Struct template parser_grammar

odtone::conf::parser_grammar

Synopsis

// In header: </home/carlos/Projectos/odtone/inc/odtone/conf.hpp>

template<typename Iterator> 
struct parser_grammar {
  // types
  typedef skipper_grammar< Iterator >                          skipper;    
  typedef qi::locals< function const *, args_type, pset_type > cmd_locals; 
  typedef qi::locals< property_class const *, uint >           prop_locals;

  // member classes/structs/unions

  struct act_on_arg_ {
    // member classes/structs/unions
    template<typename , typename , typename , typename > 
    struct result {
      // types
      typedef bool type;
    };

    // public member functions
    bool operator()(function const &, args_type &, arg_type &, error_reason &) const;
  };

  struct act_on_name_ {
    // member classes/structs/unions
    template<typename , typename , typename , typename > 
    struct result {
      // types
      typedef bool type;
    };

    // public member functions
    bool operator()(function const *&, functions const &, std::string const &, 
                    error_reason &) const;
  };

  struct act_on_prop_ {
    // member classes/structs/unions
    template<typename , typename , typename , typename > 
    struct result {
      // types
      typedef bool type;
    };

    // public member functions
    bool operator()(property_class const *&, function const &, 
                    std::string const &, error_reason &) const;
    bool operator()(property_class const *, arg_type const &, uint &, 
                    error_reason &) const;
  };

  struct error_handler_ {
    // member classes/structs/unions
    template<typename , typename , typename , typename , typename > 
    struct result {
      // types
      typedef void type;
    };

    // public member functions
    void operator()(Iterator, Iterator, Iterator, qi::info const &, 
                    error_reason) const;
  };

  struct run_cmd_ {
    // member classes/structs/unions
    template<typename , typename , typename > 
    struct result {
      // types
      typedef void type;
    };

    // public member functions
    void operator()(function const &, args_type const &, pset_type const &) const;
  };

  // construct/copy/destruct
  parser_grammar(functions const &);

  // public data members
  qi::rule< Iterator, skipper > start;
  qi::rule< Iterator, cmd_locals, skipper > cmd;
  qi::rule< Iterator, std::string(), skipper > name;
  qi::rule< Iterator, arg_type(), skipper > arg;
  qi::rule< Iterator, pset_type(function const &), skipper > pset;
  qi::rule< Iterator, prop_type(function const &), prop_locals, skipper > prop;
  string_grammar< Iterator > str;
  ip4_grammar< Iterator > ip4;
  ip6_grammar< Iterator > ip6;
  functions const & cmds;
  error_reason ereason;
  ph::function< act_on_name_ > act_on_name;
  ph::function< act_on_arg_ > act_on_arg;
  ph::function< act_on_prop_ > act_on_prop;
  ph::function< run_cmd_ > run_cmd;
  ph::function< error_handler_ > error_handler;
};

Description

parser_grammar public construct/copy/destruct

  1. parser_grammar(functions const & cm);

PrevUpHomeNext