Installation
Setup Cyclone on your machine.
There are two ways to install Cyclone on your machine. - Using the prebuilt binaries - Building from source
Pre-built Binaries
Download the prebuilt binaries for your OS from the releases page and extract the contents to a folder.
Using the Binaries through the Command Line
Open the CLI in the folder where you extracted the binaries and run the following commands:
Compiler
This command will excute the file and output the result to console.
compiler <filename>.cy / <foldername>Interpreter
This command will launch the interpreter (REPL).
interpreterBuilding from Source
To build Cyclone from source, you need to have the following dependencies installed on your machine:
- C++ Compiler (GCC or Clang) >= 14 (Might work with GCC 11.2.0)
If you are using MinGW toolchain, there's high chance that you are using C++11. To upgrade to C++14 on Windows download MinGW installer from here. For Linux, run apt install g++-14 and update tasks.json to use g++-14 instead of g++.
Clone the Repository
git clone https://github.com/jayshiai/Cyclone.gitConfigure the Tasks.json
I've included my Tasks.json, but tweak it so that it matches your folder structure.
{
"version": "2.0.0",
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: Build Interpreter (Windows)",
"command": "g++",
"args": [
"-g",
"./resources/resources.res",
"./cyi/main.cpp",
"./src/Symbol/*.cpp",
"./src/Text/*.cpp",
"./src/Syntax/*.cpp",
"./src/Binder/*.cpp",
"./src/Lowerer/*.cpp",
"./src/*.cpp",
"./Utils/*.cpp",
"-I", "include",
"-o",
"interpreter"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
},
{
"type": "cppbuild",
"label": "C/C++: Build Compiler (Windows)",
"command": "g++",
"args": [
"-g",
"./resources/resources.res",
"./cyc/main.cpp",
"./src/Symbol/*.cpp",
"./src/Text/*.cpp",
"./src/Syntax/*.cpp",
"./src/Binder/*.cpp",
"./src/Lowerer/*.cpp",
"./src/*.cpp",
"./Utils/*.cpp",
"-I", "include",
"-o",
"compiler"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
},
{
"type": "cppbuild",
"label": "C/C++: Build Interpreter (Linux)",
"command": "g++",
"args": [
"-g",
"./cyi/main.cpp",
"./src/Symbol/*.cpp",
"./src/Text/*.cpp",
"./src/Syntax/*.cpp",
"./src/Binder/*.cpp",
"./src/Lowerer/*.cpp",
"./src/*.cpp",
"./Utils/*.cpp",
"-I", "include",
"-o",
"interpreter"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
},
{
"type": "cppbuild",
"label": "C/C++: Build Compiler (Linux)",
"command": "g++",
"args": [
"-g",
"./cyc/main.cpp",
"./src/Symbol/*.cpp",
"./src/Text/*.cpp",
"./src/Syntax/*.cpp",
"./src/Binder/*.cpp",
"./src/Lowerer/*.cpp",
"./src/*.cpp",
"./Utils/*.cpp",
"-I", "include",
"-o",
"compiler"
],
"options": {
"cwd": "${workspaceFolder}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "compiler: /usr/bin/g++"
},
]
}Run Build Task for Compiler and Interpreter
Run the build tasks to generate binaries.
