Only test for registers following a spacer
This commit is contained in:
parent
86bc540ee2
commit
dfbb9c4fac
|
@ -98,17 +98,17 @@ static char *
|
|||
match_rule(Rule *r, char *p)
|
||||
{
|
||||
int i;
|
||||
char c, *a = r->a, *b = p;
|
||||
char c, last = 0, *a = r->a, *b = p;
|
||||
for(i = 0x21; i < 0x7f; i++)
|
||||
regs[i] = 0;
|
||||
while((c = *a)) {
|
||||
if(c == '?') {
|
||||
if(spacer(last) && c == '?') {
|
||||
if(!set_reg(*(++a), b)) return NULL;
|
||||
a++, b = walk(b);
|
||||
continue;
|
||||
}
|
||||
if(*a != *b) return NULL;
|
||||
a++, b++;
|
||||
a++, b++, last = c;
|
||||
}
|
||||
c = *b;
|
||||
return spacer(c) ? b : NULL;
|
||||
|
|
Loading…
Reference in New Issue