Add token compiler
mikaelpatel opened this issue · comments
Compile forth statements to virtual machine instructions (in C++).
Initial token compiler with support for basic control structures. See commit c61711b.
Token compiler will handle comments. See update d3623be.
Token compiler will generate code for constants and variables. See update 0803a7a.
Token compiler understands the following words:
- : NAME WORDS ;
- variable NAME
- VALUE constant NAME
- Conditional control structure; CONDITION if-then, if-else-then
- Loop control structure; begin-again, begin-CONDITION until, begin-CONDITION while-repeat
- ( COMMENT)
- room
- compiled-words
- generate-code
- All kernel words
Token compiler will compile string print (dot-quote) ." STRING"
See commit b17f941.