diff --git a/src/parsers/epsilon.c b/src/parsers/epsilon.c index 5ae91e360fcc3b273e1345ff057d764edabd0312..71dcfe74a7d6ac8739296ea39477ed7acdd53fd2 100644 --- a/src/parsers/epsilon.c +++ b/src/parsers/epsilon.c @@ -8,10 +8,15 @@ static HParseResult* parse_epsilon(void* env, HParseState* state) { return res; } +static bool episilon_ctrvm(HRVMProg *prog, void* env) { + return true; +} + static const HParserVtable epsilon_vt = { .parse = parse_epsilon, .isValidRegular = h_true, .isValidCF = h_true, + .compile_to_rvm = episilon_ctrvm, }; static const HParser epsilon_p = { diff --git a/src/parsers/nothing.c b/src/parsers/nothing.c index 01c029ebfc872828fd7fe17f3de1ab23c294ad85..19b8bbda31b54704b09c6c3ce8e697778154ad94 100644 --- a/src/parsers/nothing.c +++ b/src/parsers/nothing.c @@ -1,15 +1,20 @@ #include "parser_internal.h" - static HParseResult* parse_nothing() { // not a mistake, this parser always fails return NULL; } +static bool nothing_ctrvm(HRVMProg *prog, void* env) { + h_rvm_insert_insn(prog, RVM_MATCH, 0x00FF); + return true; +} + static const HParserVtable nothing_vt = { .parse = parse_nothing, .isValidRegular = h_true, .isValidCF = h_true, + .compile_to_rvm = nothing_ctrvm, }; const HParser* h_nothing_p() {