Giter VIP home page Giter VIP logo

banjo's Introduction

Banjo

The Banjo Programming Language is a redesign of C++ that adheres to that language's philosophy, semantics, and (largely) syntax.

Dependencies

Banjo has several external dependencies.

  • CMake version 3.0 or greater. This provides the build system for Banjo.
  • Boost version 1.55 or later.
  • Lingo is a library that provides a number of utilities used by the compiler.
  • LLVM is a highly portable and optimizable intermediate
    representation for programming languages.

Forking Banjo

Use the fork feature on github to fork the repo to your page.

Add the original repo to your upstream:

git remote add upstream https://github.com/asutton/banjo.git

Run

git remote -v

to make sure the upstream has been added.

Syncing your Fork

To get the latest updates to Banjo:

git fetch upstream

To merge your local changes, checkout your local master and run:

git merge upstream/master

Building Banjo

After cloning the repository (or a fork of the repository), go into the directory and run:

git submodule update --init --recursive

This will pull the required versions of Lingo into your working directory.

Note that if you have a fork of Banjo, you may occasionally need to update the 'lingo' submodule. That can be done using the following command:

git submodule update --remote --merge

The build is configured by CMake. Within your clone of the Banjo repository, run the following commands to establish the build system in the build directory.

mkdir build
cd build
cmake ..

It is generally useful to build in debug mode. You can run ccmake to edit the build configuration.

ccmake ..

Set the value of CMAKE_BUILD_TYPE to Debug. Capitalization matters.

Now you can build the compiler:

make

Testing Banjo

You can run the test suite by running:

make test

If you want to test the parser, you can use the test_parse program. It takes the name of a single input file as an argument and prints information about the parsed program (or errors).

./banjo/test_parse input.banjo

Errata

When lowering LLVM to native assembly on new versions of Mac OS X you may need to override the system triple to avoid linker warnings. Invoke llc like this:

llc -mtriple=x86_64-apple-macosx <input>

banjo's People

Contributors

asutton avatar cjb129 avatar toneill818 avatar owenstranathan avatar jenny-fa 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.