Skip to content

Commit 8e6c104

Browse files
Remove mentions of relapse and replace with validator in tour.js
1 parent b5a8f8c commit 8e6c104

File tree

1 file changed

+36
-36
lines changed

1 file changed

+36
-36
lines changed

tour.js

+36-36
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ var welcomeTour = {
66
"heading": "Welcome",
77
"text": `
88
<p>
9-
Welcome to a tour of the Relapse validation language.
9+
Welcome to a tour of the Katydid validator language.
1010
</p>
1111
<p>
12-
The tour is interactive, so when typing in the textboxes Relapse will compile and try to validate the input.
12+
The tour is interactive, so when typing in the textboxes the validator will compile and try to validate the input.
1313
This will result in the display of a green bar for valid, orange bar for invalid and red bar for a syntax or other error.
1414
</p>
1515
<p>
16-
The examples in the tour are meant to do a walk through most of the features of Relapse.
16+
The examples in the tour are meant to do a walk through most of the features of the Katydid Validator.
1717
After running through the tour you should be able to start writing your own validating expressions.
1818
</p>
1919
<p>
@@ -35,7 +35,7 @@ var welcomeTour = {
3535
</ol>
3636
</p>
3737
`,
38-
"relapse": `WhatsUp == "E"`,
38+
"validator": `WhatsUp == "E"`,
3939
"input": welcomeJson
4040
}
4141

@@ -47,14 +47,14 @@ var stringFieldsTour = {
4747
"heading": "Strings",
4848
"text": `
4949
<p>
50-
Relapse allows two specifications for string literals.
50+
The Katydid Validator allows two specifications for string literals.
5151
<ul>
5252
<li>raw <code>\`with backticks\`</code></li>
5353
<li>interpreted <code>"with double quotes"</code></li>
5454
</ul>
5555
The raw string is started with a backtick, can contain any UTF8 characters and is only terminated by another backtick.
5656
The interpreted string is contained within double quotes, can contain backslash escaped characters and cannot contain any new lines.
57-
The Relapse <a href="http://katydid.github.io/doc/syntax.html#string-literals">syntax</a> documentation contains more detail on string literals.
57+
The Katydid Validator <a href="http://katydid.github.io/doc/syntax.html#string-literals">syntax</a> documentation contains more detail on string literals.
5858
</p>
5959
<p>
6060
Fieldnames can be expressed as a string literal with quotes or backticks.
@@ -83,7 +83,7 @@ var stringFieldsTour = {
8383
</ol>
8484
</p>
8585
`,
86-
"relapse": `(
86+
"validator": `(
8787
WhatsUp == "Evolution" /*equal*/ &
8888
WhatsUp ^= "Evo" /*has prefix*/ &
8989
WhatsUp *= "volutio" /*contains*/ &
@@ -103,7 +103,7 @@ var numberFieldsTour = {
103103
"heading": "Numbers",
104104
"text": `
105105
<p>
106-
Relapse is built for multiple serialization formats which can be more specific about number types than JSON can be.
106+
The Katydid Vaildator is built for multiple serialization formats which can be more specific about number types than JSON can be.
107107
The number types include:
108108
<ul>
109109
<li>Integer <code>$int</code></li>
@@ -113,17 +113,17 @@ var numberFieldsTour = {
113113
The JSON parser included in Katydid tries to infer the type of the number.
114114
All numbers are inferred as type <code>$double</code>, but if the number is a whole number it is also of type <code>$int</code>.
115115
If the number is an unsigned whole number it is of type <code>$double</code>, <code>$int</code> and <code>$uint</code>.
116-
The Relapse <a href="http://katydid.github.io/doc/syntax.html#literals">syntax</a> documentation contains more detail on integer, unsigned integer and double literals.
116+
The Katydid Validator <a href="http://katydid.github.io/doc/syntax.html#literals">syntax</a> documentation contains more detail on integer, unsigned integer and double literals.
117117
</p>
118118
<p>
119-
Numbers in Relapse can be wrapped in a type to make the type of the number explicit.
119+
Numbers in the Validator can be wrapped in a type to make the type of the number explicit.
120120
For example:
121121
<ul>
122122
<li><code>int(123)</code></li>
123123
<li><code>uint(456)</code></li>
124124
<li><code>double(789)</code></li>
125125
</ul>
126-
If the type of the number is not explicitly specified Relapse tries to infer it.
126+
If the type of the number is not explicitly specified the Katydid Validator tries to infer it.
127127
A whole number is always infered to be of type <code>$int</code>.
128128
The type of <code>$uint</code> and <code>$double</code> can not be inferred and should always be specified explicitly.
129129
</p>
@@ -150,13 +150,13 @@ var numberFieldsTour = {
150150
Change the <code>$int</code> to <code>$double</code>. The bar should become green, but it is still orange.
151151
</li>
152152
<li>
153-
Relapse infers all the whole numbers to be of type int. So lets make it clear that they are doubles, by wrapping them in double enclosed brackets.
153+
The Katydid Validator infers all the whole numbers to be of type int. So lets make it clear that they are doubles, by wrapping them in double enclosed brackets.
154154
For example <code>Survived >= double(-2016)</code>. The bar should become green.
155155
</li>
156156
</ol>
157157
</p>
158158
`,
159-
"relapse": `(
159+
"validator": `(
160160
Survived > 999999 &
161161
Survived >= -2016 &
162162
Survived == int(1000000) &
@@ -176,16 +176,16 @@ var booleanTour = {
176176
"heading": "Other Types",
177177
"text": `
178178
<p>
179-
Booleans in Relapse are represented with the two keywords, <code>true</code> and <code>false</code>.
179+
Booleans in the Katydid Validator are represented with the two keywords, <code>true</code> and <code>false</code>.
180180
</p>
181181
<p>
182-
Relapse does not only support shorthand operators like <code>==</code>, but also supports more complex functions.
182+
The Katydid Validator does not only support shorthand operators like <code>==</code>, but also supports more complex functions.
183183
These complex functions are invoked with the <code>-></code> <i>arrow operator</i>.
184184
For example <code>== false</code> is equivalent to <code>-> eq($bool, false)</code>.
185185
This means that the field is of type <code>$bool</code> and is equal to false.
186186
</p>
187187
<p>
188-
Bytes is the last native Relapse type.
188+
Bytes is the last native Validator type.
189189
Unfortunately JSON does not have a bytes type, so this tour is not going to cover it in great detail.
190190
The second field comparison, <code>-> eq(length([]byte{0x1,2,'a'}), 3)</code>, does not even take the field value into account.
191191
It only checks whether a list of predefined bytes have a length of 3.
@@ -209,7 +209,7 @@ var booleanTour = {
209209
</ol>
210210
</p>
211211
`,
212-
"relapse": `(
212+
"validator": `(
213213
DragonsExist == false &
214214
DragonsExist -> eq(length([]byte{0x1,2,'a'}), 3) & // ignores the field value
215215
DragonsExist -> eq($bool, false)
@@ -243,13 +243,13 @@ var nameTour = {
243243
</li>
244244
<li>
245245
Change <code>(MonkeysSmart|_)</code> to <code>!((MonkeysSmart|_))</code>. The bar should become orange.
246-
<i>Relapse does not use brackets as a grouping mechanism. Brackets are paired with their operators. The <code>!</code> operator will always have brackets and the <code>|</code> operator as well.
246+
<i>The Validator does not use brackets as a grouping mechanism. Brackets are paired with their operators. The <code>!</code> operator will always have brackets and the <code>|</code> operator as well.
247247
This is why we need two brackets, one for the <code>|</code> and one for the <code>!</code>.</i>
248248
</li>
249249
</ol>
250250
</p>
251251
`,
252-
"relapse": `(DragonsExist|MonkeysSmart|!(_)) == false`,
252+
"validator": `(DragonsExist|MonkeysSmart|!(_)) == false`,
253253
"input": nameJson
254254
}
255255

@@ -274,7 +274,7 @@ var zanyTour = {
274274
</ol>
275275
</p>
276276
`,
277-
"relapse": "*",
277+
"validator": "*",
278278
"input": zanyJson,
279279
}
280280

@@ -307,7 +307,7 @@ var andOrTour = {
307307
</ol>
308308
</p>
309309
`,
310-
"relapse": "(Age > 30 & Age < 32 & Age == 31)",
310+
"validator": "(Age > 30 & Age < 32 & Age == 31)",
311311
"input": andOrJson,
312312
}
313313

@@ -333,7 +333,7 @@ var structTour = {
333333
</ol>
334334
</p>
335335
`,
336-
"relapse": 'Wish: Dart: == "Poison"',
336+
"validator": 'Wish: Dart: == "Poison"',
337337
"input": structJson,
338338
}
339339

@@ -368,7 +368,7 @@ var emptyTour = {
368368
</ol>
369369
</p>
370370
`,
371-
"relapse": 'Wish: Dart: Poison: <empty>',
371+
"validator": 'Wish: Dart: Poison: <empty>',
372372
"input": emptyJson,
373373
}
374374

@@ -410,7 +410,7 @@ var concatTour = {
410410
</ol>
411411
</p>
412412
`,
413-
"relapse": `History: [
413+
"validator": `History: [
414414
0: == "Giant Lizards",
415415
_ == "Meteor",
416416
2:*,
@@ -462,7 +462,7 @@ var zeroOrMoreTour = {
462462
</ol>
463463
</p>
464464
`,
465-
"relapse": 'History: (_ :: $string)*',
465+
"validator": 'History: (_ :: $string)*',
466466
"input": zeroOrMoreJson,
467467
}
468468

@@ -495,7 +495,7 @@ var interleaveTour = {
495495
</ol>
496496
</p>
497497
`,
498-
"relapse": `{
498+
"validator": `{
499499
MonkeysSmart :: $bool;
500500
DragonsExist :: $bool;
501501
WhatsUp :: $string;
@@ -538,7 +538,7 @@ var optionalTour = {
538538
</ol>
539539
</p>
540540
`,
541-
"relapse": `{
541+
"validator": `{
542542
(MonkeysSmart :: $bool)?;
543543
DragonsExist :: $bool;
544544
(WhatsUp :: $string)?;
@@ -579,7 +579,7 @@ var containsTour = {
579579
</ol>
580580
</p>
581581
`,
582-
"relapse": `.WhatsUp == "E"`,
582+
"validator": `.WhatsUp == "E"`,
583583
"input": containsJson,
584584
}
585585

@@ -620,7 +620,7 @@ var notTour = {
620620
</ol>
621621
</p>
622622
`,
623-
"relapse": `!(WhatsUp == "E")`,
623+
"validator": `!(WhatsUp == "E")`,
624624
"input": notJson,
625625
}
626626

@@ -670,7 +670,7 @@ var refsTour = {
670670
</ol>
671671
</p>
672672
`,
673-
"relapse": `Family: @order
673+
"validator": `Family: @order
674674
#order = ( .Order == "Orthoptera" | .Order: @order )`,
675675
"input": refsJson,
676676
}
@@ -684,7 +684,7 @@ var finalJsonTour = {
684684
<p>
685685
An answer, valid JSON, will be provided on the next page.
686686
</p>`,
687-
"relapse": `{
687+
"validator": `{
688688
WhatsUp *= "E";
689689
History [
690690
0 ^= "Dino",
@@ -719,25 +719,25 @@ var finalExprTour = {
719719
<p>
720720
An answer will be provided on the next page.
721721
</p>`,
722-
"relapse": ``,
722+
"validator": ``,
723723
"input": finalExprJson,
724724
}
725725

726726
var goodbyeJson = JSON.stringify({
727-
"WhatsUp": "RelapsE",
727+
"WhatsUp": "E",
728728
}, "", 4);
729729

730730
var goodbyeTour = {
731731
"heading": "Thank you",
732732
"text": `
733733
<p>
734-
Thank you for taking a tour of Relapse.
734+
Thank you for taking a tour of the Katydid Validor.
735735
</p>
736736
<p>
737737
More documentation can be found <a href="http://katydid.github.io/">here</a>
738738
</p>
739739
`,
740-
"relapse": `{
740+
"validator": `{
741741
"WhatsUp" == "Evolution";
742742
History [
743743
0 ^= "Dino",
@@ -823,7 +823,7 @@ function tourinit() {
823823
$("#tourheading").text(tour.heading);
824824
document.getElementById("tourtext").innerHTML = tour["text"];
825825
document.getElementById("tourprogress").setAttribute("style", `width: ` + (tourNumber+1)*100/tours.length + `%;`);
826-
codeMirrors["katydid"].setValue(tour["relapse"]);
826+
codeMirrors["katydid"].setValue(tour["validator"]);
827827
codeMirrors["json"].setValue(tour["input"]);
828828
if ((tourNumber+1) < tours.length) {
829829
document.getElementById("nextref").setAttribute("href", "./index.html?tour="+(tourNumber+1));

0 commit comments

Comments
 (0)