Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/abir66/cminusminus
An in-browser compiler that translates a subset of C code into assembly language for the Intel 8086 processor.
https://github.com/abir66/cminusminus
bison compiler emscripten flex webassembly
Last synced: 6 days ago
JSON representation
An in-browser compiler that translates a subset of C code into assembly language for the Intel 8086 processor.
- Host: GitHub
- URL: https://github.com/abir66/cminusminus
- Owner: Abir66
- Created: 2024-06-08T17:59:14.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-13T10:20:21.000Z (2 months ago)
- Last Synced: 2024-09-14T00:08:09.517Z (2 months ago)
- Topics: bison, compiler, emscripten, flex, webassembly
- Language: C++
- Homepage: https://c-minus-minus.vercel.app
- Size: 491 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CMinusMinus
An in-browser compiler made with `flex` and `bison` that translates a subset of **C code** into assembly language for the **Intel 8086 processor**.
This was done as series of four assignments for the course [***CSE310 - Compiler Sessional***](https://github.com/Abir66/CSE-310-Compiler-Sessional/tree/main) at BUET.
`Emscripten` was used to convert the project to `WebAssembly` and `JavaScript` so that it can be run in the browser.
## Building
First compile the compiler
```bash
# go to the wasm directory
cd wasm# compile the compiler
./run.sh
```This will build the parser and move the `wasm` and `js` to `/src/lib/compiler` directory
Next, for sveltekit, start a development server:
```bash
npm run dev# or start the server and open the app in a new browser tab
npm run dev -- --open
```To create a production version of your app:
```bash
npm run build
```You can preview the production build with `npm run preview`.