「言語処理系生成系」の生成系(Constructible Parser Generator on Rust)
all
derive
prebuild
template
dev
regexlex
: crates/lex_regex
lr0
: crates/parse_lr_lr0lr1
: crates/parse_lr_lr1slr1
: crates/parse_lr_slr1lalr1
: crates/parse_lr_lalr1
void
: crates/ir_voidsexp
: crates/ir_sexptree
: crates/ir_tree
// RegexLex(lex) + LR1(parse) + SExp(ir)
copager = { ..., features = ["derive", "regexlex", "lr1", "sexp"] }
// RegexLex(lex) + LALR1(parse) + Void(ir)
copager = { ..., features = ["derive", "regexlex", "lalr1", "void"] }
- example_build_oneshot
- example_build_prebuild
- example_lang_arithmetic (lib.rs)
- example_lang_json (lib.rs)
- example_lang_pl0 (lib.rs)
- example_lang_xml (lib.rs)
$ cargo run -p example_build_oneshot
Example <one-shot>
Input: 10 * 20 + 30
Success: (Expr (Expr (Term (Term (Num "10")) "*" (Num "20"))) "+" (Term (Num "30")))
$ cargo test