Miksilo Build Status Join the chat at https://gitter.im/Miksilo/Lobby#

Miksilo is a language workbench, which is a tool to construct programming languages. Miksilo, whose name comes from the Esperanto word for mixer, lets you create languages quickly by mixing existing languages and building on top of them. Language construction is notoriously hard, and these days involves not just writing a compiler or interpreter, but also editor tooling to provide features such as code completion, inline errors and code navigation. Miksilo takes a declarative language definition and from that generates all the tools expected of a modern language. To learn how to use Miksilo to generate editor tooling, visit this page.

Onboarding

To consume the Miksilo library, add a dependency to either the ModularLanguages or the LanguageServer library. Using the ModularLanguages library allows you to re-use language definitions of existing languages, but a downside is that it uses its own datatype for representing the abstract syntax tree, which makes it harder to integrate with existing AST types you may have for your language.

Using the ModularLanguages library is recommended when:

  • Your language syntactically looks like an existing language, for example it's a configuration language based on JSON or YAML.
  • Your language is turing complete and has features that commonly occur in languages such as expressions or statements.

The LanguageServer library does not enable modular language definition, but it can integrate directly with an existing language definition if you already have one. Using this is recommended when:

  • You already have type definitions for your language
  • Your language has custom syntax and doesn't contain any typical language features, an example could be a small configuration language with very custom syntax.

Build instructions

  1. Grab the source from GitHub
  2. Make sure you have installed the Java 8 JDK, or a higher version.
  3. Install Mill
  4. Call 'mill playground.run' in the project root to build Miksilo and start the sandbox desktop application.

Repository structure

This repository is divided into the following sub-projects:

  • EditorParser: Defines a parser API that can be used to create parsers suitable for use in text editors.
  • LSPProtocol: Defines the communication layers of an LSP client and an LSP server.
  • LanguageServer: Enables starting an LSP server from a language definition. Consume this library if you already have a codebase that defines your language and you want to create a language server for it.
  • ModularLanguages: Defines various tools for defining languages in a modular way. Comes with many predefined language building blocks. Consume this library if you're writing a language from scratch.
  • Playground: A desktop UI application that enables constructing languages on-the-fly by combining predefined languages blocks using drag and drop. This application is for educational purposes.

Contributing

We would love your contributions. Here are some ideas for new topics to work on:

If you would like to contribute then:

  1. Reach out on the Gitter, so other contributors can help you out where the documentation is lacking.
  2. Look through the open issues to see if you find something interesting
  3. Enjoy the work ;-)
  4. Once you're done, submit a pull request and make sure the build server approves it.