You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
476 B
25 lines
476 B
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use blib;
|
|
|
|
use ANTLR::Runtime::ANTLRStringStream;
|
|
use ANTLR::Runtime::CommonTokenStream;
|
|
use ExprLexer;
|
|
use ExprParser;
|
|
|
|
my $in;
|
|
{
|
|
undef $/;
|
|
$in = <>;
|
|
}
|
|
|
|
my $input = ANTLR::Runtime::ANTLRStringStream->new({ input => $in });
|
|
my $lexer = ExprLexer->new({ input => $input });
|
|
|
|
my $tokens = ANTLR::Runtime::CommonTokenStream->new({ token_source => $lexer });
|
|
my $parser = ExprParser->new({ input => $tokens });
|
|
$parser->prog();
|