Musique language interpreter
Go to file
Robert Bendun cb13dc9591 Refactored operators, loosing binary requirements due to them
Due to addition of turning binary operators into functions, they can now
be called with more or less then 2 arguments, which would trigger
assertions. Not all were converted to support new call syntax though
2022-09-17 00:34:41 +02:00
doc Play ref change 2022-09-11 20:45:53 +02:00
editor File hierarchy cleanup by removing etc folder 2022-08-18 23:03:21 +02:00
examples Improved rhythm of primes example 2022-08-29 21:45:17 +02:00
include Refactored operators, loosing binary requirements due to them 2022-09-17 00:34:41 +02:00
lib Report nice error when without MIDI connection 2022-08-19 16:06:33 +02:00
scripts File hierarchy cleanup by removing etc folder 2022-08-18 23:03:21 +02:00
src Refactored operators, loosing binary requirements due to them 2022-09-17 00:34:41 +02:00
.gitignore Ignoring new LSP 2022-08-18 22:07:13 +02:00
.gitmodules Minor cleanup 2022-07-30 13:40:59 +02:00
config.mk Separated makefile into smaller scripts to improve readability 2022-08-18 22:58:41 +02:00
Doxyfile Move src/musique.hh to include/musique.hh 2022-08-18 22:44:04 +02:00
instruments.mq Instruments list 2022-05-30 16:56:57 +02:00
LICENSE License 2022-05-24 12:11:50 +00:00
Makefile Separated makefile into smaller scripts to improve readability 2022-08-18 22:58:41 +02:00
README.md File hierarchy cleanup by removing etc folder 2022-08-18 23:03:21 +02:00

Musique interpreter

Interpreter języka Musique. Możliwy do wykorzystywania jako:

  • biblioteka interpretera języka dołączana do innego projektu (podobnie jak Lua);
  • REPL działający w systemie GNU/Linux + ALSA wykonujący język Musique.

Budowanie interpretera

Jeśli nie posiadasz zależności lib/midi to:

$ git submodule init
$ git submodule update
$ (cd lib/midi; make)

A następnie zbuduj interpreter:

$ make bin/musique

Dostępne komendy

  • make - Buduje interpreter bin/musique (tryb release)
  • make debug - Buduje interpreter bin/debug/musique (tryb debug)
  • make clean - Usuwa reprodukowalne elementy projektu (automatycznie stworzone pliki binarne czy raporty)

Dokumentacja

  • make doc - Tworzy doc/build/html/ zawierający dokumentację projektu

Testowanie

  • make test - Uruchom wszystkie dostępne testy automatyczne
  • make unit-tests - Uruchamia testy jednostkowe interpretera
  • make unit-test-coverage - Uruchamia raport pokrycia kodu przez testy jednostkowe
  • scripts/test.py test examples - Uruchamia testy zachowań przykładów
  • scripts/test.py record examples - Nagrywa testy zachowań przykładów

Debugowanie

  • scripts/log-function-calls.sh - Tworzy listę wywołań funkcji używając GDB

Budowa projektu

.
├── bin            Miejsce produkcji plików wykonywalnych
├── coverage
├── doc            Dokumentacja języka, interpretera
│   └── build      Miejsce produkcji dokumentacji
├── editor         Pluginy do edytorów dodające wsparcie dla języka
├── lib            Zewnętrzne zależności projektu
│   ├── expected
│   └── ut
└── include        Główny katalog z plikami nagłówkowymi
├── scripts        Skrypty wspierające budowanie i tworzenie
└── src            Główny katalog z plikami źródłowymi
    └── tests      Katalog z testami jednostkowymi

Kolorowanie składni

Vim / Neovim

Skopiuj plik etc/editor/musique.vim do folderu syntax wewnątrz twojej konfiguracji Vima (Neovima). Np:

$ cp etc/editor/musique.vim ~/.config/nvim/syntax/

Następnie musisz dodać ustawienie typu pliku na podstawie rozszerzenia wewnątrz twojej konfiguracji:

au BufRead,BufNewFile *.mq set filetype=musique

Visual Studio Code

Skopiuj katalog etc/editor/musique-vscode do folderu <user home>/.vscode/extensions i uruchom ponownie program VSCode.