摘要: Main.java/* * 主程序 */import java.io.*;import lexer.*;public class Main { public static void main(String[] args) throws IOException { Lexer lexer = new Lexer(); while (lexer.getReaderState() == false) { lexer.scan(); } /* 保存相关信息 */ lexer.saveTokens(); lexer.saveSymbolsTable(); }} Lexer.j 阅读全文
posted @ 2010-09-21 19:10 qiang.xu 阅读(25559) 评论(1) 推荐(4) 编辑
摘要: 1。java测试文件结尾import java.io.BufferedInputStream;import java.io.DataInputStream;import java.io.FileInputStream;import java.io.IOException;public class MainClass { public static void main(String[] args) throws IOException { DataInputStream in = new DataInputStream(new BufferedInputStream(new FileInput 阅读全文
posted @ 2010-09-21 09:30 qiang.xu 阅读(297) 评论(0) 推荐(0) 编辑