sdl4r 0.9.4 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +28 -0
- data/README +9 -0
- data/Rakefile +3 -2
- data/TODO +78 -0
- data/doc/classes/SDL4R.html +207 -53
- data/doc/classes/SDL4R/Parser.html +111 -49
- data/doc/classes/SDL4R/SdlBinary.html +125 -65
- data/doc/classes/SDL4R/SdlParseError.html +52 -30
- data/doc/classes/SDL4R/SdlTimeSpan.html +497 -279
- data/doc/classes/SDL4R/Tag.html +866 -514
- data/doc/created.rid +1 -1
- data/doc/files/CHANGELOG.html +52 -25
- data/doc/files/LICENSE.html +43 -52
- data/doc/files/README.html +52 -43
- data/doc/files/lib/sdl4r/parser/reader_rb.html +16 -27
- data/doc/files/lib/sdl4r/parser/time_span_with_zone_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/token_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser/tokenizer_rb.html +17 -21
- data/doc/files/lib/sdl4r/parser_rb.html +21 -22
- data/doc/files/lib/sdl4r/sdl4r_rb.html +25 -25
- data/doc/files/lib/sdl4r/sdl_binary_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +17 -21
- data/doc/files/lib/sdl4r/sdl_time_span_rb.html +17 -21
- data/doc/files/lib/sdl4r/tag_rb.html +25 -24
- data/doc/files/lib/sdl4r_rb.html +17 -21
- data/doc/fr_class_index.html +15 -12
- data/doc/fr_file_index.html +23 -12
- data/doc/fr_method_index.html +176 -91
- data/doc/index.html +7 -10
- data/doc/rdoc-style.css +210 -119
- data/lib/sdl4r.rb +3 -0
- data/lib/sdl4r/parser.rb +3 -5
- data/lib/sdl4r/parser/reader.rb +3 -3
- data/lib/sdl4r/parser/time_span_with_zone.rb +3 -0
- data/lib/sdl4r/parser/token.rb +3 -0
- data/lib/sdl4r/parser/tokenizer.rb +3 -0
- data/lib/sdl4r/sdl4r.rb +20 -8
- data/lib/sdl4r/sdl_binary.rb +3 -0
- data/lib/sdl4r/sdl_parse_error.rb +3 -0
- data/lib/sdl4r/sdl_time_span.rb +3 -0
- data/lib/sdl4r/tag.rb +18 -4
- data/test/sdl4r/parser_test.rb +7 -2
- data/test/sdl4r/sdl4r_test.rb +6 -2
- data/test/sdl4r/sdl_test.rb +3 -0
- data/test/sdl4r/tag_test.rb +3 -0
- metadata +72 -74
- data/TODO.txt +0 -177
data/doc/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sun, 08 Aug 2010 20:12:05 +0900
|
data/doc/files/CHANGELOG.html
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>File: CHANGELOG</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>File: CHANGELOG [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,18 +42,18 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="fileHeader">
|
50
46
|
<h1>CHANGELOG</h1>
|
51
47
|
<table class="header-table">
|
52
48
|
<tr class="top-aligned-row">
|
53
49
|
<td><strong>Path:</strong></td>
|
54
50
|
<td>CHANGELOG
|
51
|
+
|
55
52
|
</td>
|
56
53
|
</tr>
|
57
54
|
<tr class="top-aligned-row">
|
58
55
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
56
|
+
<td>2010-08-08 20:11:30 +0900</td>
|
60
57
|
</tr>
|
61
58
|
</table>
|
62
59
|
</div>
|
@@ -64,18 +61,34 @@
|
|
64
61
|
|
65
62
|
<div id="bodyContent">
|
66
63
|
|
67
|
-
|
68
|
-
|
69
64
|
<div id="contextContent">
|
70
65
|
|
71
66
|
<div id="description">
|
72
|
-
<h2>v0.9.
|
67
|
+
<h2>v0.9.5 (建設中)</h2>
|
68
|
+
<h2>v0.9.6 (8-aug-2010)</h2>
|
69
|
+
<h3>Major changes:</h3>
|
70
|
+
<ul>
|
71
|
+
<li>Fixes in order to make <a href="../classes/SDL4R.html">SDL4R</a> work in
|
72
|
+
Ruby 1.9 (mainly concerning encodings and dates).
|
73
|
+
|
74
|
+
</li>
|
75
|
+
<li>Commented out debug code (writing to files) inside sdl4r_test.rb.
|
76
|
+
|
77
|
+
</li>
|
78
|
+
</ul>
|
79
|
+
<h3>Minor changes:</h3>
|
80
|
+
<ul>
|
81
|
+
<li>General & contact info in the <a href="README.html">README</a>
|
82
|
+
|
83
|
+
</li>
|
84
|
+
</ul>
|
85
|
+
<h2>v0.9.4 (6-aug-2010)</h2>
|
73
86
|
<h3>Major changes:</h3>
|
74
87
|
<ul>
|
75
88
|
<li>The use of BigDecimal (standard) has been preferred to Flt::DecNum.
|
76
89
|
|
77
90
|
</li>
|
78
|
-
<li
|
91
|
+
<li>“sdl4r/sdl.rb“ has been renamed to “sdl4r/sdl4r.rb“
|
79
92
|
|
80
93
|
</li>
|
81
94
|
<li>A sdl4r.rb has been added so that users can actually write (as the
|
@@ -86,7 +99,7 @@ documentation pretended):
|
|
86
99
|
</pre>
|
87
100
|
</li>
|
88
101
|
<li><a href="../classes/SDL4R.html#M000004">SDL4R#coerce_or_fail</a> has been
|
89
|
-
implemented, which means that random objects can&#
|
102
|
+
implemented, which means that random objects can’t be added to a Tag
|
90
103
|
as before. Rational instances are coerced using Rational#to_f.
|
91
104
|
|
92
105
|
</li>
|
@@ -95,16 +108,33 @@ usec()
|
|
95
108
|
|
96
109
|
</li>
|
97
110
|
</ul>
|
111
|
+
<h2>v0.9.3</h2>
|
112
|
+
<h3>Major changes</h3>
|
113
|
+
<ul>
|
114
|
+
<li>Tag: any method that use to take namespace/name parameters now follows the
|
115
|
+
natural order “namespace” and then “name”:
|
98
116
|
|
99
|
-
|
117
|
+
<pre>
|
118
|
+
Tag.new "ns1", "tag1"
|
119
|
+
</pre>
|
120
|
+
<p>
|
121
|
+
WARNING: this was the contrary before!!! Also, the “recursive”
|
122
|
+
parameter should always be at the first place now.
|
123
|
+
</p>
|
124
|
+
</li>
|
125
|
+
<li>It is now possible to override SDL4R::new_date_time in order to create Time
|
126
|
+
instances when parsing rather than DateTime instances.
|
127
|
+
|
128
|
+
</li>
|
129
|
+
</ul>
|
100
130
|
|
131
|
+
</div>
|
101
132
|
|
102
133
|
</div>
|
103
134
|
|
104
135
|
|
105
136
|
</div>
|
106
137
|
|
107
|
-
|
108
138
|
<!-- if includes -->
|
109
139
|
|
110
140
|
<div id="section">
|
@@ -112,19 +142,16 @@ usec()
|
|
112
142
|
|
113
143
|
|
114
144
|
|
115
|
-
|
116
|
-
|
145
|
+
<!-- if method_list -->
|
117
146
|
|
118
147
|
|
119
|
-
<!-- if method_list -->
|
120
148
|
|
121
149
|
|
122
150
|
</div>
|
123
151
|
|
124
|
-
|
125
152
|
<div id="validator-badges">
|
126
153
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
127
154
|
</div>
|
128
155
|
|
129
156
|
</body>
|
130
|
-
</html>
|
157
|
+
</html>
|
data/doc/files/LICENSE.html
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>File: LICENSE</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>File: LICENSE [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,18 +42,18 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="fileHeader">
|
50
46
|
<h1>LICENSE</h1>
|
51
47
|
<table class="header-table">
|
52
48
|
<tr class="top-aligned-row">
|
53
49
|
<td><strong>Path:</strong></td>
|
54
50
|
<td>LICENSE
|
51
|
+
|
55
52
|
</td>
|
56
53
|
</tr>
|
57
54
|
<tr class="top-aligned-row">
|
58
55
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
56
|
+
<td>2010-07-29 21:59:58 +0900</td>
|
60
57
|
</tr>
|
61
58
|
</table>
|
62
59
|
</div>
|
@@ -64,8 +61,6 @@
|
|
64
61
|
|
65
62
|
<div id="bodyContent">
|
66
63
|
|
67
|
-
|
68
|
-
|
69
64
|
<div id="contextContent">
|
70
65
|
|
71
66
|
<div id="description">
|
@@ -146,7 +141,7 @@ permission to copy, distribute and/or modify the library.
|
|
146
141
|
<p>
|
147
142
|
there is no warranty for the free library. Also, if the library is modified
|
148
143
|
by someone else and passed on, the recipients should know that what they
|
149
|
-
have is not the original version, so that the original author&#
|
144
|
+
have is not the original version, so that the original author’s
|
150
145
|
reputation will not be affected by problems that might be introduced by
|
151
146
|
others.
|
152
147
|
</p>
|
@@ -184,7 +179,7 @@ criteria for linking other code with the library.
|
|
184
179
|
We call this license the "Lesser" General Public License because it
|
185
180
|
</pre>
|
186
181
|
<p>
|
187
|
-
does Less to protect the user&#
|
182
|
+
does Less to protect the user’s freedom than the ordinary General
|
188
183
|
Public License. It also provides other free software developers Less of an
|
189
184
|
advantage over competing non-free programs. These disadvantages are the
|
190
185
|
reason we use the ordinary General Public License for many libraries.
|
@@ -224,8 +219,8 @@ program using a modified version of the Library.
|
|
224
219
|
</pre>
|
225
220
|
<p>
|
226
221
|
modification follow. Pay close attention to the difference between a
|
227
|
-
|
228
|
-
library
|
222
|
+
“work based on the library” and a “work that uses the
|
223
|
+
library”. The former contains code derived from the library, whereas
|
229
224
|
the latter must be combined with the library in order to run.
|
230
225
|
</p>
|
231
226
|
<pre>
|
@@ -237,8 +232,8 @@ the latter must be combined with the library in order to run.
|
|
237
232
|
<p>
|
238
233
|
program which contains a notice placed by the copyright holder or other
|
239
234
|
authorized party saying it may be distributed under the terms of this
|
240
|
-
Lesser General Public License (also called
|
241
|
-
licensee is addressed as
|
235
|
+
Lesser General Public License (also called “this License”).
|
236
|
+
Each licensee is addressed as “you”.
|
242
237
|
</p>
|
243
238
|
<pre>
|
244
239
|
A "library" means a collection of software functions and/or data
|
@@ -251,12 +246,12 @@ use some of those functions and data) to form executables.
|
|
251
246
|
The "Library", below, refers to any such software library or work
|
252
247
|
</pre>
|
253
248
|
<p>
|
254
|
-
which has been distributed under these terms. A
|
255
|
-
Library
|
249
|
+
which has been distributed under these terms. A “work based on the
|
250
|
+
Library” means either the Library or any derivative work under
|
256
251
|
copyright law: that is to say, a work containing the Library or a portion
|
257
252
|
of it, either verbatim or with modifications and/or translated
|
258
253
|
straightforwardly into another language. (Hereinafter, translation is
|
259
|
-
included without limitation in the term
|
254
|
+
included without limitation in the term “modification”.)
|
260
255
|
</p>
|
261
256
|
<pre>
|
262
257
|
"Source code" for a work means the preferred form of the work for
|
@@ -397,18 +392,18 @@ with the object code.
|
|
397
392
|
</pre>
|
398
393
|
<p>
|
399
394
|
Library, but is designed to work with the Library by being compiled or
|
400
|
-
linked with it, is called a
|
401
|
-
work, in isolation, is not a derivative work of the Library, and
|
402
|
-
falls outside the scope of this License.
|
395
|
+
linked with it, is called a “work that uses the Library”. Such
|
396
|
+
a work, in isolation, is not a derivative work of the Library, and
|
397
|
+
therefore falls outside the scope of this License.
|
403
398
|
</p>
|
404
399
|
<pre>
|
405
400
|
However, linking a "work that uses the Library" with the Library
|
406
401
|
</pre>
|
407
402
|
<p>
|
408
403
|
creates an executable that is a derivative of the Library (because it
|
409
|
-
contains portions of the Library), rather than a
|
410
|
-
library
|
411
|
-
6 states terms for distribution of such executables.
|
404
|
+
contains portions of the Library), rather than a “work that uses the
|
405
|
+
library”. The executable is therefore covered by this License.
|
406
|
+
Section 6 states terms for distribution of such executables.
|
412
407
|
</p>
|
413
408
|
<pre>
|
414
409
|
When a "work that uses the Library" uses material from a header file
|
@@ -442,10 +437,10 @@ they are linked directly with the Library itself.
|
|
442
437
|
6. As an exception to the Sections above, you may also combine or
|
443
438
|
</pre>
|
444
439
|
<p>
|
445
|
-
link a
|
446
|
-
work containing portions of the Library, and distribute that work under
|
440
|
+
link a “work that uses the Library” with the Library to produce
|
441
|
+
a work containing portions of the Library, and distribute that work under
|
447
442
|
terms of your choice, provided that the terms permit modification of the
|
448
|
-
work for the customer&#
|
443
|
+
work for the customer’s own use and reverse engineering for debugging
|
449
444
|
such modifications.
|
450
445
|
</p>
|
451
446
|
<pre>
|
@@ -494,7 +489,7 @@ the copy of this License. Also, you must do one of these things:
|
|
494
489
|
For an executable, the required form of the "work that uses the
|
495
490
|
</pre>
|
496
491
|
<p>
|
497
|
-
Library
|
492
|
+
Library” must include any data and utility programs needed for
|
498
493
|
reproducing the executable from it. However, as a special exception, the
|
499
494
|
materials to be distributed need not include anything that is normally
|
500
495
|
distributed (in either source or binary form) with the major components
|
@@ -619,7 +614,7 @@ in detail to address new problems or concerns.
|
|
619
614
|
<p>
|
620
615
|
Each version is given a distinguishing version number. If the Library
|
621
616
|
specifies a version number of this License which applies to it and
|
622
|
-
|
617
|
+
“any later version”, you have the option of following the terms
|
623
618
|
and conditions either of that version or of any later version published by
|
624
619
|
the Free Software Foundation. If the Library does not specify a license
|
625
620
|
version number, you may choose any version ever published by the Free
|
@@ -644,12 +639,12 @@ and of promoting the sharing and reuse of software generally.
|
|
644
639
|
<p>
|
645
640
|
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT
|
646
641
|
WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
647
|
-
PROVIDE THE LIBRARY
|
648
|
-
EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
649
|
-
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
|
650
|
-
TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.
|
651
|
-
LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
|
652
|
-
REPAIR OR CORRECTION.
|
642
|
+
PROVIDE THE LIBRARY “AS IS” WITHOUT WARRANTY OF ANY KIND,
|
643
|
+
EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
644
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
|
645
|
+
ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU.
|
646
|
+
SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
|
647
|
+
SERVICING, REPAIR OR CORRECTION.
|
653
648
|
</p>
|
654
649
|
<pre>
|
655
650
|
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
@@ -683,7 +678,8 @@ ordinary General Public License).
|
|
683
678
|
<p>
|
684
679
|
safest to attach them to the start of each source file to most effectively
|
685
680
|
convey the exclusion of warranty; and each file should have at least the
|
686
|
-
|
681
|
+
“copyright” line and a pointer to where the full notice is
|
682
|
+
found.
|
687
683
|
</p>
|
688
684
|
<pre>
|
689
685
|
<one line to give the library's name and a brief idea of what it does.>
|
@@ -708,8 +704,8 @@ Also add information on how to contact you by electronic and paper mail.
|
|
708
704
|
</p>
|
709
705
|
<p>
|
710
706
|
You should also get your employer (if you work as a programmer) or your
|
711
|
-
school, if any, to sign a
|
712
|
-
if necessary. Here is a sample; alter the names:
|
707
|
+
school, if any, to sign a “copyright disclaimer” for the
|
708
|
+
library, if necessary. Here is a sample; alter the names:
|
713
709
|
</p>
|
714
710
|
<pre>
|
715
711
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
@@ -719,18 +715,16 @@ if necessary. Here is a sample; alter the names:
|
|
719
715
|
Ty Coon, President of Vice
|
720
716
|
</pre>
|
721
717
|
<p>
|
722
|
-
That&#
|
718
|
+
That’s all there is to it!
|
723
719
|
</p>
|
724
720
|
|
725
721
|
</div>
|
726
722
|
|
727
|
-
|
728
723
|
</div>
|
729
724
|
|
730
725
|
|
731
726
|
</div>
|
732
727
|
|
733
|
-
|
734
728
|
<!-- if includes -->
|
735
729
|
|
736
730
|
<div id="section">
|
@@ -738,19 +732,16 @@ That‘s all there is to it!
|
|
738
732
|
|
739
733
|
|
740
734
|
|
741
|
-
|
742
|
-
|
735
|
+
<!-- if method_list -->
|
743
736
|
|
744
737
|
|
745
|
-
<!-- if method_list -->
|
746
738
|
|
747
739
|
|
748
740
|
</div>
|
749
741
|
|
750
|
-
|
751
742
|
<div id="validator-badges">
|
752
743
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
753
744
|
</div>
|
754
745
|
|
755
746
|
</body>
|
756
|
-
</html>
|
747
|
+
</html>
|
data/doc/files/README.html
CHANGED
@@ -1,12 +1,9 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
-
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
6
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
4
|
<head>
|
8
|
-
<title>File: README</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=
|
5
|
+
<title>File: README [RDoc: Simple Declarative Language for Ruby]</title>
|
6
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
10
7
|
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
8
|
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
9
|
<script type="text/javascript">
|
@@ -25,7 +22,7 @@
|
|
25
22
|
return false;
|
26
23
|
|
27
24
|
elemStyle = elem.style;
|
28
|
-
|
25
|
+
|
29
26
|
if ( elemStyle.display != "block" ) {
|
30
27
|
elemStyle.display = "block"
|
31
28
|
} else {
|
@@ -34,10 +31,10 @@
|
|
34
31
|
|
35
32
|
return true;
|
36
33
|
}
|
37
|
-
|
34
|
+
|
38
35
|
// Make codeblocks hidden by default
|
39
|
-
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }
|
40
|
-
|
36
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }<\/style>" )
|
37
|
+
|
41
38
|
// ]]>
|
42
39
|
</script>
|
43
40
|
|
@@ -45,18 +42,18 @@
|
|
45
42
|
<body>
|
46
43
|
|
47
44
|
|
48
|
-
|
49
45
|
<div id="fileHeader">
|
50
46
|
<h1>README</h1>
|
51
47
|
<table class="header-table">
|
52
48
|
<tr class="top-aligned-row">
|
53
49
|
<td><strong>Path:</strong></td>
|
54
50
|
<td>README
|
51
|
+
|
55
52
|
</td>
|
56
53
|
</tr>
|
57
54
|
<tr class="top-aligned-row">
|
58
55
|
<td><strong>Last Update:</strong></td>
|
59
|
-
<td>
|
56
|
+
<td>2010-08-06 13:03:22 +0900</td>
|
60
57
|
</tr>
|
61
58
|
</table>
|
62
59
|
</div>
|
@@ -64,12 +61,29 @@
|
|
64
61
|
|
65
62
|
<div id="bodyContent">
|
66
63
|
|
67
|
-
|
68
|
-
|
69
64
|
<div id="contextContent">
|
70
65
|
|
71
66
|
<div id="description">
|
72
67
|
<h1>SDL (Simple Declarative Language)</h1>
|
68
|
+
<p>
|
69
|
+
SDL version supported: 1.3
|
70
|
+
</p>
|
71
|
+
<table>
|
72
|
+
<tr><td valign="top">Site:</td><td><a
|
73
|
+
href="http://www.ikayzo.org/confluence/display/SDL/Home">www.ikayzo.org/confluence/display/SDL/Home</a>
|
74
|
+
|
75
|
+
</td></tr>
|
76
|
+
<tr><td valign="top">Downloads:</td><td><a
|
77
|
+
href="http://www.ikayzo.org/confluence/display/SDL/Downloads">www.ikayzo.org/confluence/display/SDL/Downloads</a>
|
78
|
+
|
79
|
+
</td></tr>
|
80
|
+
<tr><td valign="top">Users mailing list:</td><td>sdl-users@ikayzo.org
|
81
|
+
|
82
|
+
</td></tr>
|
83
|
+
<tr><td valign="top">Developers mailing list:</td><td>sdl-developers@ikayzo.org
|
84
|
+
|
85
|
+
</td></tr>
|
86
|
+
</table>
|
73
87
|
<h2>Getting Started with <a href="../classes/SDL4R.html">SDL4R</a></h2>
|
74
88
|
<p>
|
75
89
|
To get the Ruby Gem:
|
@@ -114,7 +128,7 @@ which will write the following in your file:
|
|
114
128
|
SDL documents are made up of Tags. A Tag contains
|
115
129
|
</p>
|
116
130
|
<ul>
|
117
|
-
<li>a name (if not present, the name
|
131
|
+
<li>a name (if not present, the name “content” is used)
|
118
132
|
|
119
133
|
</li>
|
120
134
|
<li>a namespace (optional)
|
@@ -149,9 +163,9 @@ be read using the following code (ignoring exceptions):
|
|
149
163
|
<p>
|
150
164
|
A tag is basically a data structure with a list of values, a map of
|
151
165
|
attributes, and (if it has a body) child tags. In the example above, the
|
152
|
-
<tt>values.sdl</tt> file is read into a tag called
|
153
|
-
two children (tags) called
|
154
|
-
these children have one value, no attributes, and no bodies.
|
166
|
+
<tt>values.sdl</tt> file is read into a tag called “root”. It
|
167
|
+
has two children (tags) called “size” and “smoker”.
|
168
|
+
Both these children have one value, no attributes, and no bodies.
|
155
169
|
</p>
|
156
170
|
<p>
|
157
171
|
SDL is often used for simple key-value mappings. To simplify things Tag has
|
@@ -183,8 +197,8 @@ with a unicode letter or an underscore (_) followed by zero or more unicode
|
|
183
197
|
letters, numbers, underscores (_), dashes (-) and periods (.).
|
184
198
|
</p>
|
185
199
|
<p>
|
186
|
-
Tags without bodies are terminated by a new line character (
|
187
|
-
continue onto the next line by placing a backslash (
|
200
|
+
Tags without bodies are terminated by a new line character (n) and may be
|
201
|
+
continue onto the next line by placing a backslash () at the end of the
|
188
202
|
line. Tags may be nested to an arbitrary depth. SDL ignores all other white
|
189
203
|
space characters between tokens. Although nested blocks are indented by
|
190
204
|
convention, tabs have no significance in the language.
|
@@ -192,9 +206,9 @@ convention, tabs have no significance in the language.
|
|
192
206
|
<h2>Anonymous Tags</h2>
|
193
207
|
<p>
|
194
208
|
SDL also supports anonymous tags which are assigned the name
|
195
|
-
|
196
|
-
by zero or more additional literals and zero or more attributes.
|
197
|
-
examples section below demonstrates the use of anonymous tags.
|
209
|
+
“content”. An anonymous tag starts with a literal and is
|
210
|
+
followed by zero or more additional literals and zero or more attributes.
|
211
|
+
The examples section below demonstrates the use of anonymous tags.
|
198
212
|
</p>
|
199
213
|
<pre>
|
200
214
|
greetings {
|
@@ -209,10 +223,10 @@ examples section below demonstrates the use of anonymous tags.
|
|
209
223
|
<p>
|
210
224
|
There are two ways to write String literals.
|
211
225
|
</p>
|
212
|
-
<h3>Starting and ending with double quotes (
|
226
|
+
<h3>Starting and ending with double quotes (“)</h3>
|
213
227
|
<p>
|
214
|
-
Double quotes, backslash characters (
|
215
|
-
|
228
|
+
Double quotes, backslash characters (), and new lines (n) within this type
|
229
|
+
of String literal must be escaped like so:
|
216
230
|
</p>
|
217
231
|
<pre>
|
218
232
|
file "C:\\folder\\file.txt"
|
@@ -220,7 +234,7 @@ type of String literal must be escaped like so:
|
|
220
234
|
</pre>
|
221
235
|
<p>
|
222
236
|
This type of String literal can be continued on the next line by placing a
|
223
|
-
backslash (
|
237
|
+
backslash () at the end of the line like so:
|
224
238
|
</p>
|
225
239
|
<pre>
|
226
240
|
line "this is a \
|
@@ -249,7 +263,7 @@ Examples:
|
|
249
263
|
</pre>
|
250
264
|
<p>
|
251
265
|
Note: SDL interprets new lines in `` String literals as a single new line
|
252
|
-
character (
|
266
|
+
character (n) regarless of the platform.
|
253
267
|
</p>
|
254
268
|
<h2>Binary literals</h2>
|
255
269
|
<p>
|
@@ -276,13 +290,13 @@ Examples:
|
|
276
290
|
<p>
|
277
291
|
SDL supports date, time span, and date/time literals. Date and Date/Time
|
278
292
|
literals use a 24 hour clock (0-23). If a timezone is not specified, the
|
279
|
-
default locale&#
|
293
|
+
default locale’s timezone will be used.
|
280
294
|
</p>
|
281
295
|
<p>
|
282
296
|
Examples:
|
283
297
|
</p>
|
284
298
|
<ul>
|
285
|
-
<li>create a tag called
|
299
|
+
<li>create a tag called “date” with a date value of Dec 5, 2005
|
286
300
|
|
287
301
|
<pre>
|
288
302
|
date 2005/12/05
|
@@ -315,8 +329,8 @@ components)
|
|
315
329
|
<li>string (unicode) - examples: <tt>"hello"</tt> or <tt>`aloha`</tt>
|
316
330
|
|
317
331
|
</li>
|
318
|
-
<li>character (unicode) - example: <tt
|
319
|
-
|
332
|
+
<li>character (unicode) - example: <tt>'/'</tt> Note: uXXXX style unicode
|
333
|
+
escapes are not supported (or needed because sdl files are UTF8)
|
320
334
|
|
321
335
|
</li>
|
322
336
|
<li>integer (32 bits signed) - example: <tt>123</tt>
|
@@ -463,8 +477,8 @@ An example SDL file:
|
|
463
477
|
# List rows = tag.getChild("matrix").getChildrenValues("content");
|
464
478
|
</pre>
|
465
479
|
<p>
|
466
|
-
Example of getting the
|
467
|
-
|
480
|
+
Example of getting the “location” attribute from the
|
481
|
+
“daughter” tag above (ignoring exceptions)
|
468
482
|
</p>
|
469
483
|
<pre>
|
470
484
|
root = SDL4R.read(Pathname.new("myfile.sdl"))
|
@@ -543,7 +557,7 @@ following lines:
|
|
543
557
|
</pre>
|
544
558
|
<p>
|
545
559
|
This will give you correct input and output and correct UTF-8
|
546
|
-
|
560
|
+
“general” sorting. Alternatively you can use the following
|
547
561
|
options when launching the Ruby interpreter:
|
548
562
|
</p>
|
549
563
|
<pre>
|
@@ -574,13 +588,11 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
574
588
|
|
575
589
|
</div>
|
576
590
|
|
577
|
-
|
578
591
|
</div>
|
579
592
|
|
580
593
|
|
581
594
|
</div>
|
582
595
|
|
583
|
-
|
584
596
|
<!-- if includes -->
|
585
597
|
|
586
598
|
<div id="section">
|
@@ -588,19 +600,16 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
588
600
|
|
589
601
|
|
590
602
|
|
591
|
-
|
592
|
-
|
603
|
+
<!-- if method_list -->
|
593
604
|
|
594
605
|
|
595
|
-
<!-- if method_list -->
|
596
606
|
|
597
607
|
|
598
608
|
</div>
|
599
609
|
|
600
|
-
|
601
610
|
<div id="validator-badges">
|
602
611
|
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
603
612
|
</div>
|
604
613
|
|
605
614
|
</body>
|
606
|
-
</html>
|
615
|
+
</html>
|