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 at BUET.
Emscripten
was used to convert the project to WebAssembly
and JavaScript
so that it can be run in the browser.
First compile the compiler
# 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:
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:
npm run build
You can preview the production build with npm run preview
.