/* * 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 "conf/parser.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_CTX void *yyscanner; struct sym_scope *sym_scope; struct config *new_config; jmp_buf jmpbuf; linpool *cfg_mem; struct conf_order *order; CF_DEFINES #define BFD_CHECK(use) do { if (use) cf_error(ctx, "BFD not available"); } while (0) static inline void check_u16(struct cf_context *ctx, uint val) { if (val > 0xFFFF) cf_error(ctx, "Value %u out of range (0-65535)", val); } CF_DECLS %define api.pure full %parse-param {struct cf_context *ctx} %param {void *yyscanner} %union { uint i; u32 i32; u64 i64; ip_addr a; ip4_addr ip4; ip6_addr ip6; net_addr net; net_addr *net_ptr; struct symbol *s; char *t; struct rtable_config *r; struct channel_config *cc; struct f_inst *x; struct f_dynamic_attr fda; struct f_static_attr fsa; 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 sym_show_data *sd; struct lsadb_show_data *ld; struct iface *iface; void *g; btime time; struct f_prefix px; struct proto_spec ps; struct channel_limit cl; struct timeformat *tf; mpls_label_stack *mls; } %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 VPN_RD %token SYM %token TEXT %type ipa_scope %type expr bool pxlen4 %type