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
58
use Region;
/// Determine lexing rules for the parser
///
/// Rules struct that contains list of symbols as well as region tree
///
/// This struct requires two things:
/// 1. List of symbols
/// 2. Region Tree
///
/// More on those below in the **Fields** section
///
/// # Example
/// ```
/// # use heraclitus_compiler::prelude::*;
/// let symbols = vec!['+', '-', '*', '/', '(', ')', '&', '|', '!'];
/// let compounds = vec![('&', '&'), ('|', '|')];
/// let region = reg![
/// reg!(str as "string literal" => {
/// begin: "'",
/// end: "'"
/// })
/// ];
/// Rules::new(symbols, compounds, region);
/// ```