├── .clang-format ├── .github └── workflows │ └── c-cpp.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── examples ├── expressions_compiler │ └── main.fscript ├── game_of_life │ └── main.fscript ├── test_driver │ └── main.fscript └── test_json_generator │ └── test_json_generator.ost ├── include ├── ConvertUTF.h ├── core │ ├── callstack.hpp │ ├── evalstack.hpp │ ├── heap.hpp │ ├── interpreter.hpp │ ├── stringpool.hpp │ ├── symtable.hpp │ └── values.hpp ├── dbg.hpp ├── expect.hpp ├── io │ ├── fileio.hpp │ ├── glob.hpp │ ├── lexer.hpp │ ├── parser.hpp │ ├── prettyprint.hpp │ ├── processes.hpp │ ├── strings.hpp │ └── termio.hpp ├── linenoise.h ├── prelude │ └── repl.hpp └── std │ ├── arith.hpp │ ├── arrays.hpp │ ├── boolean.hpp │ ├── comparisons.hpp │ ├── controlflow.hpp │ ├── indexing.hpp │ ├── operators.hpp │ ├── os.hpp │ ├── stack.hpp │ ├── strings.hpp │ ├── templates.hpp │ └── typing.hpp ├── src ├── core │ ├── callstack.cpp │ ├── evalstack.cpp │ ├── heap.cpp │ ├── interpreter.cpp │ ├── symtable.cpp │ └── values.cpp ├── io │ ├── encodings.cpp │ ├── fileio.cpp │ ├── glob.cpp │ ├── lexer.cpp │ ├── parser.cpp │ ├── prettyprint.cpp │ ├── processes.cpp │ ├── strings.cpp │ └── termio.cpp ├── linenoise │ ├── ConvertUTF.cpp │ ├── linenoise.cpp │ └── wcwidth.cpp ├── main.cpp ├── prelude │ ├── repl.cpp │ └── repl.fscript └── std │ ├── arith.cpp │ ├── arrays.cpp │ ├── boolean.cpp │ ├── comparisons.cpp │ ├── controlflow.cpp │ ├── indexing.cpp │ ├── os.cpp │ ├── stack.cpp │ ├── strings.cpp │ ├── templates.cpp │ └── typing.cpp ├── test_root └── tests ├── cases ├── abs │ ├── expectedOutput.txt │ └── main.fscript ├── brainfuck │ ├── expectedOutput.txt │ └── main.fscript ├── is_prime │ ├── expectedOutput.txt │ └── main.fscript ├── pow_func_gen │ ├── expectedOutput.txt │ └── main.fscript ├── quicksort │ ├── expectedOutput.txt │ ├── main.fscript │ └── unsorted.fscript └── rot13 │ ├── expectedOutput.txt │ └── main.fscript ├── helper.py ├── requirements.txt ├── simpleCases.json ├── simpleCases ├── arithmetic.json ├── comparisons.json ├── func_chr.json ├── func_dup.json ├── func_len.json ├── func_ord.json ├── func_peek.json ├── func_poke.json ├── func_slice.json └── func_swap.json └── test.py /.clang-format: -------------------------------------------------------------------------------- 1 | BasedOnStyle: Google 2 | IndentWidth: 4 3 | UseTab: Never -------------------------------------------------------------------------------- /.github/workflows/c-cpp.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/.github/workflows/c-cpp.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/.gitignore -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/CMakeLists.txt -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/README.md -------------------------------------------------------------------------------- /examples/expressions_compiler/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/examples/expressions_compiler/main.fscript -------------------------------------------------------------------------------- /examples/game_of_life/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/examples/game_of_life/main.fscript -------------------------------------------------------------------------------- /examples/test_driver/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/examples/test_driver/main.fscript -------------------------------------------------------------------------------- /examples/test_json_generator/test_json_generator.ost: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/examples/test_json_generator/test_json_generator.ost -------------------------------------------------------------------------------- /include/ConvertUTF.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/ConvertUTF.h -------------------------------------------------------------------------------- /include/core/callstack.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/callstack.hpp -------------------------------------------------------------------------------- /include/core/evalstack.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/evalstack.hpp -------------------------------------------------------------------------------- /include/core/heap.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/heap.hpp -------------------------------------------------------------------------------- /include/core/interpreter.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/interpreter.hpp -------------------------------------------------------------------------------- /include/core/stringpool.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/stringpool.hpp -------------------------------------------------------------------------------- /include/core/symtable.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/symtable.hpp -------------------------------------------------------------------------------- /include/core/values.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/core/values.hpp -------------------------------------------------------------------------------- /include/dbg.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/dbg.hpp -------------------------------------------------------------------------------- /include/expect.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/expect.hpp -------------------------------------------------------------------------------- /include/io/fileio.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/fileio.hpp -------------------------------------------------------------------------------- /include/io/glob.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/glob.hpp -------------------------------------------------------------------------------- /include/io/lexer.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/lexer.hpp -------------------------------------------------------------------------------- /include/io/parser.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/parser.hpp -------------------------------------------------------------------------------- /include/io/prettyprint.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/prettyprint.hpp -------------------------------------------------------------------------------- /include/io/processes.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/processes.hpp -------------------------------------------------------------------------------- /include/io/strings.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/strings.hpp -------------------------------------------------------------------------------- /include/io/termio.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/io/termio.hpp -------------------------------------------------------------------------------- /include/linenoise.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/linenoise.h -------------------------------------------------------------------------------- /include/prelude/repl.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/prelude/repl.hpp -------------------------------------------------------------------------------- /include/std/arith.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/arith.hpp -------------------------------------------------------------------------------- /include/std/arrays.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/arrays.hpp -------------------------------------------------------------------------------- /include/std/boolean.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/boolean.hpp -------------------------------------------------------------------------------- /include/std/comparisons.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/comparisons.hpp -------------------------------------------------------------------------------- /include/std/controlflow.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/controlflow.hpp -------------------------------------------------------------------------------- /include/std/indexing.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/indexing.hpp -------------------------------------------------------------------------------- /include/std/operators.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/operators.hpp -------------------------------------------------------------------------------- /include/std/os.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/os.hpp -------------------------------------------------------------------------------- /include/std/stack.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/stack.hpp -------------------------------------------------------------------------------- /include/std/strings.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/strings.hpp -------------------------------------------------------------------------------- /include/std/templates.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/templates.hpp -------------------------------------------------------------------------------- /include/std/typing.hpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/include/std/typing.hpp -------------------------------------------------------------------------------- /src/core/callstack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/callstack.cpp -------------------------------------------------------------------------------- /src/core/evalstack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/evalstack.cpp -------------------------------------------------------------------------------- /src/core/heap.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/heap.cpp -------------------------------------------------------------------------------- /src/core/interpreter.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/interpreter.cpp -------------------------------------------------------------------------------- /src/core/symtable.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/symtable.cpp -------------------------------------------------------------------------------- /src/core/values.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/core/values.cpp -------------------------------------------------------------------------------- /src/io/encodings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/encodings.cpp -------------------------------------------------------------------------------- /src/io/fileio.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/fileio.cpp -------------------------------------------------------------------------------- /src/io/glob.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/glob.cpp -------------------------------------------------------------------------------- /src/io/lexer.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/lexer.cpp -------------------------------------------------------------------------------- /src/io/parser.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/parser.cpp -------------------------------------------------------------------------------- /src/io/prettyprint.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/prettyprint.cpp -------------------------------------------------------------------------------- /src/io/processes.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/processes.cpp -------------------------------------------------------------------------------- /src/io/strings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/strings.cpp -------------------------------------------------------------------------------- /src/io/termio.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/io/termio.cpp -------------------------------------------------------------------------------- /src/linenoise/ConvertUTF.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/linenoise/ConvertUTF.cpp -------------------------------------------------------------------------------- /src/linenoise/linenoise.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/linenoise/linenoise.cpp -------------------------------------------------------------------------------- /src/linenoise/wcwidth.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/linenoise/wcwidth.cpp -------------------------------------------------------------------------------- /src/main.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/main.cpp -------------------------------------------------------------------------------- /src/prelude/repl.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/prelude/repl.cpp -------------------------------------------------------------------------------- /src/prelude/repl.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/prelude/repl.fscript -------------------------------------------------------------------------------- /src/std/arith.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/arith.cpp -------------------------------------------------------------------------------- /src/std/arrays.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/arrays.cpp -------------------------------------------------------------------------------- /src/std/boolean.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/boolean.cpp -------------------------------------------------------------------------------- /src/std/comparisons.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/comparisons.cpp -------------------------------------------------------------------------------- /src/std/controlflow.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/controlflow.cpp -------------------------------------------------------------------------------- /src/std/indexing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/indexing.cpp -------------------------------------------------------------------------------- /src/std/os.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/os.cpp -------------------------------------------------------------------------------- /src/std/stack.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/stack.cpp -------------------------------------------------------------------------------- /src/std/strings.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/strings.cpp -------------------------------------------------------------------------------- /src/std/templates.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/templates.cpp -------------------------------------------------------------------------------- /src/std/typing.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/src/std/typing.cpp -------------------------------------------------------------------------------- /test_root: -------------------------------------------------------------------------------- 1 | SbQVHcuecUS-lv9xehGSGg 2 | -------------------------------------------------------------------------------- /tests/cases/abs/expectedOutput.txt: -------------------------------------------------------------------------------- 1 | 5 -------------------------------------------------------------------------------- /tests/cases/abs/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/abs/main.fscript -------------------------------------------------------------------------------- /tests/cases/brainfuck/expectedOutput.txt: -------------------------------------------------------------------------------- 1 | hello world -------------------------------------------------------------------------------- /tests/cases/brainfuck/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/brainfuck/main.fscript -------------------------------------------------------------------------------- /tests/cases/is_prime/expectedOutput.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/is_prime/expectedOutput.txt -------------------------------------------------------------------------------- /tests/cases/is_prime/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/is_prime/main.fscript -------------------------------------------------------------------------------- /tests/cases/pow_func_gen/expectedOutput.txt: -------------------------------------------------------------------------------- 1 | 4 2 | 25 3 | 216 4 | -------------------------------------------------------------------------------- /tests/cases/pow_func_gen/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/pow_func_gen/main.fscript -------------------------------------------------------------------------------- /tests/cases/quicksort/expectedOutput.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/quicksort/expectedOutput.txt -------------------------------------------------------------------------------- /tests/cases/quicksort/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/quicksort/main.fscript -------------------------------------------------------------------------------- /tests/cases/quicksort/unsorted.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/quicksort/unsorted.fscript -------------------------------------------------------------------------------- /tests/cases/rot13/expectedOutput.txt: -------------------------------------------------------------------------------- 1 | test -------------------------------------------------------------------------------- /tests/cases/rot13/main.fscript: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/cases/rot13/main.fscript -------------------------------------------------------------------------------- /tests/helper.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/helper.py -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/simpleCases.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases.json -------------------------------------------------------------------------------- /tests/simpleCases/arithmetic.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/arithmetic.json -------------------------------------------------------------------------------- /tests/simpleCases/comparisons.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/comparisons.json -------------------------------------------------------------------------------- /tests/simpleCases/func_chr.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_chr.json -------------------------------------------------------------------------------- /tests/simpleCases/func_dup.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_dup.json -------------------------------------------------------------------------------- /tests/simpleCases/func_len.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_len.json -------------------------------------------------------------------------------- /tests/simpleCases/func_ord.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_ord.json -------------------------------------------------------------------------------- /tests/simpleCases/func_peek.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_peek.json -------------------------------------------------------------------------------- /tests/simpleCases/func_poke.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_poke.json -------------------------------------------------------------------------------- /tests/simpleCases/func_slice.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_slice.json -------------------------------------------------------------------------------- /tests/simpleCases/func_swap.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/simpleCases/func_swap.json -------------------------------------------------------------------------------- /tests/test.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ForthScriptLang/forthscript/HEAD/tests/test.py --------------------------------------------------------------------------------