Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

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`.