0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-12-22 01:31:55 +00:00

Use ? in path matching to avoid /* trap.

This commit is contained in:
Pavel Machek 2000-05-25 14:58:38 +00:00
parent ba1dda495a
commit 9a09a64bb4
3 changed files with 4 additions and 4 deletions

View File

@ -139,7 +139,7 @@ WHITE [ \t]
return CLI_MARKER;
}
[={}:;,()+*/%-<>~\[\]] {
[={}:;,()+*/%-<>~\[\]?] {
return yytext[0];
}

View File

@ -277,7 +277,7 @@ switch_body: /* EMPTY */ { $$ = NULL; }
bgp_one:
NUM { $$ = $1; }
| '*' { $$ = PM_ANY; }
| '?' { $$ = PM_ANY; }
;
bgp_path:

View File

@ -45,8 +45,8 @@ clist l;
print "4 = ", p2.len;
p2 = prepend( p2, 5 );
print "Should be false: ", p2 ~ p;
print "Should be true: ", p2 ~ / * 4 3 2 1 /, p2, / * 4 3 2 1 /;
print "Should be true: ", p2 ~ / * 4 3 * 1 /, p2, / * 4 3 * 1 /;
print "Should be true: ", p2 ~ / ? 4 3 2 1 /, p2, / ? 4 3 2 1 /;
print "Should be true: ", p2 ~ / ? 4 3 ? 1 /, p2, / ? 4 3 ? 1 /;
print "5 = ", p2.len;
l = - empty -;