A simple Haskell implementation of an interpreter for the Address Programming Language developed in the 1950s by Kateryna Lonhvynivna Yushchenko.
This is a quick guide to the project structure:
- src - source code for ADPL interpreter
- Lib - library entry point
- Lexer - lexical analyzer for ADPL
- Parser - parser for ADPL
- Value - data types for representing the values in ADPL
- ByteCode - data types for representing ADPL bytecode
- Compiler - core logic for compiling from source code to ADPL bytecode
- Vm - virtual machine for ADPL bytecode
- Utils - common utils
- test - contains examples of programs in the original syntax and in ADPL
- docs - documentation
To use the interpreter, it is necessary to have a version of Stack installed locally. Stack is a popular build tool for Haskell.
To execute an ADPL file, run the stack run
command in the terminal with a path to the file as an argument.
For example, to execute the file ./test/data/fact.adpl
, run the following command:
stack run ./test/data/fact/fact.adpl
There are currently some warnings displayed when running programs.
You can suppress them with the option --silent
:
stack run --silent ./test/data/fact/fact.adpl
There is a simple version of ADPL syntax highlighting available for VSCode: AddLang.