mirror of https://github.com/kdl-org/kdl.git
Script updating gh-pages from c02936c. [ci skip]
This commit is contained in:
parent
5f8c191dc8
commit
d4921e93c7
34
index.html
34
index.html
|
|
@ -25,36 +25,12 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<h2>Preview for branch <a href="zkat">zkat</a></h2>
|
<h2>Preview for branch <a href="zkat">zkat</a></h2>
|
||||||
<h2>Preview for branch <a href="zkat/utf-8-must">zkat/utf-8-must</a></h2>
|
<h2>Preview for branch <a href="zkat/suffixes">zkat/suffixes</a></h2>
|
||||||
<table id="branch-zkat/utf-8-must">
|
<table id="branch-zkat/suffixes">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="zkat/utf-8-must/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
<td><a href="zkat/suffixes/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
||||||
<td><a href="zkat/utf-8-must/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
<td><a href="zkat/suffixes/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
||||||
<td><a href="https://author-tools.ietf.org/api/iddiff?url_1=https://kdl-org.github.io/kdl/draft-marchan-kdl2.txt&url_2=https://kdl-org.github.io/kdl/zkat/utf-8-must/draft-marchan-kdl2.txt" class="diff draft-marchan-kdl2">diff with main</a></td>
|
<td><a href="https://author-tools.ietf.org/api/iddiff?url_1=https://kdl-org.github.io/kdl/draft-marchan-kdl2.txt&url_2=https://kdl-org.github.io/kdl/zkat/suffixes/draft-marchan-kdl2.txt" class="diff draft-marchan-kdl2">diff with main</a></td>
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2>Preview for branch <a href="zkat/schema-v2">zkat/schema-v2</a></h2>
|
|
||||||
<table id="branch-zkat/schema-v2">
|
|
||||||
<tr>
|
|
||||||
<td><a href="zkat/schema-v2/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="zkat/schema-v2/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td>same as main</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2>Preview for branch <a href="zkat/fix-stuff">zkat/fix-stuff</a></h2>
|
|
||||||
<table id="branch-zkat/fix-stuff">
|
|
||||||
<tr>
|
|
||||||
<td><a href="zkat/fix-stuff/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="zkat/fix-stuff/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td><a href="https://author-tools.ietf.org/api/iddiff?url_1=https://kdl-org.github.io/kdl/draft-marchan-kdl2.txt&url_2=https://kdl-org.github.io/kdl/zkat/fix-stuff/draft-marchan-kdl2.txt" class="diff draft-marchan-kdl2">diff with main</a></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<h2>Preview for branch <a href="zkat/minor-tweaks">zkat/minor-tweaks</a></h2>
|
|
||||||
<table id="branch-zkat/minor-tweaks">
|
|
||||||
<tr>
|
|
||||||
<td><a href="zkat/minor-tweaks/draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="zkat/minor-tweaks/draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td><a href="https://author-tools.ietf.org/api/iddiff?url_1=https://kdl-org.github.io/kdl/draft-marchan-kdl2.txt&url_2=https://kdl-org.github.io/kdl/zkat/minor-tweaks/draft-marchan-kdl2.txt" class="diff draft-marchan-kdl2">diff with main</a></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,45 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>kdl-org/kdl zkat/fix-stuff preview</title>
|
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
|
||||||
<style type="text/css">/*<![CDATA[*/
|
|
||||||
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
|
|
||||||
h1, h2, td { font-family: "Helvetica Neue", "Roboto Condensed", "Open Sans", Helvetica, Calibri, sans-serif; }
|
|
||||||
h1 { font-size: 20px; } h2 { font-size: 16px; }
|
|
||||||
table { margin: 5px 10px; border-collapse: collapse; }
|
|
||||||
th, td { font-weight: normal; text-align: left; padding: 2px 5px; }
|
|
||||||
a:link { color: #000; } a:visited { color: #00a; }
|
|
||||||
/*]]>*/</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Editor's drafts for zkat/fix-stuff branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/fix-stuff">kdl-org/kdl</a></h1>
|
|
||||||
<table id="branch-zkat/fix-stuff">
|
|
||||||
<tr>
|
|
||||||
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td>same as main</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<script>
|
|
||||||
window.onload = function() {
|
|
||||||
var referrer_branch = 'main';
|
|
||||||
// e.g., "https://github.com/user/repo/tree/main"
|
|
||||||
var chunks = document.referrer.split("/");
|
|
||||||
if (chunks[2] === 'github.com' && chunks[5] === 'tree') {
|
|
||||||
referrer_branch = chunks[6];
|
|
||||||
}
|
|
||||||
let branch = document.querySelector('#branch-' + referrer_branch);
|
|
||||||
let h = document.location.hash.substring(1);
|
|
||||||
if (h === 'show') {
|
|
||||||
document.location.hash = '#' + branch.id;
|
|
||||||
} else if (branch && h.startsWith('go')) {
|
|
||||||
let e = branch.querySelector(h.substring(2));
|
|
||||||
if (e && e.href) {
|
|
||||||
document.location = e.href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,45 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>kdl-org/kdl zkat/minor-tweaks preview</title>
|
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
|
||||||
<style type="text/css">/*<![CDATA[*/
|
|
||||||
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
|
|
||||||
h1, h2, td { font-family: "Helvetica Neue", "Roboto Condensed", "Open Sans", Helvetica, Calibri, sans-serif; }
|
|
||||||
h1 { font-size: 20px; } h2 { font-size: 16px; }
|
|
||||||
table { margin: 5px 10px; border-collapse: collapse; }
|
|
||||||
th, td { font-weight: normal; text-align: left; padding: 2px 5px; }
|
|
||||||
a:link { color: #000; } a:visited { color: #00a; }
|
|
||||||
/*]]>*/</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Editor's drafts for zkat/minor-tweaks branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/minor-tweaks">kdl-org/kdl</a></h1>
|
|
||||||
<table id="branch-zkat/minor-tweaks">
|
|
||||||
<tr>
|
|
||||||
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td>same as main</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<script>
|
|
||||||
window.onload = function() {
|
|
||||||
var referrer_branch = 'main';
|
|
||||||
// e.g., "https://github.com/user/repo/tree/main"
|
|
||||||
var chunks = document.referrer.split("/");
|
|
||||||
if (chunks[2] === 'github.com' && chunks[5] === 'tree') {
|
|
||||||
referrer_branch = chunks[6];
|
|
||||||
}
|
|
||||||
let branch = document.querySelector('#branch-' + referrer_branch);
|
|
||||||
let h = document.location.hash.substring(1);
|
|
||||||
if (h === 'show') {
|
|
||||||
document.location.hash = '#' + branch.id;
|
|
||||||
} else if (branch && h.startsWith('go')) {
|
|
||||||
let e = branch.querySelector(h.substring(2));
|
|
||||||
if (e && e.href) {
|
|
||||||
document.location = e.href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
|
|
@ -20,17 +20,17 @@ oficial version of the language, see https://kdl.dev/spec.
|
||||||
|
|
||||||
|
|
||||||
" name="description">
|
" name="description">
|
||||||
<meta content="xml2rfc 3.27.0" name="generator">
|
<meta content="xml2rfc 3.28.0" name="generator">
|
||||||
<meta content="Document-Language" name="keyword">
|
<meta content="Document-Language" name="keyword">
|
||||||
<meta content="Configuration" name="keyword">
|
<meta content="Configuration" name="keyword">
|
||||||
<meta content="draft-marchan-kdl2-latest" name="ietf.draft">
|
<meta content="draft-marchan-kdl2-latest" name="ietf.draft">
|
||||||
<!-- Generator version information:
|
<!-- Generator version information:
|
||||||
xml2rfc 3.27.0
|
xml2rfc 3.28.0
|
||||||
Python 3.12.9
|
Python 3.12.9
|
||||||
ConfigArgParse 1.7
|
ConfigArgParse 1.7
|
||||||
google-i18n-address 3.1.1
|
google-i18n-address 3.1.1
|
||||||
intervaltree 3.1.0
|
intervaltree 3.1.0
|
||||||
Jinja2 3.1.5
|
Jinja2 3.1.6
|
||||||
lxml 5.3.0
|
lxml 5.3.0
|
||||||
platformdirs 4.3.6
|
platformdirs 4.3.6
|
||||||
pycountry 24.6.1
|
pycountry 24.6.1
|
||||||
|
|
@ -1056,7 +1056,7 @@ svg :is([fill="white"], [fill^="#fff"]) {
|
||||||
<thead><tr>
|
<thead><tr>
|
||||||
<td class="left"></td>
|
<td class="left"></td>
|
||||||
<td class="center">KDL</td>
|
<td class="center">KDL</td>
|
||||||
<td class="right">February 2025</td>
|
<td class="right">March 2025</td>
|
||||||
</tr></thead>
|
</tr></thead>
|
||||||
<tfoot><tr>
|
<tfoot><tr>
|
||||||
<td class="left">Marchán & KDL Contributors</td>
|
<td class="left">Marchán & KDL Contributors</td>
|
||||||
|
|
@ -1071,7 +1071,7 @@ svg :is([fill="white"], [fill^="#fff"]) {
|
||||||
<dd class="workgroup">KDL Community</dd>
|
<dd class="workgroup">KDL Community</dd>
|
||||||
<dt class="label-published">Published:</dt>
|
<dt class="label-published">Published:</dt>
|
||||||
<dd class="published">
|
<dd class="published">
|
||||||
<time datetime="2025-02-23" class="published">23 February 2025</time>
|
<time datetime="2025-03-30" class="published">30 March 2025</time>
|
||||||
</dd>
|
</dd>
|
||||||
<dt class="label-authors">Authors:</dt>
|
<dt class="label-authors">Authors:</dt>
|
||||||
<dd class="authors">
|
<dd class="authors">
|
||||||
|
|
@ -1181,16 +1181,19 @@ https://creativecommons.org/licenses/by-sa/4.0/<a href="#section-note.2-1" class
|
||||||
<p id="section-toc.1-1.3.2.8.1"><a href="#section-3.8" class="auto internal xref">3.8</a>. <a href="#name-type-annotation" class="internal xref">Type Annotation</a></p>
|
<p id="section-toc.1-1.3.2.8.1"><a href="#section-3.8" class="auto internal xref">3.8</a>. <a href="#name-type-annotation" class="internal xref">Type Annotation</a></p>
|
||||||
<ul class="compact toc ulBare ulEmpty">
|
<ul class="compact toc ulBare ulEmpty">
|
||||||
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.1">
|
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.1">
|
||||||
<p id="section-toc.1-1.3.2.8.2.1.1"><a href="#section-3.8.1" class="auto internal xref">3.8.1</a>. <a href="#name-reserved-type-annotations-f" class="internal xref">Reserved Type Annotations for Numbers Without Decimals:</a></p>
|
<p id="section-toc.1-1.3.2.8.2.1.1"><a href="#section-3.8.1" class="auto internal xref">3.8.1</a>. <a href="#name-suffix-type-annotation" class="internal xref">Suffix Type Annotation</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.2">
|
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.2">
|
||||||
<p id="section-toc.1-1.3.2.8.2.2.1"><a href="#section-3.8.2" class="auto internal xref">3.8.2</a>. <a href="#name-reserved-type-annotations-fo" class="internal xref">Reserved Type Annotations for Numbers With Decimals:</a></p>
|
<p id="section-toc.1-1.3.2.8.2.2.1"><a href="#section-3.8.2" class="auto internal xref">3.8.2</a>. <a href="#name-reserved-type-annotations-f" class="internal xref">Reserved Type Annotations for Numbers Without Decimals</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.3">
|
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.3">
|
||||||
<p id="section-toc.1-1.3.2.8.2.3.1"><a href="#section-3.8.3" class="auto internal xref">3.8.3</a>. <a href="#name-reserved-type-annotations-for" class="internal xref">Reserved Type Annotations for Strings:</a></p>
|
<p id="section-toc.1-1.3.2.8.2.3.1"><a href="#section-3.8.3" class="auto internal xref">3.8.3</a>. <a href="#name-reserved-type-annotations-fo" class="internal xref">Reserved Type Annotations for Numbers With Decimals:</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.4">
|
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.4">
|
||||||
<p id="section-toc.1-1.3.2.8.2.4.1"><a href="#section-3.8.4" class="auto internal xref">3.8.4</a>. <a href="#name-examples" class="internal xref">Examples</a></p>
|
<p id="section-toc.1-1.3.2.8.2.4.1"><a href="#section-3.8.4" class="auto internal xref">3.8.4</a>. <a href="#name-reserved-type-annotations-for" class="internal xref">Reserved Type Annotations for Strings:</a></p>
|
||||||
|
</li>
|
||||||
|
<li class="compact toc ulBare ulEmpty" id="section-toc.1-1.3.2.8.2.5">
|
||||||
|
<p id="section-toc.1-1.3.2.8.2.5.1"><a href="#section-3.8.5" class="auto internal xref">3.8.5</a>. <a href="#name-examples" class="internal xref">Examples</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
@ -1554,179 +1557,248 @@ the <code>)</code>, and may be separated from its target by Whitespace.<a href="
|
||||||
<p id="section-3.8-3">KDL does not specify any restrictions on what implementations might do with
|
<p id="section-3.8-3">KDL does not specify any restrictions on what implementations might do with
|
||||||
these annotations. They are free to ignore them, or use them to make decisions
|
these annotations. They are free to ignore them, or use them to make decisions
|
||||||
about how to interpret a value.<a href="#section-3.8-3" class="pilcrow">¶</a></p>
|
about how to interpret a value.<a href="#section-3.8-3" class="pilcrow">¶</a></p>
|
||||||
<p id="section-3.8-4">Additionally, the following type annotations MAY be recognized by KDL parsers
|
<div id="suffix-type-annotation">
|
||||||
and, if used, SHOULD interpret these types as follows:<a href="#section-3.8-4" class="pilcrow">¶</a></p>
|
|
||||||
<div id="reserved-type-annotations-for-numbers-without-decimals">
|
|
||||||
<section id="section-3.8.1">
|
<section id="section-3.8.1">
|
||||||
<h4 id="name-reserved-type-annotations-f">
|
<h4 id="name-suffix-type-annotation">
|
||||||
<a href="#section-3.8.1" class="section-number selfRef">3.8.1. </a><a href="#name-reserved-type-annotations-f" class="section-name selfRef">Reserved Type Annotations for Numbers Without Decimals:</a>
|
<a href="#section-3.8.1" class="section-number selfRef">3.8.1. </a><a href="#name-suffix-type-annotation" class="section-name selfRef">Suffix Type Annotation</a>
|
||||||
</h4>
|
</h4>
|
||||||
<p id="section-3.8.1-1">Signed integers of various sizes (the number is the bit size):<a href="#section-3.8.1-1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1-1">When a (<a href="#value" class="auto internal xref">Section 3.7</a>) is a (<a href="#number" class="auto internal xref">Section 3.14</a>), it's possible to attach the type
|
||||||
|
annotation as a "suffix", instead of prepending it between <code>(</code> and <code>)</code>. This
|
||||||
|
makes it possible to, for example, write <code>10px</code>, <code>10.5%</code>, <code>512GiB</code>, etc., which
|
||||||
|
are equivalent to <code>(px)10</code>, <code>(%)5</code>, and <code>(GiB)512</code>, respectively.<a href="#section-3.8.1-1" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1-2">An implementation that finds BOTH a parenthesized and a suffix
|
||||||
|
(<a href="#type-annotation" class="auto internal xref">Section 3.8</a>) on the same (<a href="#number" class="auto internal xref">Section 3.14</a>) MUST yield a syntax error.<a href="#section-3.8.1-2" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1-3">Suffixes MUST BE plain (<a href="#identifier-string" class="auto internal xref">Section 3.10</a>)s. No other (<a href="#string" class="auto internal xref">Section 3.9</a>) is
|
||||||
|
acceptable.<a href="#section-3.8.1-3" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1-4">There are two kinds of (<a href="#suffix-type-annotation" class="auto internal xref">Section 3.8.1</a>) available:
|
||||||
|
(<a href="#bare-suffix-type-annotation" class="auto internal xref">Section 3.8.1.1</a>)s and (<a href="#explicit-suffix-type-annotation" class="auto internal xref">Section 3.8.1.2</a>).<a href="#section-3.8.1-4" class="pilcrow">¶</a></p>
|
||||||
|
<div id="bare-suffix-type-annotation">
|
||||||
|
<section id="section-3.8.1.1">
|
||||||
|
<h5 id="name-bare-suffix-type-annotation">
|
||||||
|
<a href="#section-3.8.1.1" class="section-number selfRef">3.8.1.1. </a><a href="#name-bare-suffix-type-annotation" class="section-name selfRef">Bare Suffix Type Annotation</a>
|
||||||
|
</h5>
|
||||||
|
<p id="section-3.8.1.1-1">When a (<a href="#value" class="auto internal xref">Section 3.7</a>) is a decimal (<a href="#number" class="auto internal xref">Section 3.14</a>) WITHOUT exponential syntax (<code>1e+5</code>
|
||||||
|
etc) (and ONLY a decimal), it's possible to attach the type annotation as a
|
||||||
|
suffix directly to the number, without any additional syntax.<a href="#section-3.8.1.1-1" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1.1-2">They also come with some additional rules (like only being available for
|
||||||
|
decimals), in order to prevent potential ambiguity or footguns with the syntax.
|
||||||
|
This is generally acceptable, as type annotations in particular tend to be
|
||||||
|
application-defined and limited in scope, rather than arbitrary user data. In
|
||||||
|
designing this feature, it was determined that the value for various real-world
|
||||||
|
DSLs outweighed the complexity of the following rules.<a href="#section-3.8.1.1-2" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1.1-3">As such, to remove ambiguity, the suffix (<a href="#identifier-string" class="auto internal xref">Section 3.10</a>) MUST NOT start
|
||||||
|
with any of the following patterns, all of which MUST yield syntax errors:<a href="#section-3.8.1.1-3" class="pilcrow">¶</a></p>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.1-2.1">
|
<li class="normal" id="section-3.8.1.1-4.1">
|
||||||
<p id="section-3.8.1-2.1.1"><code>i8</code><a href="#section-3.8.1-2.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1.1-4.1.1"><code>.</code>, <code>,</code>, or <code>_</code><a href="#section-3.8.1.1-4.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-2.2">
|
<li class="normal" id="section-3.8.1.1-4.2">
|
||||||
<p id="section-3.8.1-2.2.1"><code>i16</code><a href="#section-3.8.1-2.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1.1-4.2.1"><code>[a-zA-Z][0-9_]</code> (to disambiguate all non-decimals, with breathing room)<a href="#section-3.8.1.1-4.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-2.3">
|
<li class="normal" id="section-3.8.1.1-4.3">
|
||||||
<p id="section-3.8.1-2.3.1"><code>i32</code><a href="#section-3.8.1-2.3.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1.1-4.3.1"><code>[eE][+-]?[0-9]</code> (to disambiguate exponentials)<a href="#section-3.8.1.1-4.3.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-2.4">
|
<li class="normal" id="section-3.8.1.1-4.4">
|
||||||
<p id="section-3.8.1-2.4.1"><code>i64</code><a href="#section-3.8.1-2.4.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1.1-4.4.1"><code>[xX][a-fA-F]</code> (to disambiguate hexadecimals)<a href="#section-3.8.1.1-4.4.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-2.5">
|
</ul>
|
||||||
<p id="section-3.8.1-2.5.1"><code>i128</code><a href="#section-3.8.1-2.5.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.1.1-5">All other (<a href="#identifier-string" class="auto internal xref">Section 3.10</a>)s can be safely appended to decimal numbers, so
|
||||||
|
long as the decimal does not include an exponential component.<a href="#section-3.8.1.1-5" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1.1-6">If the desired suffix would violate any of the above rules, either regular
|
||||||
|
parenthetical (<a href="#type-annotation" class="auto internal xref">Section 3.8</a>)s, or (<a href="#explicit-suffix-type-annotation" class="auto internal xref">Section 3.8.1.2</a>)s
|
||||||
|
may be used.<a href="#section-3.8.1.1-6" class="pilcrow">¶</a></p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<div id="explicit-suffix-type-annotation">
|
||||||
|
<section id="section-3.8.1.2">
|
||||||
|
<h5 id="name-explicit-suffix-type-annota">
|
||||||
|
<a href="#section-3.8.1.2" class="section-number selfRef">3.8.1.2. </a><a href="#name-explicit-suffix-type-annota" class="section-name selfRef">Explicit Suffix Type Annotation</a>
|
||||||
|
</h5>
|
||||||
|
<p id="section-3.8.1.2-1">Any (<a href="#number" class="auto internal xref">Section 3.14</a>) may have a <code>#</code> attached to it, followed by any valid
|
||||||
|
(<a href="#identifier-string" class="auto internal xref">Section 3.10</a>). This is an explicit (<a href="#suffix-type-annotation" class="auto internal xref">Section 3.8.1</a>) syntax
|
||||||
|
without any of the relatively complex requirements of
|
||||||
|
(<a href="#bare-suffix-type-annotation" class="auto internal xref">Section 3.8.1.1</a>), which can be a useful escape hatch. For
|
||||||
|
example: <code>10.0#u8</code> is invalid syntax without the <code>#</code> prefix.<a href="#section-3.8.1.2-1" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.1.2-2">Note again that, unlike Bare Suffixes, Explicit Suffixes may be used with ALL
|
||||||
|
(<a href="#number" class="auto internal xref">Section 3.14</a>) formats (hexadecimal, decimal, octal, and binary).<a href="#section-3.8.1.2-2" class="pilcrow">¶</a></p>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</div>
|
||||||
|
<div id="reserved-type-annotations-for-numbers-without-decimals">
|
||||||
|
<section id="section-3.8.2">
|
||||||
|
<h4 id="name-reserved-type-annotations-f">
|
||||||
|
<a href="#section-3.8.2" class="section-number selfRef">3.8.2. </a><a href="#name-reserved-type-annotations-f" class="section-name selfRef">Reserved Type Annotations for Numbers Without Decimals</a>
|
||||||
|
</h4>
|
||||||
|
<p id="section-3.8.2-1">Additionally, the following type annotations MAY be recognized by KDL parsers
|
||||||
|
and, if used, SHOULD interpret these types as follows.<a href="#section-3.8.2-1" class="pilcrow">¶</a></p>
|
||||||
|
<p id="section-3.8.2-2">Signed integers of various sizes (the number is the bit size):<a href="#section-3.8.2-2" class="pilcrow">¶</a></p>
|
||||||
|
<ul class="normal">
|
||||||
|
<li class="normal" id="section-3.8.2-3.1">
|
||||||
|
<p id="section-3.8.2-3.1.1"><code>i8</code><a href="#section-3.8.2-3.1.1" class="pilcrow">¶</a></p>
|
||||||
|
</li>
|
||||||
|
<li class="normal" id="section-3.8.2-3.2">
|
||||||
|
<p id="section-3.8.2-3.2.1"><code>i16</code><a href="#section-3.8.2-3.2.1" class="pilcrow">¶</a></p>
|
||||||
|
</li>
|
||||||
|
<li class="normal" id="section-3.8.2-3.3">
|
||||||
|
<p id="section-3.8.2-3.3.1"><code>i32</code><a href="#section-3.8.2-3.3.1" class="pilcrow">¶</a></p>
|
||||||
|
</li>
|
||||||
|
<li class="normal" id="section-3.8.2-3.4">
|
||||||
|
<p id="section-3.8.2-3.4.1"><code>i64</code><a href="#section-3.8.2-3.4.1" class="pilcrow">¶</a></p>
|
||||||
|
</li>
|
||||||
|
<li class="normal" id="section-3.8.2-3.5">
|
||||||
|
<p id="section-3.8.2-3.5.1"><code>i128</code><a href="#section-3.8.2-3.5.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p id="section-3.8.1-3">Unsigned integers of various sizes (the number is the bit size):<a href="#section-3.8.1-3" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-4">Unsigned integers of various sizes (the number is the bit size):<a href="#section-3.8.2-4" class="pilcrow">¶</a></p>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.1-4.1">
|
<li class="normal" id="section-3.8.2-5.1">
|
||||||
<p id="section-3.8.1-4.1.1"><code>u8</code><a href="#section-3.8.1-4.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-5.1.1"><code>u8</code><a href="#section-3.8.2-5.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-4.2">
|
<li class="normal" id="section-3.8.2-5.2">
|
||||||
<p id="section-3.8.1-4.2.1"><code>u16</code><a href="#section-3.8.1-4.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-5.2.1"><code>u16</code><a href="#section-3.8.2-5.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-4.3">
|
<li class="normal" id="section-3.8.2-5.3">
|
||||||
<p id="section-3.8.1-4.3.1"><code>u32</code><a href="#section-3.8.1-4.3.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-5.3.1"><code>u32</code><a href="#section-3.8.2-5.3.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-4.4">
|
<li class="normal" id="section-3.8.2-5.4">
|
||||||
<p id="section-3.8.1-4.4.1"><code>u64</code><a href="#section-3.8.1-4.4.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-5.4.1"><code>u64</code><a href="#section-3.8.2-5.4.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-4.5">
|
<li class="normal" id="section-3.8.2-5.5">
|
||||||
<p id="section-3.8.1-4.5.1"><code>u128</code><a href="#section-3.8.1-4.5.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-5.5.1"><code>u128</code><a href="#section-3.8.2-5.5.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p id="section-3.8.1-5">Platform-dependent integer types, both signed and unsigned:<a href="#section-3.8.1-5" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-6">Platform-dependent integer types, both signed and unsigned:<a href="#section-3.8.2-6" class="pilcrow">¶</a></p>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.1-6.1">
|
<li class="normal" id="section-3.8.2-7.1">
|
||||||
<p id="section-3.8.1-6.1.1"><code>isize</code><a href="#section-3.8.1-6.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-7.1.1"><code>isize</code><a href="#section-3.8.2-7.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.1-6.2">
|
<li class="normal" id="section-3.8.2-7.2">
|
||||||
<p id="section-3.8.1-6.2.1"><code>usize</code><a href="#section-3.8.1-6.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.2-7.2.1"><code>usize</code><a href="#section-3.8.2-7.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div id="reserved-type-annotations-for-numbers-with-decimals">
|
<div id="reserved-type-annotations-for-numbers-with-decimals">
|
||||||
<section id="section-3.8.2">
|
<section id="section-3.8.3">
|
||||||
<h4 id="name-reserved-type-annotations-fo">
|
<h4 id="name-reserved-type-annotations-fo">
|
||||||
<a href="#section-3.8.2" class="section-number selfRef">3.8.2. </a><a href="#name-reserved-type-annotations-fo" class="section-name selfRef">Reserved Type Annotations for Numbers With Decimals:</a>
|
<a href="#section-3.8.3" class="section-number selfRef">3.8.3. </a><a href="#name-reserved-type-annotations-fo" class="section-name selfRef">Reserved Type Annotations for Numbers With Decimals:</a>
|
||||||
</h4>
|
</h4>
|
||||||
<p id="section-3.8.2-1">IEEE 754 floating point numbers, both single (32) and double (64) precision:<a href="#section-3.8.2-1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-1">IEEE 754 floating point numbers, both single (32) and double (64) precision:<a href="#section-3.8.3-1" class="pilcrow">¶</a></p>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.2-2.1">
|
<li class="normal" id="section-3.8.3-2.1">
|
||||||
<p id="section-3.8.2-2.1.1"><code>f32</code><a href="#section-3.8.2-2.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-2.1.1"><code>f32</code><a href="#section-3.8.3-2.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.2-2.2">
|
<li class="normal" id="section-3.8.3-2.2">
|
||||||
<p id="section-3.8.2-2.2.1"><code>f64</code><a href="#section-3.8.2-2.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-2.2.1"><code>f64</code><a href="#section-3.8.3-2.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p id="section-3.8.2-3">IEEE 754-2008 decimal floating point numbers<a href="#section-3.8.2-3" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-3">IEEE 754-2008 decimal floating point numbers<a href="#section-3.8.3-3" class="pilcrow">¶</a></p>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.2-4.1">
|
<li class="normal" id="section-3.8.3-4.1">
|
||||||
<p id="section-3.8.2-4.1.1"><code>decimal64</code><a href="#section-3.8.2-4.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-4.1.1"><code>decimal64</code><a href="#section-3.8.3-4.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.2-4.2">
|
<li class="normal" id="section-3.8.3-4.2">
|
||||||
<p id="section-3.8.2-4.2.1"><code>decimal128</code><a href="#section-3.8.2-4.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.3-4.2.1"><code>decimal128</code><a href="#section-3.8.3-4.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div id="reserved-type-annotations-for-strings">
|
<div id="reserved-type-annotations-for-strings">
|
||||||
<section id="section-3.8.3">
|
<section id="section-3.8.4">
|
||||||
<h4 id="name-reserved-type-annotations-for">
|
<h4 id="name-reserved-type-annotations-for">
|
||||||
<a href="#section-3.8.3" class="section-number selfRef">3.8.3. </a><a href="#name-reserved-type-annotations-for" class="section-name selfRef">Reserved Type Annotations for Strings:</a>
|
<a href="#section-3.8.4" class="section-number selfRef">3.8.4. </a><a href="#name-reserved-type-annotations-for" class="section-name selfRef">Reserved Type Annotations for Strings:</a>
|
||||||
</h4>
|
</h4>
|
||||||
<ul class="normal">
|
<ul class="normal">
|
||||||
<li class="normal" id="section-3.8.3-1.1">
|
<li class="normal" id="section-3.8.4-1.1">
|
||||||
<p id="section-3.8.3-1.1.1"><code>date-time</code>: ISO8601 date/time format.<a href="#section-3.8.3-1.1.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.1.1"><code>date-time</code>: ISO8601 date/time format.<a href="#section-3.8.4-1.1.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.2">
|
<li class="normal" id="section-3.8.4-1.2">
|
||||||
<p id="section-3.8.3-1.2.1"><code>time</code>: "Time" section of ISO8601.<a href="#section-3.8.3-1.2.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.2.1"><code>time</code>: "Time" section of ISO8601.<a href="#section-3.8.4-1.2.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.3">
|
<li class="normal" id="section-3.8.4-1.3">
|
||||||
<p id="section-3.8.3-1.3.1"><code>date</code>: "Date" section of ISO8601.<a href="#section-3.8.3-1.3.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.3.1"><code>date</code>: "Date" section of ISO8601.<a href="#section-3.8.4-1.3.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.4">
|
<li class="normal" id="section-3.8.4-1.4">
|
||||||
<p id="section-3.8.3-1.4.1"><code>duration</code>: ISO8601 duration format.<a href="#section-3.8.3-1.4.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.4.1"><code>duration</code>: ISO8601 duration format.<a href="#section-3.8.4-1.4.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.5">
|
<li class="normal" id="section-3.8.4-1.5">
|
||||||
<p id="section-3.8.3-1.5.1"><code>decimal</code>: IEEE 754-2008 decimal string format.<a href="#section-3.8.3-1.5.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.5.1"><code>decimal</code>: IEEE 754-2008 decimal string format.<a href="#section-3.8.4-1.5.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.6">
|
<li class="normal" id="section-3.8.4-1.6">
|
||||||
<p id="section-3.8.3-1.6.1"><code>currency</code>: ISO 4217 currency code.<a href="#section-3.8.3-1.6.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.6.1"><code>currency</code>: ISO 4217 currency code.<a href="#section-3.8.4-1.6.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.7">
|
<li class="normal" id="section-3.8.4-1.7">
|
||||||
<p id="section-3.8.3-1.7.1"><code>country-2</code>: ISO 3166-1 alpha-2 country code.<a href="#section-3.8.3-1.7.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.7.1"><code>country-2</code>: ISO 3166-1 alpha-2 country code.<a href="#section-3.8.4-1.7.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.8">
|
<li class="normal" id="section-3.8.4-1.8">
|
||||||
<p id="section-3.8.3-1.8.1"><code>country-3</code>: ISO 3166-1 alpha-3 country code.<a href="#section-3.8.3-1.8.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.8.1"><code>country-3</code>: ISO 3166-1 alpha-3 country code.<a href="#section-3.8.4-1.8.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.9">
|
<li class="normal" id="section-3.8.4-1.9">
|
||||||
<p id="section-3.8.3-1.9.1"><code>country-subdivision</code>: ISO 3166-2 country subdivision code.<a href="#section-3.8.3-1.9.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.9.1"><code>country-subdivision</code>: ISO 3166-2 country subdivision code.<a href="#section-3.8.4-1.9.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.10">
|
<li class="normal" id="section-3.8.4-1.10">
|
||||||
<p id="section-3.8.3-1.10.1"><code>email</code>: RFC5322 email address.<a href="#section-3.8.3-1.10.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.10.1"><code>email</code>: RFC5322 email address.<a href="#section-3.8.4-1.10.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.11">
|
<li class="normal" id="section-3.8.4-1.11">
|
||||||
<p id="section-3.8.3-1.11.1"><code>idn-email</code>: RFC6531 internationalized email address.<a href="#section-3.8.3-1.11.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.11.1"><code>idn-email</code>: RFC6531 internationalized email address.<a href="#section-3.8.4-1.11.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.12">
|
<li class="normal" id="section-3.8.4-1.12">
|
||||||
<p id="section-3.8.3-1.12.1"><code>hostname</code>: RFC1123 internet hostname (only ASCII segments)<a href="#section-3.8.3-1.12.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.12.1"><code>hostname</code>: RFC1123 internet hostname (only ASCII segments)<a href="#section-3.8.4-1.12.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.13">
|
<li class="normal" id="section-3.8.4-1.13">
|
||||||
<p id="section-3.8.3-1.13.1"><code>idn-hostname</code>: RFC5890 internationalized internet hostname
|
<p id="section-3.8.4-1.13.1"><code>idn-hostname</code>: RFC5890 internationalized internet hostname
|
||||||
(only <code>xn--</code>-prefixed ASCII "punycode" segments, or non-ASCII segments)<a href="#section-3.8.3-1.13.1" class="pilcrow">¶</a></p>
|
(only <code>xn--</code>-prefixed ASCII "punycode" segments, or non-ASCII segments)<a href="#section-3.8.4-1.13.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.14">
|
<li class="normal" id="section-3.8.4-1.14">
|
||||||
<p id="section-3.8.3-1.14.1"><code>ipv4</code>: RFC2673 dotted-quad IPv4 address.<a href="#section-3.8.3-1.14.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.14.1"><code>ipv4</code>: RFC2673 dotted-quad IPv4 address.<a href="#section-3.8.4-1.14.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.15">
|
<li class="normal" id="section-3.8.4-1.15">
|
||||||
<p id="section-3.8.3-1.15.1"><code>ipv6</code>: RFC2373 IPv6 address.<a href="#section-3.8.3-1.15.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.15.1"><code>ipv6</code>: RFC2373 IPv6 address.<a href="#section-3.8.4-1.15.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.16">
|
<li class="normal" id="section-3.8.4-1.16">
|
||||||
<p id="section-3.8.3-1.16.1"><code>url</code>: RFC3986 URI.<a href="#section-3.8.3-1.16.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.16.1"><code>url</code>: RFC3986 URI.<a href="#section-3.8.4-1.16.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.17">
|
<li class="normal" id="section-3.8.4-1.17">
|
||||||
<p id="section-3.8.3-1.17.1"><code>url-reference</code>: RFC3986 URI Reference.<a href="#section-3.8.3-1.17.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.17.1"><code>url-reference</code>: RFC3986 URI Reference.<a href="#section-3.8.4-1.17.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.18">
|
<li class="normal" id="section-3.8.4-1.18">
|
||||||
<p id="section-3.8.3-1.18.1"><code>irl</code>: RFC3987 Internationalized Resource Identifier.<a href="#section-3.8.3-1.18.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.18.1"><code>irl</code>: RFC3987 Internationalized Resource Identifier.<a href="#section-3.8.4-1.18.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.19">
|
<li class="normal" id="section-3.8.4-1.19">
|
||||||
<p id="section-3.8.3-1.19.1"><code>irl-reference</code>: RFC3987 Internationalized Resource Identifier Reference.<a href="#section-3.8.3-1.19.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.19.1"><code>irl-reference</code>: RFC3987 Internationalized Resource Identifier Reference.<a href="#section-3.8.4-1.19.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.20">
|
<li class="normal" id="section-3.8.4-1.20">
|
||||||
<p id="section-3.8.3-1.20.1"><code>url-template</code>: RFC6570 URI Template.<a href="#section-3.8.3-1.20.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.20.1"><code>url-template</code>: RFC6570 URI Template.<a href="#section-3.8.4-1.20.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.21">
|
<li class="normal" id="section-3.8.4-1.21">
|
||||||
<p id="section-3.8.3-1.21.1"><code>uuid</code>: RFC4122 UUID.<a href="#section-3.8.3-1.21.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.21.1"><code>uuid</code>: RFC4122 UUID.<a href="#section-3.8.4-1.21.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.22">
|
<li class="normal" id="section-3.8.4-1.22">
|
||||||
<p id="section-3.8.3-1.22.1"><code>regex</code>: Regular expression. Specific patterns may be implementation-dependent.<a href="#section-3.8.3-1.22.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.22.1"><code>regex</code>: Regular expression. Specific patterns may be implementation-dependent.<a href="#section-3.8.4-1.22.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.23">
|
<li class="normal" id="section-3.8.4-1.23">
|
||||||
<p id="section-3.8.3-1.23.1"><code>base64</code>: A Base64-encoded string, denoting arbitrary binary data.<a href="#section-3.8.3-1.23.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.23.1"><code>base64</code>: A Base64-encoded string, denoting arbitrary binary data.<a href="#section-3.8.4-1.23.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
<li class="normal" id="section-3.8.3-1.24">
|
<li class="normal" id="section-3.8.4-1.24">
|
||||||
<p id="section-3.8.3-1.24.1"><code>base85</code>: An <a href="https://en.wikipedia.org/wiki/Ascii85">Ascii85</a>-encoded string, denoting arbitrary binary data.<a href="#section-3.8.3-1.24.1" class="pilcrow">¶</a></p>
|
<p id="section-3.8.4-1.24.1"><code>base85</code>: An <a href="https://en.wikipedia.org/wiki/Ascii85">Ascii85</a>-encoded string, denoting arbitrary binary data.<a href="#section-3.8.4-1.24.1" class="pilcrow">¶</a></p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
<div id="examples">
|
<div id="examples">
|
||||||
<section id="section-3.8.4">
|
<section id="section-3.8.5">
|
||||||
<h4 id="name-examples">
|
<h4 id="name-examples">
|
||||||
<a href="#section-3.8.4" class="section-number selfRef">3.8.4. </a><a href="#name-examples" class="section-name selfRef">Examples</a>
|
<a href="#section-3.8.5" class="section-number selfRef">3.8.5. </a><a href="#name-examples" class="section-name selfRef">Examples</a>
|
||||||
</h4>
|
</h4>
|
||||||
<div class="lang-kdl sourcecode" id="section-3.8.4-1">
|
<div class="lang-kdl sourcecode" id="section-3.8.5-1">
|
||||||
<pre>
|
<pre>
|
||||||
node (u8)123
|
node (u8)123
|
||||||
|
node 123#i64
|
||||||
node prop=(regex).*
|
node prop=(regex).*
|
||||||
(published)date "1970-01-01"
|
(published)date "1970-01-01"
|
||||||
(contributor)person name="Foo McBar"
|
(contributor)person name="Foo McBar"
|
||||||
</pre><a href="#section-3.8.4-1" class="pilcrow">¶</a>
|
</pre><a href="#section-3.8.5-1" class="pilcrow">¶</a>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -2837,12 +2909,26 @@ multi-line-raw-string-body :=
|
||||||
// Numbers
|
// Numbers
|
||||||
number := keyword-number | hex | octal | binary | decimal
|
number := keyword-number | hex | octal | binary | decimal
|
||||||
|
|
||||||
decimal := sign? integer ('.' integer)? exponent?
|
decimal := sign? integer ('.' integer)? (
|
||||||
|
// NOTE: This grammar does not explicitly guard against having both
|
||||||
|
// parenthesized and type suffixes.
|
||||||
|
bare-type-suffix |
|
||||||
|
explicit-type-suffix |
|
||||||
|
(exponent explicit-type-suffix?)
|
||||||
|
)?
|
||||||
exponent := ('e' | 'E') sign? integer
|
exponent := ('e' | 'E') sign? integer
|
||||||
integer := digit (digit | '_')*
|
integer := digit (digit | '_')*
|
||||||
digit := [0-9]
|
digit := [0-9]
|
||||||
sign := '+' | '-'
|
sign := '+' | '-'
|
||||||
|
|
||||||
|
bare-type-suffix := bare-type-suffix-initial identifier-char*
|
||||||
|
bare-type-suffix-initial := identifier-char
|
||||||
|
- '.' - ',' - '_'
|
||||||
|
- ([a-zA-Z] [0-9_])
|
||||||
|
- (('e' | 'E') sign? digit)
|
||||||
|
- (('x' | 'X') [a-fA-F])
|
||||||
|
explicit-type-suffix := '#' identifier-string
|
||||||
|
|
||||||
hex := sign? '0x' hex-digit (hex-digit | '_')*
|
hex := sign? '0x' hex-digit (hex-digit | '_')*
|
||||||
octal := sign? '0o' [0-7] [0-7_]*
|
octal := sign? '0o' [0-7] [0-7_]*
|
||||||
binary := sign? '0b' ('0' | '1') ('0' | '1' | '_')*
|
binary := sign? '0b' ('0' | '1') ('0' | '1' | '_')*
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
KDL Community K. Marchán
|
KDL Community K. Marchán
|
||||||
Microsoft
|
Microsoft
|
||||||
KDL Contributors
|
KDL Contributors
|
||||||
23 February 2025
|
30 March 2025
|
||||||
|
|
||||||
|
|
||||||
The KDL Document Language
|
The KDL Document Language
|
||||||
|
|
@ -60,10 +60,11 @@ Table of Contents
|
||||||
3.6.1. Example
|
3.6.1. Example
|
||||||
3.7. Value
|
3.7. Value
|
||||||
3.8. Type Annotation
|
3.8. Type Annotation
|
||||||
3.8.1. Reserved Type Annotations for Numbers Without Decimals:
|
3.8.1. Suffix Type Annotation
|
||||||
3.8.2. Reserved Type Annotations for Numbers With Decimals:
|
3.8.2. Reserved Type Annotations for Numbers Without Decimals
|
||||||
3.8.3. Reserved Type Annotations for Strings:
|
3.8.3. Reserved Type Annotations for Numbers With Decimals:
|
||||||
3.8.4. Examples
|
3.8.4. Reserved Type Annotations for Strings:
|
||||||
|
3.8.5. Examples
|
||||||
3.9. String
|
3.9. String
|
||||||
3.10. Identifier String
|
3.10. Identifier String
|
||||||
3.10.1. Non-initial characters
|
3.10.1. Non-initial characters
|
||||||
|
|
@ -303,10 +304,74 @@ Table of Contents
|
||||||
do with these annotations. They are free to ignore them, or use them
|
do with these annotations. They are free to ignore them, or use them
|
||||||
to make decisions about how to interpret a value.
|
to make decisions about how to interpret a value.
|
||||||
|
|
||||||
Additionally, the following type annotations MAY be recognized by KDL
|
3.8.1. Suffix Type Annotation
|
||||||
parsers and, if used, SHOULD interpret these types as follows:
|
|
||||||
|
|
||||||
3.8.1. Reserved Type Annotations for Numbers Without Decimals:
|
When a (Section 3.7) is a (Section 3.14), it's possible to attach the
|
||||||
|
type annotation as a "suffix", instead of prepending it between ( and
|
||||||
|
). This makes it possible to, for example, write 10px, 10.5%,
|
||||||
|
512GiB, etc., which are equivalent to (px)10, (%)5, and (GiB)512,
|
||||||
|
respectively.
|
||||||
|
|
||||||
|
An implementation that finds BOTH a parenthesized and a suffix
|
||||||
|
(Section 3.8) on the same (Section 3.14) MUST yield a syntax error.
|
||||||
|
|
||||||
|
Suffixes MUST BE plain (Section 3.10)s. No other (Section 3.9) is
|
||||||
|
acceptable.
|
||||||
|
|
||||||
|
There are two kinds of (Section 3.8.1) available: (Section 3.8.1.1)s
|
||||||
|
and (Section 3.8.1.2).
|
||||||
|
|
||||||
|
3.8.1.1. Bare Suffix Type Annotation
|
||||||
|
|
||||||
|
When a (Section 3.7) is a decimal (Section 3.14) WITHOUT exponential
|
||||||
|
syntax (1e+5 etc) (and ONLY a decimal), it's possible to attach the
|
||||||
|
type annotation as a suffix directly to the number, without any
|
||||||
|
additional syntax.
|
||||||
|
|
||||||
|
They also come with some additional rules (like only being available
|
||||||
|
for decimals), in order to prevent potential ambiguity or footguns
|
||||||
|
with the syntax. This is generally acceptable, as type annotations
|
||||||
|
in particular tend to be application-defined and limited in scope,
|
||||||
|
rather than arbitrary user data. In designing this feature, it was
|
||||||
|
determined that the value for various real-world DSLs outweighed the
|
||||||
|
complexity of the following rules.
|
||||||
|
|
||||||
|
As such, to remove ambiguity, the suffix (Section 3.10) MUST NOT
|
||||||
|
start with any of the following patterns, all of which MUST yield
|
||||||
|
syntax errors:
|
||||||
|
|
||||||
|
* ., ,, or _
|
||||||
|
|
||||||
|
* [a-zA-Z][0-9_] (to disambiguate all non-decimals, with breathing
|
||||||
|
room)
|
||||||
|
|
||||||
|
* [eE][+-]?[0-9] (to disambiguate exponentials)
|
||||||
|
|
||||||
|
* [xX][a-fA-F] (to disambiguate hexadecimals)
|
||||||
|
|
||||||
|
All other (Section 3.10)s can be safely appended to decimal numbers,
|
||||||
|
so long as the decimal does not include an exponential component.
|
||||||
|
|
||||||
|
If the desired suffix would violate any of the above rules, either
|
||||||
|
regular parenthetical (Section 3.8)s, or (Section 3.8.1.2)s may be
|
||||||
|
used.
|
||||||
|
|
||||||
|
3.8.1.2. Explicit Suffix Type Annotation
|
||||||
|
|
||||||
|
Any (Section 3.14) may have a # attached to it, followed by any valid
|
||||||
|
(Section 3.10). This is an explicit (Section 3.8.1) syntax without
|
||||||
|
any of the relatively complex requirements of (Section 3.8.1.1),
|
||||||
|
which can be a useful escape hatch. For example: 10.0#u8 is invalid
|
||||||
|
syntax without the # prefix.
|
||||||
|
|
||||||
|
Note again that, unlike Bare Suffixes, Explicit Suffixes may be used
|
||||||
|
with ALL (Section 3.14) formats (hexadecimal, decimal, octal, and
|
||||||
|
binary).
|
||||||
|
|
||||||
|
3.8.2. Reserved Type Annotations for Numbers Without Decimals
|
||||||
|
|
||||||
|
Additionally, the following type annotations MAY be recognized by KDL
|
||||||
|
parsers and, if used, SHOULD interpret these types as follows.
|
||||||
|
|
||||||
Signed integers of various sizes (the number is the bit size):
|
Signed integers of various sizes (the number is the bit size):
|
||||||
|
|
||||||
|
|
@ -338,7 +403,7 @@ Table of Contents
|
||||||
|
|
||||||
* usize
|
* usize
|
||||||
|
|
||||||
3.8.2. Reserved Type Annotations for Numbers With Decimals:
|
3.8.3. Reserved Type Annotations for Numbers With Decimals:
|
||||||
|
|
||||||
IEEE 754 floating point numbers, both single (32) and double (64)
|
IEEE 754 floating point numbers, both single (32) and double (64)
|
||||||
precision:
|
precision:
|
||||||
|
|
@ -353,7 +418,7 @@ Table of Contents
|
||||||
|
|
||||||
* decimal128
|
* decimal128
|
||||||
|
|
||||||
3.8.3. Reserved Type Annotations for Strings:
|
3.8.4. Reserved Type Annotations for Strings:
|
||||||
|
|
||||||
* date-time: ISO8601 date/time format.
|
* date-time: ISO8601 date/time format.
|
||||||
|
|
||||||
|
|
@ -407,9 +472,10 @@ Table of Contents
|
||||||
* base85: An Ascii85 (https://en.wikipedia.org/wiki/Ascii85)-encoded
|
* base85: An Ascii85 (https://en.wikipedia.org/wiki/Ascii85)-encoded
|
||||||
string, denoting arbitrary binary data.
|
string, denoting arbitrary binary data.
|
||||||
|
|
||||||
3.8.4. Examples
|
3.8.5. Examples
|
||||||
|
|
||||||
node (u8)123
|
node (u8)123
|
||||||
|
node 123#i64
|
||||||
node prop=(regex).*
|
node prop=(regex).*
|
||||||
(published)date "1970-01-01"
|
(published)date "1970-01-01"
|
||||||
(contributor)person name="Foo McBar"
|
(contributor)person name="Foo McBar"
|
||||||
|
|
@ -1141,12 +1207,26 @@ Table of Contents
|
||||||
// Numbers
|
// Numbers
|
||||||
number := keyword-number | hex | octal | binary | decimal
|
number := keyword-number | hex | octal | binary | decimal
|
||||||
|
|
||||||
decimal := sign? integer ('.' integer)? exponent?
|
decimal := sign? integer ('.' integer)? (
|
||||||
|
// NOTE: This grammar does not explicitly guard against having both
|
||||||
|
// parenthesized and type suffixes.
|
||||||
|
bare-type-suffix |
|
||||||
|
explicit-type-suffix |
|
||||||
|
(exponent explicit-type-suffix?)
|
||||||
|
)?
|
||||||
exponent := ('e' | 'E') sign? integer
|
exponent := ('e' | 'E') sign? integer
|
||||||
integer := digit (digit | '_')*
|
integer := digit (digit | '_')*
|
||||||
digit := [0-9]
|
digit := [0-9]
|
||||||
sign := '+' | '-'
|
sign := '+' | '-'
|
||||||
|
|
||||||
|
bare-type-suffix := bare-type-suffix-initial identifier-char*
|
||||||
|
bare-type-suffix-initial := identifier-char
|
||||||
|
- '.' - ',' - '_'
|
||||||
|
- ([a-zA-Z] [0-9_])
|
||||||
|
- (('e' | 'E') sign? digit)
|
||||||
|
- (('x' | 'X') [a-fA-F])
|
||||||
|
explicit-type-suffix := '#' identifier-string
|
||||||
|
|
||||||
hex := sign? '0x' hex-digit (hex-digit | '_')*
|
hex := sign? '0x' hex-digit (hex-digit | '_')*
|
||||||
octal := sign? '0o' [0-7] [0-7_]*
|
octal := sign? '0o' [0-7] [0-7_]*
|
||||||
binary := sign? '0b' ('0' | '1') ('0' | '1' | '_')*
|
binary := sign? '0b' ('0' | '1') ('0' | '1' | '_')*
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>kdl-org/kdl zkat/schema-v2 preview</title>
|
<title>kdl-org/kdl zkat/suffixes preview</title>
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
<meta name="viewport" content="initial-scale=1.0">
|
||||||
<style type="text/css">/*<![CDATA[*/
|
<style type="text/css">/*<![CDATA[*/
|
||||||
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
|
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
|
||||||
|
|
@ -13,8 +13,8 @@
|
||||||
/*]]>*/</style>
|
/*]]>*/</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>Editor's drafts for zkat/schema-v2 branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/schema-v2">kdl-org/kdl</a></h1>
|
<h1>Editor's drafts for zkat/suffixes branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/suffixes">kdl-org/kdl</a></h1>
|
||||||
<table id="branch-zkat/schema-v2">
|
<table id="branch-zkat/suffixes">
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
||||||
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -1,45 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>kdl-org/kdl zkat/utf-8-must preview</title>
|
|
||||||
<meta name="viewport" content="initial-scale=1.0">
|
|
||||||
<style type="text/css">/*<![CDATA[*/
|
|
||||||
body { font-family: "Helvetica Neue","Open Sans", Helvetica, Calibri,sans-serif; }
|
|
||||||
h1, h2, td { font-family: "Helvetica Neue", "Roboto Condensed", "Open Sans", Helvetica, Calibri, sans-serif; }
|
|
||||||
h1 { font-size: 20px; } h2 { font-size: 16px; }
|
|
||||||
table { margin: 5px 10px; border-collapse: collapse; }
|
|
||||||
th, td { font-weight: normal; text-align: left; padding: 2px 5px; }
|
|
||||||
a:link { color: #000; } a:visited { color: #00a; }
|
|
||||||
/*]]>*/</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<h1>Editor's drafts for zkat/utf-8-must branch of <a href="https://github.com/kdl-org/kdl/tree/zkat/utf-8-must">kdl-org/kdl</a></h1>
|
|
||||||
<table id="branch-zkat/utf-8-must">
|
|
||||||
<tr>
|
|
||||||
<td><a href="./draft-marchan-kdl2.html" class="html draft-marchan-kdl2" title="The KDL Document Language (HTML)">KDL</a></td>
|
|
||||||
<td><a href="./draft-marchan-kdl2.txt" class="txt draft-marchan-kdl2" title="The KDL Document Language (Text)">plain text</a></td>
|
|
||||||
<td>same as main</td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<script>
|
|
||||||
window.onload = function() {
|
|
||||||
var referrer_branch = 'main';
|
|
||||||
// e.g., "https://github.com/user/repo/tree/main"
|
|
||||||
var chunks = document.referrer.split("/");
|
|
||||||
if (chunks[2] === 'github.com' && chunks[5] === 'tree') {
|
|
||||||
referrer_branch = chunks[6];
|
|
||||||
}
|
|
||||||
let branch = document.querySelector('#branch-' + referrer_branch);
|
|
||||||
let h = document.location.hash.substring(1);
|
|
||||||
if (h === 'show') {
|
|
||||||
document.location.hash = '#' + branch.id;
|
|
||||||
} else if (branch && h.startsWith('go')) {
|
|
||||||
let e = branch.querySelector(h.substring(2));
|
|
||||||
if (e && e.href) {
|
|
||||||
document.location = e.href;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
||||||
Loading…
Reference in New Issue