ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
parser
trees
visitors
transition_finder.h
Go to the documentation of this file.
1
9
#ifndef META_PARSER_TRANSITION_FINDER_H_
10
#define META_PARSER_TRANSITION_FINDER_H_
11
12
#include <vector>
13
14
#include "
parser/transition.h
"
15
#include "parser/trees/visitors/visitor.h"
16
17
namespace
meta
18
{
19
namespace
parser
20
{
21
30
class
transition_finder
:
public
const_visitor
<void>
31
{
32
public
:
33
void
operator()
(
const
leaf_node
&)
override
;
34
void
operator()
(
const
internal_node
&)
override
;
35
42
std::vector<transition>
transitions
();
43
44
class
exception
:
public
std::runtime_error
45
{
46
public
:
47
using
std::runtime_error::runtime_error;
48
};
49
50
private
:
54
std::vector<transition>
transitions_
;
55
};
56
}
57
}
58
59
#endif
transition.h
meta::parser::internal_node
An internal node in a parse tree.
Definition:
internal_node.h:28
meta::parser::transition_finder
This is a visitor that converts a parse tree into a list of transitions that a shift-reduce parser wo...
Definition:
transition_finder.h:30
meta::parser::transition_finder::transitions
std::vector< transition > transitions()
Extracts the transitions out of the visitor.
Definition:
transition_finder.cpp:50
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
meta::parser::transition_finder::operator()
void operator()(const leaf_node &) override
Definition:
transition_finder.cpp:15
meta::parser::transition_finder::transitions_
std::vector< transition > transitions_
Storage for the transitions.
Definition:
transition_finder.h:54
meta::parser::const_visitor
Abstract base class for visitors over parse trees that do not modify the underlying tree...
Definition:
visitor.h:25
meta::parser::leaf_node
A leaf node (pre-terminal) in a parse tree.
Definition:
leaf_node.h:24
meta::parser::transition_finder::exception
Definition:
transition_finder.h:44
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1