Share via


language

[This is prerelease documentation and is subject to change in future releases. Blank topics are included as placeholders.]

This keyword specifies the container for a given domain specific language (DSL). A language must be defined within a module, which can contain multiple language declarations.

language   LanguageName{      Other "M" declarations;  }

Language Name

LanguageName is any valid “M” identifier.

Other M Declarations

Other “M” declarations does not include module or language declarations.

Remarks

A language declaration can contain at most one Main syntax rule. Usually a language block contains multiple syntax and token rules.

Languages can be defined modularly. Language definitions can be shared by other languages within the same module, or by languages in other modules. You can also specify a language name in an export declaration.

Example

The following is an example of a very basic language definition.

module Hello 
{
    language HelloLanguage 
    {
        syntax Main = "Hello, World";
    }
}

See Also

Reference

syntax
token

Concepts

module ("M" Reference)
export ("M" Reference)

Fill out a survey about this topic for Microsoft.