aboutsummaryrefslogtreecommitdiff
path: root/codegen/src/main.rs
blob: 7cc6cd02879f2f7a9fedc6e15d88d6df450436c1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#![allow(dead_code)]

use std::path::Path;

use syntex;

mod ext;

fn main() {
    // Expand VT parser state table
    let mut registry = syntex::Registry::new();
    ext::vt::register(&mut registry);
    let src = &Path::new("../src/table.rs.in");
    let dst = &Path::new("../src/table.rs");
    registry.expand("vt_state_table", src, dst).expect("expand vt_stable_table ok");

    // Expand UTF8 parser state table
    let mut registry = syntex::Registry::new();
    ext::utf8::register(&mut registry);
    let src = &Path::new("../utf8parse/src/table.rs.in");
    let dst = &Path::new("../utf8parse/src/table.rs");
    registry.expand("utf8_state_table", src, dst).expect("expand utf8_stable_table ok");
}