added PrintRules() and changed left/right == literal to .equals(literal)
properly defined the rules