Recompling a class with ET

Bernd Schoeller <[email protected]>
Newsgroups gmane.comp.lang.eiffel.gobo.general
Message-ID <[email protected]>
Dear List,

I would like to recompile a single class (from a text string) again
and again to see if it contains bugs.

The current way that I have implemented it is:

  parse is
      -- Parse the code and generate an AST.
    local
      fn: STRING
      a_file: KL_STRING_INPUT_STREAM
      root_class: ET_CLASS
    do
      create a_file.make (document.text)
      fn := "unnamed.e"
      my_universe.parse_file (a_file, fn, 0, my_cluster)
      if my_universe.classes_by_cluster (my_cluster).count > 1 then
        document.record_error ("More than one class defined", 1, 1)
      end
      if my_universe.classes_by_cluster (my_cluster).count < 1 then
        document.record_error ("No class defined", 1, 1)
      end
      parse_was_successful := not document.has_errors
      if parse_was_successful then
        root_class := my_universe.classes_by_cluster (my_cluster).first
        my_universe.set_root_class (root_class.name)
        my_universe.reset_classes
        my_universe.parse_system  
      end
    end

Unfortunately, this code only generates the AST, but does not check
correct typing or any other checks beyond parsing. I had thought the
"parse_system" would implement this.

What would I need to change to have parsing of a text include all
system validity checks?

Bernd


To Post a message, send it to:   [email protected]
To Unsubscribe, send a blank message to: [email protected] 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/gobo-eiffel/

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.