Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Programming language
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===Specification=== {{Main|Programming language specification}} The specification of a programming language is an artifact that the language [[programmer|users]] and the [[programming language implementation|implementors]] can use to agree upon whether a piece of [[source code]] is a valid [[computer program|program]] in that language, and if so what its behavior shall be. A programming language specification can take several forms, including the following: * An explicit definition of the syntax, static semantics, and execution semantics of the language. While syntax is commonly specified using a formal grammar, semantic definitions may be written in [[natural language]] (e.g., as in the [[C (programming language)|C language]]), or a [[formal semantics of programming languages|formal semantics]] (e.g., as in [[Standard ML]]<ref>{{cite book|last=Milner|first=R.|author-link=Robin Milner |author2=[[Mads Tofte|M. Tofte]] |author3=[[Robert Harper (computer scientist)|R. Harper]] |author4=D. MacQueen |title=The Definition of Standard ML (Revised)|publisher=MIT Press|year=1997|isbn=978-0-262-63181-5}}</ref> and [[Scheme (programming language)|Scheme]]<ref>{{cite web|first=Richard|last=Kelsey|author2=William Clinger|author3=Jonathan Rees|title=Section 7.2 Formal semantics|work=Revised<sup>5</sup> Report on the Algorithmic Language Scheme|url=http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.2|date=February 1998|url-status=live|archive-url=https://web.archive.org/web/20060706081110/http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.2|archive-date=6 July 2006}}</ref> specifications). * A description of the behavior of a [[compiler|translator]] for the language (e.g., the [[C++]] and [[Fortran]] specifications). The syntax and semantics of the language have to be inferred from this description, which may be written in natural or formal language. * A [[reference implementation|''reference'' or ''model'' implementation]], sometimes [[Meta-circular evaluator|written in the language being specified]] (e.g., [[Prolog]] or [[REXX|ANSI REXX]]<ref>[[American National Standards Institute|ANSI]] β Programming Language Rexx, X3-274.1996</ref>). The syntax and semantics of the language are explicit in the behavior of the reference implementation.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)