Home | History | Annotate | Download | only in expr
      1 #!/usr/bin/perl
      2 
      3 use strict;
      4 use warnings;
      5 
      6 use blib;
      7 
      8 use ANTLR::Runtime::ANTLRStringStream;
      9 use ANTLR::Runtime::CommonTokenStream;
     10 use ExprLexer;
     11 use ExprParser;
     12 
     13 my $in;
     14 {
     15     undef $/;
     16     $in = <>;
     17 }
     18 
     19 my $input = ANTLR::Runtime::ANTLRStringStream->new({ input => $in });
     20 my $lexer = ExprLexer->new({ input => $input });
     21 
     22 my $tokens = ANTLR::Runtime::CommonTokenStream->new({ token_source => $lexer });
     23 my $parser = ExprParser->new({ input => $tokens });
     24 $parser->prog();
     25