import hiro.yoshioka.ast.sql.oracle.util.WolfParserFactory;
import hiro.yoshioka.ast.sql.util.IParserUtil;
import hiro.yoshioka.ast.sql.util.ParserFactory;
import hiro.yoshioka.sql.resource.DBRoot;

import java.util.Iterator;

public class StringTest {
	static String input = "SELECT HOGE, KEY FROM DUAL";

	public static void main(String[] args) {
		try {
			ParserFactory ff = new WolfParserFactory();

			// DBRoot root = DBResourceUtil.loadDBRoot(new File(
			// "D:/eclipse/serialized/261801626"));
			DBRoot root = MockGenerator.generateDBRoot();
			IParserUtil fUtil = ff.createParserUtil(input);
			// fUtil = ff.createParserUtil(fSQL_Statement, null);

			// fUtil.enable_tracing();
			if (!fUtil.parse()) {
				for (Iterator ite = fUtil.getExpectedTokens(); ite.hasNext();) {
					System.out.println("kitai[" + ite.next() + "]");
				}
			}
		} catch (Throwable e) {
			e.printStackTrace();
		}

	}

	public static DBRoot getRoot() {
		// TODO Auto-generated method stub
		return null;
	}

}
