1#!/usr/bin/perl
2
3use blib;
4
5use English qw( -no_match_vars );
6use ANTLR::Runtime::ANTLRStringStream;
7use TLexer;
8
9use strict;
10use warnings;
11
12my $input = ANTLR::Runtime::ANTLRStringStream->new({ input => '010' });
13my $lexer = TLexer->new($input);
14
15while (1) {
16    my $token = $lexer->next_token();
17    last if $token->get_type() == $TLexer::EOF;
18
19    print "type: ", $token->get_type(), "\n";
20    print "text: ", $token->get_text(), "\n";
21    print "\n";
22}
23