package baguette_sharp

All checked builds pass
  1. Overview
  2. Docs
The Baguette# Interpreter REPL

Install

dune-project
 Dependency

Authors

Maintainers

Sources

2.2.1.tar.gz
md5=7a7d67de03c9d8d89c4b73a06bd5ae49
sha512=55eac5ce65f7c7fede1abda1c9bd9132f6006b8d5ec909116805ca75076c84bcf06635af06956c82e3b53191a62417c6aadca9fa27ce69ef72d42987d6afbc52

Description

The REPL for Baguette#

Added to opam-repository:

README

The Baguette# OCaml Interpreter

coco33920 - ocaml-baguettesharp-interpreter GitHub release License


Baguette#
Baguette#

Contact - Mail

b# b#

Baguette# is back!

Requirements

Ocaml version >= 4.13.1, modules fmt,str and linenoise ( REPL )

opam install fmt str linenoise

Installation

Pre-compiled binaries

Automatic download of the linux x86_64 binaries

curl https://raw.githubusercontent.com/coco33920/ocaml-baguettesharp-interpreter/master/download.sh | sh

the script downloads the latest binaries (which was tagged on the releases), install it as ~/.local/bin/baguette_sharp and flag it as executable. You can also do

wget https://raw.githubusercontent.com/coco33920/ocaml-baguettesharp-interpreter/master/download.sh
sh download.sh

Or just executing the script itself

wget https://github.com/coco33920/ocaml-baguettesharp-interpreter/releases/latest/download/baguette.linux64
mv baguette.linux64 ~/.local/bin/baguette_sharp
chmod +x ~/.local/bin/baguette_sharp

OPAM

Build the latest stable version in OPAM repositories opam install baguette_sharp it compile and install the latest baguette_sharp version under baguette_sharp.repl in OPAM files (which are in $PATH)

Source

You must install the dependencies to build from sources, which are fmt and linenoise. And an OCaml version of at least 4.13.1. An automatic script to download sources, install dependencies and build from source is available here :

curl https://raw.githubusercontent.com/coco33920/ocaml-baguettesharp-interpreter/master/automatic.sh | sh

Which is exactly :

opam install -y linenoise fmt
git clone https://github.com/coco33920/ocaml-baguettesharp-interpreter
cd ocaml-baguettesharp-interpreter
dune build @install
dune install

The script, same as OPAM, install the repl under baguette_sharp.repl in the OPAM files.

History

I restarted this project early 2022, to act as a TIPE (a french weird oral exam for the concours of Écoles d'Ingénieurs) to frame the formal language theory, and to do that you'll play with our world famous pastries !

The lexer, parser and interpreter are finished, they take a string of language and transform it into an abstract syntax tree (AST) that the interpreter take to execute the language. I now work on the theoritical part of the issue (turing-completeness), and the compiler.

The syntax is really close to a BASIC but with less explicit words and keywords you'll see :)

Support

The language supports integers, floating point numbers, strings, booleans, predicates, gotos, conditionnals gotos (if/else), and implements many of the standard instructions you can find in a language standard library. Keywords are simple and are the only instances when you don't need parenthesis, go see the WIKI for more accurate informations

Building

dune build .

Usage

dune exec baguette_sharp_interpreter

Test

dune runtest

Dependencies (4)

  1. linenoise >= "1.4.0"
  2. fmt >= "0.7.0"
  3. ocaml >= "4.13.1"
  4. dune >= "3.0"

Dev Dependencies (1)

  1. odoc with-doc

Optional Dependencies

None

Used by

None

Conflicts

None

Build status

Results of building baguette_sharp with each compiler on check.ci.ocaml.org, run of against opam-repository 8a77e58. All results for this package.

Each result links to its build log. To keep crawlers from overloading the site, build logs require a GitHub sign-in (see ocurrent/opam-health-check). On your first log, GitHub asks you to “Authorize opam-health-check”, the OCurrent app that runs these checks; it sees only your public profile, not your repositories. The sign-in lasts 30 days.

Version OCaml 4.11 OCaml 4.14 OCaml 5.2 OCaml 5.4 OCaml 5.5
2.2.1-1 (this version) n/a good good good good
  • good Package successfully built
  • partial One of the dependencies failed to build
  • bad Package failed to build
  • n/a Package is not available in this environment
  • internal Internal failure