blob: af759b62865a1b69a889dfc80f5d32e1eebf8cd3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <stdlib.h>
#include <stdio.h>
#include <lcq/pit/utils.h>
#include <lcq/pit/lexer.h>
#include <lcq/pit/parser.h>
#include <lcq/pit/runtime.h>
#include <lcq/pit/library.h>
typedef char *mystr;
PIT_DECLARE_HASHTABLE(mystr, double)
int main(int argc, char **argv) {
i64 sz = 256 * 1024 * 1024;
u8 *buf = malloc((size_t) sz);
pit_runtime *rt = pit_runtime_new(buf, sz);
pit_install_library_essential(rt);
pit_install_library_io(rt);
pit_install_library_plist(rt);
pit_install_library_alist(rt);
pit_install_library_bytestring(rt);
if (argc < 2) {
pit_repl(rt);
} else {
pit_load_file(rt, argv[1]);
}
}
|