package com.init.octo.parser;

import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.text.ParseException;

import org.apache.log4j.Logger;

public class ParseUtils {
    private static Logger       log = Logger.getLogger(ParseUtils.class.getName());
   
	public boolean runParser(String args[]) throws ParseException, FileNotFoundException {
        SQLtoXMLScript parser = null ;

        if (args.length < 1) {
            parser = new SQLtoXMLScript(System.in);
        }
        else {
            log.info(args[0]);
            parser = new SQLtoXMLScript(new DataInputStream(new FileInputStream(args[0])));
        } 
  
        parser.parse();

        return true;
        //for (SQLSelect s : selectList) {log.info("----\n" + s.toString());}; log.info("ORDER BY: " + orderby);
	}
}
