ModErn Text Analysis
META Enumerates Textual Applications
|
This is a visitor that converts a parse tree into a list of transitions that a shift-reduce parser would have to take in order to generate it. More...
#include <transition_finder.h>
Classes | |
class | exception |
Public Member Functions | |
void | operator() (const leaf_node &) override |
void | operator() (const internal_node &) override |
std::vector< transition > | transitions () |
Extracts the transitions out of the visitor. More... | |
Private Attributes | |
std::vector< transition > | transitions_ |
Storage for the transitions. | |
Additional Inherited Members | |
Public Types inherited from meta::parser::const_visitor< void > | |
using | result_type = void |
The result of running the visitor over the tree. | |
This is a visitor that converts a parse tree into a list of transitions that a shift-reduce parser would have to take in order to generate it.
The transitions are built up via side-effect on the visitor, so its visiting functions return void, but the visitor itself has a function to obtain the list of transitions after visiting has been completed.
|
overridevirtual |
Implements meta::parser::const_visitor< void >.
|
overridevirtual |
Implements meta::parser::const_visitor< void >.
std::vector< transition > meta::parser::transition_finder::transitions | ( | ) |
Extracts the transitions out of the visitor.
This moves the transition vector from the visitor.