-
Notifications
You must be signed in to change notification settings - Fork 0
/
jwiXML.xml
123 lines (103 loc) · 3.98 KB
/
jwiXML.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?xml version="1.0" encoding="UTF-8"?>
<tests>
<!--<samples href="pragmas/marks/sample-catalog.mark.xml" title="Marks" role="marks"/>-->
<samples href="xpath/sample-catalog.xml" title="XPath/XQuery 4" role="samples"/>
<samples href="sample-catalog.xml" title="Samples" role="samples"/>
<!--<samples href="pragmas/sample-catalog.xml" title="Pragma Samples" pragma="yes"/>-->
<samples href="https://raw.githubusercontent.com/invisibleXML/ixml/master/tests/test-catalog.xml"
title="Test Suite" role="tests"/>
<!-- Example tests and samples for the jωiXML processor
These take two forms - simple sample grammars for the interactive processor
and test grammar/input sets for automatic execution (used during development)
-->
<!-- Sample grammars for use in the interactive processor
They will appear on the left hand side and can be loaded by clicking their box.
Note that sample[@href] will load a sample from a file if available -
see the (commented-out) samples at the end which load from the ixml test suite,
assuming /ixmlTests has aliased in your web server to your local repository ixml/tests-->
<sample>S:S;'a'. </sample>
<sample>S: [L]++(+':';+'=';+'-').</sample>
<sample>a: "a"*; ()?. </sample>
<sample>input: line++lf.
line: ~[#a | #d]*.
lf: -#a | -#d, -#a.
</sample>
<sample>diary: entry+.
entry: date, para.
date: day, s, month, s, year, nl.
day: digit, digit?.
-digit:["0"-"9"].
month: "January"; "February"; "March"; "April"; "May"; "June";
"July"; "August"; "September"; "October"; "November"; "December".
year: digit, digit, digit, digit.
para: word++s, s?, blank.
-blank: nl, nl.
-word: (letter; punctuation)+.
-letter: [L].
-punctuation: [".;:,'?!"].
-s: " "+.
-nl: -#a | -#d, -#a .
</sample>
<sample>url: scheme, ":", authority, path.
@scheme: name.
-name: letter+.
-authority: "//", host.
host: sub++".".
-sub: name.
path: ("/", seg)+.
-seg: sname.
-sname: fletter*.
-letter: ["a"-"z"]; ["A"-"Z"]; ["0"-"9"].
-fletter: letter; ".".
</sample>
<sample>address: person, lf, street, lf, postcode, city, lf, country, lf;
person, lf, street, lf, city, postcode, lf, country, lf.
person: (title, S?)?, (initials; given, S), surname, S?.
title: "Mr."; "Mrs."; "Dr."; "Ms.".
initials: initial+.
initial: LETTER, ".", S?.
surname: name.
given: name.
-name: LETTER, letters.
street: no, S?, streetname; streetname, S?, no, S?.
streetname: name, S; name, S, name.
city: name, S; name, S, name, S.
country: name, S?; name, S, name, S?.
postcode: digits, S, LETTER, LETTER, S?;
LETTER, LETTER, digits, S, digit, LETTER, LETTER, S?.
no: digits.
-LETTER: ["A"-"Z"].
-letters: ["a"-"z"]*.
-digit: ["0"-"9"].
-digits: ["0"-"9"]+.
-S: " "+.
-lf: -#a | -#d, -#a .
</sample>
<!-- Samples that fetch the grammar from a file,
typically a grammar from the test-suite, which can be found at
https://github.com/invisibleXML/ixml/tree/master/tests
If you wish to reference test-suite grammars, please ensure the URIs point appropriately
For example:
<sample href="/ixmlTests/correct/address.ixml"/>
will get one of the test suit grammars, assuming your localhost website is configured
that /ixmlTests/ is aliased to the location of ixml/tests
-->
<!--<sample href="/ixmlTests/correct/expr3.ixml"/>
<sample href="/ixmlTests/correct/address.ixml"/>
-->
<sample source="tests" href="correct/email.ixml"/>
<sample source="samples" href="ABNF/ABNF.ixml"/>
<sample source="samples" href="ISO-8601-2004/iso8601.ixml"/>
<!-- Non-interactive test groups of grammars and inputs
<include href/> will include tests declared in another file
-->
<test>
<grammar>S: [L]++(+':';+'=').</grammar>
<input>abcd</input>
</test>
<include href="myTests/welcome.xml"/>
<test>
<grammar>S: [L]+ .</grammar>
<input showStates="">a5</input>
</test>
</tests>