Still doesn't build, but desugaring is farther along

This commit is contained in:
Meredith L. Patterson 2013-02-02 19:31:18 -05:00
parent 36e1f66de0
commit 156be7a559
16 changed files with 266 additions and 26 deletions

View file

@ -8,10 +8,21 @@ static HParseResult* parse_epsilon(void* env, HParseState* state) {
return res;
}
static HCFChoice* desugar_epsilon(HAllocator *mm__, void *env) {
static HCFSequence res_seq = {NULL};
static HCFChoice res_ch = {
.type = HCF_CHOICE,
.seq = &res_seq
};
return &res_ch;
}
static const HParserVtable epsilon_vt = {
.parse = parse_epsilon,
.isValidRegular = h_true,
.isValidCF = h_true,
.desugar = desugar_epsilon,
};
static const HParser epsilon_p = {