Debian Codegraph @

doc/arm/_ext/rndcconf.py

raw
1 ############################################################################
2 # Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3 #
4 # SPDX-License-Identifier: MPL-2.0
5 #
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, you can obtain one at https://mozilla.org/MPL/2.0/.
9 #
10 # See the COPYRIGHT file distributed with this work for additional
11 # information regarding copyright ownership.
12 ############################################################################
13
14 """
15 Sphinx domain "rndcconf". See iscconf.py for details.
16 """
17
18 from docutils import nodes
19
20 import iscconf
21 import parsegrammar
22
23
24 class ToBeReplacedStatementList(nodes.General, nodes.Element):
25 """
26 Placeholder, does nothing, but must be picklable
27 (= cannot be in a generated class).
28 """
29
30
31 def setup(app):
32 with open("../misc/rndc.grammar", encoding="utf-8") as filein:
33 grammar = parsegrammar.parse_mapbody(filein)
34 return iscconf.setup(
35 app, "rndcconf", "rndc.conf", ToBeReplacedStatementList, grammar
36 )