Giter Club home page Giter Club logo

southparklang's Introduction

SouthParkLang

A southpark inspired language

Documentation

https://toddmartin.dev/docs/southparklang/

Use

Right now, SouthParkLang is crude and very basic. It is a functional language implementeded in Java. The java runtime environment is needed to run the interpreter for the program.

Every operator and paramter right now requires a space input between. The currently availible functions print and perform basic artihmetic operations (add, subtract, multiply, and divide).

print function - cartmanSays addition - + subtraction - - multiply - * divide - /

Here is a sample function the print the output of an addition and subtraction operation.

( cartmanSays ( + ( + 1 1 ) ( - 2 4 ) ) )

Sample output: 4.0

Important to note about this language currently. Mathematical operations are conducted from right to left. So in the above program is seen as (4-2) + (1+1). Also, every integer is handled as a double value.

One last important note for this language in the current state. There does not currently exist much checking of the langauge. So, mistypes and errors in logic will break the program and not notify the user who is operating the interpreter.

Interactive Interpreter

To use the interactive interpreter, just invoke the interpreter without any arguements. However, currently, the interactive interpreter is for one-liners.

Interpret from file

To interpret from file, invoke interpreter with an argument that is the path and file name of the source file.

Constants

There is not an ability to use constant values. Currently the only constant value is "treeFiddy," which give the value of 350.

TO-DO

  • Clean up Interpreter code
  • Add If-then-else feature
  • Add while loop feature
  • Add variable feature

southparklang's People

Contributors

martintc avatar

Stargazers

víctor  avatar  avatar Cody Kaczynski avatar

Watchers

James Cloos avatar  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.