:py:mod:`raesl.compile.machine_files.relation_definitions`
==========================================================
.. py:module:: raesl.compile.machine_files.relation_definitions
.. autoapi-nested-parse::
Line matcher state machines of relation definitions.
Module Contents
---------------
Functions
~~~~~~~~~
.. autoapisummary::
raesl.compile.machine_files.relation_definitions._process_reldef_header
raesl.compile.machine_files.relation_definitions._process_reldef_new_relation
raesl.compile.machine_files.relation_definitions._process_reldef_param_header
raesl.compile.machine_files.relation_definitions._process_reldef_param_entry
Attributes
~~~~~~~~~~
.. autoapisummary::
raesl.compile.machine_files.relation_definitions._RELATION_DEF_SPEC
raesl.compile.machine_files.relation_definitions._RELATION_NAME_LINE_SPEC
raesl.compile.machine_files.relation_definitions._RELATION_PARAMETER_HEADER_SPEC
raesl.compile.machine_files.relation_definitions._RELATION_PARAMETER_LINE_SPEC
raesl.compile.machine_files.relation_definitions.MACHINES
.. py:data:: _RELATION_DEF_SPEC
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
relation_def:
start initial;
start -> s1 [DEFINE_KW] tag=define;
s1 -> s2 [RELATION_KW];
end accept=define_relation;
s2 -> end [NL_TK];
s2 -> end [EOF_TK];
"""
.. raw:: html
.. py:function:: _process_reldef_header(tags: raesl.compile.machine_files.typing.TokensDict, _accept: str, builder: raesl.compile.typechecking.ast_builder.AstBuilder) -> None
.. py:data:: _RELATION_NAME_LINE_SPEC
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
relation_name:
start initial;
start -> s1 [NAME] tag=rel_name;
end accept=relation_name;
s1 -> end [NL_TK];
s1 -> end [EOF_TK];
"""
.. raw:: html
.. py:function:: _process_reldef_new_relation(tags: raesl.compile.machine_files.typing.TokensDict, _accept: str, builder: raesl.compile.typechecking.ast_builder.AstBuilder) -> None
.. py:data:: _RELATION_PARAMETER_HEADER_SPEC
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
relation_param_header_spec:
start initial;
start -> s1 [REQUIRING_KW] tag=rel_requiring;
start -> s1 [RETURNING_KW] tag=rel_returning;
start -> s1 [RELATING_KW] tag=rel_relating;
s1 -> s2 [PARAMETER_KW];
end accept=relation_param_header;
s2 -> end [NL_TK];
s2 -> end [EOF_TK];
"""
.. raw:: html
.. py:function:: _process_reldef_param_header(tags: raesl.compile.machine_files.typing.TokensDict, _accept: str, builder: raesl.compile.typechecking.ast_builder.AstBuilder) -> None
.. py:data:: _RELATION_PARAMETER_LINE_SPEC
:value: Multiline-String
.. raw:: html
Show Value
.. code-block:: python
"""
relation_param:
start initial;
start -> s1 [STAR_TK];
s1 -> s5 [NAME] tag=param_name;
s1 -> s2 [ONE_KW] tag=multi_param;
s2 -> s3 [OR_KW];
s3 -> s4 [MORE_KW];
s4 -> s5 [NAME] tag=param_name;
s5 -> s6 [IS_KW];
s6 -> s7 [A_KW];
s7 -> s8 [NAME] tag=param_type;
end accept=relation_param;
s8 -> end [NL_TK];
s8 -> end [EOF_TK];
"""
.. raw:: html
.. py:function:: _process_reldef_param_entry(tags: raesl.compile.machine_files.typing.TokensDict, _accept: str, builder: raesl.compile.typechecking.ast_builder.AstBuilder) -> None
.. py:data:: MACHINES
:type: raesl.compile.machine_files.typing.MachineTripletList
:value: [('DEFINE_RELATION_MACHINE',), ('RELATION_NAME_LINE_MACHINE',),...