diff --git a/docs/index.md b/docs/index.md index 514a300..a2fb5b7 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,12 +1,46 @@ -# naylang +# Naylang An interpreter and debugger for the Grace programming language -## Compilation instructions -`naylang` uses standard out-of-source compilation with CMake. It requires at least version 3 of CMake and a compiler that supports C++14 (for example, GCC6.x). -When all the dependencies are installed, a simple sequence of commands should suffice to run the tests: +## What? +Naylang is the new interpreter, runtime and debugger for a subset of the [Grace Programming Language](http://gracelang.org/applications/). +It's still a work in progress, but it has some great capabilites already! -[![asciicast](https://asciinema.org/a/6ybls2dd3vm58xgxh5pztasxc.png)](https://asciinema.org/a/6ybls2dd3vm58xgxh5pztasxc) +## How? -Alternatively, there is a compilation/launch script in the `dists/` folder, for GCC users: +To use Naylang, just download the executable for the [latest release](https://github.com/blorente/naylang/releases) and start it up in a terminal! -[![asciicast](https://asciinema.org/a/6z28d7sey6csqzoapooyzxylj.png)](https://asciinema.org/a/6z28d7sey6csqzoapooyzxylj) +If you'd rather compile it from source [click me!](#Compilation instructions) + +### Commands + +For now, Naylang accepts three kinds of commands: + +- `load` (or `l`) ``: Open the file in ``, execute it, and show the resulting environment. +- `exec `(or `e`) ``: Execute the code and show the resulting environment. +- `print` (or `p`) ``: Execute the expression and show the result. + +Here's an example execution of Naylang: + +[![asciicast](https://asciinema.org/a/eqkmros19kzugc2fy96wo8u12.png)](https://asciinema.org/a/eqkmros19kzugc2fy96wo8u12) + +## Want to contribute? + +Naylang is written entirely in modern C++14. It uses [ANTLR4](https://antlr.org) for parsing, [CMake](https://cmake.org/) as a build system and [Catch](https://github.com/philsquared/Catch) as a testing framework. + +If you'd like to contribute to this project, you are more than welcome to. Feel free to [submit an issue](https://github.com/blorente/naylang/issues/new), fork the [main repo](https://github.com/blorente/naylang) and submit a pull request with your improvements, or even shoot me an email (blorente@ucm.es) if you want some direction on where to begin. + +### Compilation instructions +Naylang uses standard out-of-source compilation with CMake. It requires at least version 3 of CMake and a compiler that supports C++14 (for example, GCC6.x). +When all the dependencies are installed, and the repo is downloaded, a simple sequence of commands should suffice to run the tests: + +``` +cd /root/of/repo +mkdir build &6 cd build +cmake .. +make -j antlr4cpp antlr4cpp_generation_naylang +cmake .. +make -j +cd tests +chmod +x ./tests +./tests +``` \ No newline at end of file diff --git a/interpreter/CMakeLists.txt b/interpreter/CMakeLists.txt index 753778f..101279f 100644 --- a/interpreter/CMakeLists.txt +++ b/interpreter/CMakeLists.txt @@ -6,10 +6,6 @@ cmake_minimum_required(VERSION 3.0) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") -antlr4cpp_process_grammar(console_frontend naylang - ${PROJECT_SOURCE_DIR}/grammars/ConsoleFrontendCommands.g4 - ${PROJECT_SOURCE_DIR}/grammars/ConsoleFrontendCommands.g4) - set(SOURCE_FILES src/main.cpp)