source:
trunk/yao/share/antlr-2.7.7/examples/java/xml/Main.java
Last change on this file was 1, checked in by lnalod, 15 years ago | |
---|---|
File size: 413 bytes |
Line | |
---|---|
1 | import java.io.*; |
2 | import antlr.*; |
3 | |
4 | public class Main { |
5 | public static void main(String[] args) { |
6 | InputStream in = System.in; |
7 | try { |
8 | if ( args.length>0 ) { |
9 | in = new FileInputStream(args[0]); |
10 | } |
11 | XMLLexer lexer = new XMLLexer(in); |
12 | while ( lexer.nextToken().getType() != Token.EOF_TYPE ); |
13 | } catch(Throwable t) { |
14 | System.out.println("exception: "+t); |
15 | t.printStackTrace(); |
16 | } |
17 | } |
18 | } |
Note: See TracBrowser
for help on using the repository browser.