toctave

t(iny)octave
Log | Files | Refs | README

commit 175d5c6b11f0da55cdb5e290886d4fb0c2b93f85
parent 71276887c0d4ee2115814798911da0dcbc7ca6db
Author: Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
Date:   Sat, 28 May 2022 00:49:30 +0430

README.md: Add

Diffstat:
AREADME.md | 50++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 50 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -0,0 +1,50 @@ + +# `t(iny)octave` + +This is a very simple demo octave-like calculator which uses a Jittery virtual +machine (VM). + +For simplicity, there's no matrix! + +## `GNU Jitter` + +This is a demonstration of using `GNU Jitter` to generate a VM (Virtual +Machine). + +**NOTE** You need to apply `jitter.path` in master branch of `Jitter` +(as of `v0.9.286`). The reason is `Jitter` generates C code and the C compiler +is not as strict as C++ compiler. + +**Recommendation** Use `gcc` and `g++`. + +**NOTE** For simplicity, this implementation assumes the code is running on +a x86_64 platform. + +## Unfinished items + +- Function call +- `eval` + +## Structure of the code + +- `ast.hpp`, `ast.cpp`: Types and functions related to creating AST (Abstract + Syntax Tree). This implementation uses + [`stlab::forest`](https://stlab.cc/libraries/forest.hpp/) to encode the AST. + For an introduction to them, + [read this](https://stlab.cc/2020/12/01/forest-introduction.html). + And also, [this](https://stlab.cc/forest/2016/05/28/forest.html) +- `ast.test.cpp`: Test cases for AST manipulation. +- `cgen.hpp`, `cgen.cpp`: Types and functions related to code generation. + `cgen::sexpr` function generates S-expressions. `cgen::jitter` generates + code for the VM generated by Jitter (specified by `toctave.jitter` file). +- `cgen.test.cpp`: Test cases for code generation verification. +- `env.hpp`, `env.cpp`: Run-time environment. +- `toctave.jitter`: Specification of Jittery VM. +- `stlab/`: [stlab libraries](librar://stlab.cc/). + +## Copyright + +```text +Copyright (C) 2022, Mohammad-Reza Nabipoor +SPDX-License-Identifier: GPL-3.0-or-later +```