Catch symbol cap
This commit is contained in:
parent
bb72d27e2d
commit
544eddef36
|
@ -1,4 +1,4 @@
|
||||||
<> ([b]) ()
|
<> ([c]) ()
|
||||||
<> (b) ([b])
|
<> (c) ([c])
|
||||||
|
|
||||||
(abc)
|
(abc)
|
|
@ -11,7 +11,7 @@ static char bank_a[0x1000], *prog_ = bank_a;
|
||||||
static char bank_b[0x1000], *outp_ = bank_b;
|
static char bank_b[0x1000], *outp_ = bank_b;
|
||||||
static char *regs[0x100];
|
static char *regs[0x100];
|
||||||
|
|
||||||
#define spacer(c) (c == ' ' || c == '(' || c == ')')
|
#define spacer(c) (c == ' ' || c == '(' || c == ')' || c == 0)
|
||||||
|
|
||||||
static char *parse_rulefrag(char *line);
|
static char *parse_rulefrag(char *line);
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ match(char *p, Rule *r)
|
||||||
regs[id] = b;
|
regs[id] = b;
|
||||||
a++, b = walk(b), c = *b;
|
a++, b = walk(b), c = *b;
|
||||||
}
|
}
|
||||||
if(!a[0] && spacer(*(b + 1))) return b;
|
if(!*a && spacer(*b)) return b;
|
||||||
if(c != *b) return NULL;
|
if(c != *b) return NULL;
|
||||||
a++, b++;
|
a++, b++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue