Skip to content

AntonVucinic/lang

Repository files navigation

🌟 Interpreter Playground 🌟

This project is an interactive, browser-based implementation of an interpreter implemented in C.

🧑‍💻 Try it out now: Live Demo


✨ Features

  • Write and Execute: Run code directly in your browser.
  • Dynamic Feedback: View program output or errors instantly.
  • Examples at Your Fingertips: Select from built-in code snippets to get started quickly.

🛠️ Building the Project

This project can be built in two ways:

1️⃣ Local Execution

If you'd like to run the interpreter locally on your machine:

  1. Make sure you have a C compiler and make
  2. Simply run
    make

This will allow you to execute programs directly from your terminal.


2️⃣ Browser Execution (WebAssembly)

If you'd like to run the interpreter in the browser, follow these steps:

  1. Install Emscripten and make

  2. Build the WebAssembly module using the lox.js target in the Makefile:

    emmake make lox.js
  3. Start a local fileserver e.g.:

    python -m http.server

    This step is needed because not all browsers support file:// XHR requesets

  4. Open http://localhost:8000/ in your browser


📚 Acknowledgments


Don't forget to check out the Live Demo!

About

A simple, interpreted, dynamic language

Resources

License

Stars

Watchers

Forks