ruby-json 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/COPYING +504 -0
  2. data/README +16 -0
  3. data/doc/classes/Array.html +162 -0
  4. data/doc/classes/Array.src/M000011.html +27 -0
  5. data/doc/classes/Array.src/M000012.html +32 -0
  6. data/doc/classes/ArrayTest.html +129 -0
  7. data/doc/classes/ArrayTest.src/M000014.html +28 -0
  8. data/doc/classes/FalseClass.html +131 -0
  9. data/doc/classes/FalseClass.src/M000013.html +18 -0
  10. data/doc/classes/Hash.html +156 -0
  11. data/doc/classes/Hash.src/M000009.html +29 -0
  12. data/doc/classes/Hash.src/M000010.html +45 -0
  13. data/doc/classes/JSON.html +103 -0
  14. data/doc/classes/JSON/Lexer.html +411 -0
  15. data/doc/classes/JSON/Lexer.src/M000022.html +19 -0
  16. data/doc/classes/JSON/Lexer.src/M000023.html +18 -0
  17. data/doc/classes/JSON/Lexer.src/M000024.html +18 -0
  18. data/doc/classes/JSON/Lexer.src/M000025.html +20 -0
  19. data/doc/classes/JSON/Lexer.src/M000026.html +20 -0
  20. data/doc/classes/JSON/Lexer.src/M000027.html +21 -0
  21. data/doc/classes/JSON/Lexer.src/M000028.html +43 -0
  22. data/doc/classes/JSON/Lexer.src/M000029.html +67 -0
  23. data/doc/classes/JSON/Lexer.src/M000030.html +46 -0
  24. data/doc/classes/JSON/Lexer.src/M000031.html +26 -0
  25. data/doc/classes/JSON/Lexer.src/M000032.html +61 -0
  26. data/doc/classes/JSON/Lexer.src/M000033.html +29 -0
  27. data/doc/classes/JSON/Lexer.src/M000034.html +18 -0
  28. data/doc/classes/JSON/Lexer.src/M000035.html +19 -0
  29. data/doc/classes/JSON/Lexer.src/M000036.html +20 -0
  30. data/doc/classes/LexerTest.html +219 -0
  31. data/doc/classes/LexerTest.src/M000002.html +24 -0
  32. data/doc/classes/LexerTest.src/M000003.html +22 -0
  33. data/doc/classes/LexerTest.src/M000004.html +26 -0
  34. data/doc/classes/LexerTest.src/M000005.html +23 -0
  35. data/doc/classes/LexerTest.src/M000006.html +31 -0
  36. data/doc/classes/LexerTest.src/M000007.html +27 -0
  37. data/doc/classes/LexerTest.src/M000008.html +58 -0
  38. data/doc/classes/NilClass.html +131 -0
  39. data/doc/classes/NilClass.src/M000017.html +18 -0
  40. data/doc/classes/Numeric.html +131 -0
  41. data/doc/classes/Numeric.src/M000016.html +18 -0
  42. data/doc/classes/Object.html +176 -0
  43. data/doc/classes/Object.src/M000018.html +18 -0
  44. data/doc/classes/ObjectTest.html +129 -0
  45. data/doc/classes/ObjectTest.src/M000015.html +28 -0
  46. data/doc/classes/String.html +151 -0
  47. data/doc/classes/String.src/M000019.html +18 -0
  48. data/doc/classes/String.src/M000020.html +46 -0
  49. data/doc/classes/TrueClass.html +131 -0
  50. data/doc/classes/TrueClass.src/M000021.html +18 -0
  51. data/doc/created.rid +1 -0
  52. data/doc/files/install_rb.html +194 -0
  53. data/doc/files/install_rb.src/M000001.html +43 -0
  54. data/doc/files/json/lexer_rb.html +156 -0
  55. data/doc/files/json/objects_rb.html +154 -0
  56. data/doc/files/test/arraytest_rb.html +150 -0
  57. data/doc/files/test/lexertest_rb.html +150 -0
  58. data/doc/files/test/objtest_rb.html +150 -0
  59. data/doc/fr_class_index.html +39 -0
  60. data/doc/fr_file_index.html +32 -0
  61. data/doc/fr_method_index.html +62 -0
  62. data/doc/index.html +24 -0
  63. data/doc/rdoc-style.css +175 -0
  64. data/install.rb +67 -0
  65. data/lib/json/lexer.rb +297 -0
  66. data/lib/json/objects.rb +201 -0
  67. data/ruby-json.gemspec +25 -0
  68. data/test/arraytest.rb +45 -0
  69. data/test/lexertest.rb +146 -0
  70. data/test/objtest.rb +45 -0
  71. metadata +126 -0
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>new (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 35</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">s</span>)
15
+ <span class="ruby-ivar">@index</span> = <span class="ruby-value">0</span>
16
+ <span class="ruby-ivar">@source</span> = <span class="ruby-identifier">s</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>back (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 41</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back</span>
15
+ <span class="ruby-ivar">@index</span> <span class="ruby-operator">-=</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@index</span> <span class="ruby-operator">&gt;</span> <span class="ruby-value">0</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>more? (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 45</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">more?</span>
15
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-ivar">@index</span> <span class="ruby-operator">&lt;</span> <span class="ruby-ivar">@source</span>.<span class="ruby-identifier">length</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextchar (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 50</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextchar</span>
15
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">more?</span>() <span class="ruby-operator">?</span> <span class="ruby-ivar">@source</span>[<span class="ruby-ivar">@index</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">:</span> <span class="ruby-value str">&quot;\0&quot;</span>
16
+ <span class="ruby-ivar">@index</span> <span class="ruby-operator">+=</span> <span class="ruby-value">1</span>
17
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">c</span>)
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextmatch (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 58</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextmatch</span>(<span class="ruby-identifier">char</span>)
15
+ <span class="ruby-identifier">n</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>
16
+ <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;Expected '#{char}' and instead saw '#{n}'.&quot;</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">n</span> <span class="ruby-operator">!=</span> <span class="ruby-identifier">char</span>)
17
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">n</span>)
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextchars (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 67</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextchars</span>(<span class="ruby-identifier">n</span>)
15
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;substring bounds error&quot;</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-ivar">@index</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">n</span> <span class="ruby-operator">&gt;</span> <span class="ruby-ivar">@source</span>.<span class="ruby-identifier">length</span>)
16
+ <span class="ruby-identifier">i</span> = <span class="ruby-ivar">@index</span>
17
+ <span class="ruby-ivar">@index</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">n</span>
18
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-ivar">@source</span>[<span class="ruby-identifier">i</span>,<span class="ruby-identifier">n</span>])
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1,43 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextclean (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 76</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextclean</span>
15
+ <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
16
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
17
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'/'</span>)
18
+ <span class="ruby-keyword kw">case</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'/'</span>
20
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
21
+ <span class="ruby-keyword kw">while</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;\n&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;\r&quot;</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">&quot;\0&quot;</span>
22
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'*'</span>
25
+ <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
26
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
27
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;unclosed comment&quot;</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;\0&quot;</span>)
28
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'*'</span>)
29
+ <span class="ruby-keyword kw">break</span> <span class="ruby-keyword kw">if</span> (<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>() <span class="ruby-operator">==</span> <span class="ruby-value str">'/'</span>)
30
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>()
31
+ <span class="ruby-keyword kw">end</span>
32
+ <span class="ruby-keyword kw">end</span>
33
+ <span class="ruby-keyword kw">else</span>
34
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>()
35
+ <span class="ruby-keyword kw">return</span> <span class="ruby-value str">'/'</span>;
36
+ <span class="ruby-keyword kw">end</span>
37
+ <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;\0&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">&gt;</span> <span class="ruby-value str">&quot; &quot;</span>[<span class="ruby-value">0</span>]
38
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">c</span>)
39
+ <span class="ruby-keyword kw">end</span>
40
+ <span class="ruby-keyword kw">end</span>
41
+ <span class="ruby-keyword kw">end</span></pre>
42
+ </body>
43
+ </html>
@@ -0,0 +1,67 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>utf8str (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 107</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">utf8str</span>(<span class="ruby-identifier">code</span>)
15
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span>(<span class="ruby-value">0x7f</span>)) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
16
+ <span class="ruby-comment cmt"># UCS-4 range 0x00000000 - 0x0000007F</span>
17
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">code</span>.<span class="ruby-identifier">chr</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+
20
+ <span class="ruby-identifier">buf</span> = <span class="ruby-value str">&quot;&quot;</span>
21
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span>(<span class="ruby-value">0x7ff</span>)) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
22
+ <span class="ruby-comment cmt"># UCS-4 range 0x00000080 - 0x000007FF</span>
23
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b11000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">6</span>)).<span class="ruby-identifier">chr</span>
24
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
25
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>)
26
+ <span class="ruby-keyword kw">end</span>
27
+
28
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span>(<span class="ruby-value">0x000ffff</span>)) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
29
+ <span class="ruby-comment cmt"># UCS-4 range 0x00000800 - 0x0000FFFF</span>
30
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b11100000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">12</span>)).<span class="ruby-identifier">chr</span>
31
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">6</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
32
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b0011111</span>)).<span class="ruby-identifier">chr</span>
33
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>)
34
+ <span class="ruby-keyword kw">end</span>
35
+
36
+ <span class="ruby-comment cmt"># Not used -- JSON only has UCS-2, but for the sake</span>
37
+ <span class="ruby-comment cmt"># of completeness</span>
38
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span>(<span class="ruby-value">0x1</span><span class="ruby-constant">FFFFF</span>)) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
39
+ <span class="ruby-comment cmt"># UCS-4 range 0x00010000 - 0x001FFFFF</span>
40
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b11110000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">18</span>)).<span class="ruby-identifier">chr</span>
41
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">12</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
42
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">6</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
43
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b0011111</span>)).<span class="ruby-identifier">chr</span>
44
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>)
45
+ <span class="ruby-keyword kw">end</span>
46
+
47
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-operator">~</span>(<span class="ruby-value">0x03</span><span class="ruby-constant">FFFFFF</span>)) <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
48
+ <span class="ruby-comment cmt"># UCS-4 range 0x00200000 - 0x03FFFFFF</span>
49
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b11110000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">24</span>)).<span class="ruby-identifier">chr</span>
50
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">18</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
51
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">12</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
52
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">6</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
53
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b0011111</span>)).<span class="ruby-identifier">chr</span>
54
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>)
55
+ <span class="ruby-keyword kw">end</span>
56
+
57
+ <span class="ruby-comment cmt"># UCS-4 range 0x04000000 - 0x7FFFFFFF</span>
58
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b11111000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">30</span>)).<span class="ruby-identifier">chr</span>
59
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">24</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
60
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">18</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
61
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">12</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
62
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> ((<span class="ruby-identifier">code</span> <span class="ruby-operator">&gt;&gt;</span> <span class="ruby-value">6</span>) <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b00111111</span>)).<span class="ruby-identifier">chr</span>
63
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> (<span class="ruby-value">0</span><span class="ruby-identifier">b10000000</span> <span class="ruby-operator">|</span> (<span class="ruby-identifier">code</span> <span class="ruby-operator">&amp;</span> <span class="ruby-value">0</span><span class="ruby-identifier">b0011111</span>)).<span class="ruby-identifier">chr</span>
64
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>)
65
+ <span class="ruby-keyword kw">end</span></pre>
66
+ </body>
67
+ </html>
@@ -0,0 +1,46 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextstring (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 163</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextstring</span>(<span class="ruby-identifier">quot</span>)
15
+ <span class="ruby-identifier">c</span> = <span class="ruby-identifier">buf</span> = <span class="ruby-value str">&quot;&quot;</span>
16
+ <span class="ruby-keyword kw">while</span> <span class="ruby-keyword kw">true</span>
17
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
18
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">c</span>
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/\0|\n\r/</span>
20
+ <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Unterminated string&quot;</span>
21
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;\\&quot;</span>
22
+ <span class="ruby-identifier">chr</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
23
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">chr</span>
24
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'b'</span>
25
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\b&quot;</span>
26
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'t'</span>
27
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\t&quot;</span>
28
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'n'</span>
29
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\n&quot;</span>
30
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'f'</span>
31
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\f&quot;</span>
32
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'r'</span>
33
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-value str">&quot;\r&quot;</span>
34
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'u'</span>
35
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">utf8str</span>(<span class="ruby-constant">Integer</span>(<span class="ruby-value str">&quot;0x&quot;</span> <span class="ruby-operator">+</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchars</span>(<span class="ruby-value">4</span>)))
36
+ <span class="ruby-keyword kw">else</span>
37
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">chr</span>
38
+ <span class="ruby-keyword kw">end</span>
39
+ <span class="ruby-keyword kw">else</span>
40
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>) <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">quot</span>)
41
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">c</span>
42
+ <span class="ruby-keyword kw">end</span>
43
+ <span class="ruby-keyword kw">end</span>
44
+ <span class="ruby-keyword kw">end</span></pre>
45
+ </body>
46
+ </html>
@@ -0,0 +1,26 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextto (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 198</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextto</span>(<span class="ruby-identifier">regex</span>)
15
+ <span class="ruby-identifier">buf</span> = <span class="ruby-value str">&quot;&quot;</span>
16
+ <span class="ruby-keyword kw">while</span> (<span class="ruby-keyword kw">true</span>)
17
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
18
+ <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span>(<span class="ruby-identifier">regex</span> <span class="ruby-operator">=~</span> <span class="ruby-identifier">c</span>).<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'\0'</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'\n'</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'\r'</span>
19
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>() <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">!=</span> <span class="ruby-value str">'\0'</span>)
20
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">buf</span>.<span class="ruby-identifier">chomp</span>())
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">c</span>
23
+ <span class="ruby-keyword kw">end</span>
24
+ <span class="ruby-keyword kw">end</span></pre>
25
+ </body>
26
+ </html>
@@ -0,0 +1,61 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>nextvalue (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 213</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">nextvalue</span>
15
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextclean</span>
16
+ <span class="ruby-identifier">s</span> = <span class="ruby-value str">&quot;&quot;</span>
17
+
18
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">c</span>
19
+ <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/\&quot;|\'/</span>
20
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextstring</span>(<span class="ruby-identifier">c</span>))
21
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'{'</span>
22
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>()
23
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">from_json</span>(<span class="ruby-keyword kw">self</span>))
24
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">'['</span>
25
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>()
26
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-constant">Array</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">from_json</span>(<span class="ruby-keyword kw">self</span>))
27
+ <span class="ruby-keyword kw">else</span>
28
+ <span class="ruby-identifier">buf</span> = <span class="ruby-value str">&quot;&quot;</span>
29
+ <span class="ruby-keyword kw">while</span> ((<span class="ruby-identifier">c</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/&quot;| |:|,|\]|\}|\/|\0/</span>).<span class="ruby-identifier">nil?</span>)
30
+ <span class="ruby-identifier">buf</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">c</span>
31
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
32
+ <span class="ruby-keyword kw">end</span>
33
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>()
34
+ <span class="ruby-identifier">s</span> = <span class="ruby-identifier">buf</span>.<span class="ruby-identifier">chomp</span>
35
+ <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">s</span>
36
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;true&quot;</span>
37
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-keyword kw">true</span>)
38
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;false&quot;</span>
39
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-keyword kw">false</span>)
40
+ <span class="ruby-keyword kw">when</span> <span class="ruby-value str">&quot;null&quot;</span>
41
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-keyword kw">nil</span>)
42
+ <span class="ruby-keyword kw">when</span> <span class="ruby-regexp re">/^[0-9]|\.|-|\+/</span>
43
+ <span class="ruby-keyword kw">begin</span>
44
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-constant">Integer</span>(<span class="ruby-identifier">s</span>))
45
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>
46
+ <span class="ruby-comment cmt"># do nothing on an error, the next case should do the trick</span>
47
+ <span class="ruby-keyword kw">end</span>
48
+ <span class="ruby-keyword kw">begin</span>
49
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-constant">Float</span>(<span class="ruby-identifier">s</span>))
50
+ <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">ArgumentError</span>
51
+ <span class="ruby-comment cmt"># do nothing</span>
52
+ <span class="ruby-keyword kw">end</span>
53
+ <span class="ruby-keyword kw">end</span>
54
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span>)
55
+ <span class="ruby-identifier">s</span> = <span class="ruby-keyword kw">nil</span>
56
+ <span class="ruby-keyword kw">end</span>
57
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">s</span>)
58
+ <span class="ruby-keyword kw">end</span>
59
+ <span class="ruby-keyword kw">end</span></pre>
60
+ </body>
61
+ </html>
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>skipto (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 263</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skipto</span>(<span class="ruby-identifier">to</span>)
15
+ <span class="ruby-identifier">index</span> = <span class="ruby-ivar">@index</span>
16
+ <span class="ruby-identifier">loop</span> {
17
+ <span class="ruby-identifier">c</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">nextchar</span>()
18
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-value str">'\0'</span>)
19
+ <span class="ruby-ivar">@index</span> = <span class="ruby-identifier">index</span>
20
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">c</span>)
21
+ <span class="ruby-keyword kw">end</span>
22
+ <span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">c</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">to</span>)
23
+ <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">back</span>
24
+ <span class="ruby-keyword kw">return</span>(<span class="ruby-identifier">c</span>)
25
+ <span class="ruby-keyword kw">end</span>
26
+ }
27
+ <span class="ruby-keyword kw">end</span></pre>
28
+ </body>
29
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>unescape (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 278</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unescape</span>
15
+ <span class="ruby-ivar">@source</span> = <span class="ruby-constant">CGI</span><span class="ruby-operator">::</span><span class="ruby-identifier">unescape</span>(<span class="ruby-ivar">@source</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,19 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>skippast (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 285</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">skippast</span>(<span class="ruby-identifier">to</span>)
15
+ <span class="ruby-ivar">@index</span> = <span class="ruby-ivar">@source</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">to</span>, <span class="ruby-ivar">@index</span>)
16
+ <span class="ruby-ivar">@index</span> = (<span class="ruby-ivar">@index</span>.<span class="ruby-identifier">nil?</span>) <span class="ruby-operator">?</span> <span class="ruby-ivar">@source</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">:</span> <span class="ruby-ivar">@index</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">to</span>.<span class="ruby-identifier">length</span>
17
+ <span class="ruby-keyword kw">end</span></pre>
18
+ </body>
19
+ </html>
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>each (JSON::Lexer)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File json/lexer.rb, line 290</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">each</span>
15
+ <span class="ruby-keyword kw">while</span> (<span class="ruby-identifier">n</span> = <span class="ruby-identifier">nextvalue</span>)
16
+ <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">n</span>)
17
+ <span class="ruby-keyword kw">end</span>
18
+ <span class="ruby-keyword kw">end</span></pre>
19
+ </body>
20
+ </html>