/* * BIRD -- Configuration Parser Top * * (c) 1998--2000 Martin Mares * * Can be freely distributed and used under the terms of the GNU GPL. */ CF_HDR #define PARSER 1 #include "nest/bird.h" #include "conf/conf.h" #include "lib/resource.h" #include "lib/socket.h" #include "lib/timer.h" #include "lib/string.h" #include "nest/protocol.h" #include "nest/iface.h" #include "nest/route.h" #include "nest/cli.h" #include "filter/filter.h" /* FIXME: Turn on YYERROR_VERBOSE and work around lots of bison bugs? */ CF_DEFINES static void check_u16(unsigned val) { if (val > 0xFFFF) cf_error("Value %d out of range (0-65535)", val); } CF_DECLS %union { int i; u32 i32; ip_addr a; ip4_addr ip4; ip6_addr ip6; struct symbol *s; char *t; struct rtable_config *r; struct f_inst *x; struct filter *f; struct f_tree *e; struct f_trie *trie; struct f_val v; struct f_path_mask *h; struct password_item *p; struct rt_show_data *ra; struct roa_show_data *ro; struct sym_show_data *sd; struct lsadb_show_data *ld; struct iface *iface; struct roa_table *rot; void *g; bird_clock_t time; struct prefix px; struct proto_spec ps; struct timeformat *tf; } %token END CLI_MARKER INVALID_TOKEN ELSECOL DDOT %token GEQ LEQ NEQ AND OR %token PO PC %token NUM ENUM %token IP4 %token IP6 %token SYM %token TEXT %type ipa_scope %type expr bool pxlen %type expr_us %type