package IntegerTerminalExpression; use strict; use base qw(AbstractExpression); sub new { my $class = shift; my $self = {}; my $i = shift; $self->{i} = $i; bless $self, $class; } sub interpret { my $self = shift; my $context = shift; $context->push($self->{i}); } 1;