Giter Site home page Giter Site logo

The Hyperscale Programming Language Build Status

Hyperscale logo

This is the main source code repository for Hyperscale. It contains the compiler, standard library, and documentation.

This project is EXPERIMENTAL. The behaviour of this project, its name, and surrounding documentation may change without notice in a future release.

Building from Source

Building on *nix

  1. Make sure you have installed the dependencies:

    • g++ 4.7 or later or clang++ 5.x or later
    • GNU make 3.81 or later
    • cmake 3.8.2 or later
    • boost 1.66.0 or later
    • llvm 5.0.1 or later
    • curl
    • git
    • lcov
  2. Clone the source with git:

    $ git clone https://github.com/hyperscale/hyperscale.git
    $ cd hyperscale
  1. Build and install:

    $ mkdir build
    $ cd build/
    $ cmake ../
    $ make

Example

Debug Pretty Print (format text)

simple.hyper

var i = (12 + 8 * 5);

print(i);

$ ./build/bin/hyperscale debug pretty-print ./dev/simple.hyper
>  SourceFile
>  >  VarDecl <line:1, col:1> used i
>  >  >  ParenExpr <line:1, col:9>
>  >  >  >  BinaryOperator <line:1, col:13> '+'
>  >  >  >  >  IntegerLiteral <line:1, col:10> 'int' 12
>  >  >  >  >  BinaryOperator <line:1, col:17> '*'
>  >  >  >  >  >  IntegerLiteral <line:1, col:15> 'int' 8
>  >  >  >  >  >  IntegerLiteral <line:1, col:19> 'int' 5
>  >  CallExpr <line:3, col:1> 'print'
>  >  >  DeclRefExpr <line:3, col:7> 'i'

Debug pretty Print (format dot)

simple.hyper

var i = (12 + 8 * 5);

print(i);

$ ./build/bin/hyperscale debug pretty-print --format dot ./dev/simple.hyper
digraph astgraph {
  node [shape=plaintext, fontsize=12, fontname="Courier", height=.1];
  ranksep=.3;
  edge [arrowsize=.5]
  node0x7f8d89f05580 [label="file"];
  node0x7f8d89f055b0 [label="i"];
  node0x7f8d89f055f0 [label="factor"];
  node0x7f8d89f055f0_open [label="("];
  node0x7f8d89f05610 [label="+"];
  node0x7f8d89f05640 [label="12"];
  node0x7f8d89f05660 [label="*"];
  node0x7f8d89f05690 [label="8"];
  node0x7f8d89f056b0 [label="5"];
  node0x7f8d89f05660 -> node0x7f8d89f05690;
  node0x7f8d89f05660 -> node0x7f8d89f056b0;
  node0x7f8d89f05610 -> node0x7f8d89f05640;
  node0x7f8d89f05610 -> node0x7f8d89f05660;
  node0x7f8d89f055f0_close [label=")"];
  node0x7f8d89f055f0 -> node0x7f8d89f055f0_open;
  node0x7f8d89f055f0 -> node0x7f8d89f05610;
  node0x7f8d89f055f0 -> node0x7f8d89f055f0_close;
  node0x7f8d89f055b0 -> node0x7f8d89f055f0;
  node0x7f8d89f05580 -> node0x7f8d89f055b0;
  node0x7f8d89f056d0 [label="print"];
  node0x7f8d89f05720 [label="i"];
  node0x7f8d89f056d0 -> node0x7f8d89f05720;
  node0x7f8d89f05580 -> node0x7f8d89f056d0;
}

AST Graph

Features and roadmap

  • Command Line
    • Debug : Command for debugging compiler during development
      • Lexer
      • Parser
    • Build : Command for build project written in hyperscale
    • Test : Command for test project written in hyperscale
    • Bench : Command for benchmark project written in hyperscale
    • Lint : Command for linting project written in hyperscale
    • Package : Command for manage package in project written in hyperscale
  • Compiler
    • Lexer
    • Parser
    • AST
    • Code Generator (LLVM)
  • Standard Library
    • Spec
  • Documentation
    • Grammar/Lexical Structure
    • Command Line
    • Standard Library

License

See the LICENSE file for license rights and limitations (MIT).

Hyperscale's Projects

fabric icon fabric

Experimental Application lifecycle

hypercloud icon hypercloud

Hypercloud a Cloud Application Platform based on Docker Swarm.

hyperdash icon hyperdash

Golang based framework that lets you build excellent dashboards

hyperpic icon hyperpic

Fast HTTP microservice for high-level image processing.

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.