1#!perl
2
3use strict;
4use warnings;
5
6use ANTLR::Runtime::ANTLRFileStream;
7use ANTLR::Runtime::TokenRewriteStream;
8use TLexer;
9use TParser;
10
11my $input = ANTLR::Runtime::ANTLRFileStream->new({ file_name => $ARGV[0] });
12my $lexer = TLexer->new({ input => $input });
13my $tokens = ANTLR::Runtime::TokenRewriteStream({ token_source => $lexer });
14my $parser = TParser->new({ input => $tokens });
15$parser->program();
16print "$tokens\n";
17