template<typename Derived, typename ResultT, typename NodeT>
class PrattParser< Derived, ResultT, NodeT >
CRTP Base Class for Pratt Parsers.
The Derived class must implement the following interface:
- ResultT identifier(const NodeT &t)
- ResultT number(const NodeT &t)
- ResultT string(const NodeT &t)
- ResultT prefix(const NodeT &t, BindingPower p)
- ResultT parenthesis(BindingPower p) // Must parse closing token
- ResultT member(ResultT left, const NodeT &t, BindingPower p)
- ResultT subscript(ResultT left, const NodeT &t, BindingPower p) // Must parse closing token
- ResultT suffix(ResultT left, const NodeT &t)
- ResultT binary(ResultT left, const NodeT &t, BindingPower p)
- ResultT ternary(ResultT left, const NodeT &t, BindingPower p)
- ResultT error(ErrorType err, lexit::TokenType type)
- lexit::TokenType peek() const
- NodeT consume()
- lexit::TokenType to_type(const NodeT &t)
Definition at line 32 of file pratt_parser.hh.