The sed utility defines a syntax for matching and replacing regular expressions. For instance, the command line utility grep has a regular expression syntax which matches patterns in lines of text. A domain-specific language can be one of a visual diagramming language, such as those created by the Generic Eclipse Modeling System, programmatic abstractions, such as the Eclipse Modeling Framework, or textual languages.
The boundaries between these concepts are quite blurry, much like the boundary between scripting languages and general-purpose languages.ĭomain-specific languages are languages (or often, declared syntaxes or grammars) with very specific goals in design and implementation.
Creating a domain-specific language (with software to support it), rather than reusing an existing language, can be worthwhile if the language allows a particular type of problem or solution to be expressed more clearly than an existing language would allow and the type of problem in question reappears sufficiently often. Language-oriented programming considers the creation of special-purpose languages for expressing problems as standard part of the problem-solving process.
The design and use of appropriate DSLs is a key part of domain engineering, by using a language suitable to the domain at hand – this may consist of using an existing DSL or GPL, or developing a new DSL. 6 Tools for designing domain-specific languages.4.11 Generate model and services to multiple programming Languages.4.9 Rules Engines for Policy Automation.4.8 Unreal Engine before version 4 and other games.3.1 External and Embedded Domain Specific Languages.By contrast, PostScript is a Turing complete language, and in principle can be used for any task, but in practice is narrowly used as a page description language. For example, Perl was originally developed as a text-processing and glue language, for the same domain as AWK and shell scripts, but was mostly used as a general-purpose programming language later on. The line between general-purpose languages and domain-specific languages is not always sharp, as a language may have specialized features for a particular domain but be applicable more broadly, or conversely may in principle be capable of broad application but in practice used primarily for a specific domain. Simpler DSLs, particularly ones used by a single application, are sometimes informally called mini-languages. Special-purpose computer languages have always existed in the computer age, but the term "domain-specific language" has become more popular due to the rise of domain-specific modeling. DSLs can be further subdivided by the kind of language, and include domain-specific markup languages, domain-specific modeling languages (more generally, specification languages), and domain-specific programming languages. There are a wide variety of DSLs, ranging from widely used languages for common domains, such as HTML for web pages, down to languages used by only one or a few pieces of software, such as MUSH soft code. This is in contrast to a general-purpose language (GPL), which is broadly applicable across domains. Computer language specialized to a particular set of requirements or functionalityĪ domain-specific language ( DSL) is a computer language specialized to a particular application domain.