1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Conf: Improve handling of keywords

For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.
This commit is contained in:
Ondrej Zajicek
2023-04-27 18:20:49 +02:00
parent 9b471e72d7
commit a8a64ca0fe
6 changed files with 24 additions and 8 deletions

View File

@ -154,6 +154,8 @@ CF_ENUM_PX(T_ENUM_AF, AF_, AFI_, IPV4, IPV6)
CF_GRAMMAR
kw_sym: MIN MAX ;
/* Setting of router ID */
conf: rtrid ;