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
//! This crate provides a Rustemo grammars compiler as a CLI command, and an API
//! for usage from `build.rs` scripts.
//!
//! When this crate is installed `rcomp` command is available that can be run
//! over Rustemo grammars to produce parsers.
//!
//! The entry point into API is [Settings::new] which provide a default settings
//! value which can be further configured in a builder pattern style calling
//! methods of [Settings] and finally executed using [Settings::process_dir] or
//! [Settings::process_grammar] methods.
//!
//! ## Example
//!
//! ```rust,ignore
//! rustemo_compiler::Settings::new().force(true).in_source_tree().process_dir()
//! ```
//!
//! # Processing grammars
//!
//! For default settings there are [process_crate_dir], [process_dir] and
//! [process_grammar] shortcut functions.
//!
//! ## Example
//!
//! Usual pattern you can use in `build.rs` is:
//!
//! ```rust,ignore
//! if let Err(e) = rustemo_compiler::process_crate_dir() {
//! eprintln!("{}", e);
//! exit(1);
//! }
//! ```
extern crate rustemo;
pub use crate;
pub use crateTableType;
pub use crateError;
pub use crateResult;
// For output_cmp macro
pub use cratestring_difference;