Expand description
Lexer, token stream, and surface grammar for SATySFi.
Port of the v0.0.6 SATySFi frontend (lexer.mll / parser.mly) on top of
the syan parser framework.
Re-exports§
pub use cst::parse_file;pub use cst::ParseFileError;pub use cst_v1::parse_file_v1;pub use cst_v1::FileV1;pub use lexer::lex;pub use lexer::lex_partial;pub use lexer::lex_with_version;pub use lexer::LexError;pub use parse_error::ParseFailureKind;pub use span::Loc;pub use span::Span;pub use token::Atom;pub use token::Token;pub use version::sniff_headers;pub use version::sniff_version;pub use version::HeaderSniff;pub use version::ParseVersionError;pub use version::RustyfiVersion;
Modules§
- cst
- The SATySFi 0.0.6 surface grammar (a subset of the v0.0.6
parser.mly), parsed with syan derives over the SATySFi token atoms. - cst_v1
- The SATySFi 0.1.0 (
dev-0-1-0) surface grammar — a fork ofcrate::cst, not a version-gate of it (gating one sharedcst.rswould mean hand-writingParsefor nearly every node, destroying the derive idiom and risking 0.0.6 on every 0.1 edit).crate::cststays frozen: this module imports only its token-Atom-generic, non-recursive helpers (crate::cst::Header,crate::cst::ParseFileError) and re-declares everything else — including its own*ErasedV1eraser leaves and its own copy ofrender_parse_error— so that touchingcst_v1.rsnever touchescst.rs. - leaf
- Leaf token types and the delimiter
Groupaliases. - lexer
- Stateful mode-stack lexer, a direct port of the v0.0.6
lexer.mll. - parse_
error - Turning a failed parse into one diagnostic a human can act on.
- span
- stream
- The parse source for the SATySFi surface grammar.
- token
- version
- Target SATySFi language version.