Skip to content

Development of an interpreted language for use in future projects, but mostly as a learning exercise.

License

Notifications You must be signed in to change notification settings

FullOfBologna/Jeff-Interpreted-Language-JIL-

Repository files navigation

Jeff-Interpreted-Language-JIL-

Development of an interpreted language for use in future projects, but mostly as a learning exercise.

Welcome!

What is this? I am embarking on a journey to develop a general purpose interpreted language in c++, mostly for educational purposes. I have many goals for doing this. One goal is to just become more familiar with modern and optimized c++ and OO principles to improve my craft. Another (albeit lofty) goal is to create a fun and engaging open-source community working to build something fun. Looking to have other contributors, and be welcoming to people who want to start contributing to an open source project.

Where to start?

This project is built using CMake. I will add in build details shortly, but I am currently developing this on both MacOS, and Windows. There will be some pains getting your build environment set up however I will eventually put some installation and build instructions up.

Community

Join the Discord Server! This is going to be the main communication area for discussions, as development moves forward.

Dev Tasks

Current Development tasks can be found at the Trello Board

Current Functionality and progress

print() and arithmetic operations on variables are now supported! You can even print the variables values!

VariableNames can be placed on the left hand side of an "=" operator, in order to store that variable. If the variable is stored, you can then use that variable on the right side of an "=" operator to use it in arithmetic.

Example

Valid .jil File at this point.

x = 10+20-5
y = x*2

print("Hello World: x = " + x)
print("y = " + y)

Expected output of above example

Input filename:..\..\Scripts\testJeffFile.jil
HelloWorld:x= 25
HelloWorld:x= 25
y= 50
y= 50

There are bugs in the output, but the key is that print() is supported now.

So far, white space in the lines is not a problem, spaces are stripped out by the Tokenzier.

Building on Windows

CMake must be installed. If building on Windows, There are two possible routes, either using Visual Studio 2019 or MinGW. A VS .sln file can be generated by running

>cd BuildScripts/VisualStudio2019
>.\BuildVSProject.bat

This will place a .sln in the BuildScripts/VisualStudio2019 folder. By opening this file in Visual Studio, the project can be built, placing the executable file in BuildScripts/VisualStudio2019/Debug. When the project has been built, the interpreter can be used

>cd Debug
>.\JILInterpreter.exe \PATH\TO\testJILFile.jil

Building with an older VS should be easy by modifying the BuildVSProject.bat file your version. This should be modified so the project can be built by more users.

Building on Mac

The project can be built using the scripts in the "BuildScripts/Unix" folder.

Building on Unix

In order to build on Unix both cmake and g++ need to be installed. The project can be used by running

>cd BuildScripts/Unix
>./BuildUnix.sh
>./JILInterpreter /PATH/TO/testJILFile.jil