This commit is contained in:
Devine Lu Linvega 2024-04-04 11:02:57 -07:00
parent 742cbf1298
commit 18abf56626
1 changed files with 1 additions and 8 deletions

View File

@ -32,14 +32,7 @@ match(char *p, Rule *r)
{ {
char c, *a = r->a, *b = p; char c, *a = r->a, *b = p;
while((c = *a)) { while((c = *a)) {
/* registers */ if(c == '?') bind(*(++a), b), a++, b = walk(b), c = *b;
if(c == '?') {
char cc;
int id = *(++a);
bind(id, b);
a++, b = walk(b);
printf("[%s][%s]\n", a, b);
}
if(c != *b) return 0; if(c != *b) return 0;
a++, b++; a++, b++;
} }