aboutsummaryrefslogtreecommitdiff
path: root/vm.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2020-12-30 19:42:47 -0800
committerBruce Hill <bruce@bruce-hill.com>2020-12-30 19:42:47 -0800
commitff2ef9504159665c30b16b398f1e755665353bc3 (patch)
tree5957bff54c7f1b7619dd044cd55b22fe83f80d09 /vm.c
parentbc2ddc0408e47cbc12b0f7d0c0abae943fc74b83 (diff)
Fully purging "bpeg" from the source
Diffstat (limited to 'vm.c')
-rw-r--r--vm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/vm.c b/vm.c
index 40c783b..9412b0c 100644
--- a/vm.c
+++ b/vm.c
@@ -1,5 +1,5 @@
/*
- * vm.c - Code for the BPEG virtual machine that performs the matching.
+ * vm.c - Code for the BP virtual machine that performs the matching.
*/
#include <ctype.h>
@@ -116,7 +116,7 @@ static match_t *_match(grammar_t *g, file_t *f, const char *str, vm_op_t *op, un
}
case VM_STRING: {
if (&str[op->len] > f->end) return NULL;
- if ((flags & BPEG_IGNORECASE) ? memicmp(str, op->args.s, (size_t)op->len) != 0
+ if ((flags & BP_IGNORECASE) ? memicmp(str, op->args.s, (size_t)op->len) != 0
: memcmp(str, op->args.s, (size_t)op->len) != 0)
return NULL;
match_t *m = new(match_t);
@@ -215,7 +215,7 @@ static match_t *_match(grammar_t *g, file_t *f, const char *str, vm_op_t *op, un
}
if (p->end == start && reps > 0) {
// Since no forward progress was made on either `pat` or
- // `sep` and BPEG does not have mutable state, it's
+ // `sep` and BP does not have mutable state, it's
// guaranteed that no progress will be made on the next
// loop either. We know that this will continue to loop
// until reps==max, so let's just cut to the chase instead
@@ -662,7 +662,7 @@ static match_t *match_backref(const char *str, vm_op_t *op, match_t *cap, unsign
for (match_t *child = cap->child; child; child = child->nextsibling) {
if (child->start > prev) {
size_t len = (size_t)(child->start - prev);
- if ((flags & BPEG_IGNORECASE) ? memicmp(str, prev, len) != 0
+ if ((flags & BP_IGNORECASE) ? memicmp(str, prev, len) != 0
: memcmp(str, prev, len) != 0) {
destroy_match(&ret);
return NULL;
@@ -682,7 +682,7 @@ static match_t *match_backref(const char *str, vm_op_t *op, match_t *cap, unsign
}
if (cap->end > prev) {
size_t len = (size_t)(cap->end - prev);
- if ((flags & BPEG_IGNORECASE) ? memicmp(str, prev, len) != 0
+ if ((flags & BP_IGNORECASE) ? memicmp(str, prev, len) != 0
: memcmp(str, prev, len) != 0) {
destroy_match(&ret);
return NULL;