#!/usr/bin/env node

var fs = require("fs");
var path = require("path");

var target = path.resolve(path.dirname(module.filename), "../lib/parser.js");

console.log = function(){
    process.exitCode = 1;
    return console.warn.apply(null, arguments);
};
var parser = require("../lib/grammar").generate();
process.exitCode || fs.writeFileSync(target, parser + '\n');
