:py:mod:`raesl.compile.typechecking.reldef_builder` =================================================== .. py:module:: raesl.compile.typechecking.reldef_builder .. autoapi-nested-parse:: Collect and process relation definition that are found by the parser. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: raesl.compile.typechecking.reldef_builder.RelationDefBuilder Attributes ~~~~~~~~~~ .. autoapisummary:: raesl.compile.typechecking.reldef_builder.INPUT raesl.compile.typechecking.reldef_builder.OUTPUT raesl.compile.typechecking.reldef_builder.INPOUT .. py:data:: INPUT .. py:data:: OUTPUT .. py:data:: INPOUT .. py:class:: RelationDefBuilder(ast_builder: raesl.compile.typechecking.ast_builder.AstBuilder) Builder to construct relation definitions. :param ast_builder: AST builder instance. .. attribute:: diag_store Storage for found diagnostics. .. attribute:: rel_defs Created relation definitions while collecting data from parsing. .. attribute:: current_reldef Reference to the entry in 'rel_defs' that is being filled. .. attribute:: last_occurrences Map of input/output directions to token of last occurrence of that direction in the current definition. .. attribute:: current_direction Parameter direction to attach to a new parameter. .. py:method:: notify_new_section(_new_top_section: bool) Parser found a new section, drop all 'in-progress' relation definition construction. .. py:method:: add_reldef(name: raesl.compile.scanner.Token) Add a new relation definition. Parameters will follow. :param Name of the relation definition.: .. py:method:: reldef_param_header(header_tok: raesl.compile.scanner.Token, direction: str) New parameter subsection with a direction. Set the direction for the parameters that will follow. :param header_tok: Token of the direction, for deriving position information if needed. :param direction: Direction of the next parameters of the relation definition. .. py:method:: reldef_add_param(name: raesl.compile.scanner.Token, type_name: raesl.compile.scanner.Token, multi: bool) Add a parameter to the current relation definition. .. py:method:: finish(spec: raesl.compile.ast.specification.Specification) Check the relation definitions and add them to the result specification.