Crate rtlola_parsersource ·
A parser for RTLola specifications
This crate offers functionality to transform a textual representation of an RTLola specification into an abstract syntax tree. The Ast is not the most convenient data structure for modifying or analyzing a specification; there are other options available, outlined below.
- RtLolaAst: The Ast represents the abstract syntax of the specification. It is obtained by first parsing the specification into a homogenous tree and then remove concrete syntax fragments irrelevant for the logics of the specification. Apart from that, the Ast does not provide much functionality. The only checks performed when creating the Ast concern the correct syntax. See also: RtLolaAst, and parse().
- RtLolaHir: The Hir represents a high-level intermediate representation optimized for analyzability. It contains more convenient methods than the Ast, enables different
analysis steps and provides their reports. The Hir traverses several modes representing the level to which it was analyzed and refined.
Its base mode is
RtLolaHir<BaseMode>and its fully analyzed version is
RtLolaHir<CompleteMode>. See also: rtlola_hir.
- RtLolaMir: The Mir represents a mid-level intermediate representation optimized for external use such as interpretation and compilation. It contains several interconnections enabling easy accesses and additional annotation such as memory bounds for each stream. See also: rtlola_hir. As a rule of thumb, if you want to analyze and/or enrich a specification, use the RtLolaHir. If you only need a convenient representation of the specification for some devious activity such as compiling it into something else, the RtLolaMir is the way to go.
The configuration of the parser.
Invokes the parser with the given configuration.