Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚓ What's "Ship"?

Ship is an interpreted programming language made from scratch with a pirate thematic syntax. It's dynamic typed and can handle basic expressions and statements. It's also easily moddable and totally open-source with the apache license.

Installation

To install and use the ship interpreter, you must have a c++ compiler already installed in your system and then build the file "main.cpp". Example using g++:
$ g++ main.cpp -o ship

If you're on linux, you can now move the built main.cpp to the folder /usr/bin/ and use it anywhere.

Usage

Currently, you can use it in command line mode (run the executable in the terminal) or reading a file passing the file name as an argument. Example: $ ./ship script.ship

Examples

Here is an example program built with Ship.

  • circumferenceCalc.ship
yell("## Circumference Calculator Program ##");
grrr PI = 3.14159;
yarr radius = hail("What's the radius is value? ");
radius = toNum(radius);
grrr circumference = (2 * PI) * radius;

yell("The circumference is", circumference);

yell -> work as print()
grrr -> defines a constant
yarr -> defines a mutable
toNum() -> turn strings into numbers (toStr() does the opposite)

Those are just few keywords, if you want to see more, check the runtime/nativeMaps.h.

Resources

To make this I used the tylerlaceby's playlist guide on how to create your own language, you can watch it on youtube: https://www.youtube.com/playlist?list=PL_2VhOvlMk4UHGqYCLWc6GO8FaPl8fQTh I followed their concepts and used them to make my own programming language with better performance and some additions as pirate theme, hope you enjoyed.

Thank you!

This is a project made for fun only and shouldn't get much attention, thanks for taking a look.

About

Ship is a simple interpreted programming language made in C++ with a pirate theme.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Contributors

Languages