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

# rule 1
# line -> label direct
sub rule_1 {
  return $_[0];
}

# rule 2
# line -> label instr
sub rule_2 {
  return $_[0];
}

# rule 3
# label -> ID
sub rule_3 {
  return $_[0];
}

# rule 4
# label ->		/* empty */
sub rule_4 {
  return $_[0];
}

# rule 5
# direct -> START addr
sub rule_5 {
  return $_[0];
}

# rule 6
# instr -> ADD addr
sub rule_6 {
  return $_[0];
}

# rule 7
# addr -> INT
sub rule_7 {
  return $_[0];
}

# rule 8
# addr -> ID
sub rule_8 {
  return $_[0];
}

#
# Lexer
# (You should also replace this)
#
@TOKENS = ([ID, TEST],
	     [START, START],
	     [INT, 0],
	     [ADD, ADD],
	     [ID, TEST],
	  );

sub yylex {
  my $pair = shift @TOKENS;
  if (!defined $pair) {
    return End_of_Input;
  }
  my $token;
  ($token, $yylval) = @$pair;
  $token;
}
