diff options
Diffstat (limited to 'grammar.c')
| -rw-r--r-- | grammar.c | 19 |
1 files changed, 1 insertions, 18 deletions
@@ -10,9 +10,6 @@ #include "grammar.h" #include "utils.h" -__attribute__((nonnull(2,3,4), returns_nonnull)) -static def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m); - // // Return a new list of definitions with one added to the front // @@ -71,7 +68,7 @@ def_t *lookup(def_t *defs, const char *name) // // Push a backreference onto the backreference stack // -static def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m) +def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m) { vm_op_t *op = new_op(f, m->start, VM_BACKREF); op->end = m->end; @@ -81,20 +78,6 @@ static def_t *with_backref(def_t *defs, file_t *f, const char *name, match_t *m) } // -// Push all the backreferences contained in a match onto the backreference stack -// -def_t *with_backrefs(def_t *defs, file_t *f, match_t *m) -{ - if (m->op->type != VM_REF) { - if (m->op->type == VM_CAPTURE && m->op->args.capture.name) - defs = with_backref(defs, f, m->op->args.capture.name, m->child); - if (m->child) defs = with_backrefs(defs, f, m->child); - if (m->nextsibling) defs = with_backrefs(defs, f, m->nextsibling); - } - return defs; -} - -// // Free all the given definitions up till (but not including) `stop` // void free_defs(def_t **defs, def_t *stop) |
