9 个版本

0.2.0 2019 年 10 月 5 日
0.1.2 2019 年 9 月 26 日
0.0.6 2019 年 9 月 7 日
0.0.1 2019 年 8 月 28 日

#993 in 嵌入式开发

Download history • Rust 包仓库 12/week @ 2024-03-13 • Rust 包仓库 1/week @ 2024-03-20 • Rust 包仓库 5/week @ 2024-03-27 • Rust 包仓库 11/week @ 2024-04-03 • Rust 包仓库 1/week @ 2024-05-08 • Rust 包仓库 1/week @ 2024-05-15 • Rust 包仓库 1/week @ 2024-05-22 • Rust 包仓库 2/week @ 2024-05-29 • Rust 包仓库

53 每月下载量
2 个包中使用 (通过 rust-forth-compiler)

MIT 许可证

445KB
13K SLoC

Forth 12K SLoC // 0.2% comments • Rust 包仓库 Rust 354 SLoC // 0.0% comments • Rust 包仓库

rust-forth-tokenizer

使用 Rust 编写的 Forth 分词器

使用方法

main() { use rust_forth_tokenizer::ForthToken; use rust_forth_tokenizer::ForthTokenizer;

 let tokenizer = ForthTokenizer::new("word : wordname 1 2 3 ; definition");
 // The code also supports the regular for loop iterator syntax
 let collected: Vec<_> = tokenizer.into_iter().collect();
 assert_eq!(
        &collected,
        &vec![
            ForthToken::Command("word"),
            ForthToken::Colon,
            ForthToken::Command("wordname"),
            ForthToken::Number(1),
            ForthToken::Number(2),
            ForthToken::Number(3),
            ForthToken::SemiColon,
            ForthToken::Command("definition"),
        ]
    );    

}

无运行时依赖