# {py:mod}`acacia.configstruct` ```{py:module} acacia.configstruct ``` ```{autodoc2-docstring} acacia.configstruct :parser: myst :allowtitles: ``` ## Module Contents ### Classes ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`Attributes ` - ```{autodoc2-docstring} acacia.configstruct.Attributes :parser: myst :summary: ``` * - {py:obj}`CType ` - ```{autodoc2-docstring} acacia.configstruct.CType :parser: myst :summary: ``` * - {py:obj}`ConfigStruct ` - ```{autodoc2-docstring} acacia.configstruct.ConfigStruct :parser: myst :summary: ``` * - {py:obj}`ConfigStructResolver ` - ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver :parser: myst :summary: ``` ```` ### Data ````{list-table} :class: autosummary longtable :align: left * - {py:obj}`BaseTypesMap ` - ```{autodoc2-docstring} acacia.configstruct.BaseTypesMap :parser: myst :summary: ``` ```` ### API `````{py:class} Attributes :canonical: acacia.configstruct.Attributes ```{autodoc2-docstring} acacia.configstruct.Attributes :parser: myst ``` ````{py:attribute} valid_attributes :canonical: acacia.configstruct.Attributes.valid_attributes :value: > ('name', 'decl_file', 'encoding', 'byte_size', 'const_value', 'decl_line', 'decl_column', 'data_memb... ```{autodoc2-docstring} acacia.configstruct.Attributes.valid_attributes :parser: myst ``` ```` ````{py:method} escaped_string(value_tree: lark.Tree) -> str :canonical: acacia.configstruct.Attributes.escaped_string :staticmethod: ```{autodoc2-docstring} acacia.configstruct.Attributes.escaped_string :parser: myst ``` ```` ````{py:method} string(value_tree: lark.Tree) -> str :canonical: acacia.configstruct.Attributes.string :staticmethod: ```{autodoc2-docstring} acacia.configstruct.Attributes.string :parser: myst ``` ```` ````{py:method} number(value_tree: lark.Tree) -> int :canonical: acacia.configstruct.Attributes.number :staticmethod: ```{autodoc2-docstring} acacia.configstruct.Attributes.number :parser: myst ``` ```` ````{py:method} id_number(value_tree: lark.Tree) -> int :canonical: acacia.configstruct.Attributes.id_number :staticmethod: ```{autodoc2-docstring} acacia.configstruct.Attributes.id_number :parser: myst ``` ```` ````{py:method} pair(value_tree: lark.Tree) -> typing.Tuple[int, str] :canonical: acacia.configstruct.Attributes.pair :staticmethod: ```{autodoc2-docstring} acacia.configstruct.Attributes.pair :parser: myst ``` ```` ````{py:method} extract_attribute(tree: lark.Tree) :canonical: acacia.configstruct.Attributes.extract_attribute ```{autodoc2-docstring} acacia.configstruct.Attributes.extract_attribute :parser: myst ``` ```` ````{py:method} __getattr__(name: str) :canonical: acacia.configstruct.Attributes.__getattr__ ```{autodoc2-docstring} acacia.configstruct.Attributes.__getattr__ :parser: myst ``` ```` ````{py:method} __setattr__(name: str, value: typing.Union[tuple, lark.Tree]) :canonical: acacia.configstruct.Attributes.__setattr__ ```` ````{py:method} __eq__(other: object) :canonical: acacia.configstruct.Attributes.__eq__ ```` ````{py:method} __repr__() :canonical: acacia.configstruct.Attributes.__repr__ ```` ````` `````{py:class} CType(entry_tree: lark.Tree, type_collector: typing.Dict[int, acacia.configstruct.CType]) :canonical: acacia.configstruct.CType ```{autodoc2-docstring} acacia.configstruct.CType :parser: myst ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} acacia.configstruct.CType.__init__ :parser: myst ``` ````{py:attribute} special_tags :canonical: acacia.configstruct.CType.special_tags :value: > ('unknown_tag', 'null', 'compile_unit') ```{autodoc2-docstring} acacia.configstruct.CType.special_tags :parser: myst ``` ```` ````{py:attribute} single_tags :canonical: acacia.configstruct.CType.single_tags :value: > ('base_tag', 'typedef_tag', 'pointer_tag') ```{autodoc2-docstring} acacia.configstruct.CType.single_tags :parser: myst ``` ```` ````{py:attribute} member_tags :canonical: acacia.configstruct.CType.member_tags :value: > ('subrange_tag', 'enumerator_tag', 'member_tag') ```{autodoc2-docstring} acacia.configstruct.CType.member_tags :parser: myst ``` ```` ````{py:attribute} group_tags :canonical: acacia.configstruct.CType.group_tags :value: > None ```{autodoc2-docstring} acacia.configstruct.CType.group_tags :parser: myst ``` ```` ````{py:attribute} required_attributes :canonical: acacia.configstruct.CType.required_attributes :value: > None ```{autodoc2-docstring} acacia.configstruct.CType.required_attributes :parser: myst ``` ```` ````{py:property} id :canonical: acacia.configstruct.CType.id ```{autodoc2-docstring} acacia.configstruct.CType.id :parser: myst ``` ```` ````{py:method} base_type() -> acacia.configstruct.CType :canonical: acacia.configstruct.CType.base_type ```{autodoc2-docstring} acacia.configstruct.CType.base_type :parser: myst ``` ```` ````{py:method} array_dimensions() -> typing.Tuple[int, ...] :canonical: acacia.configstruct.CType.array_dimensions ```{autodoc2-docstring} acacia.configstruct.CType.array_dimensions :parser: myst ``` ```` ````{py:method} array_count() -> int :canonical: acacia.configstruct.CType.array_count ```{autodoc2-docstring} acacia.configstruct.CType.array_count :parser: myst ``` ```` ````{py:method} __eq__(other: object) :canonical: acacia.configstruct.CType.__eq__ ```` ````{py:method} extract_id(id_token: lark.Token) :canonical: acacia.configstruct.CType.extract_id :staticmethod: ```{autodoc2-docstring} acacia.configstruct.CType.extract_id :parser: myst ``` ```` ````{py:method} sanity_check_type_ids(all_types: typing.Dict[int, acacia.configstruct.CType]) :canonical: acacia.configstruct.CType.sanity_check_type_ids :staticmethod: ```{autodoc2-docstring} acacia.configstruct.CType.sanity_check_type_ids :parser: myst ``` ```` ````{py:method} find_type_by_name(all_types: typing.Dict[int, acacia.configstruct.CType], type_name: str) -> acacia.configstruct.CType :canonical: acacia.configstruct.CType.find_type_by_name :staticmethod: ```{autodoc2-docstring} acacia.configstruct.CType.find_type_by_name :parser: myst ``` ```` ````{py:method} __repr__() :canonical: acacia.configstruct.CType.__repr__ ```` ````` `````{py:class} ConfigStruct(fields: typing.Dict[str, typing.Any], type_name: typing.Optional[str] = None, section_name: typing.Optional[pathlib.Path] = None, target_file: typing.Optional[pathlib.Path] = None, empty: bool = False) :canonical: acacia.configstruct.ConfigStruct ```{autodoc2-docstring} acacia.configstruct.ConfigStruct :parser: myst ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} acacia.configstruct.ConfigStruct.__init__ :parser: myst ``` ````{py:method} __repr__() :canonical: acacia.configstruct.ConfigStruct.__repr__ ```` ````` ````{py:data} BaseTypesMap :canonical: acacia.configstruct.BaseTypesMap :type: typing.Dict[str, typing.Dict[int, typing.Any]] :value: > None ```{autodoc2-docstring} acacia.configstruct.BaseTypesMap :parser: myst ``` ```` `````{py:class} ConfigStructResolver(build_dir: pathlib.Path, endian='little', dwarfdump_name: str = 'llvm-dwarfdump') :canonical: acacia.configstruct.ConfigStructResolver ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver :parser: myst ``` ```{rubric} Initialization ``` ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver.__init__ :parser: myst ``` ````{py:method} add_struct(s: acacia.configstruct.ConfigStruct) :canonical: acacia.configstruct.ConfigStructResolver.add_struct ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver.add_struct :parser: myst ``` ```` ````{py:method} add_structs(lst: typing.List[acacia.configstruct.ConfigStruct]) :canonical: acacia.configstruct.ConfigStructResolver.add_structs ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver.add_structs :parser: myst ``` ```` ````{py:method} resolve_target_file(target_file: pathlib.Path) -> typing.Dict[int, acacia.configstruct.CType] :canonical: acacia.configstruct.ConfigStructResolver.resolve_target_file ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver.resolve_target_file :parser: myst ``` ```` ````{py:method} resolve_and_create_all(dump: bool = False) :canonical: acacia.configstruct.ConfigStructResolver.resolve_and_create_all ```{autodoc2-docstring} acacia.configstruct.ConfigStructResolver.resolve_and_create_all :parser: myst ``` ```` `````