4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>Identifier</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
30 <div class="sectionbody">
31 <div class="paragraph"><p>In <a href="StandardML">Standard ML</a>, there are syntactically two kinds of
32 identifiers.</p></div>
33 <div class="ulist"><ul>
36 Alphanumeric: starts with a letter or prime (<span class="monospaced">'</span>) and is followed by letters, digits, primes and underbars (<span class="monospaced">_</span>).
38 <div class="paragraph"><p>Examples: <span class="monospaced">abc</span>, <span class="monospaced">ABC123</span>, <span class="monospaced">Abc_123</span>, <span class="monospaced">'a</span>.</p></div>
42 Symbolic: a sequence of the following
44 <div class="listingblock">
45 <div class="content monospaced">
46 <pre> ! % & $ # + - / : < = > ? @ | ~ ` ^ | *</pre>
48 <div class="paragraph"><p>Examples: <span class="monospaced">+=</span>, <span class="monospaced"><=</span>, <span class="monospaced">>></span>, <span class="monospaced">$</span>.</p></div>
51 <div class="paragraph"><p>With the exception of <span class="monospaced">=</span>, reserved words can not be identifiers.</p></div>
52 <div class="paragraph"><p>There are a number of different classes of identifiers, some of which
53 have additional syntactic rules.</p></div>
54 <div class="ulist"><ul>
57 Identifiers not starting with a prime.
59 <div class="ulist"><ul>
62 value identifier (includes variables and constructors)
89 Identifiers starting with a prime.
91 <div class="ulist"><ul>
101 Identifiers not starting with a prime and numeric labels (<span class="monospaced">1</span>, <span class="monospaced">2</span>, …).
103 <div class="ulist"><ul>
115 <div id="footnotes"><hr></div>
117 <div id="footer-text">
119 <div id="footer-badges">