:py:mod:`raesl.compile` ======================= .. py:module:: raesl.compile .. autoapi-nested-parse:: ESL compiler. Compiles ESL documents and workspaces, meaning: - Parsing lines - Typechecking - Building an AST - Instantiating components, variables and requirements. - Deriving dependencies from these to build an output graph (network). Subpackages ----------- .. toctree:: :titlesonly: :maxdepth: 3 ast/index.rst instantiating/index.rst machine_files/index.rst typechecking/index.rst Submodules ---------- .. toctree:: :titlesonly: :maxdepth: 1 cli/index.rst diagnostics/index.rst esl_lines/index.rst parser/index.rst scanner/index.rst state_machine/index.rst Package Contents ---------------- Functions ~~~~~~~~~ .. autoapisummary:: raesl.compile.to_graph .. py:exception:: EslCompilationError Bases: :py:obj:`Exception` Error during ESL compilation. .. py:function:: to_graph(*paths: Union[str, pathlib.Path], output: Optional[Union[str, pathlib.Path]] = None, force: bool = False) -> ragraph.graph.Graph Convert ESL file(s) into a :obj:`ragraph.graph.Graph`. :param paths: Paths to resolve into ESL files. May be any number of files and directories to scan. :param output: Optional output file (JSON) to write the graph to. :param force: Whether to overwrite the output file or raise an error if it the file already exists. :returns: Instantiated graph.