Note
This was also my undergraduate FYP (Final Year Project, aka thesis) for my B.Sc. Computer Science degree at the University of Birmingham, supervised by Dr. Paul Levy.
The latest version (i.e. commit) I submitted to the University is 97f26d656a9ff409bae506240da118cb8b10f53f
.
I also tagged it as fyp.
You can also access it at uni's GitLab (if you have permission) at https://git.cs.bham.ac.uk/projects-2023-24/xxs166
Instruction to run the code, click here
├───antlr4 # Language's Antlr4 definition is here
├───scripts # All scripts stores here
├───res # Resource files
├───src # Source code of the language
│ ├───ast # AST Constractor
│ │ ├───node
│ │ ├───...
│ │ └───visitor
│ ├───eval # Evaluator
│ ├───main
│ ├───out # Ignored, compiled binary
│ ├───parser # Antlr4 generated codes
│ ├───...
│ └───utils
├───playground # Playground: K-Language Web Demo
│ ├───index.html # Entry Point
│ ├───syntax.js # Syntax Highlighter
│ └───core.wasm # K-Language Wasm Core
├───web # Landing Pages & others
└───vscode-plugin # VSCode Plugin for this Language
├───klang-highlighter
└───out # Ignored, but is for generated VSCode plugin file (.VSIX)
cd web
pnpm i
pnpm dev
IDLE is a GUI-based application, it uses cgo & GTK3 to create the GUI.
In different platform, GUI config may different.
- Install MSYS2
- Open MSYS2 MINGW64
-
pacman -S mingw-w64-x86_64-gcc pacman -S mingw-w64-x86_64-gtk3 pacman -S mingw-w64-x86_64-pkg-config pacman -S mingw-w64-x86_64-toolchain pacman -S mingw-w64-x86_64-gtksourceview3
- Add
C:\msys64\mingw64\bin
to PATH
- Install Homebrew
-
brew install gtk+3 brew install gtksourceview3 brew install gtk-mac-integration brew install pkg-config brew install gcc
sudo apt-get install libgtk-3-dev
sudo apt-get install libgtksourceview-3.0-dev
sudo apt-get install pkg-config
sudo apt-get install gcc
sudo dnf install gtksourceview3-devel
sudo dnf install gtk3-devel
sudo dnf install pkgconf
sudo dnf install gcc
sudo ln -s /usr/lib64/pkgconfig/gtksourceview-3.0.pc /usr/lib64/pkgconfig/gtksourceview-3.pc # other distros use 3 instead of 3.0