#
# Reduction rules for mt.pl
# Perl source code automatically generated at Wed Apr 22 10:29:30 1998 by
# py v.0.1 25 Aug 1995
# Source code copyright 1995 M-J. Dominus (mjd@pobox.com)
#

# rule 1
# a -> B a
sub rule_2 {
  print "MJD: Reducing by rule 2: B a -> a\n";
  return $_[1] * 10 + $_[0];
}

# rule 2
# a ->		/* empty */
sub rule_1 {
  print "MJD: Reducing by rule 1: (empty) -> a\n";
  return "MT";
}

#
# Lexer
# (You should also replace this)
#
sub yylex {
  $yylval = $tcount;
  if ($tcount <= 0) {
    return End_of_Input;
  } else {
    $tcount--;
    return B;
  }
}

sub set_input {
  $tcount = shift;
}

1;
