ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
parser
trees
visitors
visitor.h
1
9
#ifndef META_PARSE_TREE_VISITOR_H_
10
#define META_PARSE_TREE_VISITOR_H_
11
12
namespace
meta
13
{
14
namespace
parser
15
{
16
17
class
leaf_node;
18
class
internal_node;
19
24
template
<
class
T>
25
class
const_visitor
26
{
27
public
:
31
using
result_type
= T;
32
36
virtual
result_type
operator()
(
const
leaf_node
&) = 0;
37
42
virtual
result_type
operator()
(
const
internal_node
&) = 0;
43
};
44
49
template
<
class
T>
50
class
visitor
51
{
52
public
:
56
using
result_type
= T;
57
61
virtual
result_type
operator()
(
leaf_node
&) = 0;
62
67
virtual
result_type
operator()
(
internal_node
&) = 0;
68
};
69
}
70
}
71
72
#endif
meta::parser::const_visitor< bool >::result_type
bool result_type
The result of running the visitor over the tree.
Definition:
visitor.h:31
meta::parser::visitor
Abstract base class for visitors over parse trees that are allowed to modify the underlying tree...
Definition:
visitor.h:50
meta::parser::internal_node
An internal node in a parse tree.
Definition:
internal_node.h:28
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::visitor::operator()
virtual result_type operator()(leaf_node &)=0
meta::parser::const_visitor::operator()
virtual result_type operator()(const leaf_node &)=0
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::visitor< void >::result_type
void result_type
The result of running the visitor over the tree.
Definition:
visitor.h:56
meta::parser::leaf_node
A leaf node (pre-terminal) in a parse tree.
Definition:
leaf_node.h:24
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1