Most of RVM desugaring done in first draft, for TQ to check.
This commit is contained in:
parent
a88c6c8a8a
commit
07d35c72ff
23 changed files with 182 additions and 4 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "parser_internal.h"
|
||||
#include "backends/regex_actions.h"
|
||||
|
||||
static HParseResult* parse_ignore(void* env, HParseState* state) {
|
||||
HParseResult *res0 = h_do_parse((HParser*)env, state);
|
||||
|
|
@ -20,10 +21,18 @@ static bool ignore_isValidCF(void *env) {
|
|||
return (p->vtable->isValidCF(p->env));
|
||||
}
|
||||
|
||||
static bool ignore_ctrvm(HRVMProg *prog, void *env) {
|
||||
HParser *p = (HParser*)env;
|
||||
h_compile_regex(prog, p->env);
|
||||
h_rvm_insert_insn(prog, RVM_ACTION, h_rvm_create_action(prog, h_svm_action_pop));
|
||||
return true;
|
||||
}
|
||||
|
||||
static const HParserVtable ignore_vt = {
|
||||
.parse = parse_ignore,
|
||||
.isValidRegular = ignore_isValidRegular,
|
||||
.isValidCF = ignore_isValidCF,
|
||||
.compile_to_rvm = ignore_ctrvm,
|
||||
};
|
||||
|
||||
const HParser* h_ignore(const HParser* p) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue