def parse
      tags = []
			
      while tokens = @tokenizer.read_line_tokens()
        if tokens.last.type == :START_BLOCK
          # tag with a block
          tag = construct_tag(tokens[0...-1])
          add_children(tag)
          tags << tag

        elsif tokens.first.type == :END_BLOCK
          # we found an block end token that should have been consumed by
          # add_children() normally
          parse_error(
            "No opening block ({) for close block (}).",
            tokens.first.line,
            tokens.first.position)
        else
          # tag without block
          tags << construct_tag(tokens)
        end
      end
			
      @tokenizer.close()
			
      return tags
    end
def parse
      tags = []
			
      while tokens = @tokenizer.read_line_tokens()
        if tokens.last.type == :START_BLOCK
          # tag with a block
          tag = construct_tag(tokens[0...-1])
          add_children(tag)
          tags << tag

        elsif tokens.first.type == :END_BLOCK
          # we found an block end token that should have been consumed by
          # add_children() normally
          parse_error(
            "No opening block ({) for close block (}).",
            tokens.first.line,
            tokens.first.position)
        else
          # tag without block
          tags << construct_tag(tokens)
        end
      end
			
      @tokenizer.close()
			
      return tags
    end
Creates an SDL parser on the specified +IO+.

   IO.open("path/to/sdl_file") { |io|
     parser = SDL4R::Parser.new(io)
     tags = parser.parse()
   }

 Parses the underlying +IO+ and returns an +Array+ of +Tag+.

 ==Errors
 [IOError] If a problem is encountered with the IO
 [SdlParseError] If the document is malformed