Skip to content

SNAKE is a Concatenative Stack-Oriented Programming Language

License

Notifications You must be signed in to change notification settings

rexionmars/snake-lang

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT

Snake logo

SNAKE is a Concatenative Stack-Oriented Programming Language. This will be updated soon

Main characteristics

  • Compiled
  • Native
  • Stack-based

Quick Start

$ git clone https://github.com/rexionmars/snake.git
$ cd snake

Folder Structure

docs/refs/
  |
  +-- Documentations and references
  
container/
  |
  +-- Standard scripts from translate code (temporary)
  
snake.py
  |
  +-- This file is the principal and contain base functions

SNAKE usage

Sanake has two modes of operation, the first mode to Simulate the program, and the second mode to Compile the program.

SNAKE without parameters returns the help menu

$ ./snake.py

simulate program

$ ./snake.py run <args>

or compile the program x86_64 Linux

$ ./snake.py compile <args>

this will generate an x86_64 Linux executable, in the tests folder

$ cd tests && ./output

Your first Hello World in SNAKE (in initial state)

A simple example using PUSH, PLUS, MINUS, DUMP
Use your favorite editor, i love neovim

$ nvim sun.snake

Example 1: sun two numbers

49 99 + .

Example 2: subtrac two numbers

13 9 - .

Example 3: if condition

17 1 + 18 = if
    700 .
end

Contributors

GitHub Contributors Image