Skip to content

veasman/corth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Corth

This language is a work in progress

Forth but written in C++. The language is stack-based (like forth), meaning you can push numbers to, and pop numbers off the "stack" (similar to Reverse Polish Notation), aswell as having basic operations. It's not the same as Forth, but it's close enough, right?

Goals

Build

git clone https://github.com/veasman/corth.git
cd corth
mkdir build
cd build
cmake ..
make

Usage

./corth file.corth

Examples

You can check out examples for some small programs written in corth. Otherwise, here is a small example of how to use conditionals.

// If 100 + 20 > 20
if 100 20 + 20 > do
    // Print 9 squared
    9 dup * print
// Corth requires if statements to also have an else
else end

How to contribute

Issues

Feel free to submit issues and enhancement requests.

Contributing

Please refer to each project's style and contribution guidelines for submitting patches and additions. In general, I follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to a new branch
  4. Push your work back up to your fork
  5. Submit a Pull request so that I can review your changes

NOTE: Be sure to merge the latest from "upstream" before making a pull request!

License

This project uses the GNU General Public License.

About

Forth but written in C++

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published