Rust parsers, ASTs, and pretty-printers for the finite-state grammar languages of the HFST / Xerox toolchain.
Each language gets its own crate — a lexer, a typed AST, a recursive-descent
(or logos-driven) parser, and a
round-trippable pretty-printer — all sharing nfst-syntax for source spans
and diagnostics.
| Crate | Language |
|---|---|
nfst-syntax |
Shared source spans, Spanned<T>, and diagnostics |
nfst-xre |
Xerox regular expressions (xre) |
nfst-lexc |
lexc lexicon compiler |
nfst-twolc |
twolc two-level rules |
nfst-xfst |
xfst command scripts |
nfst-pmatch |
pmatch pattern matching |
Complete and used in production as part of a port of HFST. Each language
parses to a typed AST that round-trips losslessly through its
pretty-printer (parse → print → parse is structure-preserving).
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT license (LICENSE-MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.