Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/slicetext/slicetext_lang

A little programming language
https://github.com/slicetext/slicetext_lang

cmake cplusplus cpp language linux programming-language

Last synced: 23 days ago
JSON representation

A little programming language

Awesome Lists containing this project

README

        

# Slice Text
This is a little programming language project I've been working on for a while. There are other iterations of various success on my github.
This version is written in C++, with only the standard library.

## Building
### Dependencies
There are no dependencies other than cmake and gcc.
### From Commandline
Just run `cmake .` in the project directory and then run `make Lang`. Run with `./Lang.x86_64`!

## Features
Right now, the language lexes symbols, strings, operators, and numeric literals but only supports basic calculator-esque
features such as performing arithmatic with PEMDAS, as well as variable assignment.

Operator | Function
|:-:|---|
\* | Multiplication
/ | Division
\+ | Addition
\- | Subtraction / Unary Negation
\*\* | Exponents
% | Modulo
& | Bitwise And
\| | Bitwise Or
^ | Bitwise Xor
~ | Bitwise Not
\>\> | Right Shift
<< | Left Shift
++ | Increment
-- | Decrement
= | Assignment

The language also supports several numeric notations.

Notation | Example | Decimal Equivalent
|---|---|:-:|
Decimal | 21.034 | 21.034
Hex | 0xFA3 | 4003
Binary | 0b11101 | 29