Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
labs
BIRD Internet Routing Daemon
Commits
fae9be77
Commit
fae9be77
authored
Feb 10, 2010
by
Ondřej Zajíček
Browse files
Merge commit 'origin/master' into new
parents
7d196668
0efd6462
Changes
3
Hide whitespace changes
Inline
Side-by-side
conf/cf-lex.l
View file @
fae9be77
...
@@ -131,7 +131,11 @@ WHITE [ \t]
...
@@ -131,7 +131,11 @@ WHITE [ \t]
return NUM;
return NUM;
}
}
{ALPHA}{ALNUM}* {
({ALPHA}{ALNUM}*|[']({ALNUM}|[-])*[']) {
if(*yytext == '\'') {
yytext[yyleng-1] = 0;
yytext++;
}
unsigned int h = cf_hash(yytext);
unsigned int h = cf_hash(yytext);
struct keyword *k = kw_hash[h & (KW_HASH_SIZE-1)];
struct keyword *k = kw_hash[h & (KW_HASH_SIZE-1)];
while (k)
while (k)
...
...
doc/bird.conf.example
View file @
fae9be77
...
@@ -13,7 +13,8 @@
...
@@ -13,7 +13,8 @@
#router id 62.168.0.1;
#router id 62.168.0.1;
# You can define your own symbols...
# You can define your own symbols...
#define xyzzy = 120+10;
#define xyzzy = (120+10);
#define '1a-a1' = (30+40);
# Define a route filter...
# Define a route filter...
filter test_filter {
filter test_filter {
...
...
filter/test.conf
View file @
fae9be77
...
@@ -8,9 +8,10 @@
...
@@ -8,9 +8,10 @@
router
id
62
.
168
.
0
.
1
;
router
id
62
.
168
.
0
.
1
;
define
xyzzy
= (
120
+
10
);
define
xyzzy
= (
120
+
10
);
define
'1a-a1'
= (
20
+
10
);
function
mkpair
(
int
a
)
function
'
mkpair
-a'
(
int
a
)
{
{
return
(
1
,
a
);
return
(
1
,
a
);
}
}
...
@@ -132,7 +133,8 @@ pair pp;
...
@@ -132,7 +133,8 @@ pair pp;
int
set
is
;
int
set
is
;
prefix
set
pxs
;
prefix
set
pxs
;
string
s
;
string
s
;
{
{
print
"1a-a1 = 30: "
,
'1a-a1'
;
print
"Testing filter language:"
;
print
"Testing filter language:"
;
i
=
four
;
i
=
four
;
i
=
12
*
100
+
60
/
2
+
i
;
i
=
12
*
100
+
60
/
2
+
i
;
...
@@ -149,9 +151,9 @@ string s;
...
@@ -149,9 +151,9 @@ string s;
is
= [
2
,
3
,
4
,
7
..
11
];
is
= [
2
,
3
,
4
,
7
..
11
];
print
" must be true: "
,
1
.
2
.
0
.
0
/
16
~ [
1
.
0
.
0
.
0
/
8
{
15
,
17
} ];
print
" must be true: "
,
1
.
2
.
0
.
0
/
16
~ [
1
.
0
.
0
.
0
/
8
{
15
,
17
} ];
print
" data types; must be true: "
,
1
.
2
.
3
.
4
=
1
.
2
.
3
.
4
,
","
,
1
~ [
1
,
2
,
3
],
","
,
5
~ [
1
..
20
],
","
,
10
~
is
,
","
,
2
~ [
1
,
2
,
3
],
","
,
5
~ [
4
..
7
],
","
,
1
.
2
.
3
.
4
~ [
1
.
2
.
3
.
3
..
1
.
2
.
3
.
5
],
","
,
1
.
2
.
3
.
4
~
1
.
0
.
0
.
0
/
8
,
","
,
1
.
0
.
0
.
0
/
8
~
1
.
0
.
0
.
0
/
8
,
","
,
1
.
0
.
0
.
0
/
8
~ [
1
.
0
.
0
.
0
/
8
+ ];
print
" data types; must be true: "
,
1
.
2
.
3
.
4
=
1
.
2
.
3
.
4
,
","
,
1
~ [
1
,
2
,
3
],
","
,
5
~ [
1
..
20
],
","
,
10
~
is
,
","
,
2
~ [
1
,
2
,
3
],
","
,
5
~ [
4
..
7
],
","
,
1
.
2
.
3
.
4
~ [
1
.
2
.
3
.
3
..
1
.
2
.
3
.
5
],
","
,
1
.
2
.
3
.
4
~
1
.
0
.
0
.
0
/
8
,
","
,
1
.
0
.
0
.
0
/
8
~
1
.
0
.
0
.
0
/
8
,
","
,
1
.
0
.
0
.
0
/
8
~ [
1
.
0
.
0
.
0
/
8
+ ];
print
" must be true: "
,
true
&&
true
,
","
,
true
||
false
,
","
, !
false
&& !
false
&&
true
,
","
,
1
<
2
&&
1
!=
3
;
print
" must be true: "
,
true
&&
true
,
","
,
true
||
false
,
","
, !
false
&& !
false
&&
true
,
","
,
1
<
2
&&
1
!=
3
,
","
,
true
&&
true
&& !
false
;
#
print " must be true: ", defined(1), ",", defined(1.2.3.4), ",", 1 != 2, ",", 1 <= 2;
print
" must be true: "
,
defined
(
1
),
","
,
defined
(
1
.
2
.
3
.
4
),
","
,
1
!=
2
,
","
,
1
<=
2
;
print
" data types: must be false: "
,
1
~ [
2
,
3
,
4
],
","
,
5
~
is
,
","
,
1
.
2
.
3
.
4
~ [
1
.
2
.
3
.
3
,
1
.
2
.
3
.
5
],
","
, (
1
,
2
) > (
2
,
2
),
","
, (
1
,
1
) > (
1
,
1
),
","
,
1
.
0
.
0
.
0
/
9
~ [
1
.
0
.
0
.
0
/
8
- ],
","
,
1
.
2
.
0
.
0
/
17
~ [
1
.
0
.
0
.
0
/
8
{
15
,
16
} ],
","
,
true
&&
false
;
print
" data types: must be false: "
,
1
~ [
2
,
3
,
4
],
","
,
5
~
is
,
","
,
1
.
2
.
3
.
4
~ [
1
.
2
.
3
.
3
,
1
.
2
.
3
.
5
],
","
, (
1
,
2
) > (
2
,
2
),
","
, (
1
,
1
) > (
1
,
1
),
","
,
1
.
0
.
0
.
0
/
9
~ [
1
.
0
.
0
.
0
/
8
- ],
","
,
1
.
2
.
0
.
0
/
17
~ [
1
.
0
.
0
.
0
/
8
{
15
,
16
} ],
","
,
true
&&
false
;
px
=
1
.
2
.
0
.
0
/
18
;
px
=
1
.
2
.
0
.
0
/
18
;
...
@@ -163,7 +165,7 @@ string s;
...
@@ -163,7 +165,7 @@ string s;
print
"Testing mask : 127.0.0.0 = "
,
p
.
mask
(
8
);
print
"Testing mask : 127.0.0.0 = "
,
p
.
mask
(
8
);
pp
= (
1
,
2
);
pp
= (
1
,
2
);
print
"Testing pairs: (1,2) = "
, (
1
,
2
),
" = "
,
pp
,
" = "
, (
1
,
1
+
1
),
" = "
,
mkpair
(
2
);
print
"Testing pairs: (1,2) = "
, (
1
,
2
),
" = "
,
pp
,
" = "
, (
1
,
1
+
1
),
" = "
,
'
mkpair
-a'
(
2
);
print
" must be true: "
, (
1
,
2
) = (
1
,
1
+
1
);
print
" must be true: "
, (
1
,
2
) = (
1
,
1
+
1
);
print
"Testing enums: "
,
RTS_DUMMY
,
" "
,
RTS_STATIC
;
print
"Testing enums: "
,
RTS_DUMMY
,
" "
,
RTS_STATIC
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment