Pegmatite
|
Abstract base class for expressions. More...
#include <parser.hh>
Public Member Functions | |
virtual | ~Expr () |
Virtual destructor for safe overloading. More... | |
virtual bool | parse_non_term (Context &con) const =0 |
Parse this expression as a non-terminal. More... | |
virtual bool | parse_term (Context &con) const =0 |
Parse this expression as a terminal. More... | |
virtual void | dump () const =0 |
Dump the current rule. More... | |
Abstract base class for expressions.
|
virtual |
Virtual destructor for safe overloading.
Note that generally expression objects are not meant to be deallocated, as they can be used by multiple parsers.
Defined out-of-line to avoid emitting vtables in every translation unit that includes this header.
|
pure virtual |
Dump the current rule.
Used for debugging.
|
pure virtual |
Parse this expression as a non-terminal.
Non-terminals are permitted to contain whitespace around compound expressions, as defined by the whitespace rule in the context.
|
pure virtual |
Parse this expression as a terminal.
Terminals are exact matches for the specified expression, without any whitespace.