remove useless desugar_unimplemented; revert incorrect changes to test_llk()

This commit is contained in:
Meredith L. Patterson 2013-05-24 20:10:21 -07:00
parent 02d68f6d18
commit 8618f9cb62
2 changed files with 10 additions and 15 deletions

View file

@ -458,9 +458,9 @@ int test_llk(void)
printf("derive epsilon: "); printf("derive epsilon: ");
h_pprint_symbolset(stdout, g, g->geneps, 0); h_pprint_symbolset(stdout, g, g->geneps, 0);
printf("first(A) = "); printf("first(A) = ");
h_pprint_stringset(stdout, g, h_first(2, g, g->start), 0); h_pprint_stringset(stdout, h_first(3, g, g->start), 0);
printf("follow(C) = "); // printf("follow(C) = ");
h_pprint_stringset(stdout, g, h_follow(2, g, h_desugar(&system_allocator, NULL, c)), 0); // h_pprint_stringset(stdout, h_follow(3, g, h_desugar(&system_allocator, NULL, c)), 0);
if(h_compile(p, PB_LLk, (void *)3)) { if(h_compile(p, PB_LLk, (void *)3)) {
fprintf(stderr, "does not compile\n"); fprintf(stderr, "does not compile\n");

View file

@ -12,16 +12,11 @@ static HParseResult* parse_unimplemented(void* env, HParseState *state) {
return &result; return &result;
} }
static HCFChoice* desugar_unimplemented(HAllocator *mm__, HCFStack *stk__, void *env) {
assert_message(0, "'h_unimplemented' is not context-free, can't be desugared");
return NULL;
}
static const HParserVtable unimplemented_vt = { static const HParserVtable unimplemented_vt = {
.parse = parse_unimplemented, .parse = parse_unimplemented,
.isValidRegular = h_false, .isValidRegular = h_false,
.isValidCF = h_false, .isValidCF = h_false,
.desugar = desugar_unimplemented, .desugar = NULL,
.compile_to_rvm = h_not_regular, .compile_to_rvm = h_not_regular,
}; };