Main.java
上传用户:afrynkmhm
上传日期:2007-01-06
资源大小:1262k
文件大小:1k
- /*
- Simple class for testing antlr-generated HTML parser/lexer.
- Alexander Hinds, Magelang Institute
- ahinds@magelang.com
- */
- import java.io.*;
- import antlr.*;
- import HTMLLexer;
- import HTMLParser;
- public class Main {
- public static void main(String[] args) {
- try {
- HTMLLexer lexer = new HTMLLexer(new DataInputStream(System.in));
- TokenBuffer buffer = new TokenBuffer(lexer);
- HTMLParser parser = new HTMLParser(buffer);
- parser.document();
- } catch(Exception e) {
- System.err.println("exception: "+e);
- System.exit(1);
- }
- }
- }