LxLang

About

Project Status:   Prototype | Development | Alpha | Beta | Production

LxLang is an experimental language designed to support the rapid development of low-level "building block" function libraries that can be compiled to Javascript, C++, and GLSL. It supports named functions, POD data types, function and operator overloading. It also supports a limited set of special variables and shorthand constructs useful in the low-level function domain.

The language is not designed to be fully general purpose: it does not, nor are there any plans to, support complex data types or general object-oriented programming concepts such as inheritance. The output libraries of LxLang provide useful building block functionality upon which to build higher-level, language-specific constructs.

The goal of LxLang is to aid in designing short and efficient functions and simple primitive data types.

Table of Contents

Demonstration

The below translations are generated dynamically by a recursive descent parser implemented in Javascript.

Source     Javascript     C++     GLSL     AST

Source

Generated Javascript

Still in development...

Generated C++

Still in development...

Generated GLSL

Still in development...

Generated AST (Abstract Syntax Tree)

LxLang3

LxLang3 is a rewrite of the lexer and parser based on the experiences from the earlier revisions. Once the Lx Pattern and Mapper libraries can be correctly parsed and translated into Javascript, this will become the mainline LxLang implementation.

Parser

Lexer