Child pages
  • Base Language
Skip to end of metadata
Go to start of metadata

The BaseLanguage is an MPS' counterpart to Java, since it shares with Java almost the same set of constructs. BaseLanguage is the most common target of code generation in MPS and the most extensively extended language at the same time.

In order to simplify integration with Java, it is possible to specify the classpath for all modules in MPS. Classes found on the classpath will then be automatically imported into @java_stub models and so can be used directly in programs that use the BaseLanguage.

The frequently extended concepts of MPS include:

  • Expression. Constructs, which are evaluated to some results like 1, "abc", etc.
  • Statement. Constructs, which can be contained on a method level like if/while/synchronized statement.
  • Type. Types of variables, like int, double.
  • IOperation. Constructs, which can be placed after a dot like in node.parent. The parent element is a IOperation here.
  • AbstractCreator. Constructs, which can be used to instantiate various elements.

BaseLanguage was created as a copy of Java 6. Extensions to BaseLanguage for Java 7 and 8 compatibility have been gradually added.

  • Java 7 language constructs are contained in the jetbrains.mps.baselanguage.jdk7 language
  • Java 8 language extensions are contained in the jetbrains.mps.baselanguage.jdk8 language
  • You may like to check out a documentation dedicated to MPS interoperability with Java

Previous Next

  • No labels