def processCommandLine(parsedCommandLine, lineNumber)
      #puts "command: #{parsedCommandLine}"
      if @currentComponent && (@currentComponent.is_a? StaticHtml) # finish any current static HTML component
        @currentComponent.finishText
        @currentComponent = nil
      end
      if @currentComponent # we are in a page component other than a static HTML component
        if parsedCommandLine.sectionStart # we have already started, so we cannot start again
          raise ParseException.new("Unexpected section start #{parsedCommandLine} inside component")
        end
        @currentComponent.processEndComment(parsedCommandLine) # so, command must be a command to end the page component
        @currentComponent = nil
      else # not in any page component, so we need to start a new one
        if !parsedCommandLine.sectionStart # if it's an end command, error, because there is nothing to end
          raise ParseException.new("Unexpected section end #{parsedCommandLine}, outside of component")
        end
        if parsedCommandLine.isInstanceVar # it's a page component that defines an instance variable value
          if parsedCommandLine.hasCommentEnd # the value will be an HTML value
            startNewComponent(HtmlVariable.new, parsedCommandLine)
          else # the value will be an HTML-commented value
            startNewComponent(CommentVariable.new, parsedCommandLine)
          end
        else # not an instance var, so it must be a special command
          if parsedCommandLine.name == "ruby" # Ruby page component containing Ruby that will be executed in the 
                                              # context of the page object
            startNewComponent(RubyCode.new(lineNumber+1), parsedCommandLine)
          elsif parsedCommandLine.name == "class" # Specify Ruby class for the page object
            startNewComponent(SetPageObjectClass.new(parsedCommandLine.value), parsedCommandLine)
          else # not a known special command
            raise ParseException.new("Unknown section type #{parsedCommandLine.name.inspect}")
          end
        end
        if @currentComponent.finished # Did the processing cause the current page component to be finished?
          @currentComponent = nil # clear the current component
        end
      end
      
    end
def processCommandLine(parsedCommandLine, lineNumber)
      #puts "command: #{parsedCommandLine}"
      if @currentComponent && (@currentComponent.is_a? StaticHtml) # finish any current static HTML component
        @currentComponent.finishText
        @currentComponent = nil
      end
      if @currentComponent # we are in a page component other than a static HTML component
        if parsedCommandLine.sectionStart # we have already started, so we cannot start again
          raise ParseException.new("Unexpected section start #{parsedCommandLine} inside component")
        end
        @currentComponent.processEndComment(parsedCommandLine) # so, command must be a command to end the page component
        @currentComponent = nil
      else # not in any page component, so we need to start a new one
        if !parsedCommandLine.sectionStart # if it's an end command, error, because there is nothing to end
          raise ParseException.new("Unexpected section end #{parsedCommandLine}, outside of component")
        end
        if parsedCommandLine.isInstanceVar # it's a page component that defines an instance variable value
          if parsedCommandLine.hasCommentEnd # the value will be an HTML value
            startNewComponent(HtmlVariable.new, parsedCommandLine)
          else # the value will be an HTML-commented value
            startNewComponent(CommentVariable.new, parsedCommandLine)
          end
        else # not an instance var, so it must be a special command
          if parsedCommandLine.name == "ruby" # Ruby page component containing Ruby that will be executed in the 
                                              # context of the page object
            startNewComponent(RubyCode.new(lineNumber+1), parsedCommandLine)
          elsif parsedCommandLine.name == "class" # Specify Ruby class for the page object
            startNewComponent(SetPageObjectClass.new(parsedCommandLine.value), parsedCommandLine)
          else # not a known special command
            raise ParseException.new("Unknown section type #{parsedCommandLine.name.inspect}")
          end
        end
        if @currentComponent.finished # Did the processing cause the current page component to be finished?
          @currentComponent = nil # clear the current component
        end
      end
      
    end
Process a line of source text that has been identified as a Regenerate start and/or end of comment line