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.
21 lines
447 B
21 lines
447 B
#!/usr/bin/perl
|
|
|
|
use strict;
|
|
use warnings;
|
|
|
|
use blib;
|
|
|
|
use ANTLR::Runtime::ANTLRStringStream;
|
|
use ANTLR::Runtime::CommonTokenStream;
|
|
use MExprLexer;
|
|
use MExprParser;
|
|
|
|
while (<>) {
|
|
my $input = ANTLR::Runtime::ANTLRStringStream->new({ input => $_ });
|
|
my $lexer = MExprLexer->new($input);
|
|
|
|
my $tokens = ANTLR::Runtime::CommonTokenStream->new({ token_source => $lexer });
|
|
my $parser = MExprParser->new($tokens);
|
|
$parser->prog();
|
|
}
|