summaryrefslogtreecommitdiff
path: root/src/test_grammar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_grammar.cc')
-rw-r--r--src/test_grammar.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test_grammar.cc b/src/test_grammar.cc
new file mode 100644
index 0000000..7fee79a
--- /dev/null
+++ b/src/test_grammar.cc
@@ -0,0 +1,19 @@
+#include <fstream>
+
+#include "grammar.hh"
+
+using namespace std;
+
+int
+main(int argc, char** argv)
+{
+ G::Vocabulary y;
+ G::Grammar g(argv[1], y);
+ for (auto it: g.rules) {
+ it->escaped(cout);
+ cout << endl;
+ }
+
+ return 0;
+}
+