Home

Awesome

COPYING

Copyright (c) by Meta Alternative Ltd, 2005-2017. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

INTRODUCTION

MBase is a metaprogramming framework built on top of .NET. It is designed for rapid prototyping and high quality implementation of custom programming language compilers, but can also serve as a robust and flexible embeddable scripting engine. Applications are not limited to .NET platform, since MBase can be used to implement compilers targeting other platforms - JVM, LLVM, C, etc.

MBase consists of a core language and a library of micro-DSLs.

The core of MBase is built on top of a Lisp-like language. Its main applications include:

MBase includes the following micro-DSLs and libraries:

The core Lisp-like language is not Scheme- or Common Lisp-compliant since it was designed with very different goals in mind. It is incrementally built around a tiny core, with reasonable execution efficiency, and its primary application domain is compilers development. Therefore such features as continuations, a sophisticated type system or floating point arithmetic are not included in the core language.

Instead MBase provides an inline assembly, a low level 'goto' statement, a rich set of different pattern matching and AST visiting features, lexing and parsing aid, various storage data structures suitable for compilers implementation. The core MBase language should not normally be used directly, it is rather a target and implementation tool for higher level languages. There is a rich extensible syntax frontend for MBase, called PFront, although it is also not recommended as a "general purpose" programming language.

See an example compiler built on top of MBase and LLVM here: https://github.com/combinatorylogic/clike

BUILDING

MBase requires Mono >= 3.0 and must be installed into GAC. Graphviz and latex (preferably texlive) are required for building documentation.

To build on Linux with Mono:

   cd bin
   make
   ./install.sh (may require root rights to access GAC)

Optional:

   ./test.sh

Add $MBASE/bin to your $PATH;

To build on Windows (with Cygwin or mingw32 bash and GNU Make):

   cd bin
   make MONO= CSC=csc backslash=\\\\
   ./install.sh (as Administrator)
   echo "" > conf

Optional

   ./test.sh

CONTENTS (binaries)

CONTENTS (Sources)