Definition at line 156 of file ta.hh.
Public Types | |
|
typedef std::vector< kind_t >::const_iterator | input_iterator |
| Type of constant random-access iterator that is used to iterate through the input kinds of an operator. | |
Public Member Functions | |
| template<typename InputIterator> | |
| op_t (const std::string &name, InputIterator inputs_begin, InputIterator inputs_end, const kind_t &output) | |
| Constructs a new operator. | |
Friends | |
| const std::string & | name (const op_t &op) |
| Returns the name of this operator. | |
| const op_t::input_iterator | inputs_begin (const op_t &op) |
| Returns iterator that points to first input kind of the operator. | |
| const op_t::input_iterator | inputs_end (const op_t &op) |
| Returns iterator that points one past the last input kind of the operator. | |
| const kind_t & | output (const op_t &op) |
| Returns the output kind of this operator. | |
| bool | operator== (const op_t &lhs, const op_t &rhs) |
| Returns true if lhs is the same operator as rhs. | |
| bool | operator< (const op_t &lhs, const op_t &rhs) |
| Compares two operators based on address of implementation. | |
Related Functions | |
| (Note that these are not member functions.) | |
| bool | operator!= (const op_t &lhs, const op_t &rhs) |
| Returns true if lhs does not equal rhs. | |
| const kind_t & | input (const op_t &op, size_t i) |
| Returns the ith input kind for operator. | |
| size_t | input_count (const op_t &op) |
| Returns number of inputs for operator. | |
| bool | is_constant (const op_t &op) |
| Returns true if op is a constant. | |
| bool | is_binary (const op_t &op) |
| Returns true if op takes two args with same kind as output kind. | |
| op_t | make_constant (const std::string &name, const kind_t &output) |
| Constructs a constant operator. | |
| op_t | make_unary_op (const std::string &name, const kind_t &input1, const kind_t &output) |
| Constructs a unary operator. | |
| op_t | make_binary_op (const std::string &name, const kind_t &input1, const kind_t &input2, const kind_t &output) |
| Constructs a binary operator. | |
| std::ostream & | operator<< (std::ostream &o, const op_t &op) |
| Writes the operator's identifier to the output stream. | |
| rule_t | make_constant_rule (const op_t &lhs_op, const state_t &rhs) |
| Constructs a rule for a constant symbol. | |
| rule_t | make_unary_rule (const op_t &lhs_op, const state_t &lhs, const state_t &rhs) |
| Constructs a rule for a unary symbol. | |
| rule_t | make_binary_rule (const op_t &lhs_op, const state_t &lhs1, const state_t &lhs2, const state_t &rhs) |
| Constructs a rule for a binary symbol. | |
|
||||||||||||||||||||||||
|
Constructs a new operator.
|
1.4.6