sdl4r 0.9.9 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. data/CHANGELOG +70 -1
  2. data/LICENSE +499 -497
  3. data/Rakefile +38 -28
  4. data/TODO +194 -45
  5. data/doc/classes/SDL4R/AbbreviationTimezoneProxy.html +151 -0
  6. data/doc/classes/SDL4R/ConstantTimezone.html +129 -0
  7. data/doc/classes/SDL4R/Element.html +148 -0
  8. data/doc/classes/SDL4R/Reader.html +683 -0
  9. data/doc/classes/SDL4R/RelativeTimezone.html +187 -0
  10. data/doc/classes/SDL4R/SdlBinary.html +188 -0
  11. data/doc/classes/SDL4R/SdlParseError.html +110 -0
  12. data/doc/classes/SDL4R/SdlTimeSpan.html +651 -0
  13. data/doc/classes/SDL4R/Serializer.html +557 -0
  14. data/doc/classes/SDL4R/Serializer/Ref.html +138 -0
  15. data/doc/classes/SDL4R/TZAbbreviationDB/Record.html +117 -0
  16. data/doc/classes/SDL4R/Tag.html +1274 -0
  17. data/doc/classes/SDL4R/Token.html +131 -0
  18. data/doc/created.rid +1 -0
  19. data/doc/files/CHANGELOG.html +290 -0
  20. data/doc/files/LICENSE.html +53 -0
  21. data/doc/files/README.html +405 -0
  22. data/doc/files/lib/sdl4r/abbreviation_timezone_proxy_rb.html +63 -0
  23. data/doc/files/lib/sdl4r/constant_timezone_rb.html +54 -0
  24. data/doc/files/lib/sdl4r/element_rb.html +54 -0
  25. data/doc/files/lib/sdl4r/reader_rb.html +68 -0
  26. data/doc/files/lib/sdl4r/relative_timezone_rb.html +62 -0
  27. data/doc/files/lib/sdl4r/sdl4r_rb.html +66 -0
  28. data/doc/files/lib/sdl4r/sdl4r_tzinfo_rb.html +64 -0
  29. data/doc/files/lib/sdl4r/sdl4r_version_rb.html +54 -0
  30. data/doc/files/lib/sdl4r/sdl_binary_rb.html +54 -0
  31. data/doc/files/lib/sdl4r/sdl_parse_error_rb.html +54 -0
  32. data/doc/files/lib/sdl4r/sdl_time_span_rb.html +54 -0
  33. data/doc/files/lib/sdl4r/serializer_rb.html +62 -0
  34. data/doc/files/lib/sdl4r/tag_rb.html +66 -0
  35. data/doc/files/lib/sdl4r/token_rb.html +54 -0
  36. data/doc/files/lib/sdl4r/tokenizer_rb.html +64 -0
  37. data/doc/files/lib/sdl4r/tz_abbreviation_db_rb.html +67 -0
  38. data/doc/files/lib/sdl4r_rb.html +54 -0
  39. data/doc/files/lib/sdl4r_tzinfo_rb.html +54 -0
  40. data/doc/fr_class_index.html +23 -0
  41. data/doc/fr_file_index.html +40 -0
  42. data/doc/fr_method_index.html +4711 -0
  43. data/doc/index.html +15 -0
  44. data/doc/rdoc-style.css +328 -0
  45. data/lib/sdl4r.rb +3 -1
  46. data/lib/sdl4r/abbreviation_timezone_proxy.rb +38 -0
  47. data/lib/sdl4r/constant_timezone.rb +58 -0
  48. data/{test/sdl4r/sdl_test.rb → lib/sdl4r/element.rb} +19 -14
  49. data/lib/sdl4r/reader.rb +772 -0
  50. data/lib/sdl4r/relative_timezone.rb +156 -0
  51. data/lib/sdl4r/sdl4r.rb +187 -45
  52. data/lib/sdl4r/sdl4r_tzinfo.rb +75 -0
  53. data/lib/sdl4r/sdl4r_version.rb +24 -0
  54. data/lib/sdl4r/sdl_parse_error.rb +1 -1
  55. data/lib/sdl4r/sdl_time_span.rb +5 -1
  56. data/lib/sdl4r/serializer.rb +473 -60
  57. data/lib/sdl4r/tag.rb +126 -51
  58. data/lib/sdl4r/token.rb +49 -0
  59. data/lib/sdl4r/tokenizer.rb +431 -0
  60. data/lib/sdl4r/tz_abbreviation_db.rb +266 -0
  61. data/read_jprof.html +16934 -0
  62. data/read_jprof_pull.html +14451 -0
  63. data/read_prof.html +4983 -0
  64. data/read_prof_pull.html +4896 -0
  65. data/test/sdl4r/parser_test.rb +577 -503
  66. data/test/sdl4r/read_jprof.rb +58 -0
  67. data/test/sdl4r/read_prof.rb +70 -0
  68. data/test/sdl4r/reader_test.rb +173 -0
  69. data/test/sdl4r/relative_timezone_test.rb +102 -0
  70. data/test/sdl4r/sdl4r_test.rb +611 -528
  71. data/test/sdl4r/sdl4r_tzinfo_test.rb +108 -0
  72. data/test/sdl4r/sdl_test_case.rb +60 -0
  73. data/test/sdl4r/serializer_test.rb +448 -11
  74. data/test/sdl4r/tag_test.rb +84 -5
  75. data/test/sdl4r/tokenizer_test.rb +128 -0
  76. metadata +69 -11
  77. data/lib/sdl4r/parser.rb +0 -648
  78. data/lib/sdl4r/parser/reader.rb +0 -184
  79. data/lib/sdl4r/parser/time_span_with_zone.rb +0 -57
  80. data/lib/sdl4r/parser/token.rb +0 -138
  81. data/lib/sdl4r/parser/tokenizer.rb +0 -507
@@ -0,0 +1,405 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title>File: README [RDoc: Simple Declarative Language for Ruby]</title>
5
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
6
+ <link href='../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <script type='text/javascript'>
8
+ //<![CDATA[
9
+ function popupCode(url) {
10
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
11
+ }
12
+
13
+ function toggleCode(id) {
14
+ var code = document.getElementById(id)
15
+
16
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
17
+ return true
18
+ }
19
+
20
+ // Make codeblocks hidden by default
21
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
22
+ //]]>
23
+ </script>
24
+ </head>
25
+ <body class='page'>
26
+ <div class='file' id='wrapper'>
27
+ <div class='header'>
28
+ <div class='name'>README</div>
29
+ <div class='paths'>
30
+ README
31
+ </div>
32
+ <div class='last-update'>
33
+ Last Update:
34
+ <span class='datetime'>2010-11-19 19:10:15 +0900</span>
35
+ </div>
36
+ </div>
37
+ <div id='content'>
38
+ <div id='text'>
39
+ <div id='description'>
40
+ <h1>SDL (Simple Declarative Language)</h1>
41
+ <p>
42
+ SDL version supported: 1.3
43
+ </p>
44
+ <table>
45
+ <tr><td valign="top">Site:</td><td><a
46
+ href="http://www.ikayzo.org/confluence/display/SDL/Home">www.ikayzo.org/confluence/display/SDL/Home</a>
47
+
48
+ </td></tr>
49
+ <tr><td valign="top">Downloads:</td><td><a
50
+ href="http://www.ikayzo.org/confluence/display/SDL/Downloads">www.ikayzo.org/confluence/display/SDL/Downloads</a>
51
+
52
+ </td></tr>
53
+ <tr><td valign="top">Users mailing list:</td><td>sdl-users@ikayzo.org
54
+
55
+ </td></tr>
56
+ <tr><td valign="top">Developers mailing list:</td><td>sdl-developers@ikayzo.org
57
+
58
+ </td></tr>
59
+ </table>
60
+ <h2>Getting Started with SDL4R</h2>
61
+ <p>
62
+ To get the Ruby Gem:
63
+ </p>
64
+ <pre>gem install sdl4r</pre>
65
+ <p>
66
+ Then, you can start reading SDL documents:
67
+ </p>
68
+ <pre>require 'pathname'&#x000A;require 'sdl4r'&#x000A;&#x000A;root = SDL4R::read(Pathname.new(&quot;my_directory/my_config.sdl&quot;))&#x000A;puts root.attribute(&quot;port&quot;)</pre>
69
+ <p>
70
+ Or you can create SDL documents with the API:
71
+ </p>
72
+ <pre>require 'fileutils'&#x000A;require 'sdl4r'&#x000A;&#x000A;root = SDL4R::Tag.new(&quot;root&quot;) do&#x000A; new_child(&quot;server&quot;) do&#x000A; set_attribute(&quot;port&quot;, 1234)&#x000A; end&#x000A;end&#x000A;File.open(&quot;my_directory/my_config.sdl&quot;, &quot;w&quot;) { |io|&#x000A; io.write(root.children_to_string)&#x000A;}</pre>
73
+ <p>
74
+ which will write the following in your file:
75
+ </p>
76
+ <pre>server port=1234</pre>
77
+ <h2>SDL Documents</h2>
78
+ <p>
79
+ SDL documents are made up of Tags. A Tag contains
80
+ </p>
81
+ <ul>
82
+ <li>a name (if not present, the name &#8220;content&#8221; is used)
83
+
84
+ </li>
85
+ <li>a namespace (optional)
86
+
87
+ </li>
88
+ <li>0 or more values (optional)
89
+
90
+ </li>
91
+ <li>0 or more attributes (optional)
92
+
93
+ </li>
94
+ <li>0 or more children (optional)
95
+
96
+ </li>
97
+ </ul>
98
+ <p>
99
+ For the SDL code:
100
+ </p>
101
+ <pre>size 4&#x000A;smoker false</pre>
102
+ <p>
103
+ Assuming this code is in a file called <tt>values.sdl</tt>, the values can
104
+ be read using the following code (ignoring exceptions):
105
+ </p>
106
+ <pre>root = Tag.new(&quot;root&quot;).read(Pathname.new(&quot;values.sdl&quot;))&#x000A;size = root.child(&quot;size&quot;).value&#x000A;smoker = root.child(&quot;smoker&quot;).value</pre>
107
+ <p>
108
+ A tag is basically a data structure with a list of values, a map of
109
+ attributes, and (if it has a body) child tags. In the example above, the
110
+ <tt>values.sdl</tt> file is read into a tag called &#8220;root&#8221;. It
111
+ has two children (tags) called &#8220;size&#8221; and &#8220;smoker&#8221;.
112
+ Both these children have one value, no attributes, and no bodies.
113
+ </p>
114
+ <p>
115
+ SDL is often used for simple key-value mappings. To simplify things Tag has
116
+ the methods value and value= which operate on the first element in the
117
+ values list. Also notice SDL understands types which are determined using
118
+ type inference.
119
+ </p>
120
+ <p>
121
+ The example above used the simple format common in property files:
122
+ </p>
123
+ <pre>name value</pre>
124
+ <p>
125
+ The full SDL tag format is:
126
+ </p>
127
+ <pre>namespace:name value_list attribute_list {&#x000A; children_tags&#x000A;}</pre>
128
+ <p>
129
+ where value_list is zero or more space separated SDL literals and
130
+ attribute_list is zero or more space separated
131
+ <tt>(namespace:)key=value</tt> pairs. The name, namespace, and keys are SDL
132
+ identifiers. Values are SDL literals. Namespace is optional for both tag
133
+ names and attributes. Tag bodies are also optional. SDL identifiers begin
134
+ with a unicode letter or an underscore (_) followed by zero or more unicode
135
+ letters, numbers, underscores (_), dashes (-) and periods (.).
136
+ </p>
137
+ <p>
138
+ Tags without bodies are terminated by a new line character (n) and may be
139
+ continue onto the next line by placing a backslash () at the end of the
140
+ line. Tags may be nested to an arbitrary depth. SDL ignores all other white
141
+ space characters between tokens. Although nested blocks are indented by
142
+ convention, tabs have no significance in the language.
143
+ </p>
144
+ <h2>Anonymous Tags</h2>
145
+ <p>
146
+ SDL also supports anonymous tags which are assigned the name
147
+ &#8220;content&#8221;. An anonymous tag starts with a literal and is
148
+ followed by zero or more additional literals and zero or more attributes.
149
+ The examples section below demonstrates the use of anonymous tags.
150
+ </p>
151
+ <pre>greetings {&#x000A; &quot;hello&quot; language=&quot;English&quot;&#x000A;}&#x000A;&#x000A;# If we have a handle on the &quot;greetings&quot; tag we can access the&#x000A;# anonymous child tag by calling&#x000A;# Tag child1 = greetingTag.child(&quot;content&quot;);</pre>
152
+ <h2>String literals</h2>
153
+ <p>
154
+ There are two ways to write String literals.
155
+ </p>
156
+ <h3>Starting and ending with double quotes (&#8220;)</h3>
157
+ <p>
158
+ Double quotes, backslash characters (), and new lines (n) within this type
159
+ of String literal must be escaped like so:
160
+ </p>
161
+ <pre>file &quot;C:\\folder\\file.txt&quot;&#x000A;say &quot;I said \&quot;something\&quot;&quot;</pre>
162
+ <p>
163
+ This type of String literal can be continued on the next line by placing a
164
+ backslash () at the end of the line like so:
165
+ </p>
166
+ <pre>line &quot;this is a \&#x000A; long string of text&quot;</pre>
167
+ <p>
168
+ White space before the first character in the second line will be ignored.
169
+ </p>
170
+ <h3>Starting and ending with a backquote (`)</h3>
171
+ <p>
172
+ This type of string literal can only be ended with a second backquote (`).
173
+ It is not necessary (or possible) to escape any type of character within a
174
+ backquote string literal. This type of literal can also span lines. All
175
+ white spaces are preserved including new lines.
176
+ </p>
177
+ <p>
178
+ Examples:
179
+ </p>
180
+ <pre>file `C:\folder\file.txt`&#x000A;say `I said &quot;something&quot;`&#x000A;regex `\w+\.suite\(\)`&#x000A;long_line `This is&#x000A; a long line&#x000A; fee fi fo fum`</pre>
181
+ <p>
182
+ Note: SDL interprets new lines in `` String literals as a single new line
183
+ character (n) regarless of the platform.
184
+ </p>
185
+ <h2>Binary literals</h2>
186
+ <p>
187
+ Binary literals use base64 characters enclosed in square brackets ([]). The
188
+ binary literal type can also span lines. White space is ignored.
189
+ </p>
190
+ <p>
191
+ Examples:
192
+ </p>
193
+ <pre>key [sdf789GSfsb2+3324sf2] name=&quot;my key&quot;&#x000A;image [&#x000A; R3df789GSfsb2edfSFSDF&#x000A; uikuikk2349GSfsb2edfS&#x000A; vFSDFR3df789GSfsb2edf&#x000A;]&#x000A;upload from=&quot;ikayzo.com&quot; data=[&#x000A; R3df789GSfsb2edfSFSDF&#x000A; uikuikk2349GSfsb2edfS&#x000A; vFSDFR3df789GSfsb2edf&#x000A;]</pre>
194
+ <h2>Date and Time Literals</h2>
195
+ <p>
196
+ SDL supports date, time span, and date/time literals. Date and Date/Time
197
+ literals use a 24 hour clock (0-23). If a timezone is not specified, the
198
+ default locale&#8217;s timezone will be used.
199
+ </p>
200
+ <p>
201
+ Examples:
202
+ </p>
203
+ <ul>
204
+ <li>create a tag called &#8220;date&#8221; with a date value of Dec 5, 2005
205
+
206
+ <pre>date 2005/12/05</pre>
207
+ </li>
208
+ <li>various time span literals
209
+
210
+ <pre>hours 03:00:00&#x000A;minutes 00:12:00&#x000A;seconds 00:00:42&#x000A;short_time 00:12:32.423 # 12 minutes, 32 seconds, 423 milliseconds&#x000A;long_time 30d:15:23:04.023 # 30 days, 15 hours, 23 mins, 4 secs, 23 millis&#x000A;before -00:02:30 # 2 hours and 30 minutes ago</pre>
211
+ </li>
212
+ <li>a date time literal
213
+
214
+ <pre>in_japan 2005/12/05 14:12:23.345-JST</pre>
215
+ </li>
216
+ </ul>
217
+ <h2>Literal Types</h2>
218
+ <p>
219
+ SDL 1.0 has thirteen literal types (parenthesis indicate optional
220
+ components)
221
+ </p>
222
+ <ol>
223
+ <li>string (unicode) - examples: <tt>&quot;hello&quot;</tt> or <tt>`aloha`</tt>
224
+
225
+ </li>
226
+ <li>character (unicode) - example: <tt>'/'</tt> Note: uXXXX style unicode
227
+ escapes are not supported (or needed because sdl files are UTF8)
228
+
229
+ </li>
230
+ <li>integer (32 bits signed) - example: <tt>123</tt>
231
+
232
+ </li>
233
+ <li>long integer (64 bits signed) - examples: <tt>123L</tt> or <tt>123l</tt>
234
+
235
+ </li>
236
+ <li>float (32 bits signed) - examples <tt>123.43F</tt> <tt>123.43f</tt>
237
+
238
+ </li>
239
+ <li>double float (64 bits signed) - example: <tt>123.43</tt> or
240
+ <tt>123.43d</tt> or <tt>123.43D</tt>
241
+
242
+ </li>
243
+ <li>decimal (128+ bits signed) - example: <tt>123.44BD</tt> or
244
+ <tt>123.44bd</tt>
245
+
246
+ </li>
247
+ <li>boolean - examples: <tt>true</tt> or <tt>false</tt> or <tt>on</tt> or
248
+ <tt>off</tt>
249
+
250
+ </li>
251
+ <li>date yyyy/mm/dd - example <tt>2005/12/05</tt>
252
+
253
+ </li>
254
+ <li>date time yyyy/mm/dd hh:mm(:ss)(.xxx)(-ZONE) example - <tt>2005/12/05
255
+ 05:21:23.532-JST</tt> notes: uses a 24 hour clock (0-23), only hours and
256
+ minutes are mandatory
257
+
258
+ </li>
259
+ <li>time span using the format (d:)hh:mm:ss(.xxx) notes: if the day component
260
+ is included it must be suffixed with a lower case &#8216;d&#8217; examples
261
+
262
+ <pre>12:14:42 # (12 hours, 14 minutes, 42 seconds)&#x000A;00:09:12 # (9 minutes, 12 seconds)&#x000A;00:00:01.023 # (1 second, 23 milliseconds)&#x000A;23d:05:21:23.532 # (23 days, 5 hours, 21 minutes, 23 seconds, 532 milliseconds)</pre>
263
+ </li>
264
+ <li>binary [base64] example - <tt>[sdf789GSfsb2+3324sf2]</tt>
265
+
266
+ </li>
267
+ <li><tt>null</tt>
268
+
269
+ </li>
270
+ </ol>
271
+ <p>
272
+ Timezones must be specified using a valid time zone ID (ex.
273
+ America/Los_Angeles), three letter abbreviation (ex. HST), or
274
+ GMT(+/-)hh(:mm) formatted custom timezone (ex. GMT+02 or GMT+02:30)
275
+ </p>
276
+ <p>
277
+ These types are designed to be portable across Java, .NET, and other
278
+ popular platforms.
279
+ </p>
280
+ <h2>SDL Comments</h2>
281
+ <p>
282
+ SDL supports four comment types.
283
+ </p>
284
+ <pre>1. // single line comments identicle to those used in Java, C, etc. // style&#x000A; comments can occur anywhere in a line. All text after // up to the new line&#x000A; will be ignored.&#x000A;2. # property style comments. They work the same way as //&#x000A;3. -- separator comments useful for visually dividing content. They work the same way as //&#x000A;4. Slash star (/*) style multiline comments. These begin with a slash&#x000A; star and end with a star slash. Everything in between is ignored.</pre>
285
+ <h2>Example</h2>
286
+ <p>
287
+ An example SDL file:
288
+ </p>
289
+ <pre># a tag having only a name&#x000A;my_tag&#x000A;&#x000A;# three tags acting as name value pairs&#x000A;first_name &quot;Akiko&quot;&#x000A;last_name &quot;Johnson&quot;&#x000A;height 68&#x000A;&#x000A;# a tag with a value list&#x000A;person &quot;Akiko&quot; &quot;Johnson&quot; 68&#x000A;&#x000A;# a tag with attributes&#x000A;person first_name=&quot;Akiko&quot; last_name=&quot;Johnson&quot; height=68&#x000A;&#x000A;# a tag with values and attributes&#x000A;person &quot;Akiko&quot; &quot;Johnson&quot; height=60&#x000A;&#x000A;# a tag with attributes using namespaces&#x000A;person name:first-name=&quot;Akiko&quot; name:last-name=&quot;Johnson&quot;&#x000A;&#x000A;# a tag with values, attributes, namespaces, and children&#x000A;my_namespace:person &quot;Akiko&quot; &quot;Johnson&quot; dimensions:height=68 {&#x000A; son &quot;Nouhiro&quot; &quot;Johnson&quot;&#x000A; daughter &quot;Sabrina&quot; &quot;Johnson&quot; location=&quot;Italy&quot; {&#x000A; hobbies &quot;swimming&quot; &quot;surfing&quot;&#x000A; languages &quot;English&quot; &quot;Italian&quot;&#x000A; smoker false&#x000A; }&#x000A;}&#x000A;&#x000A;------------------------------------------------------------------&#x000A;// (notice the separator style comment above...)&#x000A;&#x000A;# a log entry&#x000A;# note - this tag has two values (date_time and string) and an&#x000A;# attribute (error)&#x000A;entry 2005/11/23 10:14:23.253-GMT &quot;Something bad happened&quot; error=true&#x000A;&#x000A;# a long line&#x000A;mylist &quot;something&quot; &quot;another&quot; true &quot;shoe&quot; 2002/12/13 &quot;rock&quot; \&#x000A; &quot;morestuff&quot; &quot;sink&quot; &quot;penny&quot; 12:15:23.425&#x000A;&#x000A;# a long string&#x000A;text &quot;this is a long rambling line of text with a continuation \&#x000A; and it keeps going and going...&quot;&#x000A;&#x000A;# anonymous tag examples&#x000A;&#x000A;files {&#x000A; &quot;/folder1/file.txt&quot;&#x000A; &quot;/file2.txt&quot;&#x000A;}&#x000A;&#x000A;# To retrieve the files as a list of strings&#x000A;#&#x000A;# List files = tag.child(&quot;files&quot;).children_values(&quot;content&quot;);&#x000A;#&#x000A;# We us the name &quot;content&quot; because the files tag has two children, each of&#x000A;# which are anonymous tags (values with no name.) These tags are assigned&#x000A;# the name &quot;content&quot;&#x000A;&#x000A;matrix {&#x000A; 1 2 3&#x000A; 4 5 6&#x000A;}&#x000A;&#x000A;# To retrieve the values from the matrix (as a list of lists)&#x000A;#&#x000A;# List rows = tag.child(&quot;matrix&quot;).children_values(&quot;content&quot;);</pre>
290
+ <p>
291
+ Example of getting the &#8220;location&#8221; attribute from the
292
+ &#8220;daughter&#8221; tag above (ignoring exceptions)
293
+ </p>
294
+ <pre>root = SDL4R.read(Pathname.new(&quot;myfile.sdl&quot;))&#x000A;daughter = root.child(&quot;daughter&quot;, true) // recursive search&#x000A;location = daughter.attribute(&quot;location&quot;)</pre>
295
+ <p>
296
+ SDL is normally stored in a file with the .sdl extension. These files
297
+ should always be encoded using UTF8. SDL fully supports unicode in
298
+ identifiers and literals.
299
+ </p>
300
+ <h2>Ruby and SDL types</h2>
301
+ <p>
302
+ The following list gives what types are used in Ruby in order to represent
303
+ SDL types.
304
+ </p>
305
+ <table>
306
+ <tr><td valign="top"><b>SDL</b>:</td><td><b>Ruby</b>
307
+
308
+ </td></tr>
309
+ <tr><td valign="top">unicode string:</td><td>String
310
+
311
+ </td></tr>
312
+ <tr><td valign="top">unicode character:</td><td>single-character String
313
+
314
+ </td></tr>
315
+ <tr><td valign="top">integer (32 bits signed):</td><td>Integer (Fixnum or Bignum)
316
+
317
+ </td></tr>
318
+ <tr><td valign="top">long integer (64 bits signed):</td><td>Integer (Fixnum or Bignum)
319
+
320
+ </td></tr>
321
+ <tr><td valign="top">float (32 bits signed):</td><td>Float
322
+
323
+ </td></tr>
324
+ <tr><td valign="top">double float (64 bits signed):</td><td>Float
325
+
326
+ </td></tr>
327
+ <tr><td valign="top">decimal (128+ bits signed):</td><td>BigDecimal
328
+
329
+ </td></tr>
330
+ <tr><td valign="top">boolean:</td><td>true (TrueClass) and false (FalseClass)
331
+
332
+ </td></tr>
333
+ <tr><td valign="top">date (day):</td><td>Date
334
+
335
+ </td></tr>
336
+ <tr><td valign="top">date time:</td><td>DateTime (see SDL4R#new_date_time if you want to get Time instances from
337
+ the parsers)
338
+
339
+ </td></tr>
340
+ <tr><td valign="top">time span:</td><td>SdlTimeSpan
341
+
342
+ </td></tr>
343
+ <tr><td valign="top">binary:</td><td>SdlBinary (to avoid confusion with simple strings)
344
+
345
+ </td></tr>
346
+ <tr><td valign="top">null:</td><td>nil (NilClass)
347
+
348
+ </td></tr>
349
+ </table>
350
+ <p>
351
+ TO FIX: the handling of floating numbers in Ruby being different from the
352
+ Java world, the behavior of SDL4R at limits might not be perfect for the
353
+ time being.
354
+ </p>
355
+ <h2>UTF-8 Support</h2>
356
+ <p>
357
+ In Ruby 1.8, in order to enable UTF-8 support, you may have to declare the
358
+ following lines:
359
+ </p>
360
+ <pre>$KCODE = 'u'&#x000A;require 'jcode'</pre>
361
+ <p>
362
+ This will give you correct input and output and correct UTF-8
363
+ &#8220;general&#8221; sorting. Alternatively you can use the following
364
+ options when launching the Ruby interpreter:
365
+ </p>
366
+ <pre>/path/to/ruby -Ku -rjcode</pre>
367
+ <h2>Ruby Support</h2>
368
+ <p>
369
+ SDL4R has been tested on:
370
+ </p>
371
+ <pre>* Ruby 1.8.7&#x000A;* Ruby 1.9.1&#x000A;* Ruby 1.9.2&#x000A;* JRuby 1.5.1</pre>
372
+ <h2>License</h2>
373
+ <p>
374
+ Simple Declarative Language (SDL) for Ruby
375
+ </p>
376
+ <p>
377
+ Copyright 2005 Ikayzo, inc.
378
+ </p>
379
+ <p>
380
+ This program is free software. You can distribute or modify it under the
381
+ terms of the GNU Lesser General Public License version 2.1 as published by
382
+ the Free Software Foundation.
383
+ </p>
384
+ <p>
385
+ This program is distributed AS IS and WITHOUT WARRANTY. OF ANY KIND,
386
+ INCLUDING MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. See the GNU
387
+ Lesser General Public License for more details.
388
+ </p>
389
+ <p>
390
+ You should have received a copy of the GNU Lesser General Public License
391
+ along with this program; if not, contact the Free Software Foundation,
392
+ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
393
+ </p>
394
+ </div>
395
+ <div id='section'>
396
+ </div>
397
+ </div>
398
+ </div>
399
+ <div id='footer-push'></div>
400
+ </div>
401
+ <div id='footer'>
402
+ <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
403
+ </div>
404
+ </body>
405
+ </html>
@@ -0,0 +1,63 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2
+ <html lang='en'>
3
+ <head>
4
+ <title>File: abbreviation_timezone_proxy.rb [RDoc: Simple Declarative Language for Ruby]</title>
5
+ <meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
6
+ <link href='../../../rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
7
+ <script type='text/javascript'>
8
+ //<![CDATA[
9
+ function popupCode(url) {
10
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
11
+ }
12
+
13
+ function toggleCode(id) {
14
+ var code = document.getElementById(id)
15
+
16
+ code.style.display = code.style.display != 'block' ? 'block' : 'none'
17
+ return true
18
+ }
19
+
20
+ // Make codeblocks hidden by default
21
+ document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
22
+ //]]>
23
+ </script>
24
+ </head>
25
+ <body class='page'>
26
+ <div class='file' id='wrapper'>
27
+ <div class='header'>
28
+ <h1 class='name'>abbreviation_timezone_proxy.rb</h1>
29
+ <div class='paths'>
30
+ lib/sdl4r/abbreviation_timezone_proxy.rb
31
+ </div>
32
+ <div class='last-update'>
33
+ Last Update:
34
+ <span class='datetime'>2010-12-25 03:05:23 +0900</span>
35
+ </div>
36
+ </div>
37
+ <div id='content'>
38
+ <div id='text'>
39
+ <div id='description'>
40
+ <p>
41
+ To change this template, choose Tools | Templates and open the template in
42
+ the editor.
43
+ </p>
44
+ <hr size="1"></hr><p>
45
+ Utility methods and general constants for SDL4R.
46
+ </p>
47
+ <p>
48
+ For more information about SDL4R, see the <a
49
+ href="http://../../files/README.html">link README file</a>
50
+ </p>
51
+ <hr size="1"></hr>
52
+ </div>
53
+ <div id='section'>
54
+ </div>
55
+ </div>
56
+ </div>
57
+ <div id='footer-push'></div>
58
+ </div>
59
+ <div id='footer'>
60
+ <a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
61
+ </div>
62
+ </body>
63
+ </html>