GithubHelp home page GithubHelp logo

lanamirko04 / gfy-cpp Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 246 KB

Interpreter written in C++ for the bizarre and unconventional GFY language.

Home Page: https://lanamirko04.github.io/gfy-cpp/

Makefile 0.93% C++ 30.24% CSS 68.83%
cpp gfy interpreter ugly-code ugly-lang

gfy-cpp's Introduction

GFY-CPP

An interpreter for the GFY language written in C++.

⚠️ This project is discontinued beacuse the original GFY language is no longer maintained.

Building

To build the interpreter, run the following commands:

$ git clone https://github.com/LanaMirko04/gfy-cpp.git
$ cd gfy-cpp
$ make

Usage

To run the interpreter, use the following command:

$ ./bin/gfy-cpp <file>

Where <file> is the path to the file containing the GFY code.

Implemented features

The following is a list of the features that have been implemented in the interpreter.

Legend:

  • ✅ - Implemented
  • ⚠️ - Partially implemented
  • ❌ - Not implemented

I/O

Keyword Description Status
input Reads a value from the given input stream.
output Prints a value to the given output stream.

Variables

Keyword Description Status
print Prints a string to the console. ⚠️
set Sets a variable to a value. ⚠️

Variable types

Type Description Status
int Integer number.
float Floating-point number.
string String.
bool Boolean value.
list List of values.

Arithmetic operations

Keyword Description Status
add Adds two numbers.
sub Subtracts two numbers.
mul Multiplies two numbers.
div Divides two numbers.
mod Calculates the remainder of the division of two numbers.

Logical operations

Keyword Description Status
equals Checks if two values are equal.
greater Checks if the first value is greater than the second.
less Checks if the first value is less than the second.
define Defines a function.

Operators

Operator Description Status
-> Set explicit type. ⚠️
@ Get the value of a list at a specific index.

Documentation

TODO

Notes

  • input, output, list and @ are not implemented in the lexer yet.
  • The interpreter is still in development and some features may not work as expected.

Aknowledgements

Special thanks to:

gfy-cpp's People

Contributors

lanamirko04 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.