
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">

<!--
	Copyright (c) 1999-2013 by Digital Mars
	All Rights Reserved Written by Walter Bright
	http://digitalmars.com
  -->

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="D programming language" />
<meta name="description" content="D Programming Language" />
<title>Lexical - D Programming Language</title>
<link rel="stylesheet" href="/css/codemirror.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" type="text/css" href="css/print.css" media="print" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
<script src="/js/codemirror.js"></script>
<script src="/js/run-main-website.js" type="text/javascript"></script>
<script src="/js/d.js"></script>
<script src="/js/run.js" type="text/javascript"></script>

<link rel="shortcut icon" href="favicon.ico" />

<script src="/js/hyphenate.js" type="text/javascript"></script>

<script type="text/javascript">
function bodyLoad()
{
	var links = document.getElementById("navigation").getElementsByTagName("a");
	for (var i = 0; i < links.length; i++)
	{
		var url = "/" + links[i].getAttribute("href");
		if (window.location.href.match(url + "\x24") == url)
		{
			var cls = links[i].getAttribute("class");
			links[i].setAttribute("class", cls ? cls + " active" : "active");
			break;
		}
	}
}
</script>
</head>

<body onLoad='bodyLoad()'>

<div id="top">
	<div id="search-box">
		<form method="get" action="http://google.com/search">
			<img src="/images/search-left.gif" width="11" height="22" /><input id="q" name="q" /><input type="image" id="search-submit" name="submit" src="/images/search-button.gif" />
			<input type="hidden" id="domains" name="domains" value="dlang.org" />
			<input type="hidden" id="sourceid" name="sourceid" value="google-search" />
			<div id="search-dropdown">
				<select id="sitesearch" name="sitesearch" size="1">
					<option value="dlang.org">Entire D Site</option>
					<option value="dlang.org/phobos">Library Reference</option>
					<option value="digitalmars.com/d/archives">Newsgroup Archives</option>
				</select>
			</div>
		</form>
	</div>
	<div id="header">
		<a id="d-language" href="/">
		<img id="logo" width="125" height="95" border="0" alt="D Logo" src="images/dlogo.png">
		D Programming Language</a>
	</div>
</div>

<!--Generated by Ddoc from lex.dd-->



<div id="navigation">
  

<div class="navblock">
<h2><a href="index.html" title="D Programming Language">D Home</a></h2>
<ul><li><a href="overview.html" title="D language overview">Overview</a></li>
	<li><a href="comparison.html" title="D feature list">Features</a></li>
	<li><a href="download.html" title="Download a D compiler">Downloads &amp; Tools</a></li>
	<li><a href="changelog.html" title="History of changes to D">Change Log</a></li>
	<li><a href="bugstats.php" title="D issue and bug tracking system">Bug Tracker</a></li>
	<li><a href="faq.html" title="Frequently Asked Questions">FAQ</a></li>
	<li><a href="appendices.html">Appendices</a></li>
	<li><a href="acknowledgements.html" title="Thank-you to these people who have helped with D">Acknowledgments</a></li>
	<li><a href="sitemap.html" title="Documents on this site, indexed alphabetically">Sitemap</a></li>
	<li><a href="http://digitalmars.com/d/1.0/index.html" title="D Programming Language 1.0">D1 Home</a></li>
</ul>
    </div>

<div class="navblock">
<h2>Documentation</h2>
<ul>   <li><a href="http://www.amazon.com/exec/obidos/ASIN/0321635361/classicempire">Book</a></li>
	<li><a href="http://www.informit.com/articles/article.aspx?p=1381876">&nbsp;<font size=-1><span style="visibility: hidden">3</span>1.&nbsp;Tutorial</font></a></li>
	<li><a href="http://www.informit.com/articles/article.aspx?p=1609144">&nbsp;<font size=-1>13.&nbsp;Concurrency</font></a></li>

	<li><a href="language-reference.html">Language Reference</a>

    <div class="navblock">
<ul><li><a href="lex.html">Lexical</a></li>
	<li><a href="module.html">Modules</a></li>
	<li><a href="declaration.html">Declarations</a></li>
	<li><a href="type.html">Types</a></li>
	<li><a href="property.html">Properties</a></li>
	<li><a href="attribute.html">Attributes</a></li>
	<li><a href="pragma.html">Pragmas</a></li>
	<li><a href="expression.html">Expressions</a></li>
	<li><a href="statement.html">Statements</a></li>
	<li><a href="arrays.html">Arrays</a></li>
	<li><a href="hash-map.html">Associative Arrays</a></li>
	<li><a href="struct.html">Structs &amp; Unions</a></li>
	<li><a href="class.html">Classes</a></li>
	<li><a href="interface.html">Interfaces</a></li>
	<li><a href="enum.html">Enums</a></li>
	<li><a href="const3.html">Const and Immutable</a></li>
	<li><a href="function.html">Functions</a></li>
	<li><a href="operatoroverloading.html">Operator Overloading</a></li>
	<li><a href="template.html">Templates</a></li>
	<li><a href="template-mixin.html">Template Mixins</a></li>
	<li><a href="dbc.html">Contracts</a></li>
	<li><a href="version.html">Conditional Compilation</a></li>
	<li><a href="simd.html">Vector Extensions</a></li>
	<li><a href="traits.html">Traits</a></li>
	<li><a href="errors.html">Handling errors</a></li>
	<li><a href="unittest.html">Unit Tests</a></li>
	<li><a href="garbage.html">Garbage Collection</a></li>
	<li><a href="float.html">Floating Point</a></li>
	<li><a href="iasm.html">Inline Assembler</a></li>
	<li><a href="ddoc.html">Documentation Comments</a></li>
	<li><a href="interfaceToC.html">Interfacing To C</a></li>
	<li><a href="cpp_interface.html">Interfacing To C++</a></li>
	<li><a href="portability.html">Portability Guide</a></li>
	<li><a href="entity.html">Named Character Entities</a></li>
	<li><a href="memory-safe-d.html">Memory Safe D Spec</a></li>
	<li><a href="abi.html">Application Binary Interface</a></li>
    </ul>
</div></li>
	<li><a href="phobos/index.html">Library Reference</a></li>
	<li><a href="howtos.html" title="Helps for using D">How-tos</a></li>
	<li><a href="articles.html">Articles</a></li>
</ul>
    </div>

<div class="navblock">
<h2>Community</h2>
<ul><li><a href="http://forum.dlang.org/" title="User forums">Forums</a></li>
	<li><a href="http://github.com/D-Programming-Language" title="D on github">GitHub</a></li>
	<li><a href="http://wiki.dlang.org" title="Wiki for the D Programming Language">Wiki</a></li>
	<li><a href="http://wiki.dlang.org/Review_Queue" title="Queue of current and upcoming standard library additions">Review Queue</a></li>
	<li><a href="http://twitter.com/#search?q=%23d_lang" title="#d_lang on twitter.com">Twitter</a></li>
	<li><a href="http://digitalmars.com/d/dlinks.html" title="External D related links">Links</a></li>
	
</ul>
    </div>
  
<div id="translate" class="tool">Translate this page:
	<div id="google_translate_element"></div><script type="text/javascript">
	function googleTranslateElementInit() {
	  new google.translate.TranslateElement({
	    pageLanguage: 'en',
	    autoDisplay: false,
	    layout: google.translate.TranslateElement.InlineLayout.SIMPLE
	  }, 'google_translate_element');
	}
	</script>
<script type="text/javascript" src="http://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
</div>
</div><!--/navigation-->
<div id="content" class='hyphenate'>
  
<div id="tools">
	<!--span id="lastupdate">Last update Fri Feb  8 00:04:14 2013
</span-->
	<a href="https://github.com/D-Programming-Language/d-programming-language.org/edit/master/lex.dd" class="tip button">
		Improve this page
		<span>
	        Quickly fork, edit online, and submit a pull request for this page.
			Requires a signed-in GitHub account. This works well for small changes.
			If you'd like to make larger changes you may want to consider using
			local clone.
		</span>
	</a>
	<a href="http://wiki.dlang.org/DocComments/Lex" class="tip button">
		Page wiki
		<span>
	        View or edit the community-maintained wiki page associated with this page.
		</span>
	</a>
</div>
  <h1>Lexical</h1>
  	The lexical analysis is independent of the syntax parsing and the
	semantic analysis. The lexical analyzer splits the source text up into
	tokens. The lexical grammar describes what those tokens are. The
	grammar is designed to be suitable for high speed scanning, it
	has a minimum of special case rules, there is only one phase of
	translation, and to make it easy to write a correct scanner
	for. The tokens are readily recognizable by those familiar with C and
	C++.

<h3>Source Text</h3>

	D source text can be in one of the following formats:

	<ul><li>ASCII</li><li>UTF-8</li><li>UTF-16BE</li><li>UTF-16LE</li><li>UTF-32BE</li><li>UTF-32LE
	</li></ul>

	UTF-8 is a superset of traditional 7-bit ASCII.
	One of the
	following UTF BOMs (Byte Order Marks) can be present at the beginning
	of the source text:
    <p></p>

    <center><table border=1 cellpadding=4 cellspacing=0><caption>UTF Byte Order Marks</caption>    <tr><th class="donthyphenate"><b>Format</b></th><th class="donthyphenate"><b>BOM</b></th></tr>
	<tr><td>UTF-8</td><td>EF BB BF</td></tr>
	<tr><td>UTF-16BE</td><td>FE FF</td></tr>
	<tr><td>UTF-16LE</td><td>FF FE</td></tr>
    <tr><td>UTF-32BE</td><td>00 00 FE FF</td></tr>
	<tr><td>UTF-32LE</td><td>FF FE 00 00</td></tr>
	<tr><td>ASCII</td><td>no BOM</td></tr>
    </table></center>

	<p>If the source file does not start with a BOM, then the first
	character must be less than or equal to U0000007F.</p>

	<p>There are no digraphs or trigraphs in D.</p>

	<p>The source text is decoded from its source representation
	into Unicode <a href="#Character"><i>Character</i></a>s.
	The <a href="#Character"><i>Character</i></a>s are further divided into:
	<a href="#WhiteSpace"><i>WhiteSpace</i></a>,
	<a href="#EndOfLine"><i>EndOfLine</i></a>,
	<a href="#Comment"><i>Comment</i></a>s,
	<a href="#SpecialTokenSequence"><i>SpecialTokenSequence</i></a>s,
	<a href="#Token"><i>Token</i></a>s,
	all followed by <a href="#EndOfFile"><i>EndOfFile</i></a>.
	</p>

	<p>The source text is split into tokens using the maximal munch
	technique, i.e., the
	lexical analyzer tries to make the longest token it can. For example
	<span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;&gt;</span></span> is a right shift token,
	not two greater than tokens. An exception to this rule is that a <span class="notranslate"><span class="d_inlinecode donthyphenate">..</span></span>
	embedded inside what looks like two floating point literals, as in
	<span class="notranslate"><span class="d_inlinecode donthyphenate">1..2</span></span>, is interpreted as if the <span class="notranslate"><span class="d_inlinecode donthyphenate">..</span></span> was separated by a space from the
	first integer.
	</p>

<h3>Character Set</h3>

<pre class="bnf"><span class="notranslate"><a name="Character"><i>Character</i></a>:
    <i>any Unicode character</i>
</span></pre>

<h3>End of File</h3>

<pre class="bnf"><span class="notranslate"><a name="EndOfFile"><i>EndOfFile</i></a>:
    <i>physical end of the file</i>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u0000</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u001A</span></span></span></pre>

The source text is terminated by whichever comes first.

<h3>End of Line</h3>

<pre class="bnf"><span class="notranslate"><a name="EndOfLine"><i>EndOfLine</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u000D</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u000A</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u000D \u000A</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u2028</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u2029</span></span>
    <a href="#EndOfFile"><i>EndOfFile</i></a></span></pre>

	There is no backslash line splicing, nor are there any limits
	on the length of a line.

<h3>White Space</h3>

<pre class="bnf"><span class="notranslate"><a name="WhiteSpace"><i>WhiteSpace</i></a>:
    <a href="#Space"><i>Space</i></a>
    <a href="#Space"><i>Space</i></a> <i>WhiteSpace</i>

<a name="Space"><i>Space</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u0020</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u0009</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u000B</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u000C</span></span>
</span></pre>


<h3><a name="comment">Comments</a></h3>

<pre class="bnf"><span class="notranslate"><a name="Comment"><i>Comment</i></a>:
    <a href="#BlockComment"><i>BlockComment</i></a>
    <a href="#LineComment"><i>LineComment</i></a>
    <a href="#NestingBlockComment"><i>NestingBlockComment</i></a>

<a name="BlockComment"><i>BlockComment</i></a>:
    <b>/*</b> <a href="#Characters"><i>Characters</i></a> <b>*/</b>

<a name="LineComment"><i>LineComment</i></a>:
    <b>//</b> <a href="#Characters"><i>Characters</i></a> <a href="#EndOfLine"><i>EndOfLine</i></a>

<a name="NestingBlockComment"><i>NestingBlockComment</i></a>:
    <b>/+</b> <a href="#NestingBlockCommentCharacters"><i>NestingBlockCommentCharacters</i></a> <b>+/</b>

<a name="NestingBlockCommentCharacters"><i>NestingBlockCommentCharacters</i></a>:
    <a href="#NestingBlockCommentCharacter"><i>NestingBlockCommentCharacter</i></a>
    <a href="#NestingBlockCommentCharacter"><i>NestingBlockCommentCharacter</i></a> <i>NestingBlockCommentCharacters</i>

<a name="NestingBlockCommentCharacter"><i>NestingBlockCommentCharacter</i></a>:
    <a href="#Character"><i>Character</i></a>
    <a href="#NestingBlockComment"><i>NestingBlockComment</i></a>

<a name="Characters"><i>Characters</i></a>:
    <a href="#Character"><i>Character</i></a>
    <a href="#Character"><i>Character</i></a> <i>Characters</i></span></pre>

    <p>D has three kinds of comments:</p>

	<ol><li>Block comments can span multiple lines, but do not nest.</li>
	<li>Line comments terminate at the end of the line.</li>
	<li>Nesting block comments can span multiple lines and can nest.</li>
	</ol>

	<p>The contents of strings and comments are not tokenized.  Consequently,
	comment openings occurring within a string do not begin a comment, and
	string delimiters within a comment do not affect the recognition of
	comment closings and nested "/+" comment openings.  With the exception
	of "/+" occurring within a "/+" comment, comment openings within a
	comment are ignored.
	</p>

<pre class="d_code"><span class="notranslate">a = <span class="d_comment">/+ // +/</span> 1;    <span class="d_comment">// parses as if 'a = 1;'
</span>a = <span class="d_comment">/+ "+/</span><span class="d_string">" +/ 1"</span>; <span class="d_comment">// parses as if 'a = " +/ 1";'
</span>a = <span class="d_comment">/+ /* +/</span> */ 3; <span class="d_comment">// parses as if 'a = */ 3;'
</span></span></pre>

	Comments cannot be used as token concatenators, for example,
	<span class="notranslate"><span class="d_inlinecode donthyphenate">abc/**/def</span></span> is two tokens, <span class="notranslate"><span class="d_inlinecode donthyphenate">abc</span></span> and <span class="notranslate"><span class="d_inlinecode donthyphenate">def</span></span>,
	not one <span class="notranslate"><span class="d_inlinecode donthyphenate">abcdef</span></span> token.

<h3>Tokens</h3>

<pre class="bnf"><span class="notranslate"><a name="Token"><i>Token</i></a>:
    <a href="#Identifier"><i>Identifier</i></a>
    <a href="#StringLiteral"><i>StringLiteral</i></a>
    <a href="#CharacterLiteral"><i>CharacterLiteral</i></a>
    <a href="#IntegerLiteral"><i>IntegerLiteral</i></a>
    <a href="#FloatLiteral"><i>FloatLiteral</i></a>
    <a href="#Keyword"><i>Keyword</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">/</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">/=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">.</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">..</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">...</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&amp;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&amp;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&amp;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&amp;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">|</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">|=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">||</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">-</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">-=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">--</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">+</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">+=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">++</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&lt;&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&lt;&gt;=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&lt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&lt;=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">!&gt;=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">(</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">)</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">[</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">]</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">{</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">}</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">?</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">,</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">:</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">$</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">==</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">*</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">*=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">%</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">%</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">^</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">^=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">^^</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">^^=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">~</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">~=</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">@</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">=&gt;</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">#</span></span>

</span></pre>

<h3>Identifiers</h3>

<pre class="bnf"><span class="notranslate"><a name="Identifier"><i>Identifier</i></a>:
    <a href="#IdentifierStart"><i>IdentifierStart</i></a>
    <a href="#IdentifierStart"><i>IdentifierStart</i></a> <a href="#IdentifierChars"><i>IdentifierChars</i></a>

<a name="IdentifierChars"><i>IdentifierChars</i></a>:
    <a href="#IdentifierChar"><i>IdentifierChar</i></a>
    <a href="#IdentifierChar"><i>IdentifierChar</i></a> <i>IdentifierChars</i>

<a name="IdentifierStart"><i>IdentifierStart</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>
    <i>Letter</i>
    <i>UniversalAlpha</i>

<a name="IdentifierChar"><i>IdentifierChar</i></a>:
    <a href="#IdentifierStart"><i>IdentifierStart</i></a>
    <b>0</b>
    <a href="#NonZeroDigit"><i>NonZeroDigit</i></a>
</span></pre>


	Identifiers start with a letter, <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>, or universal alpha,
	and are followed by any number
	of letters, <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>, digits, or universal alphas.
	Universal alphas are as defined in ISO/IEC 9899:1999(E) Appendix D.
	(This is the C99 Standard.)
	Identifiers can be arbitrarily long, and are case sensitive.
	Identifiers starting with <span class="notranslate"><span class="d_inlinecode donthyphenate">__</span></span> (two underscores) are reserved.

<h3>String Literals</h3>

<pre class="bnf"><span class="notranslate"><a name="StringLiteral"><i>StringLiteral</i></a>:
    <a href="#WysiwygString"><i>WysiwygString</i></a>
    <a href="#AlternateWysiwygString"><i>AlternateWysiwygString</i></a>
    <a href="#DoubleQuotedString"><i>DoubleQuotedString</i></a>

    <a href="#HexString"><i>HexString</i></a>
    <a href="#DelimitedString"><i>DelimitedString</i></a>
    <a href="#TokenString"><i>TokenString</i></a>

<a name="WysiwygString"><i>WysiwygString</i></a>:
    <b>r"</b> <a href="#WysiwygCharacters"><i>WysiwygCharacters</i></a> <b>"</b> <a href="#StringPostfix"><i>StringPostfix</i></a><sub>opt</sub>

<a name="AlternateWysiwygString"><i>AlternateWysiwygString</i></a>:
    <b>`</b> <a href="#WysiwygCharacters"><i>WysiwygCharacters</i></a> <b>`</b> <a href="#StringPostfix"><i>StringPostfix</i></a><sub>opt</sub>

<a name="WysiwygCharacters"><i>WysiwygCharacters</i></a>:
    <a href="#WysiwygCharacter"><i>WysiwygCharacter</i></a>
    <a href="#WysiwygCharacter"><i>WysiwygCharacter</i></a> <i>WysiwygCharacters</i>

<a name="WysiwygCharacter"><i>WysiwygCharacter</i></a>:
    <a href="#Character"><i>Character</i></a>
    <a href="#EndOfLine"><i>EndOfLine</i></a>

<a name="DoubleQuotedString"><i>DoubleQuotedString</i></a>:
    <b>"</b> <a href="#DoubleQuotedCharacters"><i>DoubleQuotedCharacters</i></a> <b>"</b> <a href="#StringPostfix"><i>StringPostfix</i></a><sub>opt</sub>

<a name="DoubleQuotedCharacters"><i>DoubleQuotedCharacters</i></a>:
    <a href="#DoubleQuotedCharacter"><i>DoubleQuotedCharacter</i></a>
    <a href="#DoubleQuotedCharacter"><i>DoubleQuotedCharacter</i></a> <i>DoubleQuotedCharacters</i>

<a name="DoubleQuotedCharacter"><i>DoubleQuotedCharacter</i></a>:
    <a href="#Character"><i>Character</i></a>
    <a href="#EscapeSequence"><i>EscapeSequence</i></a>
    <a href="#EndOfLine"><i>EndOfLine</i></a>

<a name="EscapeSequence"><i>EscapeSequence</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\'</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\"</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\?</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\\</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\a</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\b</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\f</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\n</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\r</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\t</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\v</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> <a href="#EndOfFile"><i>EndOfFile</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\x</span></span> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> <a href="#OctalDigit"><i>OctalDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> <a href="#OctalDigit"><i>OctalDigit</i></a> <a href="#OctalDigit"><i>OctalDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> <a href="#OctalDigit"><i>OctalDigit</i></a> <a href="#OctalDigit"><i>OctalDigit</i></a> <a href="#OctalDigit"><i>OctalDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\u</span></span> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\U</span></span> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigit"><i>HexDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> <a href="entity.html#NamedCharacterEntity"><i>NamedCharacterEntity</i></a>

<a name="HexString"><i>HexString</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">x"</span></span> <a href="#HexStringChars"><i>HexStringChars</i></a> <span class="notranslate"><span class="d_inlinecode donthyphenate">"</span></span> <a href="#StringPostfix"><i>StringPostfix</i></a><sub>opt</sub>

<a name="HexStringChars"><i>HexStringChars</i></a>:
    <a href="#HexStringChar"><i>HexStringChar</i></a>
    <a href="#HexStringChar"><i>HexStringChar</i></a> <i>HexStringChars</i>

<a name="HexStringChar"><i>HexStringChar</i></a>:
    <a href="#HexDigit"><i>HexDigit</i></a>
    <a href="#WhiteSpace"><i>WhiteSpace</i></a>
    <a href="#EndOfLine"><i>EndOfLine</i></a>

<a name="StringPostfix"><i>StringPostfix</i></a>:
    <b>c</b>
    <b>w</b>
    <b>d</b>

<a name="DelimitedString"><i>DelimitedString</i></a>:
    <b>q"</b> <i>Delimiter</i> <a href="#WysiwygCharacters"><i>WysiwygCharacters</i></a> <i>MatchingDelimiter</i> <b>"</b>

<a name="TokenString"><i>TokenString</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">q</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">{</span></span> <a href="#Token"><i>Token</i></a>s <span class="notranslate"><span class="d_inlinecode donthyphenate">}</span></span>

</span></pre>

	<p>A string literal is either a double quoted string, a wysiwyg quoted
	string, an escape sequence,
	a delimited string, a token string,
	or a hex string.
	</p>

	<p>In all string literal forms, an <a href="#EndOfLine"><i>EndOfLine</i></a> is regarded as a single
	<span class="notranslate"><span class="d_inlinecode donthyphenate">\n</span></span> character.</p>

<h4>Wysiwyg Strings</h4>

	<p>Wysiwyg "what you see is what you get" quoted strings are enclosed by r" and ".
	All characters between
	the r" and " are part of the string.
	There are no escape sequences inside r" ":
	</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">r"hello"</span>
<span class="d_string">r"c:\root\foo.exe"</span>
<span class="d_string">r"ab\n"</span> <span class="d_comment">// string is 4 characters,
</span>        <span class="d_comment">// 'a', 'b', '\', 'n'
</span></span></pre>

	<p>An alternate form of wysiwyg strings are enclosed by backquotes,
	the ` character. The ` character is not available on some keyboards
	and the font rendering of it is sometimes indistinguishable from
	the regular ' character. Since, however, the ` is rarely used,
	it is useful to delineate strings with " in them.
	</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">`hello`</span>
<span class="d_string">`c:\root\foo.exe`</span>
<span class="d_string">`ab\n`</span>  <span class="d_comment">// string is 4 characters,
</span>        <span class="d_comment">// 'a', 'b', '\', 'n'
</span></span></pre>

<h4>Double Quoted Strings</h4>

	<p>Double quoted strings are enclosed by "". Escape sequences can be
	embedded into them with the typical <span class="notranslate"><span class="d_inlinecode donthyphenate">\</span></span> notation.</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">"hello"</span>
<span class="d_string">"c:\\root\\foo.exe"</span>
<span class="d_string">"ab\n"</span>   <span class="d_comment">// string is 3 characters,
</span>         <span class="d_comment">// 'a', 'b', and a linefeed
</span><span class="d_string">"ab
"</span>        <span class="d_comment">// string is 3 characters,
</span>         <span class="d_comment">// 'a', 'b', and a linefeed
</span></span></pre>



<h4>Hex Strings</h4>

	<p>Hex strings allow string literals to be created using hex data.
	The hex data need not form valid UTF characters.
	</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">x"0A"</span>              <span class="d_comment">// same as "\x0A"
</span><span class="d_string">x"00 FBCD 32FD 0A"</span> <span class="d_comment">// same as
</span>                   <span class="d_comment">// "\x00\xFB\xCD\x32\xFD\x0A"
</span></span></pre>

	Whitespace and newlines are ignored, so the hex data can be
	easily formatted.
	The number of hex characters must be a multiple of 2.
	<p></p>

	Adjacent strings are concatenated with the ~ operator, or by simple
	juxtaposition:

<pre class="d_code"><span class="notranslate"><span class="d_string">"hello "</span> ~ <span class="d_string">"world"</span> ~ <span class="d_string">"\n"</span> <span class="d_comment">// forms the string
</span>       <span class="d_comment">// 'h','e','l','l','o',' ',
</span>       <span class="d_comment">// 'w','o','r','l','d',linefeed
</span></span></pre>

	The following are all equivalent:

<pre class="d_code"><span class="notranslate"><span class="d_string">"ab"</span> <span class="d_string">"c"</span>
<span class="d_string">r"ab"</span> <span class="d_string">r"c"</span>
<span class="d_string">r"a"</span> <span class="d_string">"bc"</span>
<span class="d_string">"a"</span> ~ <span class="d_string">"b"</span> ~ <span class="d_string">"c"</span>
</span></pre>

	<p>The optional <i>StringPostfix</i> character gives a specific type
	to the string, rather than it being inferred from the context.
	This is useful when the type cannot be unambiguously inferred,
	such as when overloading based on string type. The types corresponding
	to the postfix characters are:
	</p>


	<center><table border=1 cellpadding=4 cellspacing=0><caption>String Literal Postfix Characters</caption>	<tr><th class="donthyphenate"><b>Postfix</b></th><th class="donthyphenate"><b>Type</b></th><th class="donthyphenate"><b>Aka</b></th></tr>
	<tr><td><b>c</b></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">immutable(char)[]</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">string</span></span></td></tr>
	<tr><td><b>w</b></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">immutable(wchar)[]</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">wstring</span></span></td></tr>
	<tr><td><b>d</b></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">immutable(dchar)[]</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">dstring</span></span></td></tr>
	</table></center>

<pre class="d_code"><span class="notranslate"><span class="d_string">"hello"c</span>  <span class="d_comment">// string
</span><span class="d_string">"hello"w</span>  <span class="d_comment">// wstring
</span><span class="d_string">"hello"d</span>  <span class="d_comment">// dstring
</span></span></pre>

	<p>The string literals are assembled as UTF-8 char arrays,
	and the postfix is applied
	to convert to wchar or dchar as necessary as a final step.</p>

	<p>String literals are read only. Writes to string literals
	cannot always be detected, but cause undefined behavior.</p>

<h4>Delimited Strings</h4>

	<p>Delimited strings use various forms of delimiters.
	The delimiter, whether a character or identifer,
	must immediately follow the " without any intervening whitespace.
	The terminating delimiter must immediately precede the closing "
	without any intervening whitespace.
	A <i>nesting delimiter</i> nests, and is one of the
	following characters:
	</p>

	<center><table border=1 cellpadding=4 cellspacing=0><caption>Nesting Delimiters</caption>	<tr><th class="donthyphenate"><b>Delimiter</b></th><th class="donthyphenate"><b>Matching Delimiter</b></th></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">[</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">]</span></span></td></tr>
	<tr><td>(</td><td>)</td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">&lt;</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">&gt;</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">{</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">}</span></span></td></tr>
	</table></center>

<pre class="d_code"><span class="notranslate"><span class="d_string">q"(foo(xxx))"</span>   <span class="d_comment">// "foo(xxx)"
</span><span class="d_string">q"[foo{]"</span>       <span class="d_comment">// "foo{"
</span></span></pre>

	<p>If the delimiter is an identifier, the identifier must
	be immediately followed by a newline, and the matching
	delimiter is the same identifier starting at the beginning
	of the line:
	</p>
<pre class="d_code"><span class="notranslate">writefln(<span class="d_string">q"EOS
This
is a multi-line
heredoc string
EOS"</span>
);
</span></pre>
	<p>The newline following the opening identifier is not part
	of the string, but the last newline before the closing
	identifier is part of the string. The closing identifier
    must be placed on its own line at the leftmost column.
	</p>

	<p>Otherwise, the matching delimiter is the same as
	the delimiter character:</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">q"/foo]/"</span>          <span class="d_comment">// "foo]"
</span><span class="d_comment">// q"/abc/def/"    // error
</span></span></pre>

<h4>Token Strings</h4>

	<p>Token strings open with the characters <span class="notranslate"><span class="d_inlinecode donthyphenate">q</span></span><span class="notranslate"><span class="d_inlinecode donthyphenate">{</span></span> and close with
	the token <span class="notranslate"><span class="d_inlinecode donthyphenate">}</span></span>. In between must be valid D tokens.
	The <span class="notranslate"><span class="d_inlinecode donthyphenate">{</span></span> and <span class="notranslate"><span class="d_inlinecode donthyphenate">}</span></span> tokens nest.
	The string is formed of all the characters between the opening
	and closing of the token string, including comments.
	</p>

<pre class="d_code"><span class="notranslate"><span class="d_string">q{foo}</span>              <span class="d_comment">// "foo"
</span><span class="d_string">q{/*}*/ }</span>           <span class="d_comment">// "/*}*/ "
</span><span class="d_string">q{ foo(q{hello}); }</span> <span class="d_comment">// " foo(q{hello}); "
</span><span class="d_string">q{ __TIME__ }</span>       <span class="d_comment">// " __TIME__ "
</span>    <span class="d_comment">// i.e. it is not replaced with the time
</span><span class="d_comment">// q{ __EOF__ }     // error
</span>    <span class="d_comment">// __EOF__ is not a token, it's end of file
</span></span></pre>



<h3><a name="characterliteral">Character Literals</a></h3>

<pre class="bnf"><span class="notranslate"><a name="CharacterLiteral"><i>CharacterLiteral</i></a>:
    <b>'</b> <a href="#SingleQuotedCharacter"><i>SingleQuotedCharacter</i></a> <b>'</b>

<a name="SingleQuotedCharacter"><i>SingleQuotedCharacter</i></a>:
    <a href="#Character"><i>Character</i></a>
    <a href="#EscapeSequence"><i>EscapeSequence</i></a>
</span></pre>

	Character literals are a single character or escape sequence
	enclosed by single quotes, <span class="notranslate"><span class="d_inlinecode donthyphenate">' '</span></span>.

<h3><a name="integerliteral">Integer Literals</a></h3>

<pre class="bnf"><span class="notranslate"><a name="IntegerLiteral"><i>IntegerLiteral</i></a>:
    <a href="#Integer"><i>Integer</i></a>
    <a href="#Integer"><i>Integer</i></a> <i>IntegerSuffix</i>

<a name="Integer"><i>Integer</i></a>:
    <a href="#DecimalInteger"><i>DecimalInteger</i></a>
    <a href="#BinaryInteger"><i>BinaryInteger</i></a>
    <a href="#HexadecimalInteger"><i>HexadecimalInteger</i></a>

<a name="IntegerSuffix"><i>IntegerSuffix</i></a>:
    <b>L</b>
    <b>u</b>
    <b>U</b>
    <b>Lu</b>
    <b>LU</b>
    <b>uL</b>
    <b>UL</b>

<a name="DecimalInteger"><i>DecimalInteger</i></a>:
    <b>0</b>
    <a href="#NonZeroDigit"><i>NonZeroDigit</i></a>
    <a href="#NonZeroDigit"><i>NonZeroDigit</i></a> <i>DecimalDigitsUS</i>

<a name="BinaryInteger"><i>BinaryInteger</i></a>:
    <a href="#BinPrefix"><i>BinPrefix</i></a> <a href="#BinaryDigits"><i>BinaryDigits</i></a>

<a name="BinPrefix"><i>BinPrefix</i></a>:
    <b>0b</b>
    <b>0B</b>

<a name="HexadecimalInteger"><i>HexadecimalInteger</i></a>:
    <a href="#HexPrefix"><i>HexPrefix</i></a> <a href="#HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a>

<a name="NonZeroDigit"><i>NonZeroDigit</i></a>:
    <b>1</b>
    <b>2</b>
    <b>3</b>
    <b>4</b>
    <b>5</b>
    <b>6</b>
    <b>7</b>
    <b>8</b>
    <b>9</b>

<a name="DecimalDigits"><i>DecimalDigits</i></a>:
    <a href="#DecimalDigit"><i>DecimalDigit</i></a>
    <a href="#DecimalDigit"><i>DecimalDigit</i></a> <i>DecimalDigits</i>

<a name="DecimalDigitsUS"><i>DecimalDigitsUS</i></a>:
    <a href="#DecimalDigitUS"><i>DecimalDigitUS</i></a>
    <a href="#DecimalDigitUS"><i>DecimalDigitUS</i></a> <i>DecimalDigitsUS</i>

<a name="DecimalDigitsNoSingleUS"><i>DecimalDigitsNoSingleUS</i></a>:
    <a href="#DecimalDigit"><i>DecimalDigit</i></a>
    <a href="#DecimalDigit"><i>DecimalDigit</i></a> <a href="#DecimalDigitsUS"><i>DecimalDigitsUS</i></a>
    <a href="#DecimalDigitsUS"><i>DecimalDigitsUS</i></a> <a href="#DecimalDigit"><i>DecimalDigit</i></a>

<a name="DecimalDigitsNoStartingUS"><i>DecimalDigitsNoStartingUS</i></a>:
    <a href="#DecimalDigit"><i>DecimalDigit</i></a>
    <a href="#DecimalDigit"><i>DecimalDigit</i></a> <a href="#DecimalDigitsUS"><i>DecimalDigitsUS</i></a>

<a name="DecimalDigit"><i>DecimalDigit</i></a>:
    <b>0</b>
    <a href="#NonZeroDigit"><i>NonZeroDigit</i></a>

<a name="DecimalDigitUS"><i>DecimalDigitUS</i></a>:
    <a href="#DecimalDigit"><i>DecimalDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>

<a name="BinaryDigitsUS"><i>BinaryDigitsUS</i></a>:
    <a href="#BinaryDigitUS"><i>BinaryDigitUS</i></a>
    <a href="#BinaryDigitUS"><i>BinaryDigitUS</i></a> <i>BinaryDigitsUS</i>

<a name="BinaryDigit"><i>BinaryDigit</i></a>:
    <b>0</b>
    <b>1</b>

<a name="BinaryDigitUS"><i>BinaryDigitUS</i></a>:
    <a href="#BinaryDigit"><i>BinaryDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>

<a name="OctalDigits"><i>OctalDigits</i></a>:
    <a href="#OctalDigit"><i>OctalDigit</i></a>
    <a href="#OctalDigit"><i>OctalDigit</i></a> <i>OctalDigits</i>

<a name="OctalDigitsUS"><i>OctalDigitsUS</i></a>:
    <a href="#OctalDigitUS"><i>OctalDigitUS</i></a>
    <a href="#OctalDigitUS"><i>OctalDigitUS</i></a> <i>OctalDigitsUS</i>

<a name="OctalDigit"><i>OctalDigit</i></a>:
    <b>0</b>
    <b>1</b>
    <b>2</b>
    <b>3</b>
    <b>4</b>
    <b>5</b>
    <b>6</b>
    <b>7</b>

<a name="OctalDigitUS"><i>OctalDigitUS</i></a>:
    <a href="#OctalDigit"><i>OctalDigit</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>

<a name="HexDigits"><i>HexDigits</i></a>:
    <a href="#HexDigit"><i>HexDigit</i></a>
    <a href="#HexDigit"><i>HexDigit</i></a> <i>HexDigits</i>

<a name="HexDigitsUS"><i>HexDigitsUS</i></a>:
    <a href="#HexDigitUS"><i>HexDigitUS</i></a>
    <a href="#HexDigitUS"><i>HexDigitUS</i></a> <i>HexDigitsUS</i>

<a name="HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a>:
    <a href="#HexDigit"><i>HexDigit</i></a>
    <a href="#HexDigit"><i>HexDigit</i></a> <a href="#HexDigitsUS"><i>HexDigitsUS</i></a>
    <a href="#HexDigitsUS"><i>HexDigitsUS</i></a> <a href="#HexDigit"><i>HexDigit</i></a>

<a name="HexDigit"><i>HexDigit</i></a>:
    <a href="#DecimalDigit"><i>DecimalDigit</i></a>
    <a href="#HexLetter"><i>HexLetter</i></a>

<a name="HexLetter"><i>HexLetter</i></a>:
    <b>a</b>
    <b>b</b>
    <b>c</b>
    <b>d</b>
    <b>e</b>
    <b>f</b>
    <b>A</b>
    <b>B</b>
    <b>C</b>
    <b>D</b>
    <b>E</b>
    <b>F</b>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">_</span></span>
</span></pre>

	<p>Integers can be specified in decimal, binary, octal, or hexadecimal.</p>

	<p>Decimal integers are a sequence of decimal digits.</p>

	<p><a name="binary-literals">Binary integers</a> are a sequence of binary digits preceded
	by a &lsquo;0b&rsquo;.
	</p>

	<p>C-style octal integer notation was deemed too easy to mix up with decimal notation.
	The above is only fully supported in string literals.
	D still supports octal integer literals interpreted at compile time through the <a href="phobos/std_conv.html#octal"><span class="notranslate"><span class="d_inlinecode donthyphenate">std.conv.octal</span></span></a>
	template, as in <span class="notranslate"><span class="d_inlinecode donthyphenate">octal!167</span></span>.</p>

	<p>Hexadecimal integers are a sequence of hexadecimal digits preceded
	by a &lsquo;0x&rsquo;.
	</p>

	<p>Integers can have embedded &lsquo;_&rsquo; characters, which are ignored.
	The embedded &lsquo;_&rsquo; are useful for formatting long literals, such
	as using them as a thousands separator:
	</p>

<pre class="d_code"><span class="notranslate">123_456       <span class="d_comment">// 123456
</span>1_2_3_4_5_6_  <span class="d_comment">// 123456
</span></span></pre>

	<p>Integers can be immediately followed by one &lsquo;L&rsquo; or one of
	&lsquo;u&rsquo; or &lsquo;U&rsquo; or both.
	Note that there is no &lsquo;l&rsquo; suffix.
	</p>

	<p>The type of the integer is resolved as follows:</p>

	<center><table border=1 cellpadding=4 cellspacing=0><caption>Decimal Literal Types</caption>	<tr><th class="donthyphenate"><b>Literal</b></th><th class="donthyphenate"><b>Type</b></th></tr>
    <td colspan=10><i>Usual decimal notation</i></td>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0 .. 2_147_483_647</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">int</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">2_147_483_648 .. 9_223_372_036_854_775_807</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">long</span></span></td></tr>
    
    <td colspan=10><i>Explicit suffixes</i></td>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0L .. 9_223_372_036_854_775_807L</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">long</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0U .. 4_294_967_296U</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">uint</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">4_294_967_296U .. 18_446_744_073_709_551_615U</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0UL .. 18_446_744_073_709_551_615UL</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
    
    <td colspan=10><i>Hexadecimal notation</i></td>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x0 .. 0x7FFF_FFFF</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">int</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x8000_0000 .. 0xFFFF_FFFF</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">uint</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x1_0000_0000 .. 0x7FFF_FFFF_FFFF_FFFF</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">long</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x8000_0000_0000_0000 .. 0xFFFF_FFFF_FFFF_FFFF</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
    
    <td colspan=10><i>Hexadecimal notation with explicit suffixes</i></td>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x0L .. 0x7FFF_FFFF_FFFF_FFFFL</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">long</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x8000_0000_0000_0000L .. 0xFFFF_FFFF_FFFF_FFFFL</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x0U .. 0xFFFF_FFFFU</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">uint</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x1_0000_0000U .. 0xFFFF_FFFF_FFFF_FFFFU</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">0x0UL .. 0xFFFF_FFFF_FFFF_FFFFUL</span></span></td><td><span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span></td></tr>
	</table></center>


<h3><a name="floatliteral">Floating Point Literals</a></h3>

<pre class="bnf"><span class="notranslate"><a name="FloatLiteral"><i>FloatLiteral</i></a>:
    <a href="#Float"><i>Float</i></a>
    <a href="#Float"><i>Float</i></a> <a href="#Suffix"><i>Suffix</i></a>
    <a href="#Integer"><i>Integer</i></a> <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>
    <a href="#Integer"><i>Integer</i></a> <a href="#FloatSuffix"><i>FloatSuffix</i></a> <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>
    <a href="#Integer"><i>Integer</i></a> <a href="#RealSuffix"><i>RealSuffix</i></a> <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>

<a name="Float"><i>Float</i></a>:
    <a href="#DecimalFloat"><i>DecimalFloat</i></a>
    <a href="#HexFloat"><i>HexFloat</i></a>

<a name="DecimalFloat"><i>DecimalFloat</i></a>:
    <a href="#LeadingDecimal"><i>LeadingDecimal</i></a> <b>.</b>
    <a href="#LeadingDecimal"><i>LeadingDecimal</i></a> <b>.</b> <a href="#DecimalDigits"><i>DecimalDigits</i></a>
    <a href="#DecimalDigits"><i>DecimalDigits</i></a> <b>.</b> <a href="#DecimalDigitsNoSingleUS"><i>DecimalDigitsNoSingleUS</i></a> <a href="#DecimalExponent"><i>DecimalExponent</i></a>
    <b>.</b> <a href="#DecimalInteger"><i>DecimalInteger</i></a>
    <b>.</b> <a href="#DecimalInteger"><i>DecimalInteger</i></a> <a href="#DecimalExponent"><i>DecimalExponent</i></a>
    <a href="#LeadingDecimal"><i>LeadingDecimal</i></a> <a href="#DecimalExponent"><i>DecimalExponent</i></a>

<a name="DecimalExponent"><i>DecimalExponent</i></a>
    <a href="#DecimalExponentStart"><i>DecimalExponentStart</i></a> <a href="#DecimalDigitsNoSingleUS"><i>DecimalDigitsNoSingleUS</i></a>

<a name="DecimalExponentStart"><i>DecimalExponentStart</i></a>
    <b>e</b>
    <b>E</b>
    <b>e+</b>
    <b>E+</b>
    <b>e-</b>
    <b>E-</b>

<a name="HexFloat"><i>HexFloat</i></a>:
    <a href="#HexPrefix"><i>HexPrefix</i></a> <a href="#HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a> <b>.</b> <a href="#HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a> <a href="#HexExponent"><i>HexExponent</i></a>
    <a href="#HexPrefix"><i>HexPrefix</i></a> <b>.</b> <a href="#HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a> <a href="#HexExponent"><i>HexExponent</i></a>
    <a href="#HexPrefix"><i>HexPrefix</i></a> <a href="#HexDigitsNoSingleUS"><i>HexDigitsNoSingleUS</i></a> <a href="#HexExponent"><i>HexExponent</i></a>

<a name="HexPrefix"><i>HexPrefix</i></a>:
    <b>0x</b>
    <b>0X</b>

<a name="HexExponent"><i>HexExponent</i></a>:
    <a href="#HexExponentStart"><i>HexExponentStart</i></a> <a href="#DecimalDigitsNoSingleUS"><i>DecimalDigitsNoSingleUS</i></a>

<a name="HexExponentStart"><i>HexExponentStart</i></a>:
    <b>p</b>
    <b>P</b>
    <b>p+</b>
    <b>P+</b>
    <b>p-</b>
    <b>P-</b>


<a name="Suffix"><i>Suffix</i></a>:
    <a href="#FloatSuffix"><i>FloatSuffix</i></a>
    <a href="#RealSuffix"><i>RealSuffix</i></a>
    <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>
    <a href="#FloatSuffix"><i>FloatSuffix</i></a> <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>
    <a href="#RealSuffix"><i>RealSuffix</i></a> <a href="#ImaginarySuffix"><i>ImaginarySuffix</i></a>

<a name="FloatSuffix"><i>FloatSuffix</i></a>:
    <b>f</b>
    <b>F</b>

<a name="RealSuffix"><i>RealSuffix</i></a>:
    <b>L</b>

<a name="ImaginarySuffix"><i>ImaginarySuffix</i></a>:
    <b>i</b>

<a name="LeadingDecimal"><i>LeadingDecimal</i></a>:
    <a href="#DecimalInteger"><i>DecimalInteger</i></a>
    <b>0</b> <a href="#DecimalDigitsNoSingleUS"><i>DecimalDigitsNoSingleUS</i></a>
</span></pre>

	<p>Floats can be in decimal or hexadecimal format.</p>

	<p>Hexadecimal floats are preceded with a <b>0x</b> and the
	exponent is a <b>p</b>
	or <b>P</b> followed by a decimal number serving as the exponent
	of 2.
	</p>

	<p>Floating literals can have embedded &lsquo;_&rsquo; characters, which are ignored.
	The embedded &lsquo;_&rsquo; are useful for formatting long literals to
	make them more readable, such
	as using them as a thousands separator:
	</p>

<pre class="d_code"><span class="notranslate">123_456.567_8         <span class="d_comment">// 123456.5678
</span>1_2_3_4_5_6_._5_6_7_8 <span class="d_comment">// 123456.5678
</span>1_2_3_4_5_6_._5e-6_   <span class="d_comment">// 123456.5e-6
</span></span></pre>

	<p>Floating literals with no suffix are of type double.
	Floats can be followed by one <b>f</b>, <b>F</b>,
	or <b>L</b> suffix.
	The <b>f</b> or <b>F</b> suffix means it is a
	float, and <b>L</b> means it is a real.
	</p>

	<p>If a floating literal is followed by <b>i</b>, then it is an
	<i>ireal</i> (imaginary) type.
	</p>

	<p>Examples:</p>

<pre class="d_code"><span class="notranslate">0x1.FFFFFFFFFFFFFp1023 <span class="d_comment">// double.max
</span>0x1p-52                <span class="d_comment">// double.epsilon
</span>1.175494351e-38F       <span class="d_comment">// float.min
</span>6.3i                   <span class="d_comment">// idouble 6.3
</span>6.3fi                  <span class="d_comment">// ifloat 6.3
</span>6.3Li                  <span class="d_comment">// ireal 6.3
</span></span></pre>

	<p>It is an error if the literal exceeds the range of the type.
	It is not an error if the literal is rounded to fit into
	the significant digits of the type.
	</p>

	<p>Complex literals are not tokens, but are assembled from
	real and imaginary expressions during semantic analysis:
	</p>

<pre class="d_code"><span class="notranslate">4.5 + 6.2i  <span class="d_comment">// complex number (phased out)
</span></span></pre>

<h3>Keywords</h3>

	Keywords are reserved identifiers.

<pre class="bnf"><span class="notranslate"><a name="Keyword"><i>Keyword</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate">abstract</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">alias</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">align</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">asm</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">assert</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">auto</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">body</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">bool</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">break</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">byte</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">case</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">cast</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">catch</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">cdouble</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">cent</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">cfloat</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">char</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">class</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">const</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">continue</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">creal</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">dchar</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">debug</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">default</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">delegate</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">delete</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">deprecated</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">do</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">double</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">else</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">enum</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">export</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">extern</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">false</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">final</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">finally</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">float</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">for</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">foreach</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">foreach_reverse</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">function</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">goto</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">idouble</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">if</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ifloat</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">immutable</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">import</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">in</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">inout</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">int</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">interface</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">invariant</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ireal</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">is</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">lazy</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">long</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">macro</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">mixin</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">module</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">new</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">nothrow</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">null</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">out</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">override</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">package</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">pragma</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">private</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">protected</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">public</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">pure</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">real</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ref</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">return</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">scope</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">shared</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">short</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">static</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">struct</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">super</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">switch</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">synchronized</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">template</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">this</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">throw</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">true</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">try</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">typedef</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">typeid</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">typeof</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">ubyte</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ucent</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">uint</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ulong</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">union</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">unittest</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">ushort</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">version</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">void</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">volatile</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">wchar</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">while</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">with</span></span>

    <span class="notranslate"><span class="d_inlinecode donthyphenate">__FILE__</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">__LINE__</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">__gshared</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">__traits</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">__vector</span></span>
    <span class="notranslate"><span class="d_inlinecode donthyphenate">__parameters</span></span>
</span></pre>

<h3><a name="specialtokens">Special Tokens</a></h3>

	<p>These tokens are replaced with other tokens according to the following
	table:
	</p>

	<center><table border=1 cellpadding=4 cellspacing=0><caption>Special Tokens</caption>	<tr><th class="donthyphenate"><b>Special Token</b></th><th class="donthyphenate"><b>Replaced with</b></th></tr>

	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__DATE__</span></span></td><td>string literal of the date of compilation "<i>mmm dd yyyy</i>"</td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__EOF__</span></span></td><td>sets the scanner to the end of the file</td></tr>

	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__TIME__</span></span></td><td>string literal of the time of compilation "<i>hh:mm:ss</i>"</td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__TIMESTAMP__</span></span></td><td>string literal of the date and time of compilation "<i>www mmm dd hh:mm:ss yyyy</i>"</td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__VENDOR__</span></span></td><td>Compiler vendor string, such as "Digital Mars D"</td></tr>
	<tr><td><span class="notranslate"><span class="d_inlinecode donthyphenate">__VERSION__</span></span></td><td>Compiler version as an integer, such as 2001</td></tr>
	</table></center>

<h3><a name="Special Token Sequence">Special Token Sequences</a></h3>

<pre class="bnf"><span class="notranslate"><a name="SpecialTokenSequence"><i>SpecialTokenSequence</i></a>:
    <span class="notranslate"><span class="d_inlinecode donthyphenate"># line</span></span> <a href="#IntegerLiteral"><i>IntegerLiteral</i></a> <a href="#EndOfLine"><i>EndOfLine</i></a>
    <span class="notranslate"><span class="d_inlinecode donthyphenate"># line</span></span> <a href="#IntegerLiteral"><i>IntegerLiteral</i></a> <a href="#Filespec"><i>Filespec</i></a> <a href="#EndOfLine"><i>EndOfLine</i></a>

<a name="Filespec"><i>Filespec</i></a>:
    <b>"</b> <a href="#Characters"><i>Characters</i></a> <b>"</b>
</span></pre>

	<p>Special token sequences are processed by the lexical analyzer, may
	appear between any other tokens, and do not affect the syntax
	parsing.
	</p>

	<p>There is currently only one special token sequence, <span class="notranslate"><span class="d_inlinecode donthyphenate">#line</span></span>.
	</p>

	<p>This sets the source line number to <a href="#IntegerLiteral"><i>IntegerLiteral</i></a>,
	and optionally the source file 	name to <a href="#Filespec"><i>Filespec</i></a>,
	beginning with the next line of source text.
	The source file and line number is used for printing error messages
	and for mapping generated code back to the source for the symbolic
	debugging output.
	</p>

	<p>For example:
	</p>

<pre class="d_code"><span class="notranslate"><span class="d_keyword">int</span> #line 6 "foo\bar"
x;  <span class="d_comment">// this is now line 6 of file foo\bar
</span></span></pre>

	<p>Note that the backslash character is not treated specially inside
	<a href="#Filespec"><i>Filespec</i></a> strings.
	</p>

  
<div id="google_ad">
<!-- Google ad -->
<script type="text/javascript"><!--
/**/google_ad_client = "pub-5628673096434613";
/**/google_ad_width = 728;
/**/google_ad_height = 90;
/**/google_ad_format = "728x90_as";
/**/google_ad_channel ="3651639259";
/**/google_page_url = document.location;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div><!--/content-->



<div id="footernav">
<a href="http://forum.dlang.org/" title="User Forums">Forums</a> |
	<a href="href="http://wiki.dlang.org/DocComments/Lex" title="Read/write comments and feedback">Comments</a> |
<a href="http://digitalmars.com/advancedsearch.html" title="Search Digital Mars web site">Search</a> |
<a href="download.html" title="Download D">Downloads</a> |
<a href="/">Home</a>
</div>
<div id="copyright">

Copyright &copy; 1999-2013 by Digital Mars &reg;, All Rights Reserved |
Page generated by <a href="ddoc.html">Ddoc</a> on Fri Feb  8 00:04:14 2013

</div>
</body>
</html>
