espr/parser/
mod.rs

1//! Parser combinator for EXPRESS language
2//!
3//! This submodule responsible for tokenize of EXPRESS language input into a [SyntaxTree] struct,
4//! and provides parser combinators based on [nom](https://github.com/Geal/nom).
5//!
6//! Most parsers correspond to EXPRESS language grammers defined in [ISO-10303-11].
7//! Each documentation of the parsers contains wirth syntax notation (WSN).
8//! For example,
9//!
10//! ```text
11//! 124 digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 .
12//! ```
13//!
14//! [digit] matches to a digit character.
15//! The head number, `124`, is the serial number of this WSN in [ISO-10303-11].
16//!
17//! [ISO-10303-11]: https://www.iso.org/standard/38047.html
18//!
19//! Remarks
20//! --------
21//!
22//! EXPRESS language has two forms of "remarks" which corresponds to "comments" in Rust
23//!
24//! ```text
25//! (* this is called "embedded remark" *)
26//! -- this is called "tail remark"
27//! ```
28//!
29//! Each of remarks are handled by [embedded_remark] and [tail_remark].
30//! For handling remarks appear in arbitrary position,
31//! we re-define nom's combinators in [combinator] to stack remarks onto a `Vec<Remark>` in appeared order.
32//!
33
34#[cfg(doc)]
35use crate::ast::*;
36
37pub mod combinator;
38
39mod basis;
40mod entity;
41mod expression;
42mod identifier;
43mod literal;
44mod remark;
45mod reserved;
46mod schema;
47mod stmt;
48mod subsuper;
49mod types;
50
51pub use basis::*;
52pub use entity::*;
53pub use expression::*;
54pub use identifier::*;
55pub use literal::*;
56pub use remark::*;
57pub use reserved::*;
58pub use schema::*;
59pub use stmt::*;
60pub use subsuper::*;
61pub use types::*;