Skip to content

DenisKozarezov/interpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

en ru

GitHub go.mod Go version of a Go module

Scripting Language Interpreter

Introduction

Warning

This repository is a pet project and is purely for academic interest. The scripting language being developed here (the so-called guest language) is not a real programming language. The goals of the project are to study the topic of source program recognition and its subsequent lexing, parsing and execution of an abstract syntax tree (AST).

Installation

Install and Set Up ipret on Linux

Install ipret binary via wget from GitHub

  1. Open the Releases section and select the needed version of the ipret utility.
  2. Download the Linux platform archive using the wget command for the required architecture:
wget https://github.com/DenisKozarezov/interpreter/releases/download/<version>/ipret-linux-arm64.tar.gz
  1. Unpack the archive and move the downloaded binary file to the current user's executable directory:
mkdir ipret-temp && tar -xvzf ipret-linux-amd64.tar.gz -C ipret-temp
sudo mv ipret-temp/ipret /usr/local/bin
sudo rm -rf ipret-temp
  1. Test to ensure the version of ipret is the same as downloaded:
ipret --version

Install and Set Up ipret on Windows

Install ipret binary via direct download from GitHub

  1. Open the Releases section and select the needed version of the ipret utility.
  2. Download the zip archive for the Windows platform for the required architecture:
  • ipret-windows-amd64.zip
  • ipret-windows-386.zip
  1. Unzip the zip archive using any available archiver.
  2. Test to ensure the version of ipret is the same as downloaded:
ipret.exe --version

Usage

The --help (-h) command is used to display a prompt:

# Using --help in the root command
ipret --help

# Using --help in the interpreter run command
ipret run --help

# General form of the --help command
ipret <comand> <subcommand> --help
# Evaluate a text file with short flag
ipret run -f ./someFile.txt

# Evaluate a text file with long flag and benchmark
ipret run --filename=someFile.irt --bench

About

IPRET (InterPRETive Runtime) – minimalistic tree-walking interpreter for custom scripting language.

Topics

Resources

Stars

Watchers

Forks

Languages