Code Monkey home page Code Monkey logo

egg-pl's Introduction

Egg Programming Language

Programming Language based on Javascript
Version : 1.0.0
Author : David Niverloer

Platform

  • NodeJS
  • Browser Console
    You can also run it in your own EggPL-UI

What's Egg ?

Egg is an example of creating a basic programming language based on Javascript Objects.

It implements the 3 most important parts of an interpreted programming language :

  • Data Structure (information / syntax / task)
  • Syntax Analyzer (process)
  • Environment (memory)

How to use it

  • Import Egg-PL
    Include Egg.js in a new or existing project, You are done!
    Test it by running : Egg.autoBuild("define(x,1);print(x)");

3 ways to improve this language *(Make it your own PL) :

  • Add more environement functions (All Egg-PL functionality depends on *functions)
  • Create a built-in Error Tracking Module;
  • Create a bridge integration for NodeJS and a Result Fetching Module;

How is Egg-PL built ?

  1. EggDataStructure : Helps to create the syntax tree with its constructor data structure;
  2. EggSyntaxEvaluator : Read the syntaxTree created by EggDataStructure and run it inside the environnement, Egg-PL runs its variable in a single environnement (global scope) it will be usefull to create your own let function that create a local scope inside the global;

Note: Egg-PL works only with functions! Example : define(variable,value) instead of var variable=value;

EggEnvironement['localScopeName']['localVariable']

e.g : EggEnvironement["0"]["x"]=12 This means that x is a var in the first local scope (first memory range) and equals to 12; Now we could export local scope in global variables by the define function; e.g : You can create an environnemnt function define_in(scope,variable,value) (Pretty simple by the way)

  1. EggEnvironement : Contains keywords and const variables, it's also a global scope; The whole program works in his memory. Practically, it is a table that contains all the resources that the application must run. Are you going to improve the Egg-PL. (Write functions)

You would like to learn more ?

Keep in touch with me www.niverloer.me

egg-pl's People

Contributors

niniverloer avatar

Stargazers

 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.