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
// Copyright (c) 2018 Fabian Schuiki

//! A grammar analyzer and parser generator for almost-context-free languages.

#![deny(missing_docs)]

extern crate bit_set;
extern crate indexmap;
#[macro_use]
extern crate log;
extern crate perplex_runtime;

pub mod grammar;
pub mod first;
pub mod item_set;
pub mod machine;
pub mod backend;
mod honalee;
pub mod lexer;
pub mod parser;
pub mod glr;

/// A pretty printer.
pub struct Pretty<C, T> {
    ctx: C,
    item: T,
}

impl<C, T> Pretty<C, T> {
    pub(crate) fn new(ctx: C, item: T) -> Pretty<C, T> {
        Pretty { ctx, item }
    }
}