Git Product home page Git Product logo

beaker's Introduction

Beaker

The Beaker Programming Language.

Dependencies

Beaker has several external dependencies.

  • Boost version 1.55 or later.
  • Lingo is a library that provides a number of utilities that can be used within various compilers.
  • The csll/llvm library provides a lightweight text-based LLVM assembly generator.

Note that Beaker does not depend on LLVM directly because the LLVM flags disable exceptions, which Beaker relies upon heavily.

Building Beaker

After cloning 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 Beaker, you will need to update the 'lingo' submodule.

git submodule update --remote --merge

The build is configured by CMake.

mkdir build
cd build
cmake ..
make

Running the compiler

The compiler is run by the command beaker. It takes the name of a single input file as an argument:

./beaker input.bkr

If input.bkr has a function named main(), that function is evaluated (main() must not take arguments). Otherwise, the compiler simply prints "no main".

Notes

The Beaker implementation does not (currently) directly depend on Lingo. Eventually, Beaker will depend on the following features in Lingo:

  • String formatting
  • Node concepts
  • Debugging macros
  • S-expression debugging

The long-term plan is to migrate a number of features out of Beaker and into Lingo, replacing older, less capable implementations. These are likely to be:

  • The symbol table
  • Input buffer
  • Tokens
  • Lexing and parsing
  • Generic environments
  • ???

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>

beaker's People

Contributors

asutton avatar cjb129 avatar darkarc avatar jenny-fa avatar jpetric837 avatar owenstranathan avatar th58 avatar toneill818 avatar tyharbert avatar

Watchers

 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.