https://github.com/rxi/fe
A tiny, embeddable language implemented in ANSI C
https://github.com/rxi/fe
Last synced: 2 days ago
JSON representation
A tiny, embeddable language implemented in ANSI C
- Host: GitHub
- URL: https://github.com/rxi/fe
- Owner: rxi
- License: mit
- Created: 2019-04-09T18:51:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-04T01:56:15.000Z (over 2 years ago)
- Last Synced: 2026-10-15T01:09:17.228Z (7 days ago)
- Language: C
- Size: 20.5 KB
- Stars: 1,515
- Watchers: 26
- Forks: 101
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-c - rxi/fe - A tiny, embeddable language implemented in ANSI C (Language and Tooling / Compilers and Interpreters)
- awesome-programming-languages - Fe - A tiny, embeddable language implemented in ANSI C. (Uncategorized / Uncategorized)
- programming-languages - fe - Tiny, embeddable language implemented in ANSI C. ([HN](https://news.ycombinator.com/item?id=22785137)) (Other)
README
# fe
A *tiny*, embeddable language implemented in ANSI C
```clojure
(= reverse (fn (lst)
(let res nil)
(while lst
(= res (cons (car lst) res))
(= lst (cdr lst))
)
res
))
(= animals '("cat" "dog" "fox"))
(print (reverse animals)) ; => ("fox" "dog" "cat")
```
## Overview
* Supports numbers, symbols, strings, pairs, lambdas, macros
* Lexically scoped variables, closures
* Small memory usage within a fixed-sized memory region — no mallocs
* Simple mark and sweep garbage collector
* Easy to use C API
* Portable ANSI C — works on 32 and 64bit
* Concise — less than 800 sloc
---
* **[Demo Scripts](scripts)**
* **[C API Overview](doc/capi.md)**
* **[Language Overview](doc/lang.md)**
* **[Implementation Overview](doc/impl.md)**
## Contributing
The library focuses on being lightweight and minimal; pull requests will
likely not be merged. Bug reports and questions are welcome.
## License
This library is free software; you can redistribute it and/or modify it under
the terms of the MIT license. See [LICENSE](LICENSE) for details.