Develop and Download Open Source Software

4tH compiler

Back to Project Summary

Would you recoomend this project?

Project Release infomations and Project Resources. Note that these informations are from this projects Freecode.com page and the downloads themselves may not be hosted with SourceForge.JP.

Project Release Information

2012-12-24 04:44
The library files now support logfiles, automated date parsing, LZ77 file compression and CSV file creation.
The last defined word can be compiled anonymously. Object orientation now supports regular methods. The Sourceforge "Block reserved extension words" were added. New peephole optimizers were added to the compiler, allowing automatic compile time calculations. exec_4th() can be optimized for GCC by using the compiler switch -DUSEGCCGOTO. The word 'SMOVE' was added.
2011-12-12 06:39
Unions and pragmas can be defined. The library files now support several polynomials, RAM disks, menus, bitfields, bit arrays, several new sorting algorithms, Morse signs, and 3VL. The preprocessor was enhanced, supporting S\", token concatenation, string comparison, variable assignment, and smart double number/FP literals. 'DOES>' can be used to change the execution semantics of basic data types. A bug in the Linux Makefile was fixed. Overflow and underflow errors in number conversion were fixed. A bug in the 'IF' statement of 4tsh was fixed. The accuracy of the 'FERF' words was improved.
2011-08-20 06:06
Specific code can be executed after a failed 'WHILE' just before exiting the loop. Binary strings can be tagged individually. The library files now support UTF-8 to GBK/2 conversion (and vice versa), infix formula translation, string pattern matching, finite state machines, statistical functions, enhanced command line parsing and the full range of ANS Forth floating point words for ZEN float. The preprocessor now supports string parsing with custom delimiters, macros within macros, and a string stack. A Markov engine and an infix-to-postfix converter were added to the examples.
2011-04-10 23:46
A peephole optimizer was added. The library files now support a tiny database management system, double number multiplication, double number division, LaTeX file generation, and the XCHAR wordset. SEEK can now be used to reposition the file to the end. The words 2NIP and [FORCE] were added. Several obscure bugs were fixed. Support for 64-bit architectures was greatly improved. On Linux, compilation is now staged. A nuclear test simulation was added to the preprocessor examples.
2010-09-19 19:39
The words ’DELETE-FILE’ and ’ENVIRON@’ have been added. The library files now support writing OpenOffice, KOffice, and Microsoft XML spreadsheets, different sorting algorithms, the creation of floating point interpreters, GTK-server, Forth compatible floating point I/O for ZEN float, portable bitmap graphics and Turtle graphics. Files can now be deleted and environment variables can be queried. The maximum symbol length is increased to 23 characters. Two tiny spreadsheet programs were added to the examples.

Project Resources

http://freecode.com/urls/5a57bcb4640aa381081159f2857ba6cd
http://freecode.com/urls/bc6238e10bb94ccfc752631fc808d899
http://freecode.com/projects/4th

Project Description

4tH is a Forth compiler with a little difference. Instead of the standard Forth engine it features a
conventional compiler. 4tH is a very small compiler that can create bytecode, C-embeddable bytecode, standalone executables, but also works fine as a scripting language. It supports about 95% of the ANS Forth CORE wordset and features conditional compilation, pipes, files, assertions, forward declarations, enumerations, structures, suspended execution, recursion, include files, etc. It comes with an RPN calculator, line editor, preprocessor, compiler, decompiler, C-source generator, a virtual machine, and a multitasking environment.


SourceForge.JP is a Japanese version of SourceForge.net. For developments that are not related to Japan, we recommend you to use SourceForge.net.