blob: 889cc2f3f18134edfe4e05d9ed488883065cd824 (
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
|
#ifndef _GRAMMAR_H_
#define _GRAMMAR_H_
#include <iostream>
#include <string>
#include <vector>
using namespace std;
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;
};
#endif
|