]> git.ipfire.org Git - thirdparty/bird.git/commit
Conf: Improve handling of keywords
authorOndrej Zajicek <santiago@crfreenet.org>
Thu, 27 Apr 2023 16:20:49 +0000 (18:20 +0200)
committerMaria Matejka <mq@ucw.cz>
Tue, 10 Oct 2023 12:28:01 +0000 (14:28 +0200)
commit6e908775cba9efdae09f06a630cc7777282e2715
tree4d3860afbc1c58c35cce07be9af51a96a156c8a4
parent6b2c9b7c66d9b9648213d3a7f071d0f720048e46
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.
conf/cf-lex.l
conf/conf.h
conf/confbase.Y
conf/gen_parser.m4
nest/config.Y
proto/bgp/config.Y