Last change
on this file since 1 was
1,
checked in by lnalod, 15 years ago
|
Initial import of YAO sources
|
File size:
556 bytes
|
Line | |
---|
1 | /* |
---|
2 | Simple class for testing antlr-generated HTML parser/lexer. |
---|
3 | Alexander Hinds, Magelang Institute |
---|
4 | ahinds@magelang.com |
---|
5 | |
---|
6 | */ |
---|
7 | |
---|
8 | using System; |
---|
9 | using antlr; |
---|
10 | |
---|
11 | public class AppMain { |
---|
12 | public static void Main(string[] args) { |
---|
13 | try { |
---|
14 | HTMLLexer lexer = new HTMLLexer(new ByteBuffer(Console.OpenStandardInput())); |
---|
15 | TokenBuffer buffer = new TokenBuffer(lexer); |
---|
16 | HTMLParser parser = new HTMLParser(buffer); |
---|
17 | parser.document(); |
---|
18 | } catch(Exception e) { |
---|
19 | Console.Error.WriteLine("exception: "+e); |
---|
20 | Environment.Exit(1); |
---|
21 | } |
---|
22 | } |
---|
23 | } |
---|
24 | |
---|
Note: See
TracBrowser
for help on using the repository browser.