Giter Club home page Giter Club logo

gobo-eiffel / gobo Goto Github PK

View Code? Open in Web Editor NEW
59.0 15.0 23.0 178.92 MB

The Gobo Eiffel Project provides the Eiffel community with free and portable Eiffel tools and libraries.

Home Page: https://sourceforge.net/projects/gobo-eiffel/

License: Other

XSLT 0.70% Eiffel 79.53% Shell 0.02% C 6.32% Lex 0.42% Batchfile 0.01% Yacc 0.67% PostScript 0.43% HTML 11.64% CSS 0.01% Common Lisp 0.05% PowerShell 0.07% C++ 0.12%
gobo-eiffel eiffel-compilers eiffel-community

gobo's Introduction

GitHub Actions GitLab CI/CD Azure Pipelines

Gobo Eiffel Project

One of the main concerns of the Gobo Eiffel Project is to provide the Eiffel community with Eiffel tools and libraries that are free and portable across various Eiffel compilers available on the market. That way, you can still use your favorite Eiffel compiler while taking advantage of the goodies included in Gobo Eiffel.

The software included in this package is copyrighted freeware distributed under the terms and conditions of the MIT License as specified in file License.txt. Gobo Eiffel is a multi-developer open-source project whose development is hosted at Github while the official site (for stable releases) is located at gobosoft.com. This package also contains files from the Boehm GC project which is also released under a MIT-style license.

Gobo Eiffel already consists of seventeen Eiffel libraries:

  • Gobo Eiffel Argument Library
  • Gobo Eiffel Kernel Library
  • Gobo Eiffel Lexical Library
  • Gobo Eiffel Math Library
  • Gobo Eiffel Parse Library
  • Gobo Eiffel Pattern Library
  • Gobo Eiffel Regexp Library
  • Gobo Eiffel String Library
  • Gobo Eiffel Structure Library
  • Gobo Eiffel Test Library
  • Gobo Eiffel Thread Library
  • Gobo Eiffel Time Library
  • Gobo Eiffel Tools Library
  • Gobo Eiffel Utility Library
  • Gobo Eiffel XML Library
  • Gobo Eiffel XPath Library
  • Gobo Eiffel XSLT Library

and twelve utilities:

  • Gobo Eiffel Ant (geant)
  • Gobo Eiffel Compiler (gec)
  • Gobo Eiffel C Compilation (gecc)
  • Gobo Eiffel Cop (gecop)
  • Gobo Eiffel Doc (gedoc)
  • Gobo Eiffel Image (geimage)
  • Gobo Eiffel Lex (gelex)
  • Gobo Eiffel Lint (gelint)
  • Gobo Eiffel Preprocessor (gepp)
  • Gobo Eiffel Test (getest)
  • Gobo Eiffel XSLT Processor (gexslt)
  • Gobo Eiffel Yacc (geyacc)

Note that these utilities are not needed if you just want to use the library classes provided in this package.

Eiffel compilers

The supported Eiffel compilers, in alphabetical order, are:

  • Gobo Eiffel Compiler (gec) 21.01.09.4
  • ISE Eiffel 21.11.10.6046 (Classic and .NET)

For more details about the supported Eiffel compilers, please see the file Release_notes.md. This software might work with other Eiffel compilers and/or other compiler versions, however no test has been made yet. To have a better understanding of the way this software has been designed and implemented, you can also have a look at portability issues.

Platforms

The software provided in this distribution should work on any platform where supported Eiffel compilers are available. However this software has only been tested under Windows 10 and Linux. Since most Eiffel compilers use the notation $NAME for environment variables in their ECF files (or equivalent), this convention has been used instead of the Windowish %NAME%. Likewise, the directory separator used throughout this distribution is /, following Unix/Linux convention instead of the Windows \ separator.

To install this package, please follow the instructions below:

Under Windows

  • Download the package gobo*-src.7z, or check-out the files from the Git repository.

  • Copy the files to a directory of your choice on your disk and set the environment variable %GOBO% to that directory, known as the distribution directory. Also put the directory %GOBO%\bin in your PATH.

  • To build the tools (e.g. gec, geyacc, ...), execute the script:

      %GOBO%\bin\install.bat <c_compiler>
    

    where <c_compiler> is a C compiler installed on your computer (for example use msc for Microsoft C compiler).

Under Unix/Linux

  • Download the package gobo*-src.tar.gz, or check-out the files from the Git repository.

  • Copy the files to a directory of your choice on your disk and set the environment variable $GOBO to that directory, known as the distribution directory. Also put the directory $GOBO/bin in your PATH.

  • To build the tools (e.g. gec, geyacc, ...), execute the script:

      $GOBO/bin/install.sh <c_compiler>
    

    where <c_compiler> is a C compiler installed on your computer (for example use gcc for GNU C compiler).

Feedback

A list of the known defects along with eventual bug fixes or workarounds is available in the issue tracker on GitHub (an older bug tracker is available on SourceForge). If you find a bug which does not appear in this list yet, please report it. We will try to provide a bug fix as soon as possible (usually within one or two days).

There is a mailing list (hosted at SourceForge) for discussions about the features under development in the Git repository on GitHub. You can subscribe and take part to the discussions or ask your questions there.

Although the license allows you to do pretty much whatever you want with this software, we would be grateful to get your feedback, bug reports and/or bug fixes, improvements, etc. so that others could benefit from your work and ideas as well. We would also be interested in hearing about your projects and how easy (or difficult) it was to adapt this software for your specific needs. Thank you in advance.

You are also welcome to take part in the development of the Gobo Eiffel Project. Some developer guidelines are available to help you make the first steps.

Authors

Copyright (c) 1997-2024, Eric Bezault and others

gobo's People

Contributors

berenddeboer avatar chayward avatar ebezault avatar igneus avatar kwaxer avatar pgcrism avatar schoelle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gobo's Issues

[QUESTION] Dashboard

The TODO list published on gobosoft.com is outdated since a long while.
I'm wondering if would be possible to create tickets of future developments and improvements, by using github labels ?

Documentation sucks

A bunch of htmls but there is no index.html. Don't know where to start reading at all. And after reading all of these htmls of geant, I still have no idea how to have/write my system.ecf!

#61

is it possible to support: **** language not recognized: C Macro use <ev_gtk.h>

         I don't know if it can compile everything in EiffelVision2, but I have an application which uses some parts of it and I managed to compile and run it under Windows. I can see that you are under Linux (I guess). I never tried to compile an application using EiffelVision2 on this platform.

Originally posted by @ebezault in #70 (comment)

I tried

/Eiffel_23.09/examples/docking/simple$ gec docking_simple.ecf 
Degree 6: 0/0/0 0:0:0.112
Degree 5: 0/0/0 0:0:0.473
Degree 4: 0/0/0 0:0:0.449
Degree 3: 0/0/0 0:0:0.226

....

Degree -2: 0/0/0 0:0:2.149
**** language not recognized: C [macro <ev_gtk.h>] | "eif_argv.h"
[GIAAA] internal error.
----
**** language not recognized: C Macro use <ev_gtk.h>
Degree -3: 0/0/0 0:0:1.164
Total Time: 0/0/0 0:0:4.576

I'm wondering if it possible to support: **** language not recognized: C Macro use <ev_gtk.h>

So I can compile this project?

Thanks.

Old code does not compile anymore

We used to have a lot of code using internal cursor to navigate XM_NODEs. With the latest version of gobo it does not work as those were removed. Is this expected?

By the way, on github we cannot see the history of files after the move, we only see the commit pertaining the move.

/Eiffel_23.09/library/cURL/spec/include/eiffel_curl.h:18:10: fatal error: eif_eiffel.h: No such file or directory

I'm building:

/Eiffel_23.09/examples/cURL/sftp$ gec ./sftp.ecf
Degree 6: 0/0/0 0:0:0.020
Degree 5: 0/0/0 0:0:0.151
Degree 4: 0/0/0 0:0:0.066
Degree 3: 0/0/0 0:0:0.099
Degree -2: 0/0/0 0:0:0.095
Degree -3: 0/0/0 0:0:0.071
In file included from sftp.h:7043,
                 from sftp1.c:1:
/Eiffel_23.09/library/cURL/spec/include/eiffel_curl.h:18:10: fatal error: eif_eiffel.h: No such file or directory
   18 | #include "eif_eiffel.h"
      |          ^~~~~~~~~~~~~~
compilation terminated.
Degree -4: 0/0/0 0:0:1
Total Time: 0/0/0 0:0:1.504

Any flag I need to pass in?

Bootstrap of gexslt fails with mingw

Hi,

Running a bootstrap as shown below, it seems to have built most of the tools but there's an error when building gexslt.

A file called bin\compile_ise.ecf appears to have been generated, containing this line which I think is the cause of the error:

    <external_include location="some123/fake432/path567 -Od"/>

This seems to be generated by an option in src\gexslt\system.xace. I tried again, without this option. This ran successfully through to completion.

Peter

C:\Builds\openEHR\gobo\work\bootstrap>bootstrap.bat -v mingw ise

...

[ise] cd EIFGENs\gexslt\F_code
[ise] finish_freezing -silent
Eiffel C/C++ Compilation Tool - Version: 7.3
Copyright Eiffel Software 1996-2012. All Rights Reserved.

Preparing C compilation...
"C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/msys/1.0/bin/cp" "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/studio/config/windows
/templates/emain.template" "E1/emain.c"
"C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/studio/spec/windows/bin/x2c.exe" E1/estructure.x E1/estructure.h
cd E1 && if [ ! -f finished ] ; then "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/msys/1.0/bin/make.exe" emain.o ; fi && cd ..
"C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/studio/spec/windows/bin/x2c.exe" E1/eoffsets.x E1/eoffsets.h
make.exe[1]: Entering directory /c/Builds/openEHR/gobo/bin/EIFGENs/gexslt/F_code/E1' "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/mingw/bin/gcc" -O2 -pipe -imacros eif_config.mingw.h -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D _UNICODE -DUNICODE -DEIF_IEEE_BEHAVIOR -I"C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/studio/spec/windows/include" -I. -I"some123/fake432/path567" - Od -c emain.c cc1.exe: error: invalid option argument '-Od' if [ ! -f ../../../gexslt.rc ] ; then "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/msys/1.0/bin/cp" "C:\Program Files\Eiffel Software\Eiff elStudio 7.3 GPL/studio/config/windows/mingw/eiffel.rc" ../../../gexslt.rc ; fi cd E4 && if [ ! -f finished ] ; then "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/msys/1.0/bin/make.exe" Eobj4.o ; fi && cd .. make.exe[1]: *** [emain.o] Error 1 make.exe[1]: Leaving directory/c/Builds/openEHR/gobo/bin/EIFGENs/gexslt/F_code/E1'
make.exe": *** [E1/emain.o] Error 2
make.exe": *** Waiting for unfinished jobs....
make.exe[1]: Entering directory /c/Builds/openEHR/gobo/bin/EIFGENs/gexslt/F_code/E4' "C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/gcc/windows/mingw/bin/gcc" -O2 -pipe -imacros eif_config.mingw.h -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D _UNICODE -DUNICODE -DEIF_IEEE_BEHAVIOR -I"C:\Program Files\Eiffel Software\EiffelStudio 7.3 GPL/studio/spec/windows/include" -I. -I"some123/fake432/path567" - Od -c big_file_E4_c.c cc1.exe: error: invalid option argument '-Od' make.exe[1]: *** [big_file_E4_c.o] Error 1 make.exe[1]: Leaving directory/c/Builds/openEHR/gobo/bin/EIFGENs/gexslt/F_code/E4'
make.exe": *** [E4/Eobj4.o] Error 2

BUILD FAILED!

Another unsupported compiler

Different from the previous: #58

It's Pelles C. See: http://www.smorgasbordet.com/pellesc/

There used to be a request to support Pelles C, but closed: #54

Pelles C is very similar to MSVC. But it's much smaller. So more suitable for people doesn't have plenty of disk space to install MSVC. The generated binaries are still fast, comparable to MSVC.

It seems these bootstrap source files are for MSVC in mind. Even though Pelles C is so similar to MSVC, still not work out of the box.

@ebezault Please support Pelles C.

Postcondition violation in {DS_HASH_TABLE}.search

Hi,

After setting the key equality tester of a DS_HASH_TABLE, a call to `search'
will throw a postcondition violation:

found_set: found = has (k)

When digging a but futher, I can see that the postcondition of
{DS_SPARSE_CONTAINER}.search_position is also violated:

slots_position_set: slots_position = hash_position (k)

I don't know how to fix this bug, but I've pushed a branch with a test case to reproduce it:
https://github.com/oligot/gobo/tree/bug-ds
Here is the appropriate commit:
oligot@ca7b465

To reproduce:

  • cd into $GOBO/test/structure
  • run geant test_debug
  • backtrace:
Testing xstructure...
Preparing Test Cases
Compiling Test Cases
Running Test Cases

Test Summary for xstructure

# Passed:     202 tests
# Failed:     0 test
# ABORTED:    2 tests
# Total:      204 tests (1678 assertions)

Test Results:
ABORT:  [DS_TEST_HASH_TABLE.test_reentrant_search_position] Eiffel exception
-------------------------------------------------------------------------------
Class / Object      Routine                Nature of exception           Effect
-------------------------------------------------------------------------------
DS_HASH_TABLE       search @3              found_set:                   
<00007FD767489478>  (From DS_SPARSE_TABLE) Postcondition violated.       Fail
-------------------------------------------------------------------------------
DS_HASH_TABLE       search @3                                           
<00007FD767489478>  (From DS_SPARSE_TABLE) Routine failure.              Fail
-------------------------------------------------------------------------------
DS_TEST_HASH_TABLE  test_reentrant_search_position @7
<00007FD7674418F8>                         Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           fast_call                                           
<00007FD767441978>                         Routine failure.              Fail
-------------------------------------------------------------------------------
PROCEDURE           call @5                                             
<00007FD767441978>                         Routine failure.              Fail
-------------------------------------------------------------------------------
DS_TEST_HASH_TABLE  execute_without_rescue @4
<00007FD7674418F8>  (From TS_TEST_CASE)    Routine failure.              Fail
-------------------------------------------------------------------------------
DS_TEST_HASH_TABLE  execute_with_rescue @3                              
<00007FD7674418F8>  (From TS_TEST_CASE)    Routine failure.              Fail
-------------------------------------------------------------------------------
DS_TEST_HASH_TABLE  execute @10                                         
<00007FD7674418F8>  (From TS_TEST_CASE)    Routine failure.              Fail
-------------------------------------------------------------------------------
TS_TEST_SUITE       execute @5                                          
<00007FD76743B948>                         Routine failure.              Fail
-------------------------------------------------------------------------------
XSTRUCTURE          execute_with_summary @44
<00007FD767439558>  (From TS_TESTER)       Routine failure.              Fail
-------------------------------------------------------------------------------
XSTRUCTURE          execute_with_output @10
<00007FD767439558>  (From TS_TESTER)       Routine failure.              Fail
-------------------------------------------------------------------------------
XSTRUCTURE          execute @9                                          
<00007FD767439558>  (From TS_TESTER)       Routine failure.              Fail
-------------------------------------------------------------------------------
XSTRUCTURE          make @5                                             
<00007FD767439558>  (From TS_TESTER)       Routine failure.              Fail
-------------------------------------------------------------------------------
XSTRUCTURE          root's creation                                     
<00007FD767439558>                         Routine failure.              Exit
-------------------------------------------------------------------------------

Bug in class YY_COMPRESSED_SCANNER_SKELETON

Just i've learned how to use send issues and pull requests to the GOBO list and immediately comes my first bug message.

Class YY_COMPRESSED_SCANNER_SKELETON calls in line 191 procedure KL_SPECIAL_ROUTINES.force (there are more such calls). The feature name is a bit misleading since the routine does not resize the array if the capacity is exhausted. In class YY_COMPRESSED_SCANNER_SKELETON the a array is not resized either, so it may happen, depending on grammar and text, that a call to force will overwrite the data following the array in memory. And it does happen!

Today, I had the case that the array in question (after calling force) had count=6, capacity=3 for index =5. The type ident =137 of the object following the array was overwritten by 423, a not existing type number. The program soon crashed.

After adding (in my own copy of GOBO) a resize statement before line 191 the crash disappeared and all things were fine, but I fear that there are many more dangerous calls of force.

With regards
Wolfgang

%R into last cell of read_file

Screenshot_20190704_165858
Screenshot_20190704_170136

is it the expected behaviour to have a "%R" @ the end of a csv row (DS_ARRAYED_LIST [STRING_8]) ??? if yes what is the reason? or is it designed for crlf instead of cr only...

Seems there is something I wasn't expecting here do you?

in fact, why is there the line 182 into UT_CSV_HANDLER
removing this line and removing 1 from l_cell.count it works as I expect it to

elseif c = '%N' then
    if has_quote then
        l_cell.append_character (c) -- This line, why append a the %N character into last cell? When removed
    else
	l_cells.force_last (l_cell.substring (1, l_cell.count - 1)) --- and here -1
	STRING_.wipe_out (l_cell)
	a_action.call ([l_cells])
	l_cells.wipe_out

See the attached file in case its a csv, but changed extension as txt as github doesn't support attacheme
20190330_30-45-11-A9-32-70_192.168.0.70_inverter_data.py.csv.txt
nt of csv

Environment problem when running geant1.eant example

I'm running through the geant documentation and having a problem with OSX 10.15.7. When I run the geant1.eant example it doesn't seem to be setting the global variable "who" in the ../variables/variables5.eant build file.

As you can see the last echo is "hello ${who}" when it should be "hello bart" according to the documentation.

[gobo]$ cd ./tool/geant/example/geant

[geant]$ ls
geant1.eant	geant2.eant	geant3.eant	print.eant

[geant]$ geant -v -b geant1.eant
Loading Project's configuration from geant1.eant
Building Project

geant.one:

  [set global] who=Bart
  [set global] buildfile=../variables/variables5.eant
  [echo]
------------------------
  [echo]
before call of ../variables/variables5.eant
  [geant] geant -v -b ../variables/variables5.eant var
Loading Project's configuration from ../variables/variables5.eant
Building Project

variables5.var:

  [echo]
Hello ${who}
  [echo]
after call of ../variables/variables5.eant
  [echo]
-------
  [echo]
before call of ../variables/variables5.eant
  [geant] geant -v -b ../variables/variables5.eant var
Loading Project's configuration from ../variables/variables5.eant
Building Project

variables5.var:

  [echo]
Hello ${who}
  [echo]
after call of ../variables/variables5.eant

Here is the output with debugging.

[geant]$ geant -v -d -b geant1.eant
Loading Project's configuration from geant1.eant
Project 'geant': loading 1 immediate targets.
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'geant': loading target `one'
Building Project
pushing target: one
project 'geant': executing target `geant.one'

geant.one:

  [set global] who=Bart
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [set global] buildfile=../variables/variables5.eant
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
------------------------
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
before call of ../variables/variables5.eant
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [*geant] execute_forked_with_filename_and_target: '../variables/variables5.eant', 'var'
  [*geant] no variable 'geant.geant.level' found
  [geant] geant.geant.level=#
  [geant] geant -v -d -Dgeant.geant.level=# -b ../variables/variables5.eant var
Loading Project's configuration from ../variables/variables5.eant
Project 'variables5': loading 3 immediate targets.
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `var'
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `setenv'
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `cwd'
Building Project
pushing target: var
project 'variables5': executing target `variables5.var'

variables5.var:

  [echo]
Hello ${who}
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
after call of ../variables/variables5.eant
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
-------
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
before call of ../variables/variables5.eant
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [*geant] execute_forked_with_filename_and_target: '../variables/variables5.eant', 'var'
  [geant] geant.geant.level=##
  [geant] geant -v -d -Dgeant.geant.level=## -b ../variables/variables5.eant var
Loading Project's configuration from ../variables/variables5.eant
Project 'variables5': loading 3 immediate targets.
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `var'
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `setenv'
  [*GEANT_INTERPRETING_ELEMENT] project.position_table is Void
Project 'variables5': loading target `cwd'
Building Project
pushing target: var
project 'variables5': executing target `variables5.var'

variables5.var:

  [echo]
Hello ${who}
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'
  [echo]
after call of ../variables/variables5.eant
changing to directory: '/Users/tjohnson/gobo/tool/geant/example/geant'

[REFACTORING] Split gobo in 2 projects

Dear Gobo team,

Gobo contains generic clusters and tools in the same projet. I think it would be interesting to split gobo in two distinct projects :

  • gobo-clusters: contains libraries (Argument, Time ...) ;
  • gobo-devkit: contains eiffel tools (gec, geyacc ...)

I'll fork the project to test the feasibility of this ticket

YY_UNICODE_BUFFER does not handle non-ASCII strings

If there are non-ASCII characters when initializing YY_UNICODE_BUFFER by calling make_from_utf8_string, the buffer ends up with extraneous null characters at the end that can be seen as incorrectly set count. Indeed, the count is taken from the original string that is longer than the corresponding Unicode version. When using such a buffer in a scanner, the latter reports an unknown token because it attempts to read and interpret the extraneous null characters as if they were present in the source string.

My temporary solution is to add the following assignments at the end of the compound of make_from_utf8_string:

			count := nb

I did not check whether this is an absolutely correct fix, but it worked for me. Also, there could be other places where count is set incorrectly when filling the buffer with UTF-encoded data.

Implicit variable pointer generate unvalid C code

Please find attached a snippet when I try to send a C pointer of an Eiffel string without using an intermediate variable pointer :

compile_string (content: STRING)
                require
                        a_not_empty_content: not content.is_empty
                local
                        l_exception: WR_TCC_EXCEPTION
                        l_code: INTEGER
                        l_value: ANY
                do
                        l_value := content.to_c
                        l_code := tcc_compile_string (context, $(content.to_c)) -- << Bug without Eiffel error/warning
                        -- l_code := tcc_compile_string (context, $l_value)
                        if l_code < 0 then
                                create l_exception.make (l_code)
                                l_exception.raise
                        end
        end

My favourite C compiler returns me :

error: request for member ‘a1’ in something not a structure or union
  t1 = ((0).a1);

Trouble with utime.h and BCC

On modern version of BCC (BCC102 to be clear), there is still no <sys/utime.h> but one has to use <utime.h>. The check for old version of BCC on gec9.c should be removed as it's true for any versions of BCC.

Create a develop branch

When we push requests on GOBO tools, we need to update C source code generated. This is a huge diff process for Git.

It will be interesting to update the C source code bootstrap on master branch when all development commits are validated ?

How to have/write system.ecf?

On this document (http://www.gobosoft.com/eiffel/gobo/geant/introduction.html) said:

The following script covers 90% of the cases people use geant for. It inherits the Gobo default tasks and only adds project specific info:

...

This script assumes you have a system.ecf in your system_dir.

The problem is, I don't have a system.ecf. How could I have one? Write manually? Or doing everything on Eiffel Studio, copy the ecf then compile with Gobo? Why it need to be that complicated? Why not simple as gcc test.c -o test or at least a simple makefile? I only want to compile my code to know if it's able to compile or not.

The whole Eiffel language and it ecosystem is the best example of how overengineering and overcomplicated means. I'm not fan of XML. I used to think the XML of Java is the worst. It turned out to be wrong. I should know with all of these XML, XML ontop of XML (ecf is XML and geant is also XML), it must be sucked real hard. I'm a hobbyist only want to learn the language. This is a showstopper. Goodbye.

Trouble with eif_file_mkstemp

This very function caused so much troubles for me. I'm trying to compile with BCC. _O_EXCL is defined in <fcntl.h> and _SH_DENYRW is defined in <share.h> and all of these headers are included (see line 2244 in gec9.c). For unknown reasons, the compiler always failed with error about _O_EXCL and _SH_DENYRW are undefined. I even used dirty hack by putting these lines just before the declaration of eif_file_mkstemp but it still failed with the same error.

#include <share.h>
#include <fcntl.h>

Please help @ebezault

[GEANT] Allow relative parent location

I try to load a parent configuration file relative to the same current configuration folder, without success:

Please find attached a diff patch that reproduce the issue.
To test it, launch the bootstrap process.

--- a/misc/eiffel.eant
+++ b/misc/eiffel.eant
@@ -11,7 +11,7 @@
        </description>

        <inherit>
-               <parent location="${GOBO}/misc/ge2e.eant"/>
+               <parent location="ge2e.eant"/>
        </inherit>

Mac regex

Any idea why the following regex with

needle: ^[0-9]{8}_([:alnum:]{2}[-:][:alnum:]{2}[-:][:alnum:]{2}[-:][:alnum:]{2}[-:][:alnum:]{2}[-:][:alnum:]{2})_.*

haystack: 20190818_30-45-11-B4-EF-5D_192.168.0.96_inverter_data.py.csv.bz2

code: `

                        l_reg: RX_PCRE_REGULAR_EXPRESSION

			create l_reg.make
			l_reg.compile (needle)
			check l_reg.is_compiled then
				l_reg.match (haystack)
				check l_reg.match_count >= 1 then
					Result := l_reg.captured_substring (1)
				end
			end

`

doesn't give a match_count -> captured_string(1) for the mac address??

Use _stat instead of _stat64i32

There is no _stat64i32 on BCC. From the document on MSDN it seems _stat and _stat64i32 are identical. This is still in gec9.c, it's one of the most troubled C source I have ever tried to compile.

How to set the make jobs used by `geant`?

GNU Make and Ninja both has the -j switch to specify the make jobs to be used. I can't find anything equivalent for geant. It seems it will always set the make jobs equals to the number of CPU cores. I think the make jobs should be customizable. I'm building on a VPS where there are 4 cores but only 4GB of RAM. I always got OOM with GCC (and this always happened at the building of gexslt).

An issue with operator precedence and associativity

There seems to be an issue with associativity of an operator when the context-dependent precedence is used. I’ll use the calculator example from …/parse/example/calc. The original specifications for the operator associativity and for the expression look like

%left '-' '+'
%left '*' '/'
%left NEG
%right '^'
exp: NUM
    | exp '+' exp
    | exp '-' exp
    | exp '*' exp
    | exp '/' exp
    | '-' exp %prec NEG
    | '(' exp ')'
    ;

The calculator built with these rules produces the expected value -4 for the expression 1-2-3.

My (mis)understanding is that the specification can be changed into an equivalent one by replacing the artificial terminal symbol NEG with a real one ‘-’ and specifying the precedence of the binary version of it equal to that of ‘+’:

%left '+'
%left '*' '/'
%left '-'
%right '^'
exp: NUM
    | exp '+' exp
    | exp '-' exp %prec '+'
    | exp '*' exp
    | exp '/' exp
    | '-' exp
    | '(' exp ')'
    ;

The calculator built with these rules produces 2 for the expression 1-2-3, i.e. somehow it applies right associativity instead of the left one. Note that both ‘+’ and ‘-’ are declared as left-associative.

My expectation was that using %prec would either affect only precedence (using the newly requested one) or both precedence and associativity (taking them both from the "anchor"). But neither of these expectations turned out to be true. Is such behavior expected?

I'm trying to use an unsupported compiler

It's another endeavor, don't confuse with the previous endeavor with BCC of me.

Here is this compiler: https://github.com/LADSoft/OrangeC

I have created occ.cfg and modified bootstrap.bat to add occ. I could run bootstrapping but it failed with exactly the same error like with BCC: #56

I think creating occ.cfg and modifying bootstrap.bat are not enough, it needs you to add support for it to gec itself @ebezault

Please help.

Cannot bootstrap in Linux

Hi,
I just cloned the current master and get errors which I try to bootstrap:

/home/schoelle/Code/gobo/work/bootstrap/gec18.c:27355:8: warning: return type defaults to ‘int’ [-Wimplicit-int] static GE_init_exception_trace_buffer(GE_exception_trace_buffer\* a_trace) ^ /home/schoelle/Code/gobo/work/bootstrap/gec18.c:27369:8: warning: return type defaults to ‘int’ [-Wimplicit-int] static GE_append_to_exception_trace_buffer(GE_exception_trace_buffer\* a_trace, char\* a_string) ^ /home/schoelle/Code/gobo/work/bootstrap/gec18.c:27396:8: warning: return type defaults to ‘int’ [-Wimplicit-int] static GE_wipe_out_exception_trace_buffer(GE_exception_trace_buffer\* a_trace) ^ /home/schoelle/Code/gobo/work/bootstrap/gec18.c: In function ‘GE_jump_to_last_rescue’: /home/schoelle/Code/gobo/work/bootstrap/gec18.c:27731:4: warning: format not a string literal and no format arguments [-Wformat-security] fprintf(stderr, l_exception_trace); ^ /home/schoelle/Code/gobo/work/bootstrap/gec18.c: In function ‘GE_raise_exception’: /home/schoelle/Code/gobo/work/bootstrap/gec18.c:27825:4: warning: format not a string literal and no format arguments [-Wformat-security] fprintf(stderr, l_trace); ^ /home/schoelle/Code/gobo/work/bootstrap/gec18.c: At top level: /home/schoelle/Code/gobo/work/bootstrap/gec18.c:31629:22: fatal error: winerror.h: No such file or directory compilation terminated.

I went back to 5560840 and bootstrapping works fine. Looks like the current checked in C code will not compile on GCC.

Which norm of regexp is follow this library?

Hi,

Which regexp norm is RX_PCRE_REGULAR_EXPRESSION following?

As there are many implementations of regexp, I'm looking for a reference for this lib.

sorry if you mentioned it and I didn't find it, the first place I'd look for is on the RX_PCRE_REGULAR_EXPRESSION class comment.

gec compiler bug: type '[detachable] STRING_8' of actual argument #1 does not conform to type '[attached] UC_STRING' of formal argument in feature `is_equal' in class '[detachable] UC_STRING'

Why I cannot make this is_equal call compile?

query := a_class.queries.item(i)
if query.is_attribute and query.first_precursor /= Void then
    if attached query.first_precursor as l_first_precursor then
        if attached l_first_precursor.lower_name as l_lower_name then
             if not query.lower_name.is_equal(l_lower_name) then
              ...


[CATCALL] class [detachable] GEDOC_FIELD_RENAME_FORMAT (142,17): type '[detachable] STRING_8' of actual argument #1 does not conform to type '[attached] UC_STRING' of formal argument in feature `is_equal' in class '[detachable] UC_STRING'
[CATCALL] class [detachable] GEDOC_FIELD_RENAME_FORMAT (142,17): type '[detachable] STRING_8' of actual argument #1 does not conform to type '[attached] UC_UTF8_STRING' of formal argument in feature `is_equal' in class '[detachable] UC_UTF8_STRING'
[CATCALL] class [detachable] GEDOC_FIELD_RENAME_FORMAT (142,17): type '[detachable] UC_STRING' of actual argument #1 does not conform to type '[attached] UC_UTF8_STRING' of formal argument in feature `is_equal' in class '[detachable] UC_UTF8_STRING'

I checked the Void, and if attached ..., why it's still complaining?

[PROPOSAL] Gobo Eiffel Interpreter

I would discuss about the ability to add a Eiffel interpreter to Gobo Project and how it would be possible to implement it, by using libJIT library for example.
This project can be reused by getest, by removing the C generation & compilation processes.

DS_ARRAYED_LIST: valid_index

Ran into an issue with valid_index precondition using a DS_ARRAYED_LIST. It seems that the valid_index in inherited from DS_LIST and not implemented again. So my question has 2 wings:

  1. Is there a reason not to add a valid_index precondition to at alias "@", item (i: INTEGER): G
  2. Is there any reason not to implement

FROM DS_LIST

	valid_index (i: INTEGER): BOOLEAN
		-- Is `i' a valid index value?
	do
		Result := 0 <= i and i <= (count + 1)
	ensure
		definition: Result = (0 <= i and i <= (count + 1))
	end

SUGGESTED

inherit
        DS_LIST
            redefine
                valid_index
            end

    valid_index (i: INTEGER): BOOLEAN
            -- Is `i' a valid index value?
        do
            Result := storage.valid_index (i)
        ensure
            definition: storage.valid_index (i)
        end

at alias "@", item (i: INTEGER): G
		-- Item at index `i'
		-- (Performance: O(1).)
            require
                    valid_index: storage.valid_index (i - 1)
	do
		Result := storage.item (i - 1)
	end

I use it with content: DS_ARRAYED_LIST. content.valid_index(0) returns True as it shouldn't

Screenshot_20191125_082550

Mailing list address

The README references Yahoo Groups as a mailing list for the project. But they were terminated some time ago (no idea if there are any archives). It would be great to update the README with the links that still work, e.g. to Sourceforge, or remove the mention of user lists altogether.

build failure: undeclared function 'T238f30e1'

In this branch:

https://github.com/joortcom/gobo/tree/detect_diamond

/gobo/tool/gedoc$ make gobo 
gec --gc=no --capability=concurrency=none   src/system.ecf
Degree 6: 0/0/0 0:0:0.333
Degree 5: 0/0/0 0:0:0.922
Degree 4: 0/0/0 0:0:0.265
Degree 3: 0/0/0 0:0:0.260
Degree -2: 0/0/0 0:0:1.908
Degree -3: 0/0/0 0:0:2.182
gedoc7.c:99214:10: error: call to undeclared function 'T238f30e1'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
 99214 |                                 t5 = T238f30e1(ac, l12, a1);
       |                                      ^
1 error generated.
Degree -4: 0/0/0 0:0:9.689
Total Time: 0/0/0 0:0:15.560
make: *** [Makefile:13: gobo] Error 1

/gobo/tool/gedoc$ grep -rwI T238f30e1 *
gedoc7.c:				t5 = T238f30e1(ac, l12, a1);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.