Skip to content

monofuel/Threest-CPP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

//monofuel

A forth/postscript like language done for fun in c++.

currently (mostly) working on linux, It was working on arduino at one point but then i re-designed alot of the interpreter stuff better
so it needs to be re-done.

FIXES:
if a line doesn't end in a ;, vector error
DO... with no loop doesn't error?

GOALS:
support full dynamic typing of ints, floats, strings, arrays, booleans, and JSON objects.
JSON objects can be treated like hashmaps, and should include ways to parse objects from strings, and output them to strings
for interaction between processes or via the network.

ARDUINO:
The Threest.ino file will have to be placed in a folder named threest. the src folder can be imported as a library, however you have to remove a few files. These files are lib_test.cpp, threest_main.cpp, and threest_linux_builtins.cpp.

I also use memoryfree to show how much remaining memory is free.
https://github.com/mpflaga/Arduino-MemoryFree

for the linux version:
File IO
network IO

TODO:
exception handling. functions should drop everything and throw exception back up to parse_line

fix memory leaks. _words should be using smart pointers, but i haven't used those before, so this will be a learning experience.
char *'s should be handled better. i can't use strings as the arduino does not support strings.
some errors and output use char *'s for dynamic output, while others might use const char *'s for specific errors. this means
you can't assume to free everything after popping it off the output or error queues.

add command line arguments for:
	specifying a dictionary file
	running single commands as arguments

POSSIBLE WORDS TO ADD:
	recursepoint?

About

personal implementation of forth in C++ for learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published