diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 32 |
1 files changed, 19 insertions, 13 deletions
@@ -1,18 +1,24 @@ # interpreter -This project aims to provide a very minimal scripting language for embedded systems. Many other languages already exist, such as Lua, Tcl, or BASIC; however, most implementations require certain system calls like a read() and write(), as they expect a filesystem. This script interpreter intends to be as independent and portable as possible: parsing script from strings one at a time, having minimal built-in functions (so the user can define their own prints and such), and only requiring a few standard library functions. +This project aims to provide a very minimal scripting language for embedded systems. Many other languages already exist, such as Lua, Tcl, or BASIC; however, most implementations require certain system calls like read() and write(), as they expect a filesystem. This interpreter wants to be as system-independent and portable as possible: parsing script from strings one at a time, having minimal built-in functions (so the user can define their own IO calls and such), and only requiring a few standard library functions. -To use this program with your own device, you need some malloc/free implementation, atoi, strtof, and snprintf. Some other standard library functions are needed, but something like newlib should be able to provide them without needing any system calls. +To use this program with your own device, you'll need some malloc/free implementation, and a freestanding standard library. Newlib works well for this; however, functions like atoi() and snprintf() will probably need to be rewritten (if you don't have an \_sbrk defined). -Features: -* function/variable defining through C -* functions and variables in script -* conditionals - if/else/end, do/while -* solve - solve expressions stored in string variables +Interpreter features: +* Variable/function definition - in C and in script +* if/else and while loops +* a solve function to parse strings at runtime -Todo list: -* scopes for variables -* error messages -* arrays? -* maybe for loops +Inconvenient features: +* no local variables +* whitespace sometimes ignored -This project is still in heavy development, so don't expect much. To include it in your own project, just link in libinterp.a (for ARM, link all .o's for x86) and use the header files. +Some TODO items: +* fix all memory leaks +* add better error messages +* arrays? +* for loops + + +This project can be made for the host system (```make```) or an ARM system (```make arm```). +This project is still in heavy development, so don't expect much. To include it in your own project, just link in libinterp.a (for ARM) and use the header files. + |