/**
* Copyright 2011 Oliver Buchtala
*
* This file is part of ndogen.
*
* ndogen is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ndogen is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with ndogen. If not, see <http://www.gnu.org/licenses/>.
*/
package org.ndogen.antlr;
import org.antlr.Tool;
import org.ndogen.xml.XMLLexer;
import org.ndogen.xml.XMLParser;
public class ToolUtil {
public static void runAntlr(String _package, String antlrSourceFile) {
_package = _package.replace('.', '/');
String dir = "src/" + _package;
String[] antlrArgs = new String[]{
"-o", dir,
dir + "/" + antlrSourceFile
};
Tool.main(antlrArgs);
}
}