-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.html
104 lines (99 loc) · 5.73 KB
/
test.html
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="stylesheet" type="text/css" href="./test.css">
<script src="./grammar.js"></script>
<script src="./parser.js"></script>
<script src="./validator.js"></script>
<script src="./test.js"></script>
<title>Test the Siteswap Analyzer</title>
</head>
<body>
<article>
<h1>Test the Siteswap Analyzer</h1>
<p>Press the "Execute" button below to execute the test line by line. The expected value is the state if it is a valid siteswap, otherwise the result string. Uppercase letters in the pattern are converted to lowercase letters, full-width characters are converted to half-width characters, and white spaces are ignored.</p>
<table class="border" id="patterns">
<tr><th>No.</th><th>pattern</th><th>expected</th><th>result</th></tr>
<tr><td></td><td>0</td><td>0</td><td></td>
<tr><td></td><td>1</td><td>1</td><td></td>
<tr><td></td><td>2</td><td>1 1</td><td></td>
<tr><td></td><td>3</td><td>1 1 1</td><td></td>
<tr><td></td><td>4</td><td>1 1 1 1</td><td></td>
<tr><td></td><td>5</td><td>1 1 1 1 1</td><td></td>
<tr><td></td><td>6</td><td>1 1 1 1 1 1</td><td></td>
<tr><td></td><td>7</td><td>1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>8</td><td>1 1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>9</td><td>1 1 1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>a</td><td>1 1 1 1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>x</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>z</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1</td><td></td>
<tr><td></td><td>+</td><td>unknown character(s): +</td><td></td>
<tr><td></td><td>1+2</td><td>unknown character(s): +2</td><td></td>
<tr><td></td><td>1 + 2</td><td>unknown character(s): + 2</td><td></td>
<tr><td></td><td>*</td><td>syntax error: *</td><td></td>
<tr><td></td><td>1*2</td><td>syntax error: * 2</td><td></td>
<tr><td></td><td>1 * 2</td><td>syntax error: * 2</td><td></td>
<tr><td></td><td>12</td><td>Invalid</td><td></td>
<tr><td></td><td>20</td><td>1</td><td></td>
<tr><td></td><td>02</td><td>0 1</td><td></td>
<tr><td></td><td>3 1</td><td>1 1</td><td></td>
<tr><td></td><td> 1   3</td><td>1 0 1</td><td></td>
<tr><td></td><td>efg</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1</td><td></td>
<tr><td></td><td>EFG</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1</td><td></td>
<tr><td></td><td>efg</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1</td><td></td>
<tr><td></td><td>EFG</td><td>1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1</td><td></td>
<tr><td></td><td>[12]</td><td>2 1</td><td></td>
<tr><td></td><td>[34]</td><td>2 2 2 1</td><td></td>
<tr><td></td><td>[30]</td><td>syntax error: 0 ]</td><td></td>
<tr><td></td><td>[3]</td><td>syntax error: ]</td><td></td>
<tr><td></td><td>3[]</td><td>syntax error: ]</td><td></td>
<tr><td></td><td>[]</td><td>syntax error: ]</td><td></td>
<tr><td></td><td>[34</td><td>syntax error:</td><td></td>
<tr><td></td><td>[34[</td><td>syntax error: [</td><td></td>
<tr><td></td><td>34]</td><td>syntax error: ]</td><td></td>
<tr><td></td><td>]34]</td><td>syntax error: ] 3 4 ]</td><td></td>
<tr><td></td><td>[3[12]]</td><td>syntax error: [ 1 2 ] ]</td><td></td>
<tr><td></td><td>20[34]</td><td>1 0 1 1</td><td></td>
<tr><td></td><td>[34][32]</td><td>2 2 2</td><td></td>
<tr><td></td><td>[34][32]0</td><td>2 2</td><td></td>
<tr><td></td><td>[123]</td><td>3 2 1</td><td></td>
<tr><td></td><td>[4567]</td><td>4 4 4 4 3 2 1</td><td></td>
<tr><td></td><td>(4,2)</td><td>1 1 1</td><td></td>
<tr><td></td><td>(4,3)</td><td>syntax error: 3 )</td><td></td>
<tr><td></td><td>(4,22)</td><td>syntax error: 2 )</td><td></td>
<tr><td></td><td>(44,2)</td><td>syntax error: 4 , 2 )</td><td></td>
<tr><td></td><td>(4,4,2)</td><td>syntax error: , 2 )</td><td></td>
<tr><td></td><td>(4,(4,2))</td><td>syntax error: ( 4 , 2 ) )</td><td></td>
<tr><td></td><td>(4,(2))</td><td>syntax error: ( 2 ) )</td><td></td>
<tr><td></td><td>(4,2())</td><td>syntax error: ( ) )</td><td></td>
<tr><td></td><td>(4,2()</td><td>syntax error: ( )</td><td></td>
<tr><td></td><td>(4,2))</td><td>syntax error: )</td><td></td>
<tr><td></td><td>(4,2)(</td><td>syntax error:</td><td></td>
<tr><td></td><td>(4,2</td><td>syntax error:</td><td></td>
<tr><td></td><td>(4,)</td><td>syntax error: )</td><td></td>
<tr><td></td><td>(4,</td><td>syntax error:</td><td></td>
<tr><td></td><td>(4)</td><td>syntax error: )</td><td></td>
<tr><td></td><td>(42)</td><td>syntax error: 2 )</td><td></td>
<tr><td></td><td>4,2)</td><td>syntax error: , 2 )</td><td></td>
<tr><td></td><td>4,2</td><td>syntax error: , 2</td><td></td>
<tr><td></td><td>4)</td><td>syntax error: )</td><td></td>
<tr><td></td><td>(4,2)3</td><td>syntax error: 3</td><td></td>
<tr><td></td><td>(4,x)</td><td>syntax error: x )</td><td></td>
<tr><td></td><td>(4,x2)</td><td>syntax error: x 2 )</td><td></td>
<tr><td></td><td>(4,2x)</td><td>Invalid</td><td></td>
<tr><td></td><td>(4,2x)(2x,4)</td><td>1 1 0 1</td><td></td>
<tr><td></td><td>(4,2x)*</td><td>1 1 0 1</td><td></td>
<tr><td></td><td>(4x,2x)</td><td>1 1 0 1</td><td></td>
<tr><td></td><td>(4x,2x)*</td><td>Invalid</td><td></td>
<tr><td></td><td>(6x,0)*</td><td>1 0 0 1 1</td><td></td>
<tr><td></td><td>(4x,6x)(2,4)</td><td>1 1 1 1</td><td></td>
<tr><td></td><td>(6,4)([44x],2x)</td><td>1 1 2 1</td><td></td>
<tr><td></td><td>(2,4)([44x],2x)*</td><td>1 1 1 1</td><td></td>
<tr><td></td><td>[(4,2)]</td><td>syntax error: ( 4 , 2 ) ]</td><td></td>
</table>
<input type="button" id="execute" value="Execute">
</article>
</body>
</html>