Go to file
Yuichi Nishiwaki 48f0ec9095 dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00
include dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00
README.md huge improvement of README 2014-09-14 18:44:33 +09:00
blob.c add bytevector procedure 2014-09-12 21:19:08 +09:00
bool.c first commit 2014-08-25 13:38:09 +09:00
boot.c remove include 2014-09-12 18:52:32 +09:00
char.c char comparators 2014-09-10 17:18:14 +09:00
codegen.c upgrade xvect.h 2014-09-14 01:08:37 +09:00
cont.c proc_new -> make_proc 2014-09-12 19:46:54 +09:00
data.c first commit 2014-08-25 13:38:09 +09:00
debug.c str_new -> make_str 2014-09-12 19:52:49 +09:00
dict.c dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00
error.c str_new -> make_str 2014-09-12 19:52:49 +09:00
eval.c flatten the library hierarchy (again) 2014-09-08 19:38:19 +09:00
file.c [bugfix] rename procedures 2014-09-08 19:47:50 +09:00
gc.c dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00
init.c unix and linux feature may coexist 2014-09-12 17:36:28 +09:00
lib.c remove debug print 2014-09-15 12:34:57 +09:00
load.c flatten the library hierarchy (again) 2014-09-08 19:38:19 +09:00
macro.c proc_new -> make_proc 2014-09-12 19:46:54 +09:00
number.c str_new -> make_str 2014-09-12 19:52:49 +09:00
pair.c move map/for-each to pair.c 2014-09-13 18:51:20 +09:00
port.c var_new -> make_var 2014-09-12 19:54:21 +09:00
proc.c dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00
read.c vec_new -> make_vec 2014-09-12 19:55:32 +09:00
record.c record_new -> make_record 2014-09-12 19:49:58 +09:00
state.c trie_new -> make_trie 2014-09-12 19:49:00 +09:00
string.c add string procedure 2014-09-12 20:23:58 +09:00
symbol.c str_new -> make_str 2014-09-12 19:52:49 +09:00
system.c str_new -> make_str 2014-09-12 19:52:49 +09:00
time.c flatten the library hierarchy (again) 2014-09-08 19:38:19 +09:00
var.c var_new -> make_var 2014-09-12 19:54:21 +09:00
vector.c add vector procedure 2014-09-12 20:55:34 +09:00
vm.c move debug prints in the VM 2014-09-14 22:59:29 +09:00
write.c dictionary is now a equal?-based hash table 2014-09-15 12:39:46 +09:00

README.md

Benz

Benz is a super tiny scheme interpreter intended to be embedded in other applications such as game engine and network server. It provides a subset language of R7RS with several useful extensions. By default, Benz just contains some C files and headers and this README file. In embedding, you only need to copy the files into the project and add include dir to the include path.

Originally, Benz used to be the core component of Picrin Scheme. They are currently maintained at separate repositories.

Example

#include <stdio.h>

#include "picrin.h"

/* Simple REPL program */

int
main(int argc, char *argv[])
{
  pic_state *pic;
  pic_value expr;

  pic = pic_open(argc, argv, NULL);

  pic_import_library(pic, pic->PICRIN_BASE);

  while (1) {
    printf("> ");

    expr = pic_read(pic, pic_stdin(pic));

    if (pic_eof_p(expr)) {
      break;
    }

    pic_printf(pic, "~s\n", pic_eval(pic, expr, pic->lib));
  }

  pic_close(pic);

  return 0;
}

Language

All procedures and syntaces are exported from a single library named (picrin base). The complete list is found at https://gist.github.com/wasabiz/344d802a2340d1f734b7 .

Authors

See https://github.com/picrin-scheme/benz and https://github.com/picrin-scheme/picrin for details.

LICENSE

Copyright (c) 2013-2014 Yuichi Nishiwaki and other picrin contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.