Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions doc/language/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
font-family: Arial, sans-serif;
font-weight: medium;
font-style: italic;
color: #008
color: #008
}

/* Value sets */
em {
font-family: Arial, sans-serif;
font-weight: medium;
font-weight: medium;
font-style: italic;
color: #800
}
Expand Down Expand Up @@ -158,12 +158,12 @@ <h2 id="lexing">Lexing</h2>

</li>

<li><i>symbol</i>:
<li><i>symbol</i>:
The following single-character symbols:
<p><code>{}[],.();</code></p>
</li>

<li><i>operator</i>:
<li><i>operator</i>:
A sequence of at least one of the following single-character symbols:
<code>!$:~+-&amp;|^=&lt;&gt;*/%</code>
<p>Subject to the following rules, which will cause the lexing to terminate with a shorter
Expand Down Expand Up @@ -233,15 +233,15 @@ <h2 id="abstract_syntax">Abstract Syntax</h2>
<i>expr</i>
<code>[</code>
<i>expr</i>
[ <code>:</code> [ <i>expr</i>
[ <code>:</code> [ <i>expr</i>
[ <code>:</code> [ <i>expr</i> ] ] ] ]
<code>]</code>

<!-- object index (general2) -->
</td></tr> <tr><td></td><td> | </td><td>
<i>expr</i>
<code>[</code>
<code>:</code> [ <i>expr</i>
<code>:</code> [ <i>expr</i>
[ <code>:</code> [ <i>expr</i> ] ] ] ]
<code>]</code>

Expand Down Expand Up @@ -512,15 +512,15 @@ <h2 id="abstract_syntax">Abstract Syntax</h2>
<code>^</code> |
<code>|</code> |
<code>&amp;&amp;</code> |
<code>||</code>
<code>||</code>
</td></tr>

<!-- unaryop -->
<tr><td><i>unaryop</i></td><td>::=</td><td>
<code>-</code> |
<code>+</code> |
<code>!</code> |
<code>~</code>
<code>~</code>
</td></tr>
</table>

Expand Down Expand Up @@ -573,7 +573,7 @@ <h3 id="core_syntax">Core Syntax</h3>

<ul>
<li>The set of identifiers now includes <code>$</code>, which is no-longer a special keyword.</li>
<li>The following binary operators are removed: <code>!=</code> <code>==</code>
<li>The following binary operators are removed: <code>!=</code> <code>==</code>
<code>%</code> <code>in</code></li>
<li>Array slices <code>[::]</code> are removed.</li>
<li>Array and object comprehensions are replaced with a simple object comprehension construct.</li>
Expand Down Expand Up @@ -928,7 +928,7 @@ <h3 id="desugaring">Desugaring</h3>

<div class="desugar-rule"> \[
desugar_{field}(string \mathrel{h} e), binds, b) =
desugar_{field}([string] \mathrel{h} e), binds, b)
desugar_{field}([string] \mathrel{h} e), binds, b)
\] </div>

<div class="desugar-rule"> \[
Expand Down Expand Up @@ -1015,7 +1015,7 @@ <h3 id="desugaring">Desugaring</h3>
\hspace{10mm}desugar_{expr}(
\local{arr = e'}{
\texttt{std.join}(\\\hspace{20mm}[], \texttt{std.makeArray}(
\texttt{std.length}(arr),
\texttt{std.length}(arr),
\function{i}{\local{x = arr[i]}{[base]}}
))
},
Expand Down Expand Up @@ -1178,7 +1178,7 @@ <h4 id="jsonnet_values">Jsonnet Values</h4>

<p> When executed, Jsonnet expressions yield Jsonnet values. These need to be manifested, an
additional step, to get JSON values. The differences between Jsonnet values and JSON values are:
1) Jsonnet values contain functions (which are not representable in JSON). 2)
1) Jsonnet values contain functions (which are not representable in JSON). 2)
Due to the lazy semantics, both object fields and array elements have yet to be executed to yield
values. 3) Object assertions still need to be checked.</p>

Expand Down Expand Up @@ -1257,7 +1257,7 @@ <h4 id="substitution">Capture-Avoiding Substitution</h4>
...
<code>[</code><i>e''</i><code>]</code> <i>h</i> <i>e'''</i>
...
<code>}</code>[<i>e</i>/<i>x</i>] =
<code>}</code>[<i>e</i>/<i>x</i>] =
<code>{</code>
...
<code>assert</code> <i>e'</i>[<i>e</i>/<i>x</i>]
Expand Down Expand Up @@ -1484,14 +1484,14 @@ <h4 id="execution">Execution</h4>

<div class="sequent-rule"> \[\rule{object-inherit} {
e^L ↓ \object{
\assert e''^L_1 \ldots \assert e''^L_n,\
f_1 h^L_1 e^L_1 \ldots f_m h^L_m e^L_m,\
\assert e''^L_1 \ldots \assert e''^L_n,\
f_1 h^L_1 e^L_1 \ldots f_m h^L_m e^L_m,\
f'^L_1 h'^L_1 e'^L_1 \ldots f'^L_p h'^L_p e'^L_p
}
\\
e^R ↓ \object{
\assert e''^R_1 \ldots \assert e''^R_q,\
f_1 h^R_1 e^R_1 \ldots f_m h^R_m e^R_m,\
\assert e''^R_1 \ldots \assert e''^R_q,\
f_1 h^R_1 e^R_1 \ldots f_m h^R_m e^R_m,\
f'^R_1 h'^R_1 e'^R_1 \ldots f'^R_r h'^R_r e'^R_r
}
\\
Expand All @@ -1502,18 +1502,18 @@ <h4 id="execution">Execution</h4>
e_s = \super + \object{
\assert S(e''^L_1) \ldots \assert S(e''^L_n),\\
\hspace{20mm}
f_1 h^L_1 S(e^L_1) \ldots f_m h^L_m S(e^L_m),\
f_1 h^L_1 S(e^L_1) \ldots f_m h^L_m S(e^L_m),\
f'^L_1 h'^L_1 S(e'^L_1) \ldots f'^L_p h'^L_p S(e'^L_p)
}
\\
∀i∈\{1 \ldots m\}: h'''_i = h^L_i + h^R_i ∧
e'''_i = (\local{x = \self, y = \super}{e^R_i ⟦e_s / \super⟧})
\\
o = \{ \\
\hspace{5mm} \assert e''^L_1 \ldots \assert e''^L_n, \
\assert e''^R_1 \ldots \assert e''^R_p, \\
\hspace{5mm} f^L_1 h^L_1 e^L_1 \ldots f^L_p h^L_p e^L_p, \
f^R_1 h^R_1 e^R_1 \ldots f^R_q h^R_q e^R_q, \
\hspace{5mm} \assert e''^L_1 \ldots \assert e''^L_n, \
\assert e''^R_1 \ldots \assert e''^R_q, \\
\hspace{5mm} f'^L_1 h'^L_1 e'^L_1 \ldots f'^L_p h'^L_p e'^L_p, \
f'^R_1 h'^R_1 e'^R_1 \ldots f'^R_r h'^R_r e'^R_r, \
f_1 h'''_1 e'''_m \ldots f_m h'''_m e'''_m \\
\}
} {
Expand Down Expand Up @@ -1805,9 +1805,9 @@ <h4 id="manifestation">Manifestation</h4>

<div class="sequent-rule"> \[\rule{manifest-object} {
o = \object{
\assert e''_1 \ldots \assert e''_m,\
f_1 h_1 e_1 \ldots f_n h_n e_n,\
f'_1 :: e'_1 \ldots f'_p :: e'_p,\
\assert e''_1 \ldots \assert e''_m,\
f_1 h_1 e_1 \ldots f_n h_n e_n,\
f'_1 :: e'_1 \ldots f'_p :: e'_p,\
}
\\
∀i∈\{1\ldots m\}: e''_i⟦o/\self,\{\}/\super⟧↓\_
Expand Down