Skip to content

OneWingedShark/Forth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forth in Ada

Here are my attempts to write a Forth interpreter in Ada. I am not using the straight method, instead opting to give a few types to the system (Integers and Strings, most notably).


Parsing/Interpretive Oddities

  • Input strings are parsed as space-delimited [tabs are not handled, currently] words by Forth.Tokenize.
  • This list of words is then processed (Forth.Handle_Strings) such that ." and s" trigger a routine to merge the trailing strings in the list [and add the missing spaces] which is terminated by a string in the list which ends with the double-quote and is not two consecutive double-quotes.
  • A word of two consecutive double-quotes is translated to a single double-quote.
  • Everything so far has not used the return-stack.

To Do:

  1. Continue adding the core words.
  2. Implement sane operators for the base types, especially BLOB.
  3. Profit?

About

A Forth interpreter written in Ada.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published