GitHub Toggle Dark/Light/Auto modeToggle Dark/Light/Auto modeToggle Dark/Light/Auto mode Back to homepage


Anyone who is new to DSL development should carefully read the following primer on the terms we are using in our documentation:

abstract syntax tree: A tree of elements that represents a text document. Each element is a simple JS object that combines multiple input tokens into a single object. Commonly abbreviated as AST.

document: An abstract term to refer to a text file on your file system or an open editor document in your IDE.

grammar: Defines the form of your language. In Langium, a grammar is also responsible for describing how the AST is built.

parser: A program that takes a document as its input and computes an abstract syntax tree as its output.

parser rule: A parser rule describes how a certain AST element is supposed to be parsed. This is done by invoking other parser rules or terminals.

terminal: A terminal is the smallest parsable part of a document. It usually represents small pieces of text like names, numbers, keywords or comments.

token: A token is a substring of the document that matches a certain terminal. It contains information about which kind of terminal it represents as well as its location in the document.