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
// Copyright (c) 2017 King's College London
// created by the Software Development Team <http://soft-dev.org/>
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0>, or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, or the UPL-1.0 license <http://opensource.org/licenses/UPL>
// at your option. This file may not be copied, modified, or distributed except according to those
// terms.

mod astar;
mod cpctplus;
pub mod ctbuilder;
pub mod lex;
pub use crate::lex::{LexError, Lexeme, Lexer};
mod panic;
pub mod parser;
pub use crate::parser::{
    LexParseError, Node, ParseError, ParseRepair, RTParserBuilder, RecoveryKind
};
mod mf;

pub use crate::ctbuilder::CTParserBuilder;

/// A convenience macro for including statically compiled `.y` files. A file `src/x.y` which is
/// statically compiled by lrpar can then be used in a crate with `lrpar_mod!(x)`.
#[macro_export]
macro_rules! lrpar_mod {
    ($n:ident) => {
        include!(concat!(env!("OUT_DIR"), "/", stringify!($n), ".rs"));
    };
}

#[doc(hidden)]
pub use cfgrammar::RIdx;