bird/proto/rip/config.Y

37 lines
609 B
Text
Raw Normal View History

/*
* BIRD -- RIP Configuration
*
* Can be freely distributed and used under the terms of the GNU GPL.
*/
CF_HDR
#include "proto/rip/rip.h"
CF_DECLS
1998-12-02 00:17:10 +08:00
CF_KEYWORDS(RIP, INFINITY)
CF_GRAMMAR
CF_ADDTO(proto, rip_proto '}')
rip_proto_start: proto_start RIP {
this_proto = proto_new(&proto_rip, sizeof(struct rip_data));
rip_init_instance(this_proto);
}
;
rip_proto:
rip_proto_start proto_name '{'
| rip_proto proto_item ';'
1998-12-02 00:17:10 +08:00
| rip_proto INFINITY expr ';' {
if ($3 < 0 || $3 > 64) cf_error("Invalid infinity");
((struct rip_data *) this_proto)->infinity = $3;
}
;
CF_CODE
CF_END