Fix transitions for sequences whose left side can be blank

This commit is contained in:
Max Brunsfeld 2014-01-23 23:56:37 -08:00
parent 5776846227
commit 8208aae060
6 changed files with 98 additions and 34 deletions

View file

@ -8,12 +8,12 @@ START_TEST
describe("compiling grammars", []() {
string test_parser_dir = src_dir() + "/spec/fixtures/parsers";
it("works for the arithmetic grammar", [&]() {
it("compiles the arithmetic grammar", [&]() {
Grammar grammar = test_grammars::arithmetic();
ofstream(test_parser_dir + "/arithmetic.c") << compile(grammar, "arithmetic");
});
it("works for the json grammar", [&]() {
it("compiles the json grammar", [&]() {
Grammar grammar = test_grammars::json();
ofstream(test_parser_dir + "/json.c") << compile(grammar, "json");
});