GithubHelp home page GithubHelp logo

lzz3's Introduction

Lzz, The Lazy C++ Compiler

Lazy C++ is C++ without header files. Write code in one file and let Lzz generate your header and source files.

Just browse the source tree for examples. Lzz is writen in Lazy C++ (and Lua)!

This is Lzz version 3. It is still a work progress, though it can compile itself. The latest stable version is 2.8.2 and is available at http://www.lazycplusplus.com. You will need version 2.8.2 to bootstrap version 3.

Version 3 is extensible. The parser finite state machine (FSM) and semantic actions are not hardcoded. Instead the FSM is loaded at runtime, and semantic actions are coded in Lua. New language constructs can be added without recompiling Lzz!

The FSM is generated using BasilCC (mjspncr/basilcc). Since the parser runtime library is required to build Lzz you must build BasilCC first.

Follow these steps to get Lzz up and running:

  1. Download and build BasilCC. Note this step will require Lua 5.3. You'll also need Lzz 2.8.2 to bootstrap the build.

  2. Edit the makefile in this directory. Set LZZ to the Lzz 2.8.2 executable, and set BASILCC_ROOT to your BasilCC directory.

  3. Build lzz3: make BUILD=OPT. The binary will be created in build.gcc/bin.

  4. Generate the parser FSM (and Lua node definitions) from the Lazy C++ grammar: basilcc lzzscripts/lzz_rules.txt.

  5. Set the environment variable LZZSCRIPTS to the full path of the lzzscripts directory.

To compile Lzz with binary you just built, in the makefile set LZZ to the binary and type 'make clean; make BUILD=OPT'.

lzz3's People

Contributors

mjspncr 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.