blob: a424d65a8173d58c054fac9b1fe8c3e4f887e0f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef _GRAMMAR_H_
#define _GRAMMAR_H_
#include <iostream>
#include <string>
#include <vector>
using namespace std;
namespace extractor {
class Rule;
class Grammar {
public:
Grammar(const vector<Rule>& rules, const vector<string>& feature_names);
vector<Rule> GetRules() const;
vector<string> GetFeatureNames() const;
friend ostream& operator<<(ostream& os, const Grammar& grammar);
private:
vector<Rule> rules;
vector<string> feature_names;
};
} // namespace extractor
#endif
|