video_chat_get 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (462) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +6 -1
  4. data/lib/requests/request.rb +1 -1
  5. data/lib/site_list/mildom_analyze.rb +1 -0
  6. data/lib/site_list/openrec_analyze.rb +1 -0
  7. data/lib/site_list/twitcasting_analyze.rb +1 -0
  8. data/lib/site_list/youtubelive_analyze.rb +60 -52
  9. data/lib/video_chat_get/version.rb +1 -1
  10. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/gem 2.build_complete b/data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/gem → 2.build_complete +0 -0
  11. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/gem.build_complete +0 -0
  12. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/gem_make 2.out +13 -0
  13. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/gem_make.out +13 -0
  14. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/json/ext/generator 2.bundle +0 -0
  15. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/json/ext/generator.bundle +0 -0
  16. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/json/ext/parser 2.bundle +0 -0
  17. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/json/ext/parser.bundle +0 -0
  18. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/mkmf 2.log +60 -0
  19. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/json-2.3.0/mkmf.log +60 -0
  20. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/gem 2.build_complete b/data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/gem → 2.build_complete +0 -0
  21. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/gem.build_complete +0 -0
  22. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/gem_make 2.out +155 -0
  23. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/gem_make.out +155 -0
  24. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/mkmf 2.log +542 -0
  25. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/mkmf.log +542 -0
  26. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/nokogiri/nokogiri 2.bundle +0 -0
  27. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-18/2.5.0/nokogiri-1.10.9/nokogiri/nokogiri.bundle +0 -0
  28. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/diagrams/.keep 2 b/data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/diagrams/.keep → 2 +0 -0
  29. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/Makefile 2 +199 -0
  30. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/fbuffer/fbuffer 2.h +187 -0
  31. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/.sitearchdir.-.json.-.ext 2.time b/data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/.sitearchdir.-.json.-.ext → 2.time +0 -0
  32. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/Makefile 2 +265 -0
  33. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/depend 2 +1 -0
  34. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/extconf 2.rb +4 -0
  35. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/generator 2.c +1499 -0
  36. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/generator/generator 2.h +171 -0
  37. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/.sitearchdir.-.json.-.ext 2.time b/data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/.sitearchdir.-.json.-.ext → 2.time +0 -0
  38. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/Makefile 2 +265 -0
  39. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/depend 2 +1 -0
  40. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/extconf 2.rb +6 -0
  41. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser 2.c +2136 -0
  42. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser 2.h +91 -0
  43. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/ext/parser/parser 2.rl +896 -0
  44. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/ext/json/extconf 2.rb +2 -0
  45. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/install 2.rb +23 -0
  46. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/ByteListTranscoder 2.java +166 -0
  47. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Generator 2.java +466 -0
  48. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorMethods 2.java +231 -0
  49. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorService 2.java +42 -0
  50. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/GeneratorState 2.java +490 -0
  51. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/OptionsReader 2.java +113 -0
  52. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Parser 2.java +2362 -0
  53. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Parser 2.rl +893 -0
  54. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/ParserService 2.java +34 -0
  55. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/RuntimeInfo 2.java +116 -0
  56. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/StringDecoder 2.java +166 -0
  57. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/StringEncoder 2.java +111 -0
  58. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/java/src/json/ext/Utils 2.java +88 -0
  59. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json 2.gemspec +0 -0
  60. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json-java 2.gemspec +37 -0
  61. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/json_pure 2.gemspec +38 -0
  62. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json 2.rb +63 -0
  63. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/bigdecimal 2.rb +29 -0
  64. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/complex 2.rb +29 -0
  65. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/core 2.rb +12 -0
  66. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/date 2.rb +34 -0
  67. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/date_time 2.rb +50 -0
  68. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/exception 2.rb +31 -0
  69. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/ostruct 2.rb +31 -0
  70. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/range 2.rb +29 -0
  71. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/rational 2.rb +28 -0
  72. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/regexp 2.rb +30 -0
  73. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/set 2.rb +29 -0
  74. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/struct 2.rb +30 -0
  75. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/symbol 2.rb +25 -0
  76. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/add/time 2.rb +38 -0
  77. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/common 2.rb +456 -0
  78. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/ext 2.rb +15 -0
  79. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/ext/.keep 2 b/data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/ext/.keep → 2 +0 -0
  80. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/generic_object 2.rb +71 -0
  81. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure 2.rb +15 -0
  82. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure/generator 2.rb +459 -0
  83. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/pure/parser 2.rb +319 -0
  84. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/lib/json/version 2.rb +9 -0
  85. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/references/rfc7159 2.txt +899 -0
  86. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail10 2.json +1 -0
  87. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail11 2.json +1 -0
  88. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail12 2.json +1 -0
  89. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail13 2.json +1 -0
  90. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail14 2.json +1 -0
  91. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail18 2.json +1 -0
  92. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail19 2.json +1 -0
  93. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail2 2.json +1 -0
  94. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail20 2.json +1 -0
  95. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail21 2.json +1 -0
  96. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail22 2.json +1 -0
  97. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail23 2.json +1 -0
  98. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail24 2.json +1 -0
  99. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail25 2.json +1 -0
  100. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail27 2.json +2 -0
  101. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail28 2.json +2 -0
  102. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail3 2.json +1 -0
  103. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail4 2.json +1 -0
  104. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail5 2.json +1 -0
  105. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail6 2.json +1 -0
  106. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail7 2.json +1 -0
  107. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail8 2.json +1 -0
  108. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/fail9 2.json +1 -0
  109. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/obsolete_fail1 2.json +1 -0
  110. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass1 2.json +56 -0
  111. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass15 2.json +1 -0
  112. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass16 2.json +1 -0
  113. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass17 2.json +1 -0
  114. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass2 2.json +1 -0
  115. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass26 2.json +1 -0
  116. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/fixtures/pass3 2.json +6 -0
  117. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_addition_test 2.rb +203 -0
  118. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_common_interface_test 2.rb +126 -0
  119. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_encoding_test 2.rb +107 -0
  120. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_ext_parser_test 2.rb +15 -0
  121. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_fixtures_test 2.rb +32 -0
  122. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_generator_test 2.rb +421 -0
  123. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_generic_object_test 2.rb +82 -0
  124. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_parser_test 2.rb +472 -0
  125. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/json_string_matching_test 2.rb +38 -0
  126. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tests/test_helper 2.rb +17 -0
  127. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/diff 2.sh +18 -0
  128. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/fuzz 2.rb +131 -0
  129. data/vendor/bundle/ruby/2.5.0/gems/json-2.3.0/tools/server 2.rb +62 -0
  130. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/LICENSE 2.md +9 -0
  131. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/LICENSE-DEPENDENCIES 2.md +1614 -0
  132. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/README 2.md +198 -0
  133. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/bin/nokogiri 2 +118 -0
  134. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/dependencies 2.yml +74 -0
  135. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/.sitearchdir.-.nokogiri 2.time b/data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/.sitearchdir.-.nokogiri → 2.time +0 -0
  136. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/Makefile +16 -15
  137. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/Makefile 2 +626 -0
  138. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/depend 2 +358 -0
  139. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/extconf 2.rb +686 -0
  140. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document 2.c +170 -0
  141. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document 2.h +10 -0
  142. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document 2.o +0 -0
  143. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_document.o +0 -0
  144. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description 2.c +279 -0
  145. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description 2.h +10 -0
  146. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description 2.o +0 -0
  147. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_element_description.o +0 -0
  148. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup 2.c +32 -0
  149. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup 2.h +8 -0
  150. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup 2.o +0 -0
  151. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_entity_lookup.o +0 -0
  152. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context 2.c +116 -0
  153. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context 2.h +11 -0
  154. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context 2.o +0 -0
  155. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_parser_context.o +0 -0
  156. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser 2.c +87 -0
  157. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser 2.h +9 -0
  158. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser 2.o +0 -0
  159. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/html_sax_push_parser.o +0 -0
  160. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri 2.bundle +0 -0
  161. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri 2.c +141 -0
  162. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri 2.h +121 -0
  163. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri 2.o +0 -0
  164. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.bundle +0 -0
  165. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/nokogiri.o +0 -0
  166. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr 2.c +103 -0
  167. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr 2.h +9 -0
  168. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr 2.o +0 -0
  169. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attr.o +0 -0
  170. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl 2.c +70 -0
  171. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl 2.h +9 -0
  172. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl 2.o +0 -0
  173. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_attribute_decl.o +0 -0
  174. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata 2.c +62 -0
  175. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata 2.h +9 -0
  176. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata 2.o +0 -0
  177. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_cdata.o +0 -0
  178. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment 2.c +69 -0
  179. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment 2.h +9 -0
  180. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment 2.o +0 -0
  181. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_comment.o +0 -0
  182. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document 2.c +608 -0
  183. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document 2.h +23 -0
  184. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document 2.o +0 -0
  185. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document.o +0 -0
  186. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment 2.c +48 -0
  187. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment 2.h +10 -0
  188. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment 2.o +0 -0
  189. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_document_fragment.o +0 -0
  190. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd 2.c +202 -0
  191. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd 2.h +10 -0
  192. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd 2.o +0 -0
  193. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_dtd.o +0 -0
  194. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content 2.c +123 -0
  195. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content 2.h +10 -0
  196. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content 2.o +0 -0
  197. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_content.o +0 -0
  198. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl 2.c +69 -0
  199. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl 2.h +9 -0
  200. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl 2.o +0 -0
  201. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl 3.h +9 -0
  202. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_element_decl.o +0 -0
  203. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 2.c +79 -0
  204. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 2.h +8 -0
  205. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 2.o +0 -0
  206. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 3.c +79 -0
  207. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 3.h +8 -0
  208. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler 3.o +0 -0
  209. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_encoding_handler.o +0 -0
  210. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl 2.c +110 -0
  211. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl 2.h +10 -0
  212. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl 2.o +0 -0
  213. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl 3.c +110 -0
  214. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl 3.h +10 -0
  215. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_decl.o +0 -0
  216. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference 2.c +52 -0
  217. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference 2.h +9 -0
  218. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference 2.o +0 -0
  219. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference 3.c +52 -0
  220. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference 3.h +9 -0
  221. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_entity_reference.o +0 -0
  222. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io 2.c +61 -0
  223. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io 2.h +11 -0
  224. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io 2.o +0 -0
  225. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io 3.c +61 -0
  226. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io 3.h +11 -0
  227. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_io.o +0 -0
  228. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 2.c +112 -0
  229. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 2.h +12 -0
  230. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 2.o +0 -0
  231. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 3.c +112 -0
  232. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 3.h +12 -0
  233. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_libxml2_hacks 3.o +0 -0
  234. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 2.c +111 -0
  235. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 2.h +14 -0
  236. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 2.o +0 -0
  237. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 3.c +111 -0
  238. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 3.h +14 -0
  239. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace 3.o +0 -0
  240. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_namespace.o +0 -0
  241. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node 2.c +1753 -0
  242. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node 2.h +13 -0
  243. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node 2.o +0 -0
  244. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node 3.h +13 -0
  245. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node.o +0 -0
  246. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set 2.c +486 -0
  247. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set 2.h +12 -0
  248. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set 2.o +0 -0
  249. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set 3.c +486 -0
  250. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set 3.h +12 -0
  251. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_node_set.o +0 -0
  252. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction 2.c +56 -0
  253. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction 2.h +9 -0
  254. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction 2.o +0 -0
  255. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction 3.c +56 -0
  256. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction 3.h +9 -0
  257. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_processing_instruction.o +0 -0
  258. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader 2.c +668 -0
  259. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader 2.h +10 -0
  260. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader 2.o +0 -0
  261. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader 3.h +10 -0
  262. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader 3.o +0 -0
  263. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_reader.o +0 -0
  264. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng 2.c +161 -0
  265. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng 2.h +9 -0
  266. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng 2.o +0 -0
  267. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng 3.c +161 -0
  268. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng 3.h +9 -0
  269. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_relax_ng.o +0 -0
  270. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser 2.c +310 -0
  271. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser 2.h +39 -0
  272. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser 2.o +0 -0
  273. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser 3.c +310 -0
  274. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser 3.h +39 -0
  275. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser.o +0 -0
  276. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 2.c +262 -0
  277. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 2.h +10 -0
  278. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 2.o +0 -0
  279. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 3.c +262 -0
  280. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 3.h +10 -0
  281. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context 3.o +0 -0
  282. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_parser_context.o +0 -0
  283. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser 2.c +159 -0
  284. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser 2.h +9 -0
  285. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser 2.o +0 -0
  286. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser 3.c +159 -0
  287. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser 3.h +9 -0
  288. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_sax_push_parser.o +0 -0
  289. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema 2.c +234 -0
  290. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema 2.h +9 -0
  291. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema 2.o +0 -0
  292. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema 3.c +234 -0
  293. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema 3.h +9 -0
  294. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_schema.o +0 -0
  295. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 2.c +64 -0
  296. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 2.h +13 -0
  297. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 2.o +0 -0
  298. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 3.c +64 -0
  299. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 3.h +13 -0
  300. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error 3.o +0 -0
  301. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_syntax_error.o +0 -0
  302. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text 2.c +52 -0
  303. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text 2.h +9 -0
  304. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text 2.o +0 -0
  305. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text 3.c +52 -0
  306. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text 3.h +9 -0
  307. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_text.o +0 -0
  308. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context 2.c +298 -0
  309. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context 2.h +10 -0
  310. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context 2.o +0 -0
  311. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context 3.h +10 -0
  312. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context 3.o +0 -0
  313. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xml_xpath_context.o +0 -0
  314. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 2.c +270 -0
  315. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 2.h +14 -0
  316. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 2.o +0 -0
  317. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 3.c +270 -0
  318. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 3.h +14 -0
  319. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet 3.o +0 -0
  320. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/ext/nokogiri/xslt_stylesheet.o +0 -0
  321. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri 2.rb +144 -0
  322. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri 3.rb +144 -0
  323. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css 2.rb +27 -0
  324. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css 3.rb +27 -0
  325. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/node 2.rb +52 -0
  326. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/node 3.rb +52 -0
  327. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser 2.rb +750 -0
  328. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser 2.y +272 -0
  329. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser 3.rb +750 -0
  330. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser 3.y +272 -0
  331. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser_extras 2.rb +91 -0
  332. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/parser_extras 3.rb +91 -0
  333. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/syntax_error 2.rb +7 -0
  334. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/syntax_error 3.rb +7 -0
  335. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer 2.rb +153 -0
  336. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer 2.rex +55 -0
  337. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer 3.rb +153 -0
  338. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/tokenizer 3.rex +55 -0
  339. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/xpath_visitor 2.rb +230 -0
  340. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/css/xpath_visitor 3.rb +230 -0
  341. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/decorators/slop 2.rb +42 -0
  342. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/decorators/slop 3.rb +42 -0
  343. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html 2.rb +37 -0
  344. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html 3.rb +37 -0
  345. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder 2.rb +35 -0
  346. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/builder 3.rb +35 -0
  347. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document 2.rb +335 -0
  348. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document 3.rb +335 -0
  349. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document_fragment 2.rb +49 -0
  350. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/document_fragment 3.rb +49 -0
  351. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description 2.rb +23 -0
  352. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description 3.rb +23 -0
  353. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description_defaults 2.rb +671 -0
  354. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/element_description_defaults 3.rb +671 -0
  355. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/entity_lookup 2.rb +13 -0
  356. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/entity_lookup 3.rb +13 -0
  357. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser 2.rb +62 -0
  358. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser 3.rb +62 -0
  359. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser_context 2.rb +16 -0
  360. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/parser_context 3.rb +16 -0
  361. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/push_parser 2.rb +36 -0
  362. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/html/sax/push_parser 3.rb +36 -0
  363. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/nokogiri 2.bundle +0 -0
  364. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/nokogiri 3.bundle +0 -0
  365. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/nokogiri.bundle +0 -0
  366. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/syntax_error 2.rb +4 -0
  367. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/syntax_error 3.rb +4 -0
  368. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/version 2.rb +109 -0
  369. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/version 3.rb +109 -0
  370. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml 2.rb +75 -0
  371. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml 3.rb +75 -0
  372. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attr 2.rb +14 -0
  373. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attr 3.rb +14 -0
  374. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attribute_decl 2.rb +18 -0
  375. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/attribute_decl 3.rb +18 -0
  376. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/builder 2.rb +446 -0
  377. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/builder 3.rb +446 -0
  378. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/cdata 2.rb +11 -0
  379. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/cdata 3.rb +11 -0
  380. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/character_data 2.rb +7 -0
  381. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/character_data 3.rb +7 -0
  382. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document 2.rb +285 -0
  383. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document 3.rb +285 -0
  384. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document_fragment 2.rb +160 -0
  385. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/document_fragment 3.rb +160 -0
  386. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/dtd 2.rb +32 -0
  387. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/dtd 3.rb +32 -0
  388. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_content 2.rb +36 -0
  389. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_content 3.rb +36 -0
  390. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_decl 2.rb +13 -0
  391. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/element_decl 3.rb +13 -0
  392. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_decl 2.rb +19 -0
  393. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_decl 3.rb +19 -0
  394. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_reference 2.rb +18 -0
  395. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/entity_reference 3.rb +18 -0
  396. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/namespace 2.rb +13 -0
  397. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/namespace 3.rb +13 -0
  398. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node 2.rb +902 -0
  399. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node 3.rb +902 -0
  400. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node/save_options 2.rb +61 -0
  401. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node/save_options 3.rb +61 -0
  402. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set 2.rb +371 -0
  403. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/node_set 3.rb +371 -0
  404. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/notation 2.rb +6 -0
  405. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/notation 3.rb +6 -0
  406. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/parse_options 2.rb +120 -0
  407. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/parse_options 3.rb +120 -0
  408. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp 2.rb +2 -0
  409. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp 3.rb +2 -0
  410. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/character_data 2.rb +18 -0
  411. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/character_data 3.rb +18 -0
  412. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/node 2.rb +56 -0
  413. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/pp/node 3.rb +56 -0
  414. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/processing_instruction 2.rb +8 -0
  415. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/processing_instruction 3.rb +8 -0
  416. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/reader 2.rb +112 -0
  417. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/reader 3.rb +112 -0
  418. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/relax_ng 2.rb +32 -0
  419. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/relax_ng 3.rb +32 -0
  420. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax 2.rb +4 -0
  421. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax 3.rb +4 -0
  422. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/document 2.rb +171 -0
  423. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/document 3.rb +171 -0
  424. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser 2.rb +122 -0
  425. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser 3.rb +122 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser_context 2.rb +16 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/parser_context 3.rb +16 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/push_parser 2.rb +60 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/sax/push_parser 3.rb +60 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/schema 2.rb +63 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/schema 3.rb +63 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/searchable 2.rb +230 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/searchable 3.rb +230 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/syntax_error 2.rb +70 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/syntax_error 3.rb +70 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/text 2.rb +9 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/text 3.rb +9 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath 2.rb +10 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath 3.rb +10 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath/syntax_error 2.rb +11 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath/syntax_error 3.rb +11 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath_context 2.rb +16 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xml/xpath_context 3.rb +16 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt 2.rb +56 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt 3.rb +56 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt/stylesheet 2.rb +25 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/nokogiri/xslt/stylesheet 3.rb +25 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/xsd/xmlparser/nokogiri 2.rb +102 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/lib/xsd/xmlparser/nokogiri 3.rb +102 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes 2.patch +78 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes 3.patch +78 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0002-Remove-script-macro-support 2.patch +40 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0002-Remove-script-macro-support 3.patch +40 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi 2.patch +44 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi 3.patch +44 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0004-libxml2.la-is-in-top_builddir 2.patch +25 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0004-libxml2.la-is-in-top_builddir 3.patch +25 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities 2.patch +32 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/nokogiri-1.10.9/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities 3.patch +32 -0
  460. data/vendor/bundle/ruby/2.5.0/specifications/json-2.3.0.gemspec +0 -0
  461. data/vendor/bundle/ruby/2.5.0/specifications/nokogiri-1.10.9.gemspec +2 -2
  462. metadata +493 -3
@@ -0,0 +1,171 @@
1
+ #ifndef _GENERATOR_H_
2
+ #define _GENERATOR_H_
3
+
4
+ #include <math.h>
5
+ #include <ctype.h>
6
+
7
+ #include "ruby.h"
8
+
9
+ #ifdef HAVE_RUBY_RE_H
10
+ #include "ruby/re.h"
11
+ #else
12
+ #include "re.h"
13
+ #endif
14
+
15
+ #ifndef rb_intern_str
16
+ #define rb_intern_str(string) SYM2ID(rb_str_intern(string))
17
+ #endif
18
+
19
+ #ifndef rb_obj_instance_variables
20
+ #define rb_obj_instance_variables(object) rb_funcall(object, rb_intern("instance_variables"), 0)
21
+ #endif
22
+
23
+ #define option_given_p(opts, key) RTEST(rb_funcall(opts, i_key_p, 1, key))
24
+
25
+ /* unicode definitions */
26
+
27
+ #define UNI_STRICT_CONVERSION 1
28
+
29
+ typedef unsigned long UTF32; /* at least 32 bits */
30
+ typedef unsigned short UTF16; /* at least 16 bits */
31
+ typedef unsigned char UTF8; /* typically 8 bits */
32
+
33
+ #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
34
+ #define UNI_MAX_BMP (UTF32)0x0000FFFF
35
+ #define UNI_MAX_UTF16 (UTF32)0x0010FFFF
36
+ #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
37
+ #define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
38
+
39
+ #define UNI_SUR_HIGH_START (UTF32)0xD800
40
+ #define UNI_SUR_HIGH_END (UTF32)0xDBFF
41
+ #define UNI_SUR_LOW_START (UTF32)0xDC00
42
+ #define UNI_SUR_LOW_END (UTF32)0xDFFF
43
+
44
+ static const int halfShift = 10; /* used for shifting by 10 bits */
45
+
46
+ static const UTF32 halfBase = 0x0010000UL;
47
+ static const UTF32 halfMask = 0x3FFUL;
48
+
49
+ static unsigned char isLegalUTF8(const UTF8 *source, unsigned long length);
50
+ static void unicode_escape(char *buf, UTF16 character);
51
+ static void unicode_escape_to_buffer(FBuffer *buffer, char buf[6], UTF16 character);
52
+ static void convert_UTF8_to_JSON_ASCII(FBuffer *buffer, VALUE string);
53
+ static void convert_UTF8_to_JSON(FBuffer *buffer, VALUE string);
54
+ static char *fstrndup(const char *ptr, unsigned long len);
55
+
56
+ /* ruby api and some helpers */
57
+
58
+ typedef struct JSON_Generator_StateStruct {
59
+ char *indent;
60
+ long indent_len;
61
+ char *space;
62
+ long space_len;
63
+ char *space_before;
64
+ long space_before_len;
65
+ char *object_nl;
66
+ long object_nl_len;
67
+ char *array_nl;
68
+ long array_nl_len;
69
+ FBuffer *array_delim;
70
+ FBuffer *object_delim;
71
+ FBuffer *object_delim2;
72
+ long max_nesting;
73
+ char allow_nan;
74
+ char ascii_only;
75
+ long depth;
76
+ long buffer_initial_length;
77
+ } JSON_Generator_State;
78
+
79
+ #define GET_STATE_TO(self, state) \
80
+ TypedData_Get_Struct(self, JSON_Generator_State, &JSON_Generator_State_type, state)
81
+
82
+ #define GET_STATE(self) \
83
+ JSON_Generator_State *state; \
84
+ GET_STATE_TO(self, state)
85
+
86
+ #define GENERATE_JSON(type) \
87
+ FBuffer *buffer; \
88
+ VALUE Vstate; \
89
+ JSON_Generator_State *state; \
90
+ \
91
+ rb_scan_args(argc, argv, "01", &Vstate); \
92
+ Vstate = cState_from_state_s(cState, Vstate); \
93
+ TypedData_Get_Struct(Vstate, JSON_Generator_State, &JSON_Generator_State_type, state); \
94
+ buffer = cState_prepare_buffer(Vstate); \
95
+ generate_json_##type(buffer, Vstate, state, self); \
96
+ return fbuffer_to_s(buffer)
97
+
98
+ static VALUE mHash_to_json(int argc, VALUE *argv, VALUE self);
99
+ static VALUE mArray_to_json(int argc, VALUE *argv, VALUE self);
100
+ #ifdef RUBY_INTEGER_UNIFICATION
101
+ static VALUE mInteger_to_json(int argc, VALUE *argv, VALUE self);
102
+ #else
103
+ static VALUE mFixnum_to_json(int argc, VALUE *argv, VALUE self);
104
+ static VALUE mBignum_to_json(int argc, VALUE *argv, VALUE self);
105
+ #endif
106
+ static VALUE mFloat_to_json(int argc, VALUE *argv, VALUE self);
107
+ static VALUE mString_included_s(VALUE self, VALUE modul);
108
+ static VALUE mString_to_json(int argc, VALUE *argv, VALUE self);
109
+ static VALUE mString_to_json_raw_object(VALUE self);
110
+ static VALUE mString_to_json_raw(int argc, VALUE *argv, VALUE self);
111
+ static VALUE mString_Extend_json_create(VALUE self, VALUE o);
112
+ static VALUE mTrueClass_to_json(int argc, VALUE *argv, VALUE self);
113
+ static VALUE mFalseClass_to_json(int argc, VALUE *argv, VALUE self);
114
+ static VALUE mNilClass_to_json(int argc, VALUE *argv, VALUE self);
115
+ static VALUE mObject_to_json(int argc, VALUE *argv, VALUE self);
116
+ static void State_free(void *state);
117
+ static VALUE cState_s_allocate(VALUE klass);
118
+ static VALUE cState_configure(VALUE self, VALUE opts);
119
+ static VALUE cState_to_h(VALUE self);
120
+ static void generate_json(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
121
+ static void generate_json_object(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
122
+ static void generate_json_array(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
123
+ static void generate_json_string(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
124
+ static void generate_json_null(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
125
+ static void generate_json_false(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
126
+ static void generate_json_true(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
127
+ #ifdef RUBY_INTEGER_UNIFICATION
128
+ static void generate_json_integer(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
129
+ #endif
130
+ static void generate_json_fixnum(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
131
+ static void generate_json_bignum(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
132
+ static void generate_json_float(FBuffer *buffer, VALUE Vstate, JSON_Generator_State *state, VALUE obj);
133
+ static VALUE cState_partial_generate(VALUE self, VALUE obj);
134
+ static VALUE cState_generate(VALUE self, VALUE obj);
135
+ static VALUE cState_initialize(int argc, VALUE *argv, VALUE self);
136
+ static VALUE cState_from_state_s(VALUE self, VALUE opts);
137
+ static VALUE cState_indent(VALUE self);
138
+ static VALUE cState_indent_set(VALUE self, VALUE indent);
139
+ static VALUE cState_space(VALUE self);
140
+ static VALUE cState_space_set(VALUE self, VALUE space);
141
+ static VALUE cState_space_before(VALUE self);
142
+ static VALUE cState_space_before_set(VALUE self, VALUE space_before);
143
+ static VALUE cState_object_nl(VALUE self);
144
+ static VALUE cState_object_nl_set(VALUE self, VALUE object_nl);
145
+ static VALUE cState_array_nl(VALUE self);
146
+ static VALUE cState_array_nl_set(VALUE self, VALUE array_nl);
147
+ static VALUE cState_max_nesting(VALUE self);
148
+ static VALUE cState_max_nesting_set(VALUE self, VALUE depth);
149
+ static VALUE cState_allow_nan_p(VALUE self);
150
+ static VALUE cState_ascii_only_p(VALUE self);
151
+ static VALUE cState_depth(VALUE self);
152
+ static VALUE cState_depth_set(VALUE self, VALUE depth);
153
+ static FBuffer *cState_prepare_buffer(VALUE self);
154
+ #ifndef ZALLOC
155
+ #define ZALLOC(type) ((type *)ruby_zalloc(sizeof(type)))
156
+ static inline void *ruby_zalloc(size_t n)
157
+ {
158
+ void *p = ruby_xmalloc(n);
159
+ memset(p, 0, n);
160
+ return p;
161
+ }
162
+ #endif
163
+ #ifdef TypedData_Make_Struct
164
+ static const rb_data_type_t JSON_Generator_State_type;
165
+ #define NEW_TYPEDDATA_WRAPPER 1
166
+ #else
167
+ #define TypedData_Make_Struct(klass, type, ignore, json) Data_Make_Struct(klass, type, NULL, State_free, json)
168
+ #define TypedData_Get_Struct(self, JSON_Generator_State, ignore, json) Data_Get_Struct(self, JSON_Generator_State, json)
169
+ #endif
170
+
171
+ #endif
@@ -0,0 +1,265 @@
1
+
2
+ SHELL = /bin/sh
3
+
4
+ # V=0 quiet, V=1 verbose. other values don't work.
5
+ V = 0
6
+ Q1 = $(V:1=)
7
+ Q = $(Q1:0=@)
8
+ ECHO1 = $(V:1=@ :)
9
+ ECHO = $(ECHO1:0=@ echo)
10
+ NULLCMD = :
11
+
12
+ #### Start of system configuration section. ####
13
+
14
+ srcdir = .
15
+ topdir = /usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0
16
+ hdrdir = $(topdir)
17
+ arch_hdrdir = /usr/local/Cellar/ruby/2.5.1/include/ruby-2.5.0/x86_64-darwin16
18
+ PATH_SEPARATOR = :
19
+ VPATH = $(srcdir):$(arch_hdrdir)/ruby:$(hdrdir)/ruby
20
+ prefix = $(DESTDIR)/usr/local/Cellar/ruby/2.5.1
21
+ rubysitearchprefix = $(rubylibprefix)/$(sitearch)
22
+ rubyarchprefix = $(rubylibprefix)/$(arch)
23
+ rubylibprefix = $(libdir)/$(RUBY_BASE_NAME)
24
+ exec_prefix = $(prefix)
25
+ vendorarchhdrdir = $(vendorhdrdir)/$(sitearch)
26
+ sitearchhdrdir = $(sitehdrdir)/$(sitearch)
27
+ rubyarchhdrdir = $(rubyhdrdir)/$(arch)
28
+ vendorhdrdir = $(rubyhdrdir)/vendor_ruby
29
+ sitehdrdir = $(rubyhdrdir)/site_ruby
30
+ rubyhdrdir = $(includedir)/$(RUBY_VERSION_NAME)
31
+ vendorarchdir = $(vendorlibdir)/$(sitearch)
32
+ vendorlibdir = $(vendordir)/$(ruby_version)
33
+ vendordir = $(DESTDIR)/usr/local/lib/ruby/vendor_ruby
34
+ sitearchdir = $(DESTDIR)./.gem.20200622-60094-8t995x
35
+ sitelibdir = $(DESTDIR)./.gem.20200622-60094-8t995x
36
+ sitedir = $(DESTDIR)/usr/local/lib/ruby/site_ruby
37
+ rubyarchdir = $(rubylibdir)/$(arch)
38
+ rubylibdir = $(rubylibprefix)/$(ruby_version)
39
+ sitearchincludedir = $(includedir)/$(sitearch)
40
+ archincludedir = $(includedir)/$(arch)
41
+ sitearchlibdir = $(libdir)/$(sitearch)
42
+ archlibdir = $(libdir)/$(arch)
43
+ ridir = $(datarootdir)/$(RI_BASE_NAME)
44
+ mandir = $(datarootdir)/man
45
+ localedir = $(datarootdir)/locale
46
+ libdir = $(exec_prefix)/lib
47
+ psdir = $(docdir)
48
+ pdfdir = $(docdir)
49
+ dvidir = $(docdir)
50
+ htmldir = $(docdir)
51
+ infodir = $(datarootdir)/info
52
+ docdir = $(datarootdir)/doc/$(PACKAGE)
53
+ oldincludedir = $(SDKROOT)/usr/include
54
+ includedir = $(prefix)/include
55
+ localstatedir = $(prefix)/var
56
+ sharedstatedir = $(prefix)/com
57
+ sysconfdir = $(prefix)/etc
58
+ datadir = $(datarootdir)
59
+ datarootdir = $(prefix)/share
60
+ libexecdir = $(exec_prefix)/libexec
61
+ sbindir = $(exec_prefix)/sbin
62
+ bindir = $(exec_prefix)/bin
63
+ archdir = $(rubyarchdir)
64
+
65
+
66
+ CC = clang
67
+ CXX = clang++
68
+ LIBRUBY = $(LIBRUBY_SO)
69
+ LIBRUBY_A = lib$(RUBY_SO_NAME)-static.a
70
+ LIBRUBYARG_SHARED = -l$(RUBY_SO_NAME)
71
+ LIBRUBYARG_STATIC = -l$(RUBY_SO_NAME)-static -framework Foundation
72
+ empty =
73
+ OUTFLAG = -o $(empty)
74
+ COUTFLAG = -o $(empty)
75
+ CSRCFLAG = $(empty)
76
+
77
+ RUBY_EXTCONF_H =
78
+ cflags = $(optflags) $(debugflags) $(warnflags)
79
+ cxxflags = $(optflags) $(debugflags) $(warnflags)
80
+ optflags = -O3
81
+ debugflags = -ggdb3
82
+ warnflags = -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens
83
+ CCDLFLAGS = -fno-common
84
+ CFLAGS = $(CCDLFLAGS) $(cflags) -fno-common -pipe $(ARCH_FLAG)
85
+ INCFLAGS = -I. -I$(arch_hdrdir) -I$(hdrdir)/ruby/backward -I$(hdrdir) -I$(srcdir)
86
+ DEFS =
87
+ CPPFLAGS = -DHAVE_RB_ENC_RAISE -I/usr/local/opt/libyaml/include -I/usr/local/opt/openssl/include -I/usr/local/opt/readline/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT $(DEFS) $(cppflags)
88
+ CXXFLAGS = $(CCDLFLAGS) $(cxxflags) $(ARCH_FLAG)
89
+ ldflags = -L. -fstack-protector -L/usr/local/lib -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib
90
+ dldflags = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib
91
+ ARCH_FLAG =
92
+ DLDFLAGS = $(ldflags) $(dldflags) $(ARCH_FLAG)
93
+ LDSHARED = $(CC) -dynamic -bundle
94
+ LDSHAREDXX = $(CXX) -dynamic -bundle
95
+ AR = libtool -static
96
+ EXEEXT =
97
+
98
+ RUBY_INSTALL_NAME = $(RUBY_BASE_NAME)
99
+ RUBY_SO_NAME = ruby.2.5.1
100
+ RUBYW_INSTALL_NAME =
101
+ RUBY_VERSION_NAME = $(RUBY_BASE_NAME)-$(ruby_version)
102
+ RUBYW_BASE_NAME = rubyw
103
+ RUBY_BASE_NAME = ruby
104
+
105
+ arch = x86_64-darwin16
106
+ sitearch = $(arch)
107
+ ruby_version = 2.5.0
108
+ ruby = $(bindir)/$(RUBY_BASE_NAME)
109
+ RUBY = $(ruby)
110
+ ruby_headers = $(hdrdir)/ruby.h $(hdrdir)/ruby/backward.h $(hdrdir)/ruby/ruby.h $(hdrdir)/ruby/defines.h $(hdrdir)/ruby/missing.h $(hdrdir)/ruby/intern.h $(hdrdir)/ruby/st.h $(hdrdir)/ruby/subst.h $(arch_hdrdir)/ruby/config.h
111
+
112
+ RM = rm -f
113
+ RM_RF = $(RUBY) -run -e rm -- -rf
114
+ RMDIRS = rmdir -p
115
+ MAKEDIRS = mkdir -p
116
+ INSTALL = /usr/bin/install -c
117
+ INSTALL_PROG = $(INSTALL) -m 0755
118
+ INSTALL_DATA = $(INSTALL) -m 644
119
+ COPY = cp
120
+ TOUCH = exit >
121
+
122
+ #### End of system configuration section. ####
123
+
124
+ preload =
125
+ libpath = . $(libdir) /usr/local/opt/libyaml/lib /usr/local/opt/openssl/lib /usr/local/opt/readline/lib
126
+ LIBPATH = -L. -L$(libdir) -L/usr/local/opt/libyaml/lib -L/usr/local/opt/openssl/lib -L/usr/local/opt/readline/lib
127
+ DEFFILE =
128
+
129
+ CLEANFILES = mkmf.log
130
+ DISTCLEANFILES =
131
+ DISTCLEANDIRS =
132
+
133
+ extout =
134
+ extout_prefix =
135
+ target_prefix = /json/ext
136
+ LOCAL_LIBS =
137
+ LIBS = $(LIBRUBYARG_SHARED) -lpthread -ldl -lobjc
138
+ ORIG_SRCS = parser.c
139
+ SRCS = $(ORIG_SRCS)
140
+ OBJS = parser.o
141
+ HDRS = $(srcdir)/parser.h
142
+ LOCAL_HDRS =
143
+ TARGET = parser
144
+ TARGET_NAME = parser
145
+ TARGET_ENTRY = Init_$(TARGET_NAME)
146
+ DLLIB = $(TARGET).bundle
147
+ EXTSTATIC =
148
+ STATIC_LIB =
149
+
150
+ TIMESTAMP_DIR = .
151
+ BINDIR = $(bindir)
152
+ RUBYCOMMONDIR = $(sitedir)$(target_prefix)
153
+ RUBYLIBDIR = $(sitelibdir)$(target_prefix)
154
+ RUBYARCHDIR = $(sitearchdir)$(target_prefix)
155
+ HDRDIR = $(rubyhdrdir)/ruby$(target_prefix)
156
+ ARCHHDRDIR = $(rubyhdrdir)/$(arch)/ruby$(target_prefix)
157
+ TARGET_SO_DIR =
158
+ TARGET_SO = $(TARGET_SO_DIR)$(DLLIB)
159
+ CLEANLIBS = $(TARGET_SO)
160
+ CLEANOBJS = *.o *.bak
161
+
162
+ all: $(DLLIB)
163
+ static: $(STATIC_LIB)
164
+ .PHONY: all install static install-so install-rb
165
+ .PHONY: clean clean-so clean-static clean-rb
166
+
167
+ clean-static::
168
+ clean-rb-default::
169
+ clean-rb::
170
+ clean-so::
171
+ clean: clean-so clean-static clean-rb-default clean-rb
172
+ -$(Q)$(RM) $(CLEANLIBS) $(CLEANOBJS) $(CLEANFILES) .*.time
173
+
174
+ distclean-rb-default::
175
+ distclean-rb::
176
+ distclean-so::
177
+ distclean-static::
178
+ distclean: clean distclean-so distclean-static distclean-rb-default distclean-rb
179
+ -$(Q)$(RM) Makefile $(RUBY_EXTCONF_H) conftest.* mkmf.log
180
+ -$(Q)$(RM) core ruby$(EXEEXT) *~ $(DISTCLEANFILES)
181
+ -$(Q)$(RMDIRS) $(DISTCLEANDIRS) 2> /dev/null || true
182
+
183
+ realclean: distclean
184
+ install: install-so install-rb
185
+
186
+ install-so: $(DLLIB) $(TIMESTAMP_DIR)/.sitearchdir.-.json.-.ext.time
187
+ $(INSTALL_PROG) $(DLLIB) $(RUBYARCHDIR)
188
+ clean-static::
189
+ -$(Q)$(RM) $(STATIC_LIB)
190
+ install-rb: pre-install-rb do-install-rb install-rb-default
191
+ install-rb-default: pre-install-rb-default do-install-rb-default
192
+ pre-install-rb: Makefile
193
+ pre-install-rb-default: Makefile
194
+ do-install-rb:
195
+ do-install-rb-default:
196
+ pre-install-rb-default:
197
+ @$(NULLCMD)
198
+ $(TIMESTAMP_DIR)/.sitearchdir.-.json.-.ext.time:
199
+ $(Q) $(MAKEDIRS) $(@D) $(RUBYARCHDIR)
200
+ $(Q) $(TOUCH) $@
201
+
202
+ site-install: site-install-so site-install-rb
203
+ site-install-so: install-so
204
+ site-install-rb: install-rb
205
+
206
+ .SUFFIXES: .c .m .cc .mm .cxx .cpp .o .S
207
+
208
+ .cc.o:
209
+ $(ECHO) compiling $(<)
210
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
211
+
212
+ .cc.S:
213
+ $(ECHO) translating $(<)
214
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
215
+
216
+ .mm.o:
217
+ $(ECHO) compiling $(<)
218
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
219
+
220
+ .mm.S:
221
+ $(ECHO) translating $(<)
222
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
223
+
224
+ .cxx.o:
225
+ $(ECHO) compiling $(<)
226
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
227
+
228
+ .cxx.S:
229
+ $(ECHO) translating $(<)
230
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
231
+
232
+ .cpp.o:
233
+ $(ECHO) compiling $(<)
234
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
235
+
236
+ .cpp.S:
237
+ $(ECHO) translating $(<)
238
+ $(Q) $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
239
+
240
+ .c.o:
241
+ $(ECHO) compiling $(<)
242
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
243
+
244
+ .c.S:
245
+ $(ECHO) translating $(<)
246
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
247
+
248
+ .m.o:
249
+ $(ECHO) compiling $(<)
250
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -c $(CSRCFLAG)$<
251
+
252
+ .m.S:
253
+ $(ECHO) translating $(<)
254
+ $(Q) $(CC) $(INCFLAGS) $(CPPFLAGS) $(CFLAGS) $(COUTFLAG)$@ -S $(CSRCFLAG)$<
255
+
256
+ $(TARGET_SO): $(OBJS) Makefile
257
+ $(ECHO) linking shared-object json/ext/$(DLLIB)
258
+ -$(Q)$(RM) $(@)
259
+ $(Q) $(LDSHARED) -o $@ $(OBJS) $(LIBPATH) $(DLDFLAGS) $(LOCAL_LIBS) $(LIBS)
260
+ $(Q) $(POSTLINK)
261
+
262
+
263
+
264
+ ###
265
+ parser.o: parser.c parser.h $(srcdir)/../fbuffer/fbuffer.h
@@ -0,0 +1 @@
1
+ parser.o: parser.c parser.h $(srcdir)/../fbuffer/fbuffer.h
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: false
2
+ require 'mkmf'
3
+
4
+ have_func("rb_enc_raise", "ruby.h")
5
+
6
+ create_makefile 'json/ext/parser'
@@ -0,0 +1,2136 @@
1
+
2
+ #line 1 "parser.rl"
3
+ #include "../fbuffer/fbuffer.h"
4
+ #include "parser.h"
5
+
6
+ #if defined HAVE_RUBY_ENCODING_H
7
+ # define EXC_ENCODING rb_utf8_encoding(),
8
+ # ifndef HAVE_RB_ENC_RAISE
9
+ static void
10
+ enc_raise(rb_encoding *enc, VALUE exc, const char *fmt, ...)
11
+ {
12
+ va_list args;
13
+ VALUE mesg;
14
+
15
+ va_start(args, fmt);
16
+ mesg = rb_enc_vsprintf(enc, fmt, args);
17
+ va_end(args);
18
+
19
+ rb_exc_raise(rb_exc_new3(exc, mesg));
20
+ }
21
+ # define rb_enc_raise enc_raise
22
+ # endif
23
+ #else
24
+ # define EXC_ENCODING /* nothing */
25
+ # define rb_enc_raise rb_raise
26
+ #endif
27
+
28
+ /* unicode */
29
+
30
+ static const signed char digit_values[256] = {
31
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
32
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
33
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1,
34
+ -1, -1, -1, -1, -1, -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1,
35
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
36
+ 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
37
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
38
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
39
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
40
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
41
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
42
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
43
+ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
44
+ -1, -1, -1, -1, -1, -1, -1
45
+ };
46
+
47
+ static UTF32 unescape_unicode(const unsigned char *p)
48
+ {
49
+ signed char b;
50
+ UTF32 result = 0;
51
+ b = digit_values[p[0]];
52
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
53
+ result = (result << 4) | (unsigned char)b;
54
+ b = digit_values[p[1]];
55
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
56
+ result = (result << 4) | (unsigned char)b;
57
+ b = digit_values[p[2]];
58
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
59
+ result = (result << 4) | (unsigned char)b;
60
+ b = digit_values[p[3]];
61
+ if (b < 0) return UNI_REPLACEMENT_CHAR;
62
+ result = (result << 4) | (unsigned char)b;
63
+ return result;
64
+ }
65
+
66
+ static int convert_UTF32_to_UTF8(char *buf, UTF32 ch)
67
+ {
68
+ int len = 1;
69
+ if (ch <= 0x7F) {
70
+ buf[0] = (char) ch;
71
+ } else if (ch <= 0x07FF) {
72
+ buf[0] = (char) ((ch >> 6) | 0xC0);
73
+ buf[1] = (char) ((ch & 0x3F) | 0x80);
74
+ len++;
75
+ } else if (ch <= 0xFFFF) {
76
+ buf[0] = (char) ((ch >> 12) | 0xE0);
77
+ buf[1] = (char) (((ch >> 6) & 0x3F) | 0x80);
78
+ buf[2] = (char) ((ch & 0x3F) | 0x80);
79
+ len += 2;
80
+ } else if (ch <= 0x1fffff) {
81
+ buf[0] =(char) ((ch >> 18) | 0xF0);
82
+ buf[1] =(char) (((ch >> 12) & 0x3F) | 0x80);
83
+ buf[2] =(char) (((ch >> 6) & 0x3F) | 0x80);
84
+ buf[3] =(char) ((ch & 0x3F) | 0x80);
85
+ len += 3;
86
+ } else {
87
+ buf[0] = '?';
88
+ }
89
+ return len;
90
+ }
91
+
92
+ static VALUE mJSON, mExt, cParser, eParserError, eNestingError;
93
+ static VALUE CNaN, CInfinity, CMinusInfinity;
94
+ static VALUE cBigDecimal = Qundef;
95
+
96
+ static ID i_json_creatable_p, i_json_create, i_create_id, i_create_additions,
97
+ i_chr, i_max_nesting, i_allow_nan, i_symbolize_names,
98
+ i_object_class, i_array_class, i_decimal_class, i_key_p,
99
+ i_deep_const_get, i_match, i_match_string, i_aset, i_aref,
100
+ i_leftshift, i_new, i_BigDecimal;
101
+
102
+
103
+ #line 126 "parser.rl"
104
+
105
+
106
+
107
+ #line 108 "parser.c"
108
+ enum {JSON_object_start = 1};
109
+ enum {JSON_object_first_final = 27};
110
+ enum {JSON_object_error = 0};
111
+
112
+ enum {JSON_object_en_main = 1};
113
+
114
+
115
+ #line 167 "parser.rl"
116
+
117
+
118
+ static char *JSON_parse_object(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
119
+ {
120
+ int cs = EVIL;
121
+ VALUE last_name = Qnil;
122
+ VALUE object_class = json->object_class;
123
+
124
+ if (json->max_nesting && current_nesting > json->max_nesting) {
125
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
126
+ }
127
+
128
+ *result = NIL_P(object_class) ? rb_hash_new() : rb_class_new_instance(0, 0, object_class);
129
+
130
+
131
+ #line 132 "parser.c"
132
+ {
133
+ cs = JSON_object_start;
134
+ }
135
+
136
+ #line 182 "parser.rl"
137
+
138
+ #line 139 "parser.c"
139
+ {
140
+ if ( p == pe )
141
+ goto _test_eof;
142
+ switch ( cs )
143
+ {
144
+ case 1:
145
+ if ( (*p) == 123 )
146
+ goto st2;
147
+ goto st0;
148
+ st0:
149
+ cs = 0;
150
+ goto _out;
151
+ st2:
152
+ if ( ++p == pe )
153
+ goto _test_eof2;
154
+ case 2:
155
+ switch( (*p) ) {
156
+ case 13: goto st2;
157
+ case 32: goto st2;
158
+ case 34: goto tr2;
159
+ case 47: goto st23;
160
+ case 125: goto tr4;
161
+ }
162
+ if ( 9 <= (*p) && (*p) <= 10 )
163
+ goto st2;
164
+ goto st0;
165
+ tr2:
166
+ #line 149 "parser.rl"
167
+ {
168
+ char *np;
169
+ json->parsing_name = 1;
170
+ np = JSON_parse_string(json, p, pe, &last_name);
171
+ json->parsing_name = 0;
172
+ if (np == NULL) { p--; {p++; cs = 3; goto _out;} } else {p = (( np))-1;}
173
+ }
174
+ goto st3;
175
+ st3:
176
+ if ( ++p == pe )
177
+ goto _test_eof3;
178
+ case 3:
179
+ #line 180 "parser.c"
180
+ switch( (*p) ) {
181
+ case 13: goto st3;
182
+ case 32: goto st3;
183
+ case 47: goto st4;
184
+ case 58: goto st8;
185
+ }
186
+ if ( 9 <= (*p) && (*p) <= 10 )
187
+ goto st3;
188
+ goto st0;
189
+ st4:
190
+ if ( ++p == pe )
191
+ goto _test_eof4;
192
+ case 4:
193
+ switch( (*p) ) {
194
+ case 42: goto st5;
195
+ case 47: goto st7;
196
+ }
197
+ goto st0;
198
+ st5:
199
+ if ( ++p == pe )
200
+ goto _test_eof5;
201
+ case 5:
202
+ if ( (*p) == 42 )
203
+ goto st6;
204
+ goto st5;
205
+ st6:
206
+ if ( ++p == pe )
207
+ goto _test_eof6;
208
+ case 6:
209
+ switch( (*p) ) {
210
+ case 42: goto st6;
211
+ case 47: goto st3;
212
+ }
213
+ goto st5;
214
+ st7:
215
+ if ( ++p == pe )
216
+ goto _test_eof7;
217
+ case 7:
218
+ if ( (*p) == 10 )
219
+ goto st3;
220
+ goto st7;
221
+ st8:
222
+ if ( ++p == pe )
223
+ goto _test_eof8;
224
+ case 8:
225
+ switch( (*p) ) {
226
+ case 13: goto st8;
227
+ case 32: goto st8;
228
+ case 34: goto tr11;
229
+ case 45: goto tr11;
230
+ case 47: goto st19;
231
+ case 73: goto tr11;
232
+ case 78: goto tr11;
233
+ case 91: goto tr11;
234
+ case 102: goto tr11;
235
+ case 110: goto tr11;
236
+ case 116: goto tr11;
237
+ case 123: goto tr11;
238
+ }
239
+ if ( (*p) > 10 ) {
240
+ if ( 48 <= (*p) && (*p) <= 57 )
241
+ goto tr11;
242
+ } else if ( (*p) >= 9 )
243
+ goto st8;
244
+ goto st0;
245
+ tr11:
246
+ #line 134 "parser.rl"
247
+ {
248
+ VALUE v = Qnil;
249
+ char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
250
+ if (np == NULL) {
251
+ p--; {p++; cs = 9; goto _out;}
252
+ } else {
253
+ if (NIL_P(json->object_class)) {
254
+ rb_hash_aset(*result, last_name, v);
255
+ } else {
256
+ rb_funcall(*result, i_aset, 2, last_name, v);
257
+ }
258
+ {p = (( np))-1;}
259
+ }
260
+ }
261
+ goto st9;
262
+ st9:
263
+ if ( ++p == pe )
264
+ goto _test_eof9;
265
+ case 9:
266
+ #line 267 "parser.c"
267
+ switch( (*p) ) {
268
+ case 13: goto st9;
269
+ case 32: goto st9;
270
+ case 44: goto st10;
271
+ case 47: goto st15;
272
+ case 125: goto tr4;
273
+ }
274
+ if ( 9 <= (*p) && (*p) <= 10 )
275
+ goto st9;
276
+ goto st0;
277
+ st10:
278
+ if ( ++p == pe )
279
+ goto _test_eof10;
280
+ case 10:
281
+ switch( (*p) ) {
282
+ case 13: goto st10;
283
+ case 32: goto st10;
284
+ case 34: goto tr2;
285
+ case 47: goto st11;
286
+ }
287
+ if ( 9 <= (*p) && (*p) <= 10 )
288
+ goto st10;
289
+ goto st0;
290
+ st11:
291
+ if ( ++p == pe )
292
+ goto _test_eof11;
293
+ case 11:
294
+ switch( (*p) ) {
295
+ case 42: goto st12;
296
+ case 47: goto st14;
297
+ }
298
+ goto st0;
299
+ st12:
300
+ if ( ++p == pe )
301
+ goto _test_eof12;
302
+ case 12:
303
+ if ( (*p) == 42 )
304
+ goto st13;
305
+ goto st12;
306
+ st13:
307
+ if ( ++p == pe )
308
+ goto _test_eof13;
309
+ case 13:
310
+ switch( (*p) ) {
311
+ case 42: goto st13;
312
+ case 47: goto st10;
313
+ }
314
+ goto st12;
315
+ st14:
316
+ if ( ++p == pe )
317
+ goto _test_eof14;
318
+ case 14:
319
+ if ( (*p) == 10 )
320
+ goto st10;
321
+ goto st14;
322
+ st15:
323
+ if ( ++p == pe )
324
+ goto _test_eof15;
325
+ case 15:
326
+ switch( (*p) ) {
327
+ case 42: goto st16;
328
+ case 47: goto st18;
329
+ }
330
+ goto st0;
331
+ st16:
332
+ if ( ++p == pe )
333
+ goto _test_eof16;
334
+ case 16:
335
+ if ( (*p) == 42 )
336
+ goto st17;
337
+ goto st16;
338
+ st17:
339
+ if ( ++p == pe )
340
+ goto _test_eof17;
341
+ case 17:
342
+ switch( (*p) ) {
343
+ case 42: goto st17;
344
+ case 47: goto st9;
345
+ }
346
+ goto st16;
347
+ st18:
348
+ if ( ++p == pe )
349
+ goto _test_eof18;
350
+ case 18:
351
+ if ( (*p) == 10 )
352
+ goto st9;
353
+ goto st18;
354
+ tr4:
355
+ #line 157 "parser.rl"
356
+ { p--; {p++; cs = 27; goto _out;} }
357
+ goto st27;
358
+ st27:
359
+ if ( ++p == pe )
360
+ goto _test_eof27;
361
+ case 27:
362
+ #line 363 "parser.c"
363
+ goto st0;
364
+ st19:
365
+ if ( ++p == pe )
366
+ goto _test_eof19;
367
+ case 19:
368
+ switch( (*p) ) {
369
+ case 42: goto st20;
370
+ case 47: goto st22;
371
+ }
372
+ goto st0;
373
+ st20:
374
+ if ( ++p == pe )
375
+ goto _test_eof20;
376
+ case 20:
377
+ if ( (*p) == 42 )
378
+ goto st21;
379
+ goto st20;
380
+ st21:
381
+ if ( ++p == pe )
382
+ goto _test_eof21;
383
+ case 21:
384
+ switch( (*p) ) {
385
+ case 42: goto st21;
386
+ case 47: goto st8;
387
+ }
388
+ goto st20;
389
+ st22:
390
+ if ( ++p == pe )
391
+ goto _test_eof22;
392
+ case 22:
393
+ if ( (*p) == 10 )
394
+ goto st8;
395
+ goto st22;
396
+ st23:
397
+ if ( ++p == pe )
398
+ goto _test_eof23;
399
+ case 23:
400
+ switch( (*p) ) {
401
+ case 42: goto st24;
402
+ case 47: goto st26;
403
+ }
404
+ goto st0;
405
+ st24:
406
+ if ( ++p == pe )
407
+ goto _test_eof24;
408
+ case 24:
409
+ if ( (*p) == 42 )
410
+ goto st25;
411
+ goto st24;
412
+ st25:
413
+ if ( ++p == pe )
414
+ goto _test_eof25;
415
+ case 25:
416
+ switch( (*p) ) {
417
+ case 42: goto st25;
418
+ case 47: goto st2;
419
+ }
420
+ goto st24;
421
+ st26:
422
+ if ( ++p == pe )
423
+ goto _test_eof26;
424
+ case 26:
425
+ if ( (*p) == 10 )
426
+ goto st2;
427
+ goto st26;
428
+ }
429
+ _test_eof2: cs = 2; goto _test_eof;
430
+ _test_eof3: cs = 3; goto _test_eof;
431
+ _test_eof4: cs = 4; goto _test_eof;
432
+ _test_eof5: cs = 5; goto _test_eof;
433
+ _test_eof6: cs = 6; goto _test_eof;
434
+ _test_eof7: cs = 7; goto _test_eof;
435
+ _test_eof8: cs = 8; goto _test_eof;
436
+ _test_eof9: cs = 9; goto _test_eof;
437
+ _test_eof10: cs = 10; goto _test_eof;
438
+ _test_eof11: cs = 11; goto _test_eof;
439
+ _test_eof12: cs = 12; goto _test_eof;
440
+ _test_eof13: cs = 13; goto _test_eof;
441
+ _test_eof14: cs = 14; goto _test_eof;
442
+ _test_eof15: cs = 15; goto _test_eof;
443
+ _test_eof16: cs = 16; goto _test_eof;
444
+ _test_eof17: cs = 17; goto _test_eof;
445
+ _test_eof18: cs = 18; goto _test_eof;
446
+ _test_eof27: cs = 27; goto _test_eof;
447
+ _test_eof19: cs = 19; goto _test_eof;
448
+ _test_eof20: cs = 20; goto _test_eof;
449
+ _test_eof21: cs = 21; goto _test_eof;
450
+ _test_eof22: cs = 22; goto _test_eof;
451
+ _test_eof23: cs = 23; goto _test_eof;
452
+ _test_eof24: cs = 24; goto _test_eof;
453
+ _test_eof25: cs = 25; goto _test_eof;
454
+ _test_eof26: cs = 26; goto _test_eof;
455
+
456
+ _test_eof: {}
457
+ _out: {}
458
+ }
459
+
460
+ #line 183 "parser.rl"
461
+
462
+ if (cs >= JSON_object_first_final) {
463
+ if (json->create_additions) {
464
+ VALUE klassname;
465
+ if (NIL_P(json->object_class)) {
466
+ klassname = rb_hash_aref(*result, json->create_id);
467
+ } else {
468
+ klassname = rb_funcall(*result, i_aref, 1, json->create_id);
469
+ }
470
+ if (!NIL_P(klassname)) {
471
+ VALUE klass = rb_funcall(mJSON, i_deep_const_get, 1, klassname);
472
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0))) {
473
+ *result = rb_funcall(klass, i_json_create, 1, *result);
474
+ }
475
+ }
476
+ }
477
+ return p + 1;
478
+ } else {
479
+ return NULL;
480
+ }
481
+ }
482
+
483
+
484
+
485
+ #line 486 "parser.c"
486
+ enum {JSON_value_start = 1};
487
+ enum {JSON_value_first_final = 29};
488
+ enum {JSON_value_error = 0};
489
+
490
+ enum {JSON_value_en_main = 1};
491
+
492
+
493
+ #line 283 "parser.rl"
494
+
495
+
496
+ static char *JSON_parse_value(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
497
+ {
498
+ int cs = EVIL;
499
+
500
+
501
+ #line 502 "parser.c"
502
+ {
503
+ cs = JSON_value_start;
504
+ }
505
+
506
+ #line 290 "parser.rl"
507
+
508
+ #line 509 "parser.c"
509
+ {
510
+ if ( p == pe )
511
+ goto _test_eof;
512
+ switch ( cs )
513
+ {
514
+ st1:
515
+ if ( ++p == pe )
516
+ goto _test_eof1;
517
+ case 1:
518
+ switch( (*p) ) {
519
+ case 13: goto st1;
520
+ case 32: goto st1;
521
+ case 34: goto tr2;
522
+ case 45: goto tr3;
523
+ case 47: goto st6;
524
+ case 73: goto st10;
525
+ case 78: goto st17;
526
+ case 91: goto tr7;
527
+ case 102: goto st19;
528
+ case 110: goto st23;
529
+ case 116: goto st26;
530
+ case 123: goto tr11;
531
+ }
532
+ if ( (*p) > 10 ) {
533
+ if ( 48 <= (*p) && (*p) <= 57 )
534
+ goto tr3;
535
+ } else if ( (*p) >= 9 )
536
+ goto st1;
537
+ goto st0;
538
+ st0:
539
+ cs = 0;
540
+ goto _out;
541
+ tr2:
542
+ #line 235 "parser.rl"
543
+ {
544
+ char *np = JSON_parse_string(json, p, pe, result);
545
+ if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
546
+ }
547
+ goto st29;
548
+ tr3:
549
+ #line 240 "parser.rl"
550
+ {
551
+ char *np;
552
+ if(pe > p + 8 && !strncmp(MinusInfinity, p, 9)) {
553
+ if (json->allow_nan) {
554
+ *result = CMinusInfinity;
555
+ {p = (( p + 10))-1;}
556
+ p--; {p++; cs = 29; goto _out;}
557
+ } else {
558
+ rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
559
+ }
560
+ }
561
+ np = JSON_parse_float(json, p, pe, result);
562
+ if (np != NULL) {p = (( np))-1;}
563
+ np = JSON_parse_integer(json, p, pe, result);
564
+ if (np != NULL) {p = (( np))-1;}
565
+ p--; {p++; cs = 29; goto _out;}
566
+ }
567
+ goto st29;
568
+ tr7:
569
+ #line 258 "parser.rl"
570
+ {
571
+ char *np;
572
+ np = JSON_parse_array(json, p, pe, result, current_nesting + 1);
573
+ if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
574
+ }
575
+ goto st29;
576
+ tr11:
577
+ #line 264 "parser.rl"
578
+ {
579
+ char *np;
580
+ np = JSON_parse_object(json, p, pe, result, current_nesting + 1);
581
+ if (np == NULL) { p--; {p++; cs = 29; goto _out;} } else {p = (( np))-1;}
582
+ }
583
+ goto st29;
584
+ tr25:
585
+ #line 228 "parser.rl"
586
+ {
587
+ if (json->allow_nan) {
588
+ *result = CInfinity;
589
+ } else {
590
+ rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 8);
591
+ }
592
+ }
593
+ goto st29;
594
+ tr27:
595
+ #line 221 "parser.rl"
596
+ {
597
+ if (json->allow_nan) {
598
+ *result = CNaN;
599
+ } else {
600
+ rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p - 2);
601
+ }
602
+ }
603
+ goto st29;
604
+ tr31:
605
+ #line 215 "parser.rl"
606
+ {
607
+ *result = Qfalse;
608
+ }
609
+ goto st29;
610
+ tr34:
611
+ #line 212 "parser.rl"
612
+ {
613
+ *result = Qnil;
614
+ }
615
+ goto st29;
616
+ tr37:
617
+ #line 218 "parser.rl"
618
+ {
619
+ *result = Qtrue;
620
+ }
621
+ goto st29;
622
+ st29:
623
+ if ( ++p == pe )
624
+ goto _test_eof29;
625
+ case 29:
626
+ #line 270 "parser.rl"
627
+ { p--; {p++; cs = 29; goto _out;} }
628
+ #line 629 "parser.c"
629
+ switch( (*p) ) {
630
+ case 13: goto st29;
631
+ case 32: goto st29;
632
+ case 47: goto st2;
633
+ }
634
+ if ( 9 <= (*p) && (*p) <= 10 )
635
+ goto st29;
636
+ goto st0;
637
+ st2:
638
+ if ( ++p == pe )
639
+ goto _test_eof2;
640
+ case 2:
641
+ switch( (*p) ) {
642
+ case 42: goto st3;
643
+ case 47: goto st5;
644
+ }
645
+ goto st0;
646
+ st3:
647
+ if ( ++p == pe )
648
+ goto _test_eof3;
649
+ case 3:
650
+ if ( (*p) == 42 )
651
+ goto st4;
652
+ goto st3;
653
+ st4:
654
+ if ( ++p == pe )
655
+ goto _test_eof4;
656
+ case 4:
657
+ switch( (*p) ) {
658
+ case 42: goto st4;
659
+ case 47: goto st29;
660
+ }
661
+ goto st3;
662
+ st5:
663
+ if ( ++p == pe )
664
+ goto _test_eof5;
665
+ case 5:
666
+ if ( (*p) == 10 )
667
+ goto st29;
668
+ goto st5;
669
+ st6:
670
+ if ( ++p == pe )
671
+ goto _test_eof6;
672
+ case 6:
673
+ switch( (*p) ) {
674
+ case 42: goto st7;
675
+ case 47: goto st9;
676
+ }
677
+ goto st0;
678
+ st7:
679
+ if ( ++p == pe )
680
+ goto _test_eof7;
681
+ case 7:
682
+ if ( (*p) == 42 )
683
+ goto st8;
684
+ goto st7;
685
+ st8:
686
+ if ( ++p == pe )
687
+ goto _test_eof8;
688
+ case 8:
689
+ switch( (*p) ) {
690
+ case 42: goto st8;
691
+ case 47: goto st1;
692
+ }
693
+ goto st7;
694
+ st9:
695
+ if ( ++p == pe )
696
+ goto _test_eof9;
697
+ case 9:
698
+ if ( (*p) == 10 )
699
+ goto st1;
700
+ goto st9;
701
+ st10:
702
+ if ( ++p == pe )
703
+ goto _test_eof10;
704
+ case 10:
705
+ if ( (*p) == 110 )
706
+ goto st11;
707
+ goto st0;
708
+ st11:
709
+ if ( ++p == pe )
710
+ goto _test_eof11;
711
+ case 11:
712
+ if ( (*p) == 102 )
713
+ goto st12;
714
+ goto st0;
715
+ st12:
716
+ if ( ++p == pe )
717
+ goto _test_eof12;
718
+ case 12:
719
+ if ( (*p) == 105 )
720
+ goto st13;
721
+ goto st0;
722
+ st13:
723
+ if ( ++p == pe )
724
+ goto _test_eof13;
725
+ case 13:
726
+ if ( (*p) == 110 )
727
+ goto st14;
728
+ goto st0;
729
+ st14:
730
+ if ( ++p == pe )
731
+ goto _test_eof14;
732
+ case 14:
733
+ if ( (*p) == 105 )
734
+ goto st15;
735
+ goto st0;
736
+ st15:
737
+ if ( ++p == pe )
738
+ goto _test_eof15;
739
+ case 15:
740
+ if ( (*p) == 116 )
741
+ goto st16;
742
+ goto st0;
743
+ st16:
744
+ if ( ++p == pe )
745
+ goto _test_eof16;
746
+ case 16:
747
+ if ( (*p) == 121 )
748
+ goto tr25;
749
+ goto st0;
750
+ st17:
751
+ if ( ++p == pe )
752
+ goto _test_eof17;
753
+ case 17:
754
+ if ( (*p) == 97 )
755
+ goto st18;
756
+ goto st0;
757
+ st18:
758
+ if ( ++p == pe )
759
+ goto _test_eof18;
760
+ case 18:
761
+ if ( (*p) == 78 )
762
+ goto tr27;
763
+ goto st0;
764
+ st19:
765
+ if ( ++p == pe )
766
+ goto _test_eof19;
767
+ case 19:
768
+ if ( (*p) == 97 )
769
+ goto st20;
770
+ goto st0;
771
+ st20:
772
+ if ( ++p == pe )
773
+ goto _test_eof20;
774
+ case 20:
775
+ if ( (*p) == 108 )
776
+ goto st21;
777
+ goto st0;
778
+ st21:
779
+ if ( ++p == pe )
780
+ goto _test_eof21;
781
+ case 21:
782
+ if ( (*p) == 115 )
783
+ goto st22;
784
+ goto st0;
785
+ st22:
786
+ if ( ++p == pe )
787
+ goto _test_eof22;
788
+ case 22:
789
+ if ( (*p) == 101 )
790
+ goto tr31;
791
+ goto st0;
792
+ st23:
793
+ if ( ++p == pe )
794
+ goto _test_eof23;
795
+ case 23:
796
+ if ( (*p) == 117 )
797
+ goto st24;
798
+ goto st0;
799
+ st24:
800
+ if ( ++p == pe )
801
+ goto _test_eof24;
802
+ case 24:
803
+ if ( (*p) == 108 )
804
+ goto st25;
805
+ goto st0;
806
+ st25:
807
+ if ( ++p == pe )
808
+ goto _test_eof25;
809
+ case 25:
810
+ if ( (*p) == 108 )
811
+ goto tr34;
812
+ goto st0;
813
+ st26:
814
+ if ( ++p == pe )
815
+ goto _test_eof26;
816
+ case 26:
817
+ if ( (*p) == 114 )
818
+ goto st27;
819
+ goto st0;
820
+ st27:
821
+ if ( ++p == pe )
822
+ goto _test_eof27;
823
+ case 27:
824
+ if ( (*p) == 117 )
825
+ goto st28;
826
+ goto st0;
827
+ st28:
828
+ if ( ++p == pe )
829
+ goto _test_eof28;
830
+ case 28:
831
+ if ( (*p) == 101 )
832
+ goto tr37;
833
+ goto st0;
834
+ }
835
+ _test_eof1: cs = 1; goto _test_eof;
836
+ _test_eof29: cs = 29; goto _test_eof;
837
+ _test_eof2: cs = 2; goto _test_eof;
838
+ _test_eof3: cs = 3; goto _test_eof;
839
+ _test_eof4: cs = 4; goto _test_eof;
840
+ _test_eof5: cs = 5; goto _test_eof;
841
+ _test_eof6: cs = 6; goto _test_eof;
842
+ _test_eof7: cs = 7; goto _test_eof;
843
+ _test_eof8: cs = 8; goto _test_eof;
844
+ _test_eof9: cs = 9; goto _test_eof;
845
+ _test_eof10: cs = 10; goto _test_eof;
846
+ _test_eof11: cs = 11; goto _test_eof;
847
+ _test_eof12: cs = 12; goto _test_eof;
848
+ _test_eof13: cs = 13; goto _test_eof;
849
+ _test_eof14: cs = 14; goto _test_eof;
850
+ _test_eof15: cs = 15; goto _test_eof;
851
+ _test_eof16: cs = 16; goto _test_eof;
852
+ _test_eof17: cs = 17; goto _test_eof;
853
+ _test_eof18: cs = 18; goto _test_eof;
854
+ _test_eof19: cs = 19; goto _test_eof;
855
+ _test_eof20: cs = 20; goto _test_eof;
856
+ _test_eof21: cs = 21; goto _test_eof;
857
+ _test_eof22: cs = 22; goto _test_eof;
858
+ _test_eof23: cs = 23; goto _test_eof;
859
+ _test_eof24: cs = 24; goto _test_eof;
860
+ _test_eof25: cs = 25; goto _test_eof;
861
+ _test_eof26: cs = 26; goto _test_eof;
862
+ _test_eof27: cs = 27; goto _test_eof;
863
+ _test_eof28: cs = 28; goto _test_eof;
864
+
865
+ _test_eof: {}
866
+ _out: {}
867
+ }
868
+
869
+ #line 291 "parser.rl"
870
+
871
+ if (cs >= JSON_value_first_final) {
872
+ return p;
873
+ } else {
874
+ return NULL;
875
+ }
876
+ }
877
+
878
+
879
+ #line 880 "parser.c"
880
+ enum {JSON_integer_start = 1};
881
+ enum {JSON_integer_first_final = 3};
882
+ enum {JSON_integer_error = 0};
883
+
884
+ enum {JSON_integer_en_main = 1};
885
+
886
+
887
+ #line 307 "parser.rl"
888
+
889
+
890
+ static char *JSON_parse_integer(JSON_Parser *json, char *p, char *pe, VALUE *result)
891
+ {
892
+ int cs = EVIL;
893
+
894
+
895
+ #line 896 "parser.c"
896
+ {
897
+ cs = JSON_integer_start;
898
+ }
899
+
900
+ #line 314 "parser.rl"
901
+ json->memo = p;
902
+
903
+ #line 904 "parser.c"
904
+ {
905
+ if ( p == pe )
906
+ goto _test_eof;
907
+ switch ( cs )
908
+ {
909
+ case 1:
910
+ switch( (*p) ) {
911
+ case 45: goto st2;
912
+ case 48: goto st3;
913
+ }
914
+ if ( 49 <= (*p) && (*p) <= 57 )
915
+ goto st5;
916
+ goto st0;
917
+ st0:
918
+ cs = 0;
919
+ goto _out;
920
+ st2:
921
+ if ( ++p == pe )
922
+ goto _test_eof2;
923
+ case 2:
924
+ if ( (*p) == 48 )
925
+ goto st3;
926
+ if ( 49 <= (*p) && (*p) <= 57 )
927
+ goto st5;
928
+ goto st0;
929
+ st3:
930
+ if ( ++p == pe )
931
+ goto _test_eof3;
932
+ case 3:
933
+ if ( 48 <= (*p) && (*p) <= 57 )
934
+ goto st0;
935
+ goto tr4;
936
+ tr4:
937
+ #line 304 "parser.rl"
938
+ { p--; {p++; cs = 4; goto _out;} }
939
+ goto st4;
940
+ st4:
941
+ if ( ++p == pe )
942
+ goto _test_eof4;
943
+ case 4:
944
+ #line 945 "parser.c"
945
+ goto st0;
946
+ st5:
947
+ if ( ++p == pe )
948
+ goto _test_eof5;
949
+ case 5:
950
+ if ( 48 <= (*p) && (*p) <= 57 )
951
+ goto st5;
952
+ goto tr4;
953
+ }
954
+ _test_eof2: cs = 2; goto _test_eof;
955
+ _test_eof3: cs = 3; goto _test_eof;
956
+ _test_eof4: cs = 4; goto _test_eof;
957
+ _test_eof5: cs = 5; goto _test_eof;
958
+
959
+ _test_eof: {}
960
+ _out: {}
961
+ }
962
+
963
+ #line 316 "parser.rl"
964
+
965
+ if (cs >= JSON_integer_first_final) {
966
+ long len = p - json->memo;
967
+ fbuffer_clear(json->fbuffer);
968
+ fbuffer_append(json->fbuffer, json->memo, len);
969
+ fbuffer_append_char(json->fbuffer, '\0');
970
+ *result = rb_cstr2inum(FBUFFER_PTR(json->fbuffer), 10);
971
+ return p + 1;
972
+ } else {
973
+ return NULL;
974
+ }
975
+ }
976
+
977
+
978
+ #line 979 "parser.c"
979
+ enum {JSON_float_start = 1};
980
+ enum {JSON_float_first_final = 8};
981
+ enum {JSON_float_error = 0};
982
+
983
+ enum {JSON_float_en_main = 1};
984
+
985
+
986
+ #line 341 "parser.rl"
987
+
988
+
989
+ static int is_bigdecimal_class(VALUE obj)
990
+ {
991
+ if (cBigDecimal == Qundef) {
992
+ if (rb_const_defined(rb_cObject, i_BigDecimal)) {
993
+ cBigDecimal = rb_const_get_at(rb_cObject, i_BigDecimal);
994
+ }
995
+ else {
996
+ return 0;
997
+ }
998
+ }
999
+ return obj == cBigDecimal;
1000
+ }
1001
+
1002
+ static char *JSON_parse_float(JSON_Parser *json, char *p, char *pe, VALUE *result)
1003
+ {
1004
+ int cs = EVIL;
1005
+
1006
+
1007
+ #line 1008 "parser.c"
1008
+ {
1009
+ cs = JSON_float_start;
1010
+ }
1011
+
1012
+ #line 361 "parser.rl"
1013
+ json->memo = p;
1014
+
1015
+ #line 1016 "parser.c"
1016
+ {
1017
+ if ( p == pe )
1018
+ goto _test_eof;
1019
+ switch ( cs )
1020
+ {
1021
+ case 1:
1022
+ switch( (*p) ) {
1023
+ case 45: goto st2;
1024
+ case 48: goto st3;
1025
+ }
1026
+ if ( 49 <= (*p) && (*p) <= 57 )
1027
+ goto st7;
1028
+ goto st0;
1029
+ st0:
1030
+ cs = 0;
1031
+ goto _out;
1032
+ st2:
1033
+ if ( ++p == pe )
1034
+ goto _test_eof2;
1035
+ case 2:
1036
+ if ( (*p) == 48 )
1037
+ goto st3;
1038
+ if ( 49 <= (*p) && (*p) <= 57 )
1039
+ goto st7;
1040
+ goto st0;
1041
+ st3:
1042
+ if ( ++p == pe )
1043
+ goto _test_eof3;
1044
+ case 3:
1045
+ switch( (*p) ) {
1046
+ case 46: goto st4;
1047
+ case 69: goto st5;
1048
+ case 101: goto st5;
1049
+ }
1050
+ goto st0;
1051
+ st4:
1052
+ if ( ++p == pe )
1053
+ goto _test_eof4;
1054
+ case 4:
1055
+ if ( 48 <= (*p) && (*p) <= 57 )
1056
+ goto st8;
1057
+ goto st0;
1058
+ st8:
1059
+ if ( ++p == pe )
1060
+ goto _test_eof8;
1061
+ case 8:
1062
+ switch( (*p) ) {
1063
+ case 69: goto st5;
1064
+ case 101: goto st5;
1065
+ }
1066
+ if ( (*p) > 46 ) {
1067
+ if ( 48 <= (*p) && (*p) <= 57 )
1068
+ goto st8;
1069
+ } else if ( (*p) >= 45 )
1070
+ goto st0;
1071
+ goto tr9;
1072
+ tr9:
1073
+ #line 335 "parser.rl"
1074
+ { p--; {p++; cs = 9; goto _out;} }
1075
+ goto st9;
1076
+ st9:
1077
+ if ( ++p == pe )
1078
+ goto _test_eof9;
1079
+ case 9:
1080
+ #line 1081 "parser.c"
1081
+ goto st0;
1082
+ st5:
1083
+ if ( ++p == pe )
1084
+ goto _test_eof5;
1085
+ case 5:
1086
+ switch( (*p) ) {
1087
+ case 43: goto st6;
1088
+ case 45: goto st6;
1089
+ }
1090
+ if ( 48 <= (*p) && (*p) <= 57 )
1091
+ goto st10;
1092
+ goto st0;
1093
+ st6:
1094
+ if ( ++p == pe )
1095
+ goto _test_eof6;
1096
+ case 6:
1097
+ if ( 48 <= (*p) && (*p) <= 57 )
1098
+ goto st10;
1099
+ goto st0;
1100
+ st10:
1101
+ if ( ++p == pe )
1102
+ goto _test_eof10;
1103
+ case 10:
1104
+ switch( (*p) ) {
1105
+ case 69: goto st0;
1106
+ case 101: goto st0;
1107
+ }
1108
+ if ( (*p) > 46 ) {
1109
+ if ( 48 <= (*p) && (*p) <= 57 )
1110
+ goto st10;
1111
+ } else if ( (*p) >= 45 )
1112
+ goto st0;
1113
+ goto tr9;
1114
+ st7:
1115
+ if ( ++p == pe )
1116
+ goto _test_eof7;
1117
+ case 7:
1118
+ switch( (*p) ) {
1119
+ case 46: goto st4;
1120
+ case 69: goto st5;
1121
+ case 101: goto st5;
1122
+ }
1123
+ if ( 48 <= (*p) && (*p) <= 57 )
1124
+ goto st7;
1125
+ goto st0;
1126
+ }
1127
+ _test_eof2: cs = 2; goto _test_eof;
1128
+ _test_eof3: cs = 3; goto _test_eof;
1129
+ _test_eof4: cs = 4; goto _test_eof;
1130
+ _test_eof8: cs = 8; goto _test_eof;
1131
+ _test_eof9: cs = 9; goto _test_eof;
1132
+ _test_eof5: cs = 5; goto _test_eof;
1133
+ _test_eof6: cs = 6; goto _test_eof;
1134
+ _test_eof10: cs = 10; goto _test_eof;
1135
+ _test_eof7: cs = 7; goto _test_eof;
1136
+
1137
+ _test_eof: {}
1138
+ _out: {}
1139
+ }
1140
+
1141
+ #line 363 "parser.rl"
1142
+
1143
+ if (cs >= JSON_float_first_final) {
1144
+ long len = p - json->memo;
1145
+ fbuffer_clear(json->fbuffer);
1146
+ fbuffer_append(json->fbuffer, json->memo, len);
1147
+ fbuffer_append_char(json->fbuffer, '\0');
1148
+ if (NIL_P(json->decimal_class)) {
1149
+ *result = rb_float_new(rb_cstr_to_dbl(FBUFFER_PTR(json->fbuffer), 1));
1150
+ } else {
1151
+ VALUE text;
1152
+ text = rb_str_new2(FBUFFER_PTR(json->fbuffer));
1153
+ if (is_bigdecimal_class(json->decimal_class)) {
1154
+ *result = rb_funcall(Qnil, i_BigDecimal, 1, text);
1155
+ } else {
1156
+ *result = rb_funcall(json->decimal_class, i_new, 1, text);
1157
+ }
1158
+ }
1159
+ return p + 1;
1160
+ } else {
1161
+ return NULL;
1162
+ }
1163
+ }
1164
+
1165
+
1166
+
1167
+ #line 1168 "parser.c"
1168
+ enum {JSON_array_start = 1};
1169
+ enum {JSON_array_first_final = 17};
1170
+ enum {JSON_array_error = 0};
1171
+
1172
+ enum {JSON_array_en_main = 1};
1173
+
1174
+
1175
+ #line 416 "parser.rl"
1176
+
1177
+
1178
+ static char *JSON_parse_array(JSON_Parser *json, char *p, char *pe, VALUE *result, int current_nesting)
1179
+ {
1180
+ int cs = EVIL;
1181
+ VALUE array_class = json->array_class;
1182
+
1183
+ if (json->max_nesting && current_nesting > json->max_nesting) {
1184
+ rb_raise(eNestingError, "nesting of %d is too deep", current_nesting);
1185
+ }
1186
+ *result = NIL_P(array_class) ? rb_ary_new() : rb_class_new_instance(0, 0, array_class);
1187
+
1188
+
1189
+ #line 1190 "parser.c"
1190
+ {
1191
+ cs = JSON_array_start;
1192
+ }
1193
+
1194
+ #line 429 "parser.rl"
1195
+
1196
+ #line 1197 "parser.c"
1197
+ {
1198
+ if ( p == pe )
1199
+ goto _test_eof;
1200
+ switch ( cs )
1201
+ {
1202
+ case 1:
1203
+ if ( (*p) == 91 )
1204
+ goto st2;
1205
+ goto st0;
1206
+ st0:
1207
+ cs = 0;
1208
+ goto _out;
1209
+ st2:
1210
+ if ( ++p == pe )
1211
+ goto _test_eof2;
1212
+ case 2:
1213
+ switch( (*p) ) {
1214
+ case 13: goto st2;
1215
+ case 32: goto st2;
1216
+ case 34: goto tr2;
1217
+ case 45: goto tr2;
1218
+ case 47: goto st13;
1219
+ case 73: goto tr2;
1220
+ case 78: goto tr2;
1221
+ case 91: goto tr2;
1222
+ case 93: goto tr4;
1223
+ case 102: goto tr2;
1224
+ case 110: goto tr2;
1225
+ case 116: goto tr2;
1226
+ case 123: goto tr2;
1227
+ }
1228
+ if ( (*p) > 10 ) {
1229
+ if ( 48 <= (*p) && (*p) <= 57 )
1230
+ goto tr2;
1231
+ } else if ( (*p) >= 9 )
1232
+ goto st2;
1233
+ goto st0;
1234
+ tr2:
1235
+ #line 393 "parser.rl"
1236
+ {
1237
+ VALUE v = Qnil;
1238
+ char *np = JSON_parse_value(json, p, pe, &v, current_nesting);
1239
+ if (np == NULL) {
1240
+ p--; {p++; cs = 3; goto _out;}
1241
+ } else {
1242
+ if (NIL_P(json->array_class)) {
1243
+ rb_ary_push(*result, v);
1244
+ } else {
1245
+ rb_funcall(*result, i_leftshift, 1, v);
1246
+ }
1247
+ {p = (( np))-1;}
1248
+ }
1249
+ }
1250
+ goto st3;
1251
+ st3:
1252
+ if ( ++p == pe )
1253
+ goto _test_eof3;
1254
+ case 3:
1255
+ #line 1256 "parser.c"
1256
+ switch( (*p) ) {
1257
+ case 13: goto st3;
1258
+ case 32: goto st3;
1259
+ case 44: goto st4;
1260
+ case 47: goto st9;
1261
+ case 93: goto tr4;
1262
+ }
1263
+ if ( 9 <= (*p) && (*p) <= 10 )
1264
+ goto st3;
1265
+ goto st0;
1266
+ st4:
1267
+ if ( ++p == pe )
1268
+ goto _test_eof4;
1269
+ case 4:
1270
+ switch( (*p) ) {
1271
+ case 13: goto st4;
1272
+ case 32: goto st4;
1273
+ case 34: goto tr2;
1274
+ case 45: goto tr2;
1275
+ case 47: goto st5;
1276
+ case 73: goto tr2;
1277
+ case 78: goto tr2;
1278
+ case 91: goto tr2;
1279
+ case 102: goto tr2;
1280
+ case 110: goto tr2;
1281
+ case 116: goto tr2;
1282
+ case 123: goto tr2;
1283
+ }
1284
+ if ( (*p) > 10 ) {
1285
+ if ( 48 <= (*p) && (*p) <= 57 )
1286
+ goto tr2;
1287
+ } else if ( (*p) >= 9 )
1288
+ goto st4;
1289
+ goto st0;
1290
+ st5:
1291
+ if ( ++p == pe )
1292
+ goto _test_eof5;
1293
+ case 5:
1294
+ switch( (*p) ) {
1295
+ case 42: goto st6;
1296
+ case 47: goto st8;
1297
+ }
1298
+ goto st0;
1299
+ st6:
1300
+ if ( ++p == pe )
1301
+ goto _test_eof6;
1302
+ case 6:
1303
+ if ( (*p) == 42 )
1304
+ goto st7;
1305
+ goto st6;
1306
+ st7:
1307
+ if ( ++p == pe )
1308
+ goto _test_eof7;
1309
+ case 7:
1310
+ switch( (*p) ) {
1311
+ case 42: goto st7;
1312
+ case 47: goto st4;
1313
+ }
1314
+ goto st6;
1315
+ st8:
1316
+ if ( ++p == pe )
1317
+ goto _test_eof8;
1318
+ case 8:
1319
+ if ( (*p) == 10 )
1320
+ goto st4;
1321
+ goto st8;
1322
+ st9:
1323
+ if ( ++p == pe )
1324
+ goto _test_eof9;
1325
+ case 9:
1326
+ switch( (*p) ) {
1327
+ case 42: goto st10;
1328
+ case 47: goto st12;
1329
+ }
1330
+ goto st0;
1331
+ st10:
1332
+ if ( ++p == pe )
1333
+ goto _test_eof10;
1334
+ case 10:
1335
+ if ( (*p) == 42 )
1336
+ goto st11;
1337
+ goto st10;
1338
+ st11:
1339
+ if ( ++p == pe )
1340
+ goto _test_eof11;
1341
+ case 11:
1342
+ switch( (*p) ) {
1343
+ case 42: goto st11;
1344
+ case 47: goto st3;
1345
+ }
1346
+ goto st10;
1347
+ st12:
1348
+ if ( ++p == pe )
1349
+ goto _test_eof12;
1350
+ case 12:
1351
+ if ( (*p) == 10 )
1352
+ goto st3;
1353
+ goto st12;
1354
+ tr4:
1355
+ #line 408 "parser.rl"
1356
+ { p--; {p++; cs = 17; goto _out;} }
1357
+ goto st17;
1358
+ st17:
1359
+ if ( ++p == pe )
1360
+ goto _test_eof17;
1361
+ case 17:
1362
+ #line 1363 "parser.c"
1363
+ goto st0;
1364
+ st13:
1365
+ if ( ++p == pe )
1366
+ goto _test_eof13;
1367
+ case 13:
1368
+ switch( (*p) ) {
1369
+ case 42: goto st14;
1370
+ case 47: goto st16;
1371
+ }
1372
+ goto st0;
1373
+ st14:
1374
+ if ( ++p == pe )
1375
+ goto _test_eof14;
1376
+ case 14:
1377
+ if ( (*p) == 42 )
1378
+ goto st15;
1379
+ goto st14;
1380
+ st15:
1381
+ if ( ++p == pe )
1382
+ goto _test_eof15;
1383
+ case 15:
1384
+ switch( (*p) ) {
1385
+ case 42: goto st15;
1386
+ case 47: goto st2;
1387
+ }
1388
+ goto st14;
1389
+ st16:
1390
+ if ( ++p == pe )
1391
+ goto _test_eof16;
1392
+ case 16:
1393
+ if ( (*p) == 10 )
1394
+ goto st2;
1395
+ goto st16;
1396
+ }
1397
+ _test_eof2: cs = 2; goto _test_eof;
1398
+ _test_eof3: cs = 3; goto _test_eof;
1399
+ _test_eof4: cs = 4; goto _test_eof;
1400
+ _test_eof5: cs = 5; goto _test_eof;
1401
+ _test_eof6: cs = 6; goto _test_eof;
1402
+ _test_eof7: cs = 7; goto _test_eof;
1403
+ _test_eof8: cs = 8; goto _test_eof;
1404
+ _test_eof9: cs = 9; goto _test_eof;
1405
+ _test_eof10: cs = 10; goto _test_eof;
1406
+ _test_eof11: cs = 11; goto _test_eof;
1407
+ _test_eof12: cs = 12; goto _test_eof;
1408
+ _test_eof17: cs = 17; goto _test_eof;
1409
+ _test_eof13: cs = 13; goto _test_eof;
1410
+ _test_eof14: cs = 14; goto _test_eof;
1411
+ _test_eof15: cs = 15; goto _test_eof;
1412
+ _test_eof16: cs = 16; goto _test_eof;
1413
+
1414
+ _test_eof: {}
1415
+ _out: {}
1416
+ }
1417
+
1418
+ #line 430 "parser.rl"
1419
+
1420
+ if(cs >= JSON_array_first_final) {
1421
+ return p + 1;
1422
+ } else {
1423
+ rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
1424
+ return NULL;
1425
+ }
1426
+ }
1427
+
1428
+ static VALUE json_string_unescape(VALUE result, char *string, char *stringEnd)
1429
+ {
1430
+ char *p = string, *pe = string, *unescape;
1431
+ int unescape_len;
1432
+ char buf[4];
1433
+
1434
+ while (pe < stringEnd) {
1435
+ if (*pe == '\\') {
1436
+ unescape = (char *) "?";
1437
+ unescape_len = 1;
1438
+ if (pe > p) rb_str_buf_cat(result, p, pe - p);
1439
+ switch (*++pe) {
1440
+ case 'n':
1441
+ unescape = (char *) "\n";
1442
+ break;
1443
+ case 'r':
1444
+ unescape = (char *) "\r";
1445
+ break;
1446
+ case 't':
1447
+ unescape = (char *) "\t";
1448
+ break;
1449
+ case '"':
1450
+ unescape = (char *) "\"";
1451
+ break;
1452
+ case '\\':
1453
+ unescape = (char *) "\\";
1454
+ break;
1455
+ case 'b':
1456
+ unescape = (char *) "\b";
1457
+ break;
1458
+ case 'f':
1459
+ unescape = (char *) "\f";
1460
+ break;
1461
+ case 'u':
1462
+ if (pe > stringEnd - 4) {
1463
+ rb_enc_raise(
1464
+ EXC_ENCODING eParserError,
1465
+ "%u: incomplete unicode character escape sequence at '%s'", __LINE__, p
1466
+ );
1467
+ } else {
1468
+ UTF32 ch = unescape_unicode((unsigned char *) ++pe);
1469
+ pe += 3;
1470
+ if (UNI_SUR_HIGH_START == (ch & 0xFC00)) {
1471
+ pe++;
1472
+ if (pe > stringEnd - 6) {
1473
+ rb_enc_raise(
1474
+ EXC_ENCODING eParserError,
1475
+ "%u: incomplete surrogate pair at '%s'", __LINE__, p
1476
+ );
1477
+ }
1478
+ if (pe[0] == '\\' && pe[1] == 'u') {
1479
+ UTF32 sur = unescape_unicode((unsigned char *) pe + 2);
1480
+ ch = (((ch & 0x3F) << 10) | ((((ch >> 6) & 0xF) + 1) << 16)
1481
+ | (sur & 0x3FF));
1482
+ pe += 5;
1483
+ } else {
1484
+ unescape = (char *) "?";
1485
+ break;
1486
+ }
1487
+ }
1488
+ unescape_len = convert_UTF32_to_UTF8(buf, ch);
1489
+ unescape = buf;
1490
+ }
1491
+ break;
1492
+ default:
1493
+ p = pe;
1494
+ continue;
1495
+ }
1496
+ rb_str_buf_cat(result, unescape, unescape_len);
1497
+ p = ++pe;
1498
+ } else {
1499
+ pe++;
1500
+ }
1501
+ }
1502
+ rb_str_buf_cat(result, p, pe - p);
1503
+ return result;
1504
+ }
1505
+
1506
+
1507
+ #line 1508 "parser.c"
1508
+ enum {JSON_string_start = 1};
1509
+ enum {JSON_string_first_final = 8};
1510
+ enum {JSON_string_error = 0};
1511
+
1512
+ enum {JSON_string_en_main = 1};
1513
+
1514
+
1515
+ #line 537 "parser.rl"
1516
+
1517
+
1518
+ static int
1519
+ match_i(VALUE regexp, VALUE klass, VALUE memo)
1520
+ {
1521
+ if (regexp == Qundef) return ST_STOP;
1522
+ if (RTEST(rb_funcall(klass, i_json_creatable_p, 0)) &&
1523
+ RTEST(rb_funcall(regexp, i_match, 1, rb_ary_entry(memo, 0)))) {
1524
+ rb_ary_push(memo, klass);
1525
+ return ST_STOP;
1526
+ }
1527
+ return ST_CONTINUE;
1528
+ }
1529
+
1530
+ static char *JSON_parse_string(JSON_Parser *json, char *p, char *pe, VALUE *result)
1531
+ {
1532
+ int cs = EVIL;
1533
+ VALUE match_string;
1534
+
1535
+ *result = rb_str_buf_new(0);
1536
+
1537
+ #line 1538 "parser.c"
1538
+ {
1539
+ cs = JSON_string_start;
1540
+ }
1541
+
1542
+ #line 558 "parser.rl"
1543
+ json->memo = p;
1544
+
1545
+ #line 1546 "parser.c"
1546
+ {
1547
+ if ( p == pe )
1548
+ goto _test_eof;
1549
+ switch ( cs )
1550
+ {
1551
+ case 1:
1552
+ if ( (*p) == 34 )
1553
+ goto st2;
1554
+ goto st0;
1555
+ st0:
1556
+ cs = 0;
1557
+ goto _out;
1558
+ st2:
1559
+ if ( ++p == pe )
1560
+ goto _test_eof2;
1561
+ case 2:
1562
+ switch( (*p) ) {
1563
+ case 34: goto tr2;
1564
+ case 92: goto st3;
1565
+ }
1566
+ if ( 0 <= (*p) && (*p) <= 31 )
1567
+ goto st0;
1568
+ goto st2;
1569
+ tr2:
1570
+ #line 523 "parser.rl"
1571
+ {
1572
+ *result = json_string_unescape(*result, json->memo + 1, p);
1573
+ if (NIL_P(*result)) {
1574
+ p--;
1575
+ {p++; cs = 8; goto _out;}
1576
+ } else {
1577
+ FORCE_UTF8(*result);
1578
+ {p = (( p + 1))-1;}
1579
+ }
1580
+ }
1581
+ #line 534 "parser.rl"
1582
+ { p--; {p++; cs = 8; goto _out;} }
1583
+ goto st8;
1584
+ st8:
1585
+ if ( ++p == pe )
1586
+ goto _test_eof8;
1587
+ case 8:
1588
+ #line 1589 "parser.c"
1589
+ goto st0;
1590
+ st3:
1591
+ if ( ++p == pe )
1592
+ goto _test_eof3;
1593
+ case 3:
1594
+ if ( (*p) == 117 )
1595
+ goto st4;
1596
+ if ( 0 <= (*p) && (*p) <= 31 )
1597
+ goto st0;
1598
+ goto st2;
1599
+ st4:
1600
+ if ( ++p == pe )
1601
+ goto _test_eof4;
1602
+ case 4:
1603
+ if ( (*p) < 65 ) {
1604
+ if ( 48 <= (*p) && (*p) <= 57 )
1605
+ goto st5;
1606
+ } else if ( (*p) > 70 ) {
1607
+ if ( 97 <= (*p) && (*p) <= 102 )
1608
+ goto st5;
1609
+ } else
1610
+ goto st5;
1611
+ goto st0;
1612
+ st5:
1613
+ if ( ++p == pe )
1614
+ goto _test_eof5;
1615
+ case 5:
1616
+ if ( (*p) < 65 ) {
1617
+ if ( 48 <= (*p) && (*p) <= 57 )
1618
+ goto st6;
1619
+ } else if ( (*p) > 70 ) {
1620
+ if ( 97 <= (*p) && (*p) <= 102 )
1621
+ goto st6;
1622
+ } else
1623
+ goto st6;
1624
+ goto st0;
1625
+ st6:
1626
+ if ( ++p == pe )
1627
+ goto _test_eof6;
1628
+ case 6:
1629
+ if ( (*p) < 65 ) {
1630
+ if ( 48 <= (*p) && (*p) <= 57 )
1631
+ goto st7;
1632
+ } else if ( (*p) > 70 ) {
1633
+ if ( 97 <= (*p) && (*p) <= 102 )
1634
+ goto st7;
1635
+ } else
1636
+ goto st7;
1637
+ goto st0;
1638
+ st7:
1639
+ if ( ++p == pe )
1640
+ goto _test_eof7;
1641
+ case 7:
1642
+ if ( (*p) < 65 ) {
1643
+ if ( 48 <= (*p) && (*p) <= 57 )
1644
+ goto st2;
1645
+ } else if ( (*p) > 70 ) {
1646
+ if ( 97 <= (*p) && (*p) <= 102 )
1647
+ goto st2;
1648
+ } else
1649
+ goto st2;
1650
+ goto st0;
1651
+ }
1652
+ _test_eof2: cs = 2; goto _test_eof;
1653
+ _test_eof8: cs = 8; goto _test_eof;
1654
+ _test_eof3: cs = 3; goto _test_eof;
1655
+ _test_eof4: cs = 4; goto _test_eof;
1656
+ _test_eof5: cs = 5; goto _test_eof;
1657
+ _test_eof6: cs = 6; goto _test_eof;
1658
+ _test_eof7: cs = 7; goto _test_eof;
1659
+
1660
+ _test_eof: {}
1661
+ _out: {}
1662
+ }
1663
+
1664
+ #line 560 "parser.rl"
1665
+
1666
+ if (json->create_additions && RTEST(match_string = json->match_string)) {
1667
+ VALUE klass;
1668
+ VALUE memo = rb_ary_new2(2);
1669
+ rb_ary_push(memo, *result);
1670
+ rb_hash_foreach(match_string, match_i, memo);
1671
+ klass = rb_ary_entry(memo, 1);
1672
+ if (RTEST(klass)) {
1673
+ *result = rb_funcall(klass, i_json_create, 1, *result);
1674
+ }
1675
+ }
1676
+
1677
+ if (json->symbolize_names && json->parsing_name) {
1678
+ *result = rb_str_intern(*result);
1679
+ } else if (RB_TYPE_P(*result, T_STRING)) {
1680
+ rb_str_resize(*result, RSTRING_LEN(*result));
1681
+ }
1682
+ if (cs >= JSON_string_first_final) {
1683
+ return p + 1;
1684
+ } else {
1685
+ return NULL;
1686
+ }
1687
+ }
1688
+
1689
+ /*
1690
+ * Document-class: JSON::Ext::Parser
1691
+ *
1692
+ * This is the JSON parser implemented as a C extension. It can be configured
1693
+ * to be used by setting
1694
+ *
1695
+ * JSON.parser = JSON::Ext::Parser
1696
+ *
1697
+ * with the method parser= in JSON.
1698
+ *
1699
+ */
1700
+
1701
+ static VALUE convert_encoding(VALUE source)
1702
+ {
1703
+ #ifdef HAVE_RUBY_ENCODING_H
1704
+ rb_encoding *enc = rb_enc_get(source);
1705
+ if (enc == rb_ascii8bit_encoding()) {
1706
+ if (OBJ_FROZEN(source)) {
1707
+ source = rb_str_dup(source);
1708
+ }
1709
+ FORCE_UTF8(source);
1710
+ } else {
1711
+ source = rb_str_conv_enc(source, rb_enc_get(source), rb_utf8_encoding());
1712
+ }
1713
+ #endif
1714
+ return source;
1715
+ }
1716
+
1717
+ /*
1718
+ * call-seq: new(source, opts => {})
1719
+ *
1720
+ * Creates a new JSON::Ext::Parser instance for the string _source_.
1721
+ *
1722
+ * Creates a new JSON::Ext::Parser instance for the string _source_.
1723
+ *
1724
+ * It will be configured by the _opts_ hash. _opts_ can have the following
1725
+ * keys:
1726
+ *
1727
+ * _opts_ can have the following keys:
1728
+ * * *max_nesting*: The maximum depth of nesting allowed in the parsed data
1729
+ * structures. Disable depth checking with :max_nesting => false|nil|0, it
1730
+ * defaults to 100.
1731
+ * * *allow_nan*: If set to true, allow NaN, Infinity and -Infinity in
1732
+ * defiance of RFC 4627 to be parsed by the Parser. This option defaults to
1733
+ * false.
1734
+ * * *symbolize_names*: If set to true, returns symbols for the names
1735
+ * (keys) in a JSON object. Otherwise strings are returned, which is
1736
+ * also the default. It's not possible to use this option in
1737
+ * conjunction with the *create_additions* option.
1738
+ * * *create_additions*: If set to false, the Parser doesn't create
1739
+ * additions even if a matching class and create_id was found. This option
1740
+ * defaults to false.
1741
+ * * *object_class*: Defaults to Hash
1742
+ * * *array_class*: Defaults to Array
1743
+ */
1744
+ static VALUE cParser_initialize(int argc, VALUE *argv, VALUE self)
1745
+ {
1746
+ VALUE source, opts;
1747
+ GET_PARSER_INIT;
1748
+
1749
+ if (json->Vsource) {
1750
+ rb_raise(rb_eTypeError, "already initialized instance");
1751
+ }
1752
+ #ifdef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
1753
+ rb_scan_args(argc, argv, "1:", &source, &opts);
1754
+ #else
1755
+ rb_scan_args(argc, argv, "11", &source, &opts);
1756
+ #endif
1757
+ if (!NIL_P(opts)) {
1758
+ #ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
1759
+ opts = rb_convert_type(opts, T_HASH, "Hash", "to_hash");
1760
+ if (NIL_P(opts)) {
1761
+ rb_raise(rb_eArgError, "opts needs to be like a hash");
1762
+ } else {
1763
+ #endif
1764
+ VALUE tmp = ID2SYM(i_max_nesting);
1765
+ if (option_given_p(opts, tmp)) {
1766
+ VALUE max_nesting = rb_hash_aref(opts, tmp);
1767
+ if (RTEST(max_nesting)) {
1768
+ Check_Type(max_nesting, T_FIXNUM);
1769
+ json->max_nesting = FIX2INT(max_nesting);
1770
+ } else {
1771
+ json->max_nesting = 0;
1772
+ }
1773
+ } else {
1774
+ json->max_nesting = 100;
1775
+ }
1776
+ tmp = ID2SYM(i_allow_nan);
1777
+ if (option_given_p(opts, tmp)) {
1778
+ json->allow_nan = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
1779
+ } else {
1780
+ json->allow_nan = 0;
1781
+ }
1782
+ tmp = ID2SYM(i_symbolize_names);
1783
+ if (option_given_p(opts, tmp)) {
1784
+ json->symbolize_names = RTEST(rb_hash_aref(opts, tmp)) ? 1 : 0;
1785
+ } else {
1786
+ json->symbolize_names = 0;
1787
+ }
1788
+ tmp = ID2SYM(i_create_additions);
1789
+ if (option_given_p(opts, tmp)) {
1790
+ json->create_additions = RTEST(rb_hash_aref(opts, tmp));
1791
+ } else {
1792
+ json->create_additions = 0;
1793
+ }
1794
+ if (json->symbolize_names && json->create_additions) {
1795
+ rb_raise(rb_eArgError,
1796
+ "options :symbolize_names and :create_additions cannot be "
1797
+ " used in conjunction");
1798
+ }
1799
+ tmp = ID2SYM(i_create_id);
1800
+ if (option_given_p(opts, tmp)) {
1801
+ json->create_id = rb_hash_aref(opts, tmp);
1802
+ } else {
1803
+ json->create_id = rb_funcall(mJSON, i_create_id, 0);
1804
+ }
1805
+ tmp = ID2SYM(i_object_class);
1806
+ if (option_given_p(opts, tmp)) {
1807
+ json->object_class = rb_hash_aref(opts, tmp);
1808
+ } else {
1809
+ json->object_class = Qnil;
1810
+ }
1811
+ tmp = ID2SYM(i_array_class);
1812
+ if (option_given_p(opts, tmp)) {
1813
+ json->array_class = rb_hash_aref(opts, tmp);
1814
+ } else {
1815
+ json->array_class = Qnil;
1816
+ }
1817
+ tmp = ID2SYM(i_decimal_class);
1818
+ if (option_given_p(opts, tmp)) {
1819
+ json->decimal_class = rb_hash_aref(opts, tmp);
1820
+ } else {
1821
+ json->decimal_class = Qnil;
1822
+ }
1823
+ tmp = ID2SYM(i_match_string);
1824
+ if (option_given_p(opts, tmp)) {
1825
+ VALUE match_string = rb_hash_aref(opts, tmp);
1826
+ json->match_string = RTEST(match_string) ? match_string : Qnil;
1827
+ } else {
1828
+ json->match_string = Qnil;
1829
+ }
1830
+ #ifndef HAVE_RB_SCAN_ARGS_OPTIONAL_HASH
1831
+ }
1832
+ #endif
1833
+ } else {
1834
+ json->max_nesting = 100;
1835
+ json->allow_nan = 0;
1836
+ json->create_additions = 0;
1837
+ json->create_id = rb_funcall(mJSON, i_create_id, 0);
1838
+ json->object_class = Qnil;
1839
+ json->array_class = Qnil;
1840
+ json->decimal_class = Qnil;
1841
+ }
1842
+ source = convert_encoding(StringValue(source));
1843
+ StringValue(source);
1844
+ json->len = RSTRING_LEN(source);
1845
+ json->source = RSTRING_PTR(source);;
1846
+ json->Vsource = source;
1847
+ return self;
1848
+ }
1849
+
1850
+
1851
+ #line 1852 "parser.c"
1852
+ enum {JSON_start = 1};
1853
+ enum {JSON_first_final = 10};
1854
+ enum {JSON_error = 0};
1855
+
1856
+ enum {JSON_en_main = 1};
1857
+
1858
+
1859
+ #line 760 "parser.rl"
1860
+
1861
+
1862
+ /*
1863
+ * call-seq: parse()
1864
+ *
1865
+ * Parses the current JSON text _source_ and returns the complete data
1866
+ * structure as a result.
1867
+ */
1868
+ static VALUE cParser_parse(VALUE self)
1869
+ {
1870
+ char *p, *pe;
1871
+ int cs = EVIL;
1872
+ VALUE result = Qnil;
1873
+ GET_PARSER;
1874
+
1875
+
1876
+ #line 1877 "parser.c"
1877
+ {
1878
+ cs = JSON_start;
1879
+ }
1880
+
1881
+ #line 776 "parser.rl"
1882
+ p = json->source;
1883
+ pe = p + json->len;
1884
+
1885
+ #line 1886 "parser.c"
1886
+ {
1887
+ if ( p == pe )
1888
+ goto _test_eof;
1889
+ switch ( cs )
1890
+ {
1891
+ st1:
1892
+ if ( ++p == pe )
1893
+ goto _test_eof1;
1894
+ case 1:
1895
+ switch( (*p) ) {
1896
+ case 13: goto st1;
1897
+ case 32: goto st1;
1898
+ case 34: goto tr2;
1899
+ case 45: goto tr2;
1900
+ case 47: goto st6;
1901
+ case 73: goto tr2;
1902
+ case 78: goto tr2;
1903
+ case 91: goto tr2;
1904
+ case 102: goto tr2;
1905
+ case 110: goto tr2;
1906
+ case 116: goto tr2;
1907
+ case 123: goto tr2;
1908
+ }
1909
+ if ( (*p) > 10 ) {
1910
+ if ( 48 <= (*p) && (*p) <= 57 )
1911
+ goto tr2;
1912
+ } else if ( (*p) >= 9 )
1913
+ goto st1;
1914
+ goto st0;
1915
+ st0:
1916
+ cs = 0;
1917
+ goto _out;
1918
+ tr2:
1919
+ #line 752 "parser.rl"
1920
+ {
1921
+ char *np = JSON_parse_value(json, p, pe, &result, 0);
1922
+ if (np == NULL) { p--; {p++; cs = 10; goto _out;} } else {p = (( np))-1;}
1923
+ }
1924
+ goto st10;
1925
+ st10:
1926
+ if ( ++p == pe )
1927
+ goto _test_eof10;
1928
+ case 10:
1929
+ #line 1930 "parser.c"
1930
+ switch( (*p) ) {
1931
+ case 13: goto st10;
1932
+ case 32: goto st10;
1933
+ case 47: goto st2;
1934
+ }
1935
+ if ( 9 <= (*p) && (*p) <= 10 )
1936
+ goto st10;
1937
+ goto st0;
1938
+ st2:
1939
+ if ( ++p == pe )
1940
+ goto _test_eof2;
1941
+ case 2:
1942
+ switch( (*p) ) {
1943
+ case 42: goto st3;
1944
+ case 47: goto st5;
1945
+ }
1946
+ goto st0;
1947
+ st3:
1948
+ if ( ++p == pe )
1949
+ goto _test_eof3;
1950
+ case 3:
1951
+ if ( (*p) == 42 )
1952
+ goto st4;
1953
+ goto st3;
1954
+ st4:
1955
+ if ( ++p == pe )
1956
+ goto _test_eof4;
1957
+ case 4:
1958
+ switch( (*p) ) {
1959
+ case 42: goto st4;
1960
+ case 47: goto st10;
1961
+ }
1962
+ goto st3;
1963
+ st5:
1964
+ if ( ++p == pe )
1965
+ goto _test_eof5;
1966
+ case 5:
1967
+ if ( (*p) == 10 )
1968
+ goto st10;
1969
+ goto st5;
1970
+ st6:
1971
+ if ( ++p == pe )
1972
+ goto _test_eof6;
1973
+ case 6:
1974
+ switch( (*p) ) {
1975
+ case 42: goto st7;
1976
+ case 47: goto st9;
1977
+ }
1978
+ goto st0;
1979
+ st7:
1980
+ if ( ++p == pe )
1981
+ goto _test_eof7;
1982
+ case 7:
1983
+ if ( (*p) == 42 )
1984
+ goto st8;
1985
+ goto st7;
1986
+ st8:
1987
+ if ( ++p == pe )
1988
+ goto _test_eof8;
1989
+ case 8:
1990
+ switch( (*p) ) {
1991
+ case 42: goto st8;
1992
+ case 47: goto st1;
1993
+ }
1994
+ goto st7;
1995
+ st9:
1996
+ if ( ++p == pe )
1997
+ goto _test_eof9;
1998
+ case 9:
1999
+ if ( (*p) == 10 )
2000
+ goto st1;
2001
+ goto st9;
2002
+ }
2003
+ _test_eof1: cs = 1; goto _test_eof;
2004
+ _test_eof10: cs = 10; goto _test_eof;
2005
+ _test_eof2: cs = 2; goto _test_eof;
2006
+ _test_eof3: cs = 3; goto _test_eof;
2007
+ _test_eof4: cs = 4; goto _test_eof;
2008
+ _test_eof5: cs = 5; goto _test_eof;
2009
+ _test_eof6: cs = 6; goto _test_eof;
2010
+ _test_eof7: cs = 7; goto _test_eof;
2011
+ _test_eof8: cs = 8; goto _test_eof;
2012
+ _test_eof9: cs = 9; goto _test_eof;
2013
+
2014
+ _test_eof: {}
2015
+ _out: {}
2016
+ }
2017
+
2018
+ #line 779 "parser.rl"
2019
+
2020
+ if (cs >= JSON_first_final && p == pe) {
2021
+ return result;
2022
+ } else {
2023
+ rb_enc_raise(EXC_ENCODING eParserError, "%u: unexpected token at '%s'", __LINE__, p);
2024
+ return Qnil;
2025
+ }
2026
+ }
2027
+
2028
+ static void JSON_mark(void *ptr)
2029
+ {
2030
+ JSON_Parser *json = ptr;
2031
+ rb_gc_mark_maybe(json->Vsource);
2032
+ rb_gc_mark_maybe(json->create_id);
2033
+ rb_gc_mark_maybe(json->object_class);
2034
+ rb_gc_mark_maybe(json->array_class);
2035
+ rb_gc_mark_maybe(json->decimal_class);
2036
+ rb_gc_mark_maybe(json->match_string);
2037
+ }
2038
+
2039
+ static void JSON_free(void *ptr)
2040
+ {
2041
+ JSON_Parser *json = ptr;
2042
+ fbuffer_free(json->fbuffer);
2043
+ ruby_xfree(json);
2044
+ }
2045
+
2046
+ static size_t JSON_memsize(const void *ptr)
2047
+ {
2048
+ const JSON_Parser *json = ptr;
2049
+ return sizeof(*json) + FBUFFER_CAPA(json->fbuffer);
2050
+ }
2051
+
2052
+ #ifdef NEW_TYPEDDATA_WRAPPER
2053
+ static const rb_data_type_t JSON_Parser_type = {
2054
+ "JSON/Parser",
2055
+ {JSON_mark, JSON_free, JSON_memsize,},
2056
+ #ifdef RUBY_TYPED_FREE_IMMEDIATELY
2057
+ 0, 0,
2058
+ RUBY_TYPED_FREE_IMMEDIATELY,
2059
+ #endif
2060
+ };
2061
+ #endif
2062
+
2063
+ static VALUE cJSON_parser_s_allocate(VALUE klass)
2064
+ {
2065
+ JSON_Parser *json;
2066
+ VALUE obj = TypedData_Make_Struct(klass, JSON_Parser, &JSON_Parser_type, json);
2067
+ json->fbuffer = fbuffer_alloc(0);
2068
+ return obj;
2069
+ }
2070
+
2071
+ /*
2072
+ * call-seq: source()
2073
+ *
2074
+ * Returns a copy of the current _source_ string, that was used to construct
2075
+ * this Parser.
2076
+ */
2077
+ static VALUE cParser_source(VALUE self)
2078
+ {
2079
+ GET_PARSER;
2080
+ return rb_str_dup(json->Vsource);
2081
+ }
2082
+
2083
+ void Init_parser(void)
2084
+ {
2085
+ #undef rb_intern
2086
+ rb_require("json/common");
2087
+ mJSON = rb_define_module("JSON");
2088
+ mExt = rb_define_module_under(mJSON, "Ext");
2089
+ cParser = rb_define_class_under(mExt, "Parser", rb_cObject);
2090
+ eParserError = rb_path2class("JSON::ParserError");
2091
+ eNestingError = rb_path2class("JSON::NestingError");
2092
+ rb_gc_register_mark_object(eParserError);
2093
+ rb_gc_register_mark_object(eNestingError);
2094
+ rb_define_alloc_func(cParser, cJSON_parser_s_allocate);
2095
+ rb_define_method(cParser, "initialize", cParser_initialize, -1);
2096
+ rb_define_method(cParser, "parse", cParser_parse, 0);
2097
+ rb_define_method(cParser, "source", cParser_source, 0);
2098
+
2099
+ CNaN = rb_const_get(mJSON, rb_intern("NaN"));
2100
+ rb_gc_register_mark_object(CNaN);
2101
+
2102
+ CInfinity = rb_const_get(mJSON, rb_intern("Infinity"));
2103
+ rb_gc_register_mark_object(CInfinity);
2104
+
2105
+ CMinusInfinity = rb_const_get(mJSON, rb_intern("MinusInfinity"));
2106
+ rb_gc_register_mark_object(CMinusInfinity);
2107
+
2108
+ i_json_creatable_p = rb_intern("json_creatable?");
2109
+ i_json_create = rb_intern("json_create");
2110
+ i_create_id = rb_intern("create_id");
2111
+ i_create_additions = rb_intern("create_additions");
2112
+ i_chr = rb_intern("chr");
2113
+ i_max_nesting = rb_intern("max_nesting");
2114
+ i_allow_nan = rb_intern("allow_nan");
2115
+ i_symbolize_names = rb_intern("symbolize_names");
2116
+ i_object_class = rb_intern("object_class");
2117
+ i_array_class = rb_intern("array_class");
2118
+ i_decimal_class = rb_intern("decimal_class");
2119
+ i_match = rb_intern("match");
2120
+ i_match_string = rb_intern("match_string");
2121
+ i_key_p = rb_intern("key?");
2122
+ i_deep_const_get = rb_intern("deep_const_get");
2123
+ i_aset = rb_intern("[]=");
2124
+ i_aref = rb_intern("[]");
2125
+ i_leftshift = rb_intern("<<");
2126
+ i_new = rb_intern("new");
2127
+ i_BigDecimal = rb_intern("BigDecimal");
2128
+ }
2129
+
2130
+ /*
2131
+ * Local variables:
2132
+ * mode: c
2133
+ * c-file-style: ruby
2134
+ * indent-tabs-mode: nil
2135
+ * End:
2136
+ */