2024-01-04 11:33:25 +01:00
2024-01-03 19:06:13 +01:00
2024-01-03 23:38:48 +01:00
2024-01-04 11:33:25 +01:00
2024-01-04 11:33:25 +01:00
2024-01-04 00:59:24 +01:00
2023-12-26 22:47:16 +01:00
2024-01-03 14:27:32 +01:00
2024-01-03 13:55:46 +01:00
2024-01-04 00:41:53 +01:00

PSIL

a simple lisp interpreter

How to compile

Should be a regular cmake build, something like

cmake -B build -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=YES
cmake --build build  --parallel $(nproc)

should be enough (you can also change the build type for Release and disable sanitize in case it's too slow)

How to run tests

Unit tests (assuming build in build):

ctest --test-dir build --verbose --parallel $(nproc)

CLI tests (also assuming build in build and being in repo root):

PSIL="../build/src/psil" clitests/testall.sh

How to use

You can just run the executable and you'll be in REPL mode, or specify an input file like -f <file>, the effect is the same as if you had put it there yourself.

When reading from a file, REPL is still enabled by default and can be disabled with --repl-

Options

You can also change some of the behaviours of the interpreter:

--cell_limit:limit (for example --cell_limit:10000) - limit the amount of cells that can be used
--command_strs[+/-] (for example --command_strs+) - use string representation of commands, useful
                                                    for debugging the compiler with verbose logging
--default_log_level:level (for example --default_log_level:3) - change the default logging level
--repl[+/-] (for example --repl-) - enable/disable repl
Description
A simple lisp-like language interpreter
Readme 182 KiB
Languages
C++ 95.5%
CMake 3.2%
Shell 1%
Euphoria 0.2%
Elixir 0.1%