The Eiffel Compiler tecomp version 0.16 has been released

Helmut <helmut.brandl@gmx.net>
Mon, 27 Apr 2009 07:56:30 -0700 (PDT)

          From comp.compilers

Related articles
The Eiffel Compiler tecomp version 0.16 has been released helmut.brandl@gmx.net (Helmut) (2009-04-27)
| List of all articles for this month |

From: Helmut <helmut.brandl@gmx.net>
Newsgroups: comp.compilers
Date: Mon, 27 Apr 2009 07:56:30 -0700 (PDT)
Organization: Compilers Central
Keywords: Eiffel, available
Posted-Date: 28 Apr 2009 05:11:24 EDT

... with the following new features:


- Underscore now allowed to improve the readability of
    integer constants (e.g. 2_100_095). Grouping of 3 is
    recommended but can be done arbitrarily. The integers have
    to start with a digit. The underscore is allowed in hex,
    octal and binary as well (e.g. 0x0fff_120a, 0c77_44,
    0b1111_0000).


- Free operators implemented.


- Webpresence improved at [[http://tecomp.sourceforge.net]]
    and language description improved.


- Exception objects implemented. To raise an exception
    create an object of type DEVELOPER_EXCEPTION and call the
    feature raise. The class which handles exception has to
    inherit from EXCEPTION_MANAGER. The feature {{exception}}
    returns the raised exception. Object test can be used to
    check the type of the exception (see example below).


      class MY_EXCEPTION inherit DEVELOPER_EXCEPTION end


      class HANDLER inherit EXCEPTION_MANAGER feature
            raise_my_exception
                  do
                      (create {MY_EXCEPTION}).raise
                  end


            raise_precondition
                  require
                        False
                  do
                  end


            test_exceptions
                  local
                        i:INTEGER
                  do
                        if i = 0 then
                                raise_my_exception
                        else if i = 1 then
                                  raise_precondition
                        end
                  rescue
                        check i <= 1 end
                        check i = 0 implies {e1:MY_EXCEPTION} exception end
                        check i = 1 implies {e2:PRECONDITION_VIOLATION} exception
end
                        check i = 1 implies {e: ASSERTION_VIOLATION} exception end
                        i := i + 1
                        retry
                  end
      end


Available exception classes in the kernel library


- EXCEPTION, EXCEPTION_MANAGER, DEVELOPER_EXCEPTION,


- ASSERTION_VIOLATION, CHECK_VIOLATION,
    PRECONDITION_VIOLATION, POSTCONDITION_VIOLATION,
    INVARIANT_VIOLATION, LOOP_INVARIANT_VIOLATION,
    VARIANT_VIOLATION


- BAD_INSPECT_VALUE, IO_EXCEPTION



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.