Tula (Turing Language) is an Esoteric Programming Language based on Turing Machine and extended with Set Theory.
This repository contains an implementation of Tula, a Turing Language, using C, Flex, and Bison. Tula allows for the description and execution of Turing machines with a simplified, readable syntax.
Tula, as specified here, is designed to facilitate the description of Turing machine behavior using a simple textual language. This implementation aims to provide a straightforward compiler and runtime for Tula scripts, leveraging C for the backend processing, Flex for lexical analysis, and Bison for parsing.
Currently, this implementation supports a limited set of features:
- Cases: Define transition cases for the Turing machine.
- States: Allow specification of different states within the Turing machine.
- Tula Tape: Define the initial tape contents.
- S-expressions
- Loops
- Sets
- Compound Expressions
- Operations
These features are planned for future releases as the project evolves.
To install and run this Tula implementation, follow these steps:
- GCC (GNU Compiler Collection)
- Bison (GNU Parser Generator)
- Flex (Fast Lexical Analyzer)
- Clone the repository:
git clone https://git@github.com:OleksiiBulba/tula.git <repo-dir>
cd <repo-dir>
Build the project:
make
To run a Tula script, use the following command:
./bin/tula path/to/script.tula
./bin/tula examples/increment.tula
Ensure your script follows the limitations of the currently supported features.
Contributions to extend the functionality of this Tula implementation are welcome. Particularly, efforts to implement the unsupported features would greatly enhance this project.
Before contributing, please ensure to read the contributing guidelines (not yet provided). You can submit pull requests via GitHub.
This project is licensed under the MIT License - see the LICENSE.md file for details.
- Inspired by the original Tula specification by Tsoding: Tula