David Piepgrass


THE PROJECT HAS MOVED TO GitHub with web sites at loyc.net and core.loyc.net and new wiki here. The SF Wiki will no longer be updated.

The Language of Your Choice (Loyc) project is intended to become a rich set of tools for:

  • Transforming source code between different languages
  • Cross-language library programming, also known as acmeism
  • IDEs (code completion lists, various kinds of code visualization, intellisense)
  • Code analysis and transformation

Enhanced C#, LES (Loyc Expression Syntax) and LEL (Loyc expression langauge) are also under the Loyc umbrella.

It is in very early stages right now because I am working on it alone. I am focusing on the first point right now (transforming code between languages). Also, LES is working and I'm busy developing early stages of LEL. The project also currently includes a set of general-purpose libraries that will eventually be spun off into a separate project for a cross-language standard library.

Important concepts

Source code overview

Loyc currently contains the following projects, listed in order from the lowest level to the highest level. A rough dependency tree is

            |   |      
            |   +---------------+
            |                   |
            |               Loyc.Syntax
            |                  | |
      Loyc.Utilities-----------+ |
            ^                    |
            |                    |
  +---------+-------------+----+ |
  |         |             |    | |
Baadia* MiniTestRunner  Tests  Ecs*

* I will eventually split out LLLPG, Baadia, Ecs (Enhanced C#), and the low-level libraries (Essentials, Collections) into separate projects on SourceForge or GitHub.

In this graph, a dependency line from C to A is hidden when there is already a line
from C to B and B to A. For example, Ecs depends on Loyc.Syntax; Ecs also depends
directly on Loyc.Collections and Loyc.Essentials, but the direct dependency lines are
hidden so that the graph does not turn into spaghetti. Also, the graph does not show
that Loyc.Syntax and Ecs depend on LLLPG at compile-time to generate their lexers and

- LLLPG is a parser generator (Loyc LL(k) Parser Generator) to help make fast recursive-descent parsers
- LEL is a name for a programming language that doesn't really exist yet. Right now it really implements something that I'm calling LeMP (Lexical Macro Processor), which was earlier named micro-LEL. LeMP is a source-code preprocessor that LLLPG is based on.
- EC# is an enhanced version of C# that does not exist yet but which will have tons of new features
- Baadia is a gesture-based program for drawing "Boxes and arrows" diagrams (yes, it totally doesn't belong here.)
- MiniTestRunner is a unit test runner that I never completed, for a small unit test framework that resembles earlier versions of NUnit (Loyc.MiniTest).

I am currently keeping the unit tests in the same assemblies as the code being tested. I suspect this is why my libraries tend to be larger than many other "small" .NET libraries. Eventually I'll move the unit tests out into their own assemblies.

These projects use couple of tricks to support both .NET 3.5 and .NET 4 using a single solution file. The tricks are documented here: http://stackoverflow.com/questions/5006397/targetting-multiple-net-framework-versions-by-using-different-project-configura/23705790#23705790

Project list

There's a folder in Src/ and a .csproj file for each of these bullet points.

  • [Loyc.Essentials]: A library of interfaces and small services that are "missing" from the MS BCL.
  • [Loyc.Collections]: VLists, persistent hashtables (Set/MSet/Map/MMap), ALists, etc.
  • [Loyc.Syntax]: Loyc trees, LES printer and parser, SourceRange/SourcePos, helper classes for lexing/parsing, CodeSymbols
  • [Loyc.Utilities]: Miscellaneous code; notably contains a bunch of geometry algorithms and extension methods.
  • [Tests project]: Front end that invokes most of the unit tests. Also, some random benchmark code.
  • [LLLPG]: The Loyc LL(k) Parser Generator
  • [MiniTestRunner]: Unit test runner (very incomplete)
  • [Baadia]: Drawing program for making boxes and arrows diagrams (very incomplete)
  • [LEL]: Loyc expression language compiler (barely started)
  • [Ecs]: Enhanced C# compiler (barely started)

I just moved the source code to GitHub: https://github.com/qwertie/Loyc

My development blog: http://loyc-etc.blogspot.com

Home page: http://loyc.net


Wiki: Baadia
Wiki: Ecs
Wiki: LEL
Wiki: LES
Wiki: Loyc trees
Wiki: Loyc.Collections
Wiki: Loyc.Essentials
Wiki: Loyc.Syntax
Wiki: Loyc.Utilities
Wiki: MiniTestRunner