From f5140d1027f514bc59d46ab8aa09181f5870afbd Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 13 Dec 2022 19:31:46 +0100 Subject: Conf: Allow keywords to be redefined by user symbols Most syntactic constructs in BIRD configuration (e.g. protocol options) are defined as keywords, which are distinct from symbols (user-defined names for protocols, variables, ...). That may cause backwards compatibility issue when a new feature is added, as it may collide with existing user names. We can allow keywords to be shadowed by symbols in almost all cases to avoid this issue. This replaces the previous mechanism, where shadowable symbols have to be explictly added to kw_syms. --- nest/config.Y | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'nest/config.Y') diff --git a/nest/config.Y b/nest/config.Y index ce45d98d..c583dc7f 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -154,8 +154,6 @@ CF_ENUM_PX(T_ENUM_AF, AF_, AFI_, IPV4, IPV6) CF_GRAMMAR -kw_sym: MIN | MAX ; - /* Setting of router ID */ conf: rtrid ; @@ -842,7 +840,7 @@ sym_args: | sym_args FILTER { $$ = $1; $$->type = SYM_FILTER; } | sym_args PROTOCOL { $$ = $1; $$->type = SYM_PROTO; } | sym_args TEMPLATE { $$ = $1; $$->type = SYM_TEMPLATE; } - | sym_args symbol { $$ = $1; $$->sym = $2; } + | sym_args CF_SYM_KNOWN { $$ = $1; $$->sym = $2; } ; -- cgit v1.2.3