import java.io.*; public class TestInclude { public static void main(String[] args) throws IOException // may be thrown by yylex { // check for command-line arg if (args.length != 1) { System.err.println("please supply name of file to be scanned."); System.exit(-1); } // open input file FileReader inFile = null; try { inFile = new FileReader(args[0]); } catch (FileNotFoundException ex) { System.err.println("File " + args[0] + " not found."); System.exit(-1); } // create and call the scanner Yylex scanner = new Yylex(inFile); scanner.next_token(); } }