aboutsummaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-09-16 21:47:48 -0700
committerBruce Hill <bruce@bruce-hill.com>2020-09-16 21:47:48 -0700
commit9ee7102f51c60469659de752f119b1ecbd3c0ba7 (patch)
tree23cb1f8b50eb9009c94e0eda1950f03bca028acb /vm.c
parentd536f6a2ca46d4deed84eba38abdbbfc28207400 (diff)
Removed (/) (which is just a clunky way to do "")
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/vm.c b/vm.c
index 9579aee..40efb30 100644
--- a/vm.c
+++ b/vm.c
@@ -17,7 +17,6 @@ static match_t *get_capture_named(match_t *m, const char *name);
* The names of the opcodes (keep in sync with the enum definition above)
*/
static const char *opcode_names[] = {
- [VM_EMPTY] = "EMPTY",
[VM_ANYCHAR] = "ANYCHAR",
[VM_STRING] = "STRING",
[VM_RANGE] = "RANGE",
@@ -83,13 +82,6 @@ typedef struct recursive_ref_s {
static match_t *_match(grammar_t *g, file_t *f, const char *str, vm_op_t *op, unsigned int flags, recursive_ref_t *rec)
{
switch (op->op) {
- case VM_EMPTY: {
- match_t *m = calloc(sizeof(match_t), 1);
- m->op = op;
- m->start = str;
- m->end = str;
- return m;
- }
case VM_ANYCHAR: {
if (!*str || (!op->multiline && *str == '\n'))
return NULL;
@@ -382,7 +374,6 @@ void print_pattern(vm_op_t *op)
{
switch (op->op) {
case VM_REF: fprintf(stderr, "a $%s", op->args.s); break;
- case VM_EMPTY: fprintf(stderr, "the empty string"); break;
case VM_ANYCHAR: fprintf(stderr, "any char"); break;
case VM_STRING: fprintf(stderr, "string \"%s\"", op->args.s); break;
case VM_RANGE: {