]> git.proxmox.com Git - mirror_frr.git/commit - lib/command_parse.y
lib: parser: use reentrant mode on flex & bison
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 16 Nov 2016 06:03:51 +0000 (15:03 +0900)
committerDavid Lamparter <equinox@opensourcerouting.org>
Thu, 1 Dec 2016 17:45:27 +0000 (18:45 +0100)
commite9484f70b21ed49d0ca6dbf2899b3a6306ffd2e9
tree1148e8457c5599449c13d7b7a012d9f16af8e3da
parentb07a15f82dc1dd60316ab92edc4f612eced7ffa3
lib: parser: use reentrant mode on flex & bison

This removes remaining global variables from the lexer, pushing the
lexer state into struct parser_ctx too.  At the same time, "cmd_yy" is
used as prefix for all parser & lexer routines.

The result is that (a) there is no collision anymore if a program uses
flex/bison and links libzebra, and (b) the parser is fully encapsulated
and could be called in parallel from multiple threads.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/command_lex.l
lib/command_parse.y