def parse_komabetsu_line
      s0 = @current_pos
      if match_str("P") != :failed
        s2 = parse_teban
        if s2 != :failed
          s4 = parse_xy_piece
          if s4 != :failed
            s3 = []
            while s4 != :failed
              s3 << s4
              s4 = parse_xy_piece
            end
          else
            s3 = :failed
          end
          if s3 != :failed
            if parse_nl != :failed
              @reported_pos = s0
              s0 = { "teban" => s2, "pieces" => s3 }
            else
              @current_pos = s0
              s0 = :failed
            end
          else
            @current_pos = s0
            s0 = :failed
          end
        else
          @current_pos = s0
          s0 = :failed
        end
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
def parse_komabetsu_line
      s0 = @current_pos
      if match_str("P") != :failed
        s2 = parse_teban
        if s2 != :failed
          s4 = parse_xy_piece
          if s4 != :failed
            s3 = []
            while s4 != :failed
              s3 << s4
              s4 = parse_xy_piece
            end
          else
            s3 = :failed
          end
          if s3 != :failed
            if parse_nl != :failed
              @reported_pos = s0
              s0 = { "teban" => s2, "pieces" => s3 }
            else
              @current_pos = s0
              s0 = :failed
            end
          else
            @current_pos = s0
            s0 = :failed
          end
        else
          @current_pos = s0
          s0 = :failed
        end
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
komabetsuline : "P" teban xypiece+ nl