123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566(*
* SPDX-FileCopyrightText: 2024 The Forester Project Contributors
*
* SPDX-License-Identifier: GPL-3.0-or-later
*)(** The forester compiler*)(** {1 Base types }*)moduleXml_forester=Xml_forester(** Definition of the forester XML schema. This is the compilation target.*)(** {1 Compilation phases}*)(** {2 Parsing}
The lexer and parser are implemented with {{: https://ocaml.org/manual/5.3/lexyacc.html} ocamllex} and {{: https://gallium.inria.fr/~fpottier/menhir/} menhir}*)moduleParse=ParsemoduleImports=Imports(** Create {{!Forester_core.Forest_graph.t}import and dependency graphs}.
*)moduleExpand=Expand(** Transform {!Code.tree}s into {!Syn.tree}s by {{!Forester_core.Forest_graph.topo_fold}folding} over the {{!Forester_core.Forest_graph}import graph.}*)moduleEval=Eval(** Transform {!Syn.tree}s into {{!Forester_core.Types.article}[articles]}.*)(** {1 High-level architecture}
The compiler needs to support both batch-style and incremental compilation. To this end, we define a {{!State.t}state type} and {{!Phases}transition functions} that act on this state.
In the future, we want to record more knowledge in {{!field:State.graphs}[graphs]} of the {{!State.t}state} and derive the information we need for the language server via the query system.
*)moduleForest=Forest(** Augmented hash table used throughout compilation phases.*)moduleAction=ActionmoduleState=StatemodulePhases=PhasesmoduleDriver=DrivermoduleAsset_router=Asset_routermoduleURI_util=URI_util(** {1 IO}*)(** {2 LaTeX pipeline}*)moduleBuild_latex=Build_latexmoduleLaTeX_pipeline=LaTeX_pipelinemoduleLaTeX_template=LaTeX_templatemoduleJob=Job(** Definition of LaTeX jobs*)(**/**)moduleEio_util=Eio_utilmoduleExport_for_test=Export_for_testmoduleCache=CachemoduleDir_scanner=Dir_scanner(**/**)