Tidak Ada Deskripsi

Jeremiah Orians 78ae3c569a Putting the hack back in for now 4 tahun lalu
functions 2b4262f538 Mescc compilability: fix escape sequences 4 tahun lalu
include 99842b1210 Incorporate janneke's mes library 4 tahun lalu
lib 00dc151b55 Converted mes-m2 from array to struct based addressing 5 tahun lalu
mes d69d36169c Work around one more quasiquote bug 4 tahun lalu
module 62e2ebcef9 Implement setenv in Scheme 4 tahun lalu
scaffold 83eba13500 scaffold: Add exit-42.c. 4 tahun lalu
scripts 953d4106fb Import minimal (./configure hardcoded) mescc (needs Nyacc). 6 tahun lalu
test 1cc6aceea1 Removed failing tests 4 tahun lalu
.dir-locals.el 77cb2d53f3 .dir-locals.el: set k&r (?) style. 6 tahun lalu
.gitignore 4afe8eeebe Imported mescc tests 5 tahun lalu
LICENSE 55b619475c Initial commit 6 tahun lalu
README.md 2650b6434a README update 4 tahun lalu
gcc_req.h c81d2320e3 Mescc compilability: Make function pointers work 4 tahun lalu
kaem.run 7f5bfe5dbc Provide escape for broken macro expansion 4 tahun lalu
makefile 480e6c4ffc Add support for nested macro expansions 4 tahun lalu
mes.c 7f5bfe5dbc Provide escape for broken macro expansion 4 tahun lalu
mes.h 0d3eb68f8a Make fuzzing less dangerous 4 tahun lalu
mes_builtins.c 0d3eb68f8a Make fuzzing less dangerous 4 tahun lalu
mes_cell.c 78ae3c569a Putting the hack back in for now 4 tahun lalu
mes_eval.c fed23483f5 Clearing out more segfaults 4 tahun lalu
mes_init.c ed0365f402 Make mes-m2 append behave more like guile's 4 tahun lalu
mes_keyword.c 608c699485 Added initial support for keywords 5 tahun lalu
mes_list.c ed0365f402 Make mes-m2 append behave more like guile's 4 tahun lalu
mes_macro.c fed23483f5 Clearing out more segfaults 4 tahun lalu
mes_posix.c 0d3eb68f8a Make fuzzing less dangerous 4 tahun lalu
mes_print.c b43d9f5694 Imported all of the Ur-Scheme tests 5 tahun lalu
mes_read.c 3b8f00ff8f Fix nested set! bug and matching one found in quasiquote and fix #\; #\( and #\) 5 tahun lalu
mes_record.c fa1011d76a Added support for nul in strings 5 tahun lalu
mes_string.c ed0365f402 Make mes-m2 append behave more like guile's 4 tahun lalu
mes_tokenize.c ed0365f402 Make mes-m2 append behave more like guile's 4 tahun lalu
mes_vector.c 2d0cf3871c Make mes-m2 tail-call form 5 tahun lalu

README.md

mes-m2

Making Mes.c M2-Planet friendly

Goal

The goal of this project is to create a re-implementation of GNU Mes, which can be compiled by M2-Planet and extends the feature set of GNU mes to provide a replacement guile to be used for the bootstrap.

The goal of this project is not to provide a minimally-adapted GNU Mes which can be compiled by M2-Planet and is able to compile the real GNU Mes (and thereby run mescc). If you are interested in this project, have a look at the wip-m2 branch in Savannah's GNU Mes repository. That branch is work in progress and can get rebased without further notice.

Status

At the moment, the project is quite far away from its goal.

It is possible to load a minimal Scheme environment and REPL by running

$ make
$ bin/m2
````

Which can be used to test the Scheme implementation (you will most likely run into bugs when doing so).

Tests can be run by `make test` and the M2-Planet build can be tested via `kaem --verbose --strict`.
Note that this only works when you are on amd64 architecture, and mescc-tools are in your `$PATH`.
If you are e.g. on x86, you can use the scripts from the [mescc-tools-seed](../mescc-tools-seed) repo to build mes-m2 with M2-Planet.

MesCC from the original GNU Mes project is also able to compile mes-m2.

The "original" Mes scheme environment is available if you set `MES_PREFIX=mes`:

```ShellSession
$ MES_DEBUG=100 MES_PREFIX=mes bin/m2

It is able to load modules, and will auto-load many modules (which you see loading when MES_DEBUG is set), but will eventually end with either a segfault or an undefined symbol. (Currently it ends with an undefined symbol).

Note that the macro implementation and quasiquote expansion is known to be buggy, so an undefined symbol does not necessarily mean an error in the Scheme code. If you take a look at the file and the code looks just fine, probably check if you can create a minimal example that uses the same constructs and also shows the same behaviour. (Replacing quasiquotes by their "expanded form" may also help pinpoint the issue).

For really low-level debugging you can export MES_CORE=0 to interact with C primitive version only (and if you don't build with M2-Planet, you can debug with gdb/cgdb).

Once you got the full MES REPL working, you can try running mescc like this

$ MES_PREFIX=mes bin/mes-m2 -s scripts/mescc.scm -- -I include -S scaffold/exit-42.c -o foo.S

You can also compare the execution with guile's:

$guile --no-auto-compile -L module -e main scripts/mescc.scm -I include -S scaffold/exit-42.c -o foo.S

to compile using the MesCC and nyacc included here.