Skip to content

eclipse-langium/langium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

5ad6064 · Apr 17, 2025
Jan 20, 2025
Feb 20, 2025
Apr 17, 2025
Apr 17, 2025
Nov 2, 2023
Feb 8, 2023
Jun 23, 2023
Feb 13, 2024
Aug 22, 2023
Oct 8, 2024
Feb 9, 2023
Jan 16, 2023
Jan 20, 2025
Apr 17, 2025
Nov 8, 2023
Jun 14, 2021
Apr 3, 2025
Apr 17, 2025
Jul 27, 2024
Dec 11, 2023
Aug 17, 2023
Feb 14, 2024

Repository files navigation

npm Build Gitter Chat Github Discussions Gitpod Ready-to-Code


Eclipse Langium (IPA: /ˈlæŋɡiəm/, like language and equilibrium) is a language engineering tool for TypeScript with built-in support for the Language Server Protocol. The framework is an all-in-one solution for building programming languages, domain specific languages, code generators, interpreters and compilers. It serves as a spiritual successor to the Eclipse Xtext framework.

  • Semantics First: Building on top of a grammar declaration language, Langium enables you to build the abstract model of your language in parallel to its syntax. Langium parsers are powered by Chevrotain.
  • Lean by Default, Customizable by Design: Langium offers the infrastructure you need to build languages purely by defining their grammar. If that is not enough, you can fine tune every detail of your language using our dependency injection system.
  • Write Once, Run Everywhere: By leveraging the flexibility of JavaScript and the Language Server Protocol, a language written using Langium can run in all kinds of IDEs and browsers or be embedded in CLIs and server applications.

Installation

Build your first language with Langium in our online playground.

Once you're ready to set up a project, you can use yeoman to generate a sample Langium project:

npm i -g yo generator-langium
yo langium

Documentation

You can find the Langium documentation on the website.

If you're new to building programming languages, take a look at our overview to see what Langium offers.

The documentation is divided into several sections:

The documentation website is hosted in this repository.

Examples

We host a number of simple examples in our main repo:

  • arithmetics: How to create an expression language + interpreter.
  • domainmodel: How to create a language with fully qualified name identifiers.
  • requirements: How to create a Langium project with multiple languages.
  • statemachine: How to create a code generator.

More complex examples are available as separate repositories in our GitHub organization:

  • lox: Implementation of the Lox language from the popular book Crafting Interpreters.
  • minilogo: Implementation of a logo language dialect. Shows how to integrate Langium in the browser.

Contributing

If you want to contribute to Langium, please take a look at our contributing guide.

Langium is fully MIT licensed.