Mercurial > hg > Applications > JavaLite
view src/parser/ITLNodeScannerTest.java @ 107:30e74062f06c continuation-removal
*** empty log message ***
author | kono |
---|---|
date | Sun, 20 Jan 2008 18:22:55 +0900 |
parents | |
children |
line wrap: on
line source
package parser; import java.io.FileNotFoundException; import java.io.FileReader; import lite.ITLSolver; public class ITLNodeScannerTest extends LogicNodeScannerTest { public static ITLNodeScanner<ITLSolver> scan; public static void initScanner() { Dictionary<ITLSolver> dict = new Dictionary<ITLSolver>(); scan = new ITLNodeScanner<ITLSolver>(dict); } public static void scan(String exp) { for(Token<ITLSolver> t : scan.scanToken(exp)) { System.out.print(t+" "); } System.out.println(); } public static void scan(FileReader file) { for(Token<ITLSolver> t : scan.scanToken(file)) { System.out.print(t+" "); System.out.println(); } } public static void main(String arg[]) { initScanner(); if (arg.length==0) { arg = new String[1]; arg[0] = "test"; } for(String file: arg) { try { scan(new FileReader(file)); } catch (FileNotFoundException e) { scan(file); } } } }