Skip to content

Commit e983324

Browse files
committed
More README changes
1 parent 63c677c commit e983324

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Interpreter and Compiler in Golang for Monkey programming language
22

3-
Monkey has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease, and has built-in integers, booleans, arrays and hashes.
3+
**Monkey** has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease, and has built-in integers, booleans, arrays and hashes.
44

55
Based on Thorsten Ball's books interpreterbook.com and compilerbook.com
66

77
**By Raymond Gan**
88

99
## Part 1: Interpreter
10-
- Building an interpreter for a C-like programming language from scratch, with NO 3rd party libraries
11-
- Building a lexer, a parser and an Abstract Syntax Tree (AST)
10+
- Build an **interpreter** for a C-like programming language from scratch, with NO 3rd party libraries.
11+
- Build a lexer, a parser, and Abstract Syntax Tree (AST). A **lexer** converts source code to tokens. A **parser** converts tokens to an **Abstract Syntax Tree**. **Tokens** are small, easily categorizable data structures.
1212
- The Pratt parsing technique and a recursive descent parser
13-
- Building a REPL
13+
- Build a REPL
1414
- Build a tree-walking evaluator
1515

1616
Monkey language:
@@ -59,7 +59,7 @@ let getName = fn(person) { person["name"]; };
5959
getName(people[0]); // => "Anna"
6060
getName(people[1]); // => "Bob"
6161
```
62-
In Monkey functions are first-class citizens, treated like any other value. Thus we can use higher-order functions and pass functions around as values:
62+
In Monkey, functions are first-class citizens, treated like any other value. Thus we can use higher-order functions and pass functions around as values:
6363
```
6464
// Define the higher-order function `map`, that calls the given function `f`
6565
// on each element in `arr` and returns an array of the produced values.
@@ -96,7 +96,7 @@ hello("dear, future Reader!"); // => Hello dear, future Reader!
9696
```
9797
## Part 2: Compiler
9898

99-
- Take the lexer, the parser, the AST, the REPL and the object system and use them to build a new, faster implementation of Monkey
99+
- Take the lexer, parser, AST, REPL and object system and use them to build a new, faster implementation of Monkey.
100100
- Change its architecture and turn it into a **bytecode compiler and virtual machine**, from scratch.
101101
- Build compiler and VM side-by-side so that we always have a running system to steadily evolve.
102102

0 commit comments

Comments
 (0)