Arrp is a functional programming language for digital signal processing. This project provides a compiler for Arrp.
For more information on the language Arrp, visit the Arrp website.
Table of Contents:
Installation packages are available on GitHub as release assets.
Depending on your Linux setup, double-clicking may open a graphical installer.
Alternatively, the following command installs the package using
dpkg -i package_name.deb
Mac OS ZIP archive:
- Unzip the folder.
- The compiler executable is at
bin/arrpin the unzipped folder. Optionally, add the
bindir to the
- If you wish
arrpto generate executables, either set the environment variable
ARRP_HOMEto the unzipped folder, or add the
includesubfolder to the
Invoking the compiler with the -h option will print information about its usage and available options:
To generate C++ from Arrp code (replacing
program... with the desired file name):
arrp program.arrp --cpp program.cpp
The Arrp compiler can also generate an executable (this also requires a C++ compiler):
arrp program.arrp --exe program
Run the executable with the -h option to get help on how to use it:
See the documentation for more information about the generated C++ code and executables.
Building from Source
NOTE: The project requires a compiler with a good support for C++11.
This project uses git submodules; make sure to get/update all of them:
git submodule init git submodule update
(Optional) Bison and Flex
Optionally, you may want to re-generate lexer and parser. This requires the flex lexer generator and the bison parser generator.
isl (Integer Set Library)
The isl library must be built manually, because it is not integrated with the CMake build system of this project.
Execute the following commands, starting in the root of this project:
cd extra/isl mkdir build ./autogen.sh ./configure --prefix=$(pwd)/build make install
This will build isl in the directory
After all the prerequisits are in place as described above, you can build the Arrp compiler using the CMake build system.
On Linux and Mac OS X, execute the following commands, starting in the root of this project:
mkdir build cd build cmake .. make
This will produce the Arrp compiler executable:
To use the compiler in the build directory, set the environment variable ARRP_HOME to that directory.
After building the compiler, run
ctest in the build folder.
The CMake build system provides the following options:
- PARSER_REGENERATE - Regenerate lexer and parser using flex and bison.
- PARSER_GENERATOR_OUTPUT_DESCRIPTION - When generating parser, output parser description.