1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
//! The drivers of the crate's own standard tables, and the accessors around them.
//!
//! There is one driver per kind of object: [`SourceSerdeDriver`] for sources (with the
//! choice between embedding a source's text and referencing it), [`StateSerdeDriver`]
//! for parsing states, [`SpecSerdeDriver`] and [`ProviderSerdeDriver`] for callable
//! specs and specs providers, [`TreeSerdeDriver`] for node trees,
//! [`DiagnosticSerdeDriver`] for diagnostics, and [`ParseResultSerdeDriver`] for whole
//! parse results. Each table has its own typed position type ([`SourceIndex`],
//! [`StateIndex`], and so on).
//!
//! [`SerdeSession::new`](crate::serialize::SerdeSession::new) registers all seven and
//! reports their handles as [`StandardTables`]. Objects go in and come out either
//! through those handles or through the by-kind extension traits:
//! [`StandardTableInterning`] and [`StandardTableReading`] for sources, states, specs,
//! and providers, and [`TreeSerialization`], [`DiagnosticSerialization`], and
//! [`ParseResultSerialization`] for trees, diagnostics, and parse results.
//!
//! Reading also needs the reading environment: [`KnownProviders`] is the directory of
//! providers a serialized package resolves against, and [`register_core_readers`]
//! registers the readers of the crate's own spec and provider types.
//!
//! Everything here is registered on the engine, which knows nothing of these object
//! types, exactly as a framework's own tables would be: the drivers implement
//! [`ObjectSerdeDriver`](crate::serialize::ObjectSerdeDriver), the positions are
//! [`serial_index!`](crate::serialize::serial_index) types, and the accessors find
//! the tables by name ([`SerdeSession::table_handle`](crate::serialize::SerdeSession::table_handle)).
pub
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
/// The name of the sources table.
pub const SOURCES_TABLE: &str = "sources";
/// The name of the states table.
pub const STATES_TABLE: &str = "states";
/// The name of the specs table.
pub const SPECS_TABLE: &str = "specs";
/// The name of the providers table.
pub const PROVIDERS_TABLE: &str = "providers";
/// The name of the trees table.
pub const TREES_TABLE: &str = "trees";
/// The name of the diagnostics table.
pub const DIAGNOSTICS_TABLE: &str = "diagnostics";
/// The name of the parse-results table.
pub const PARSE_RESULTS_TABLE: &str = "parse-results";
/// The identifier of every entry of the sources table.
pub const SOURCE_IDENTIFIER: &str = "core.source";
/// The identifier of every entry of the states table.
pub const STATE_IDENTIFIER: &str = "core.state";
/// The identifier of a trees table entry whose annotation is the unit type (the
/// annotations are omitted from the wire).
pub const CORE_TREE_IDENTIFIER: &str = "core.tree";
/// The identifier of every entry of the diagnostics table.
pub const DIAGNOSTIC_IDENTIFIER: &str = "core.diagnostic";
/// The identifier of every entry of the parse-results table.
pub const PARSE_RESULT_IDENTIFIER: &str = "core.parse-result";
/// The identifier of a specs table entry holding a stamped spec's identity form
/// (its provider's position plus the definition key).
pub const SPEC_IDENTITY_IDENTIFIER: &str = "core.provider-spec-identity";
/// The identifier of a specs table entry holding an error spec's self-contained form.
pub const ERROR_SPEC_IDENTIFIER: &str = "core.error-spec";
/// The identifier of a providers table entry holding a package (by name).
pub const PACKAGE_IDENTIFIER: &str = "core.package";
/// The identifier of a providers table entry holding a scope (in full).
pub const SCOPE_IDENTIFIER: &str = "core.scope";
/// The identifier of a providers table entry holding a fallback provider (in full).
pub const FALLBACK_PROVIDER_IDENTIFIER: &str = "core.fallback-provider";