Make descriptions more consistent in compiler specs

This commit is contained in:
Max Brunsfeld 2014-09-09 13:01:18 -07:00
parent 8f109504a8
commit e9dad529f5
11 changed files with 13 additions and 13 deletions

View file

@ -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) },

View file

@ -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;

View file

@ -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", [&]() {

View file

@ -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;

View file

@ -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),

View file

@ -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) },

View file

@ -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<Metadata>(str("a"), map<MetadataKey, int>({

View file

@ -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", [&]() {

View file

@ -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({

View file

@ -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({

View file

@ -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") }) },