From e9dad529f589a4c4e8a14bdcfb893d879dd72e90 Mon Sep 17 00:00:00 2001 From: Max Brunsfeld Date: Tue, 9 Sep 2014 13:01:18 -0700 Subject: [PATCH] Make descriptions more consistent in compiler specs --- spec/compiler/build_tables/build_parse_table_spec.cc | 2 +- spec/compiler/build_tables/conflict_manager_spec.cc | 4 ++-- spec/compiler/build_tables/first_set_spec.cc | 2 +- spec/compiler/build_tables/get_metadata_spec.cc | 2 +- spec/compiler/build_tables/item_set_closure_spec.cc | 2 +- spec/compiler/build_tables/item_set_transitions_spec.cc | 4 ++-- spec/compiler/build_tables/lex_item_spec.cc | 2 +- spec/compiler/build_tables/rule_can_be_blank_spec.cc | 2 +- spec/compiler/prepare_grammar/expand_tokens_spec.cc | 2 +- spec/compiler/prepare_grammar/extract_tokens_spec.cc | 2 +- spec/compiler/prepare_grammar/intern_symbols_spec.cc | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/spec/compiler/build_tables/build_parse_table_spec.cc b/spec/compiler/build_tables/build_parse_table_spec.cc index b378bf7b..a9de0863 100644 --- a/spec/compiler/build_tables/build_parse_table_spec.cc +++ b/spec/compiler/build_tables/build_parse_table_spec.cc @@ -9,7 +9,7 @@ using namespace build_tables; START_TEST -describe("building parse tables", []() { +describe("build_parse_table", []() { SyntaxGrammar parse_grammar({ { "rule0", choice({ i_sym(1), i_sym(2) }) }, { "rule1", i_token(0) }, diff --git a/spec/compiler/build_tables/conflict_manager_spec.cc b/spec/compiler/build_tables/conflict_manager_spec.cc index 6006565c..c40e0b6f 100644 --- a/spec/compiler/build_tables/conflict_manager_spec.cc +++ b/spec/compiler/build_tables/conflict_manager_spec.cc @@ -23,7 +23,7 @@ describe("resolving parse conflicts", []() { { "token3", keyword("stuff") }, }, {}, {}); - describe("lexical conflicts", [&]() { + describe("LexConflictManager", [&]() { Symbol sym1(0, SymbolOptionToken); Symbol sym2(1, SymbolOptionToken); Symbol sym3(2, SymbolOptionToken); @@ -79,7 +79,7 @@ describe("resolving parse conflicts", []() { }); }); - describe("syntactic conflicts", [&]() { + describe("ParseConflictManager", [&]() { Symbol sym1(0); Symbol sym2(1); ParseConflictManager *manager; diff --git a/spec/compiler/build_tables/first_set_spec.cc b/spec/compiler/build_tables/first_set_spec.cc index da88ee9c..42ab6652 100644 --- a/spec/compiler/build_tables/first_set_spec.cc +++ b/spec/compiler/build_tables/first_set_spec.cc @@ -8,7 +8,7 @@ using namespace rules; START_TEST -describe("computing FIRST sets", []() { +describe("first_set", []() { const SyntaxGrammar null_grammar; describe("for a sequence AB", [&]() { diff --git a/spec/compiler/build_tables/get_metadata_spec.cc b/spec/compiler/build_tables/get_metadata_spec.cc index 951be340..352b9d5c 100644 --- a/spec/compiler/build_tables/get_metadata_spec.cc +++ b/spec/compiler/build_tables/get_metadata_spec.cc @@ -7,7 +7,7 @@ using namespace build_tables; START_TEST -describe("getting metadata for rules", []() { +describe("get_metadata", []() { MetadataKey key1 = MetadataKey(100); MetadataKey key2 = MetadataKey(101); rule_ptr rule; diff --git a/spec/compiler/build_tables/item_set_closure_spec.cc b/spec/compiler/build_tables/item_set_closure_spec.cc index 09d9259f..5e869659 100644 --- a/spec/compiler/build_tables/item_set_closure_spec.cc +++ b/spec/compiler/build_tables/item_set_closure_spec.cc @@ -8,7 +8,7 @@ using namespace rules; START_TEST -describe("computing closures of item sets", []() { +describe("item_set_closure", []() { SyntaxGrammar grammar({ { "E", seq({ i_sym(1), diff --git a/spec/compiler/build_tables/item_set_transitions_spec.cc b/spec/compiler/build_tables/item_set_transitions_spec.cc index 42c9bf3a..8b235e8b 100644 --- a/spec/compiler/build_tables/item_set_transitions_spec.cc +++ b/spec/compiler/build_tables/item_set_transitions_spec.cc @@ -8,7 +8,7 @@ using namespace build_tables; START_TEST -describe("lexical item set transitions", []() { +describe("char_transitions(LexItemSet)", []() { describe("when two items in the set have transitions on the same character", [&]() { it("merges the transitions by computing the union of the two item sets", [&]() { LexItemSet set1({ @@ -41,7 +41,7 @@ describe("lexical item set transitions", []() { }); }); -describe("syntactic item set transitions", [&]() { +describe("sym_transitions(ParseItemSet, SyntaxGrammar)", [&]() { SyntaxGrammar grammar({ { "A", blank() }, { "B", i_token(21) }, diff --git a/spec/compiler/build_tables/lex_item_spec.cc b/spec/compiler/build_tables/lex_item_spec.cc index a5ab3539..82107285 100644 --- a/spec/compiler/build_tables/lex_item_spec.cc +++ b/spec/compiler/build_tables/lex_item_spec.cc @@ -8,7 +8,7 @@ using namespace build_tables; START_TEST -describe("lex items", []() { +describe("LexItem", []() { describe("determining if an item is the start of a token", [&]() { Symbol sym(1); rule_ptr token_start = make_shared(str("a"), map({ diff --git a/spec/compiler/build_tables/rule_can_be_blank_spec.cc b/spec/compiler/build_tables/rule_can_be_blank_spec.cc index fdeb2897..14c10f26 100644 --- a/spec/compiler/build_tables/rule_can_be_blank_spec.cc +++ b/spec/compiler/build_tables/rule_can_be_blank_spec.cc @@ -8,7 +8,7 @@ using build_tables::rule_can_be_blank; START_TEST -describe("checking if rules can be blank", [&]() { +describe("rule_can_be_blank", [&]() { rule_ptr rule; it("returns false for basic rules", [&]() { diff --git a/spec/compiler/prepare_grammar/expand_tokens_spec.cc b/spec/compiler/prepare_grammar/expand_tokens_spec.cc index d73c204f..d876cce3 100644 --- a/spec/compiler/prepare_grammar/expand_tokens_spec.cc +++ b/spec/compiler/prepare_grammar/expand_tokens_spec.cc @@ -8,7 +8,7 @@ START_TEST using namespace rules; using prepare_grammar::expand_tokens; -describe("expanding token rules", []() { +describe("expand_tokens", []() { it("replaces regex patterns with their expansion", [&]() { LexicalGrammar grammar({ { "rule_A", seq({ diff --git a/spec/compiler/prepare_grammar/extract_tokens_spec.cc b/spec/compiler/prepare_grammar/extract_tokens_spec.cc index 1d3f310a..d444adef 100644 --- a/spec/compiler/prepare_grammar/extract_tokens_spec.cc +++ b/spec/compiler/prepare_grammar/extract_tokens_spec.cc @@ -131,7 +131,7 @@ describe("extract_tokens", []() { }); }); - describe("handling ubiquitous tokens!", [&]() { + describe("handling ubiquitous tokens", [&]() { describe("ubiquitous tokens that are not symbols", [&]() { it("adds them to the lexical grammar's separators", [&]() { auto result = extract_tokens(Grammar({ diff --git a/spec/compiler/prepare_grammar/intern_symbols_spec.cc b/spec/compiler/prepare_grammar/intern_symbols_spec.cc index 60a46550..1449d2b3 100644 --- a/spec/compiler/prepare_grammar/intern_symbols_spec.cc +++ b/spec/compiler/prepare_grammar/intern_symbols_spec.cc @@ -10,7 +10,7 @@ START_TEST using namespace rules; using prepare_grammar::intern_symbols; -describe("interning symbols in a grammar", []() { +describe("intern_symbols", []() { it("replaces named symbols with numerically-indexed symbols", [&]() { Grammar grammar({ { "x", choice({ sym("y"), sym("z") }) },