Examples of domain-specific programming languages include
HTML,
Logo for pencil-like drawing,
Verilog and
VHDL hardware description languages,
MATLAB and
GNU Octave for matrix programming,
Mathematica,
Maple and
Maxima for
symbolic mathematics,
Specification and Description Language for reactive and distributed systems,
spreadsheet formulas and macros,
SQL for
relational database queries,
Yacc grammars for creating
parsers,
regular expressions for specifying
lexers, the
Generic Eclipse Modeling System for creating diagramming languages,
Csound for sound and music synthesis, and the input languages of
GraphViz and
GrGen, software packages used for
graph layout and
graph rewriting,
HashiCorp Configuration Language used for
Terraform and other HashiCorp tools,
Puppet also has its own
configuration language.
GameMaker Language GML is a domain-specific language used by
GameMaker Studio designed to help novice programmers learn the fundamentals of coding more easily. It functions as a blend of several languages, including
Delphi,
C++, and
BASIC. Most GML functions, once compiled, call runtime functions written in the specific language of the target platform; consequently, their final implementation remains hidden from the user. The language's primary goal is to lower the barrier to entry for game development. The GameMaker runtime, which manages the main game loop and handles function implementation, allows a simple game to use only a few lines of code instead of thousands.
ColdFusion Markup Language ColdFusion's associated scripting language is another example of a domain-specific language for data-driven websites. The language is used to weave together languages and services such as Java,
.NET, C++, SMS,
email, email servers, http, ftp, exchange, directory services, and
file systems for use in websites. The
ColdFusion Markup Language (CFML) includes a set of tags that can be used in ColdFusion pages to interact with data sources, manipulate data, and display output. CFML tag syntax is similar to HTML element syntax.
FilterMeister FilterMeister is a programming environment, with a programming language that is based on C, for the specific purpose of creating
Photoshop-compatible image processing filter plug-ins; FilterMeister runs as a Photoshop plug-in itself and it can load and execute scripts or compile and export them as independent plug-ins. Although the FilterMeister language reproduces a significant portion of the C language and function library, it contains only those features which can be used within the context of Photoshop plug-ins and adds a number of specific features only useful in this specific domain.
MediaWiki templates The
Template feature of
MediaWiki is an embedded domain-specific language whose fundamental purpose is to support the creation of
page templates and the
transclusion (inclusion by reference) of MediaWiki pages into other MediaWiki pages.
Software engineering uses There has been much interest in domain-specific languages to improve the productivity and quality of
software engineering. Domain-specific language could possibly provide a robust set of tools for efficient software engineering. Such tools are beginning to make their way into the development of critical software systems. The Software Cost Reduction Toolkit is an example of this. The toolkit is a suite of utilities including a specification editor to create a
requirements specification, a dependency graph browser to display variable dependencies, a
consistency checker to catch missing cases in
well-formed formulas in the specification, a
model checker and a
theorem prover to check program properties against the specification, and an invariant generator that automatically constructs invariants based on the requirements. A newer development is
language-oriented programming, an integrated software engineering
methodology based mainly on creating, optimizing, and using domain-specific languages.
Metacompilers Complementing
language-oriented programming, and all other forms of domain-specific languages, are the class of compiler writing tools called
metacompilers. Such compiler is useful for generating
parsers and
code generators for domain-specific languages, and a metacompiler compiles a domain-specific
metalanguage specifically designed for the domain of
metaprogramming. Besides parsing domain-specific languages, metacompilers are useful for generating a wide range of software engineering and analysis tools. The meta-compiler methodology is often found in
program transformation systems. Metacompilers that played a significant role in both computer science and the computer industry include
META II, and its descendant
TreeMeta.
Unreal Engine before version 4 and other games Unreal and
Unreal Tournament unveiled a language named
UnrealScript. This allowed rapid development of modifications relative to the competitor
Quake (using the
Id Tech 2 engine). The Id Tech engine used standard
C code meaning C had to be learned and properly applied, while UnrealScript was optimized for ease of use and efficiency. Similarly, more recent games have introduced their own specific languages for development. One more common example is
Lua for scripting.
Rules engines for policy automation Various
business rules engines have been developed for automating policy and business rules used in both government and private industry.
ILOG,
Oracle Policy Automation, DTRules,
Drools and others provide support for DSLs aimed to support various problem domains. DTRules goes so far as to define an interface for the use of multiple DSLs within a rule set. The purpose of business rules engines is to define a representation of business logic in as human-readable fashion as possible. This allows both
subject-matter experts and developers to work with and understand the same representation of the business logic. Most rules engines provide both an approach to simplifying the control structures for business logic (for example, using declarative rules or
decision tables) coupled with alternatives to programming syntax in favor of DSLs.
Statistical modelling languages Statistical modelers have developed domain-specific languages such as
R (an implementation of the
S language),
Bugs,
Jags, and
Stan. These languages provide a syntax for describing a Bayesian model and generate a method for solving it using simulation.
Generate model and services to multiple programming Languages Generate object handling and services based on an
Interface Description Language for a domain-specific language such as JavaScript for web applications, HTML for documentation, C++ for high-performance code, etc. This is done by cross-language frameworks such as
Apache Thrift or
Google Protocol Buffers.
Gherkin Gherkin is a language designed to define test cases to check the behavior of software, without specifying how that behavior is implemented. It is meant to be read and used by non-technical users using a natural language syntax and a
line-oriented design. The tests defined with Gherkin must then be implemented in a general programming language. Then, the steps in a Gherkin program acts as a syntax for method invocation accessible to non-developers.
Other examples Other prominent examples of domain-specific languages include: •
Game Description Language •
OpenGL Shading Language •
Gradle •
ActionScript ==Advantages and disadvantages==