hello-world icon indicating copy to clipboard operation
hello-world copied to clipboard

Update Eiffel

Open igneus opened this issue 8 months ago • 2 comments

to compile on recent Eiffel compilers (tested Gobo Eiffel, Liberty Eiffel)

igneus avatar Apr 10 '25 23:04 igneus

Why the PR is needed:

Liberty Eiffel

$ se c Eiffel.eiff 
****** Fatal Error: Cannot find the class "EIFF" in any known cluster.

------
Error occurs while compiling. Compilation process aborted.

The compiler requires the source file name to match name of the contained class. When we fix that, compilation fails on keywords (and the compiler is history-aware enough to inform us that the rejected keywords were once part of Eiffel syntax and how to update them):

$ se c hello.e
****** Warning: `indexing' is an obsolete keyword, please use `note' instead.

Line 1 column 1 in HELLO (/home/igneus/github_hacking/hello-world/e/hello.e):
indexing "Hello World in Eiffel , from http://roesler-ac.de/wolfram/hello.htm#Eiffel"
^                                                                                    
------
****** Fatal Error: The keyword 'creation' is now replaced by 'create'. Please update your code.

Line 5 column 1 in HELLO (/home/igneus/github_hacking/hello-world/e/hello.e):
creation
^       
------
Error occurs while compiling. Compilation process aborted.

Gobo Eiffel

$ gec Eiffel.eiff 
[ESYN] ECF /home/igneus/github_hacking/hello-world/e/Eiffel.eiff (1,1): parse error

igneus avatar Apr 26 '25 11:04 igneus

Here when filename is fixed, compilation fails on an outdated object creation keyword:

$ gec hello.e 
Syntax error:
line 14 column 4 in hello.e
                do
                        !!io;
                        ^
                        io.put_string("Hello World");

igneus avatar Apr 26 '25 11:04 igneus