Skip to main content

Crate trilogy_parser

Crate trilogy_parser 

Source

Structs§

CandidateSpec
DatasourceDeclaration
DatasourceInfo
Information about a datasource declaration
DependencyGraph
Result of dependency resolution
DirectoryGraph
Edge
FileInfo
FileNode
A node in the dependency graph
GraphCore
ImportInfo
Information about a single import
ImportResolver
Resolver for PreQL import dependencies
ImportStatement
NetworkSpec
ParsedFile
PersistInfo
Information about a persist statement
PersistStatement
TrilogyParser

Enums§

AddressKind
How a datasource is backed. Only Literal yields a physical address that can be joined against externally-observed state; Templated addresses resolve at run time and are surfaced raw rather than silently dropped.
EdgeReason
LimitKind
ParseError
PersistMode
ResolveError
Rule

Constants§

MAX_NESTING_DEPTH
The deepest parse tree parse_bounded accepts. The deepest model in the repository reaches 48; a level of nested expression costs about 5-6, so this admits about 40 nested parens/calls/cases (125 nested types) while keeping every recursive walk downstream (the PyO3 conversion, Python’s tree conversion and hydration) inside its stack.
NESTING_LIMIT_MESSAGE
Leads the message of every nesting-limit error; Python matches on it.

Functions§

build_edges
Build edges from a directory graph
collect_preql_files
Collect .preql files in a directory, optionally recursing into subdirectories.
enumerate_covers
_enumerate_covers: the level-order obligation walk. Returns the emitted covers (as node names, in emission order) and which budget truncated the walk, if any.
parse_bounded
Parse text as a Trilogy file, rejecting input nested deeper than MAX_NESTING_DEPTH with an ordinary parse error rather than recursing on.
parse_file
parse_imports
process_directory_with_imports
Process files in a directory, discovering transitive imports
rule_calls
How many rule calls a parse of text makes, or None when it makes more than max_calls. Parse errors other than the call limit are returned.