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
//! This crate is the runtime for the generated Rustemo parsers.
// See: https://github.com/rust-lang/rfcs/issues/2324
// For local std docs browsing
// #[doc(inline)]
// pub use std;

#[macro_use]
mod common;
#[macro_use]
pub mod debug;

mod builder;
mod context;
mod error;
mod input;
mod lexer;
mod location;
mod parser;
mod utils;

mod lr;
//#[cfg(feature = "glr")]
mod glr;

// Public API
pub use crate::context::Context;
pub use crate::error::Error;
pub use crate::error::Result;
pub use crate::input::Input;
pub use crate::location::{LineColumn, Location, Position, ValLoc};

pub use crate::builder::Builder;
pub use crate::lexer::{Lexer, StringLexer, Token, TokenRecognizer};
pub use crate::lr::{
    builder::{LRBuilder, SliceBuilder, TreeBuilder, TreeNode},
    context::LRContext,
    parser::{Action, LRParser, ParserDefinition},
};
pub use crate::parser::{Parser, State};

//#[cfg(feature = "glr")]
pub use crate::glr::{
    gss::{Forest, GssHead},
    parser::GlrParser,
};