#[feature(globs)];

use std::str;
use std::rt::io;
use std::rt::io::file;
use std::rt::io::{Reader,Writer};
use std::os;
use peg::{compile_grammar};
use codegen::RustWriter;

mod peg;
mod codegen;
mod grammar;

fn main() {
	let args = os::args();
	let source = str::from_utf8(file::open(&Path::new(args[1]), io::Open, io::Read).read_to_end());
	let grammar_def = grammar::grammar(source).unwrap();
	let w = RustWriter::new(io::stdout());
	compile_grammar(&w, grammar_def);
}

#[feature(globs)];
#[feature(managed_boxes)];

use std::str;
use std::rt::io::stdout;
use std::rt::io::fs::File;
use std::os;
use peg::{compile_grammar};
use codegen::RustWriter;

mod peg;
mod codegen;
mod grammar;

fn main() {
	let args = os::args();
	let source = str::from_utf8(File::open(&Path::new(args[1])).read_to_end());
	let grammar_def = grammar::grammar(source).unwrap();
	let w = RustWriter::new(stdout());
	compile_grammar(&w, grammar_def);
}

Update for fs changes (again)
Update for fs changes (again)
