#!/usr/bin/perl
# parse language described in assem.output
# 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)
#

require 'py-skel.pl';
require 'assem-rules.pl';

$; = "\034";
%act = (
"0label",	'goto 2',
"0line",	'goto 11',
"0\$default",	'reduce 4',
"0ID",	'shift 1',
"1\$default",	'reduce 3',
"2direct",	'goto 5',
"2ADD",	'shift 4',
"2START",	'shift 3',
"2instr",	'goto 6',
"3addr",	'goto 9',
"3INT",	'shift 8',
"3ID",	'shift 7',
"4addr",	'goto 10',
"4INT",	'shift 8',
"4ID",	'shift 7',
"5\$default",	'reduce 1',
"6\$default",	'reduce 2',
"7\$default",	'reduce 8',
"8\$default",	'reduce 7',
"9\$default",	'reduce 5',
"10\$default",	'reduce 6',
"11End_of_Input",	'goto 12',
"12End_of_Input",	'goto 13',
"13\$default",	'accept',
);

@length = (0, 2, 2, 1, 0, 2, 2, 1, 1, );

@rhs = ('', 'line', 'line', 'label', 'label', 'direct', 'instr', 'addr', 'addr', );

@rule = (
  '',
  'line -> label direct',
  'line -> label instr',
  'label -> ID',
  'label ->		/* empty */',
  'direct -> START addr',
  'instr -> ADD addr',
  'addr -> INT',
  'addr -> ID',
);

