Code Monkey home page Code Monkey logo

abaci0-literate's Introduction

A Literate Program Implementing a Subset of the Abaci Programming Language

About

The file Abaci0.md is a human-readable manuscript intended a full description of how this compiler was written from scratch, and the basics of how it operates. This file and all of the contents of directory src, plus the CMakeLists.txt CMake script, were machine-extracted from the master literate source file Abaci0.lit.

Pre-requisites

To build this project requires:

  • A C++ compiler, tested only with g++ version 12.2.0 and clang++ version 14.0.6
  • The LLVM development libraries, built against version 14.0
  • The Boost headers, specifically Boost Spirit X3 in Boost 1.74
  • Headers and link-library of libfmt, built against version 10.2.1
  • Python version 3, tested with version 3.11.2

This project was developed using Debian current stable (Bookworm).

Building

To create the executable abaci0 in a build sub-directory of the project source files:

mkdir build && cd build
cmake ..
make

Run ./abaci0 without arguments to enter an interactive session, or with a source filename as the single argument to execute a script.

To recreate the manuscript and sources:

python3 literate.py Abaci0.lit

Roadmap

Release 1.0.0 is believed to be feature-complete with no known defects. (Please raise issues or submit pull requests.)

Future development of this project is likely to be fixes only, no major language enhancements or additions are planned. I am interested in adding support for the expectation operator of Spirit X3 (> instead of >>), however this would most likely involve manual testing of each rule as the changes are made to avoid breakages.

Version history

  • 0.8.0 (2024-Apr-09) Initial release, believed fully working but not complete (no class instances or method calls).

  • 0.8.2 (2024-Apr-17) Improvements to processed manuscript and minor changes to code.

  • 0.8.3 (2024-Apr-18) Allow UTF-8 identifiers, and UTF-8 tokens in parser/Keywords.hpp.

  • 0.8.6 (2024-Apr-22) Corrections to source manuscript and minor changes to code.

  • 0.8.9 (2024-Apr-25) Factorial and Fibonacci functions now generate correct code, updates made to source manuscript.

  • 0.9.0 (2024-May-09) Dot selection for data members and methods, this pointer.

  • 0.9.1 (2024-May-22) Fixes for VS2022, improved name mangling, self-assignment.

  • 0.9.2 (2024-May-25) User input and type conversions.

  • 1.0.0 (2024-May-27) User messages now have their own header file. Small changes to front-end with improved error diagnostics for defective code.

  • 1.0.1 (2024-Jun-03) Functions and methods can now return object values, which allows for creation of factory functions.

License

All writing and source code released under a Creative Commmons License, ©2023-24 Richard Spencer

abaci0-literate's People

Contributors

cpp-tutor avatar

Stargazers

Buerck avatar Marouane El Hizabri avatar

Watchers

 avatar

Forkers

gmh5225 familyye

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.