nanog mailing list archives

Re: JunOS config yacc grammar?


From: Nick Hilliard <nick () foobar org>
Date: Tue, 22 Aug 2023 13:23:31 +0100

Lyndon Nerenberg (VE7TFX/VE6BBM) wrote on 22/08/2023 01:27:
Because I've been writing yacc grammars for decades.  I just wanted to
see if someone had already done it, as that would save me some time.
But if there's nothing out there I'll just roll one myself.

check out xorp and vyos - both contain code to parse junos style configurations. Just bear in mind that they provide basic tokeniser functionality, which parses the configurations into token trees. The config interpretation can then be handled on a modular basis.

Nick


Current thread: