Expand description
The Polydat language without its runtime.
This crate holds what a reader of Polydat source needs and nothing
a runner needs: the lexer and parser (lexer, parser), the
AST (ast), its pretty-printer (pprint) and visualizer
(viz), the free-name collector (refs), pragmas
(pragmas), the diagnostic types (error), the tile
template parsers (tile, tile_structural), the
comprehension sub-language with its algebra (comprehension),
and the port type vocabulary (PortType). polydat-core
depends on this crate and compiles what it parses; the polydat
facade re-exports every module here at the path it always had, so
polydat::dsl::ast and polydat::ast::PortType are these.
What a type means to a compiled buffer, what a comprehension
evaluates to, and what a tile renders are all the runtime’s: they
live in polydat-core (reached through polydat), as trait
implementations and functions over the types defined here.
Modules§
- ast
- Abstract syntax tree for the Polydat DSL.
- comprehension
- The comprehension sub-language: the canonical algebra (
ast) with its sources, strategies, cardinalities, and metadata, and the forms that reach it (spec) from text, from a specification document, and from a source expression. The text parser and the flat form it produces on the way are internal to this crate (comprehension_forms.md §14.8). Evaluation is the runtime’s. - error
- Structured error types for the Polydat DSL with rich source context.
- lexer
- Lexer for the Polydat DSL.
- parser
- Recursive descent parser for the Polydat DSL.
- pprint
- AST →
.polydatsource pretty-printer. - pragmas
- Module-level pragmas for Polydat source.
- refs
- Grammar-based free-name extraction for Polydat expression text.
- tile
- The tile template grammar (SRD 114 §2.2): holes, projections, branches, and the doubled-open escape, parsed over configurable delimiters and sigil. The textual front end for Polytile; the structural front end (§3) lowers to the same pieces.
- tile_
structural - The structural front end and the host boundary of Polytile (SRD 114 §3, §5.6).
- viz
- DAG visualization for Polydat Kernels.
Enums§
- Numeric
Domain - The set of numbers a scalar port type can carry, described by the properties that decide whether one of them holds every value of another: how many bits the representation has, and how it spends them.
- Port
Type - Compile-time type tag for a port on a Polydat node.