Skip to main content

trilogy_parser/
lib.rs

1mod parser;
2mod resolver;
3mod directory_resolver;
4mod graph;
5mod network_search;
6mod trilogy_parser;
7#[cfg(feature = "python")]
8pub mod python_bindings;
9
10// The pest parser over the full Trilogy grammar. Exported because
11// `ParseError::PestError` already surfaces `Rule` in its public signature —
12// without this a consumer cannot name that type, let alone match on it — and
13// because the raw parse tree is the reason non-Python tooling wants the crate.
14pub use trilogy_parser::{
15    parse_bounded, rule_calls, Rule, TrilogyParser, MAX_NESTING_DEPTH, NESTING_LIMIT_MESSAGE,
16};
17
18pub use parser::{
19    parse_file, parse_imports, AddressKind, DatasourceDeclaration, ImportStatement, ParseError,
20    ParsedFile, PersistMode, PersistStatement,
21};
22pub use resolver::{
23    DatasourceInfo, DependencyGraph, FileNode, ImportInfo, ImportResolver, PersistInfo,
24    ResolveError,
25};
26pub use directory_resolver::{
27    collect_preql_files, process_directory_with_imports, build_edges, DirectoryGraph, Edge,
28    EdgeReason, FileInfo,
29};
30pub use graph::GraphCore;
31pub use network_search::{enumerate_covers, CandidateSpec, LimitKind, NetworkSpec};