This project is a simple interpreter for a programming language called writing, built using Go. The interpreter includes essential components such as a lexer, tokenizer, parser, and a REPL (Read-Eval-Print Loop) for interactive use.
- Lexer: Breaks input source code into tokens for further processing.
- Tokenizer: Converts the raw source code into a structured format of tokens.
- Parser: Analyzes the token stream and constructs an abstract syntax tree (AST).
- REPL: Allows users to interact with the interpreter in real-time.
- Go 1.16 or higher
- Basic understanding of programming languages and interpreters
-
Clone the repository:
git clone https://github.com/NithinKonda/interpreter.git cd interpreter
-
Build the Project:
go build
-
Run with the command:
go run main.go
-
Add test cases in parser_test.go and evalutaion_test.go :
go test ./evaluator go test ./parser