Skip to content

Commit b641f2c

Browse files
committedFeb 21, 2024
Updated README
1 parent f0448d1 commit b641f2c

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed
 

‎README.md

+25-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
1-
This is a project to write an interpreter and a compiler for a made up language Monkey, following the book "Writing an Interpreter in Go", and its sequel "Writing a Compiler in Go".
1+
This is a project to write an interpreter and a compiler for a made up language Monkey. The repository follows the book "Writing an Interpreter in Go" until Tag `Book1End`, and its sequel "Writing a Compiler in Go" until Tag `Book2End`. All further commits are my own contribution.
22

3-
https://interpreterbook.com/
4-
https://compilerbook.com/
3+
- https://interpreterbook.com/
4+
- https://compilerbook.com/
5+
6+
# How to run
7+
8+
### Linux
9+
10+
1. Clone the repository
11+
2. Run the command `cd MyCode/` to change directories.
12+
3. To run the REPL, run the command `./build/monkey`.
13+
4. Alternatively, create a file with extension `.mky` and run the command `./build/monkey [file]` to compile and run the file
14+
15+
A pre-written file `test.mky` is also present in the repository
16+
17+
# Running benchmarks
18+
19+
### Linux
20+
1. Clone the repository
21+
2. Run the command `cd MyCode/` to change directories.
22+
3. To run using compiler and vm, run the command `./build/fibonacci -engine=vm`
23+
4. To run using interpreter, run the command `./build/fibonacci -engine=eval`
24+
25+
- Currently the benchmark is based on a pre-written fibonacci recursion program.
26+
- The fibonacci number can be changed by going into `./benchmark/main.go Ln 30`, and editing the number in the function call.

0 commit comments

Comments
 (0)
Please sign in to comment.