summaryrefslogtreecommitdiff
path: root/extractor/grammar.h
diff options
context:
space:
mode:
Diffstat (limited to 'extractor/grammar.h')
-rw-r--r--extractor/grammar.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/extractor/grammar.h b/extractor/grammar.h
new file mode 100644
index 00000000..889cc2f3
--- /dev/null
+++ b/extractor/grammar.h
@@ -0,0 +1,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