Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/heldrida/interpreter-in-zig
An interpreter written in Zig programming language
https://github.com/heldrida/interpreter-in-zig
Last synced: about 1 month ago
JSON representation
An interpreter written in Zig programming language
- Host: GitHub
- URL: https://github.com/heldrida/interpreter-in-zig
- Owner: heldrida
- Created: 2021-02-17T17:16:41.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T02:01:22.000Z (almost 4 years ago)
- Last Synced: 2024-12-30T10:19:03.074Z (about 2 months ago)
- Language: Zig
- Size: 34.2 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![]()
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
# An interpreter in Zig
An interpreter, created as a learning playground for both [Zig](https://ziglang.org/) and interpreter.
The interpreter does the process of tokenization, parses source-code in a [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop), transforms the input into a [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree), and evaluates the tree.
## Build executable
To build an executable, run the following cmd:
```zsh
zig build-exe src/main.zig -O ReleaseSafe --name bin
```It'll generate `bin`, which you'd want to execute by:
```
./bin
```## References
[Lexical analysis](https://en.wikipedia.org/wiki/Lexical_analysis)
[Abstract Syntax tree](https://en.wikipedia.org/wiki/Abstract_syntax_tree)
[Parsing](https://en.wikipedia.org/wiki/Parsing)
[Top-down parsing](https://en.wikipedia.org/wiki/Top-down_parsing)
[Zig documentation](https://ziglang.org/documentation/master)
## Logo