rj_schema 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (323) hide show
  1. checksums.yaml +5 -5
  2. data/Rakefile +4 -0
  3. data/ext/rj_schema/rapidjson/thirdparty/gtest/CMakeLists.txt +16 -0
  4. data/ext/rj_schema/rapidjson/thirdparty/gtest/README.md +141 -0
  5. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CHANGES +126 -0
  6. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CMakeLists.txt +202 -0
  7. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/CONTRIBUTORS +40 -0
  8. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/LICENSE +28 -0
  9. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/Makefile.am +224 -0
  10. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/README.md +333 -0
  11. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/configure.ac +146 -0
  12. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CheatSheet.md +562 -0
  13. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/CookBook.md +3675 -0
  14. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DesignDoc.md +280 -0
  15. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/DevGuide.md +132 -0
  16. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/Documentation.md +12 -0
  17. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/ForDummies.md +439 -0
  18. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/FrequentlyAskedQuestions.md +628 -0
  19. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/KnownIssues.md +19 -0
  20. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CheatSheet.md +525 -0
  21. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/CookBook.md +3250 -0
  22. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/Documentation.md +11 -0
  23. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/ForDummies.md +439 -0
  24. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_5/FrequentlyAskedQuestions.md +624 -0
  25. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CheatSheet.md +534 -0
  26. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/CookBook.md +3342 -0
  27. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/Documentation.md +12 -0
  28. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/ForDummies.md +439 -0
  29. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_6/FrequentlyAskedQuestions.md +628 -0
  30. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CheatSheet.md +556 -0
  31. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/CookBook.md +3432 -0
  32. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/Documentation.md +12 -0
  33. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/ForDummies.md +439 -0
  34. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/docs/v1_7/FrequentlyAskedQuestions.md +628 -0
  35. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-actions.h +1205 -0
  36. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-cardinalities.h +147 -0
  37. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h +2377 -0
  38. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-actions.h.pump +794 -0
  39. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h +1095 -0
  40. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-function-mockers.h.pump +291 -0
  41. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h +2179 -0
  42. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-matchers.h.pump +672 -0
  43. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h +397 -0
  44. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-generated-nice-strict.h.pump +161 -0
  45. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-matchers.h +4399 -0
  46. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-actions.h +246 -0
  47. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-more-matchers.h +58 -0
  48. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock-spec-builders.h +1847 -0
  49. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/gmock.h +94 -0
  50. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h +8 -0
  51. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h.pump +10 -0
  52. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h +39 -0
  53. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/custom/gmock-port.h +46 -0
  54. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h +279 -0
  55. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h.pump +136 -0
  56. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-internal-utils.h +511 -0
  57. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/include/gmock/internal/gmock-port.h +91 -0
  58. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/make/Makefile +101 -0
  59. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.sln +32 -0
  60. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock.vcproj +191 -0
  61. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_config.vsprops +15 -0
  62. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_main.vcproj +187 -0
  63. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2005/gmock_test.vcproj +201 -0
  64. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.sln +32 -0
  65. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock.vcxproj +82 -0
  66. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_config.props +19 -0
  67. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_main.vcxproj +88 -0
  68. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2010/gmock_test.vcxproj +101 -0
  69. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.sln +32 -0
  70. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock.vcxproj +84 -0
  71. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_config.props +19 -0
  72. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_main.vcxproj +90 -0
  73. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/msvc/2015/gmock_test.vcxproj +103 -0
  74. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/fuse_gmock_files.py +240 -0
  75. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/LICENSE +203 -0
  76. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README +35 -0
  77. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/README.cppclean +115 -0
  78. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/__init__.py +0 -0
  79. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/ast.py +1733 -0
  80. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class.py +227 -0
  81. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/gmock_class_test.py +448 -0
  82. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/keywords.py +59 -0
  83. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/tokenize.py +287 -0
  84. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/cpp/utils.py +41 -0
  85. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/generator/gmock_gen.py +31 -0
  86. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock-config.in +303 -0
  87. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/gmock_doctor.py +640 -0
  88. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload.py +1387 -0
  89. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/scripts/upload_gmock.py +78 -0
  90. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-all.cc +47 -0
  91. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-cardinalities.cc +156 -0
  92. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-internal-utils.cc +174 -0
  93. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-matchers.cc +498 -0
  94. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock-spec-builders.cc +823 -0
  95. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock.cc +183 -0
  96. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/src/gmock_main.cc +54 -0
  97. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-actions_test.cc +1411 -0
  98. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-cardinalities_test.cc +428 -0
  99. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-actions_test.cc +1228 -0
  100. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-function-mockers_test.cc +622 -0
  101. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-internal-utils_test.cc +127 -0
  102. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-generated-matchers_test.cc +1286 -0
  103. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-internal-utils_test.cc +699 -0
  104. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-matchers_test.cc +5648 -0
  105. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-more-actions_test.cc +708 -0
  106. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-nice-strict_test.cc +424 -0
  107. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-port_test.cc +43 -0
  108. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock-spec-builders_test.cc +2644 -0
  109. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_all_test.cc +51 -0
  110. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_ex_test.cc +81 -0
  111. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test.py +108 -0
  112. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_leak_test_.cc +100 -0
  113. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link2_test.cc +40 -0
  114. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.cc +40 -0
  115. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_link_test.h +669 -0
  116. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test.py +180 -0
  117. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_.cc +291 -0
  118. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_output_test_golden.txt +310 -0
  119. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_stress_test.cc +322 -0
  120. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test.cc +220 -0
  121. data/ext/rj_schema/rapidjson/thirdparty/gtest/googlemock/test/gmock_test_utils.py +112 -0
  122. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CHANGES +157 -0
  123. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CMakeLists.txt +286 -0
  124. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/CONTRIBUTORS +37 -0
  125. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/LICENSE +28 -0
  126. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/Makefile.am +310 -0
  127. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/README.md +280 -0
  128. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/cmake/internal_utils.cmake +242 -0
  129. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.cbproj +138 -0
  130. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest.groupproj +54 -0
  131. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_all.cc +38 -0
  132. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_link.cc +40 -0
  133. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_main.cbproj +82 -0
  134. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/codegear/gtest_unittest.cbproj +88 -0
  135. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/configure.ac +68 -0
  136. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/AdvancedGuide.md +2182 -0
  137. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/DevGuide.md +126 -0
  138. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Documentation.md +14 -0
  139. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/FAQ.md +1087 -0
  140. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Primer.md +502 -0
  141. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/PumpManual.md +177 -0
  142. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/Samples.md +14 -0
  143. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_AdvancedGuide.md +2096 -0
  144. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Documentation.md +12 -0
  145. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_FAQ.md +886 -0
  146. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_Primer.md +497 -0
  147. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_PumpManual.md +177 -0
  148. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_5_XcodeGuide.md +93 -0
  149. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_AdvancedGuide.md +2178 -0
  150. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Documentation.md +14 -0
  151. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_FAQ.md +1038 -0
  152. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Primer.md +501 -0
  153. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_PumpManual.md +177 -0
  154. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_Samples.md +14 -0
  155. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_6_XcodeGuide.md +93 -0
  156. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_AdvancedGuide.md +2181 -0
  157. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Documentation.md +14 -0
  158. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_FAQ.md +1082 -0
  159. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Primer.md +501 -0
  160. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_PumpManual.md +177 -0
  161. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_Samples.md +14 -0
  162. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/V1_7_XcodeGuide.md +93 -0
  163. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/docs/XcodeGuide.md +93 -0
  164. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-death-test.h +294 -0
  165. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-message.h +250 -0
  166. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h +1444 -0
  167. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-param-test.h.pump +510 -0
  168. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-printers.h +993 -0
  169. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-spi.h +232 -0
  170. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-test-part.h +179 -0
  171. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest-typed-test.h +263 -0
  172. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest.h +2236 -0
  173. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_pred_impl.h +358 -0
  174. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/gtest_prod.h +58 -0
  175. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-port.h +69 -0
  176. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest-printers.h +42 -0
  177. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/custom/gtest.h +41 -0
  178. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-death-test-internal.h +319 -0
  179. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-filepath.h +206 -0
  180. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-internal.h +1238 -0
  181. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-linked_ptr.h +243 -0
  182. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h +5146 -0
  183. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util-generated.h.pump +286 -0
  184. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-param-util.h +731 -0
  185. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port-arch.h +93 -0
  186. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-port.h +2554 -0
  187. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-string.h +167 -0
  188. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h +1020 -0
  189. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-tuple.h.pump +347 -0
  190. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h +3331 -0
  191. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/include/gtest/internal/gtest-type-util.h.pump +297 -0
  192. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/acx_pthread.m4 +363 -0
  193. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/m4/gtest.m4 +74 -0
  194. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/make/Makefile +82 -0
  195. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.sln +45 -0
  196. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest-md.vcproj +126 -0
  197. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.sln +45 -0
  198. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest.vcproj +126 -0
  199. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main-md.vcproj +129 -0
  200. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_main.vcproj +129 -0
  201. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test-md.vcproj +164 -0
  202. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_prod_test.vcproj +164 -0
  203. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest-md.vcproj +147 -0
  204. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/msvc/gtest_unittest.vcproj +147 -0
  205. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/prime_tables.h +123 -0
  206. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.cc +68 -0
  207. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1.h +43 -0
  208. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample10_unittest.cc +144 -0
  209. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample1_unittest.cc +153 -0
  210. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.cc +56 -0
  211. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2.h +85 -0
  212. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample2_unittest.cc +109 -0
  213. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3-inl.h +172 -0
  214. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample3_unittest.cc +151 -0
  215. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.cc +46 -0
  216. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4.h +53 -0
  217. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample4_unittest.cc +45 -0
  218. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample5_unittest.cc +199 -0
  219. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample6_unittest.cc +224 -0
  220. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample7_unittest.cc +130 -0
  221. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample8_unittest.cc +173 -0
  222. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/samples/sample9_unittest.cc +160 -0
  223. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/common.py +83 -0
  224. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/fuse_gtest_files.py +253 -0
  225. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gen_gtest_pred_impl.py +730 -0
  226. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/gtest-config.in +274 -0
  227. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/pump.py +855 -0
  228. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/release_docs.py +158 -0
  229. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/test/Makefile +59 -0
  230. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload.py +1387 -0
  231. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/scripts/upload_gtest.py +78 -0
  232. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-all.cc +48 -0
  233. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-death-test.cc +1342 -0
  234. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-filepath.cc +387 -0
  235. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-internal-inl.h +1183 -0
  236. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-port.cc +1259 -0
  237. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-printers.cc +373 -0
  238. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-test-part.cc +110 -0
  239. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest-typed-test.cc +118 -0
  240. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest.cc +5388 -0
  241. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/src/gtest_main.cc +38 -0
  242. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_ex_test.cc +93 -0
  243. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-death-test_test.cc +1427 -0
  244. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-filepath_test.cc +662 -0
  245. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-linked_ptr_test.cc +154 -0
  246. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-listener_test.cc +311 -0
  247. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-message_test.cc +159 -0
  248. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-options_test.cc +215 -0
  249. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test2_test.cc +65 -0
  250. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.cc +1055 -0
  251. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-param-test_test.h +57 -0
  252. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-port_test.cc +1304 -0
  253. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-printers_test.cc +1635 -0
  254. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-test-part_test.cc +208 -0
  255. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-tuple_test.cc +320 -0
  256. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test2_test.cc +45 -0
  257. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.cc +380 -0
  258. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-typed-test_test.h +66 -0
  259. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest-unittest-api_test.cc +341 -0
  260. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_all_test.cc +47 -0
  261. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest.py +212 -0
  262. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_break_on_failure_unittest_.cc +88 -0
  263. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test.py +237 -0
  264. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_catch_exceptions_test_.cc +311 -0
  265. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test.py +130 -0
  266. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_color_test_.cc +71 -0
  267. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test.py +117 -0
  268. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_env_var_test_.cc +126 -0
  269. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_environment_test.cc +192 -0
  270. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest.py +636 -0
  271. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_filter_unittest_.cc +140 -0
  272. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test.py +172 -0
  273. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_help_test_.cc +46 -0
  274. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest.py +207 -0
  275. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_list_tests_unittest_.cc +157 -0
  276. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_main_unittest.cc +45 -0
  277. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_no_test_unittest.cc +56 -0
  278. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test.py +340 -0
  279. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_.cc +1062 -0
  280. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_output_test_golden_lin.txt +743 -0
  281. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_pred_impl_unittest.cc +2427 -0
  282. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_premature_exit_test.cc +127 -0
  283. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_prod_test.cc +57 -0
  284. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_repeat_test.cc +253 -0
  285. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test.py +325 -0
  286. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_shuffle_test_.cc +103 -0
  287. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_sole_header_test.cc +57 -0
  288. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_stress_test.cc +256 -0
  289. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_test_utils.py +320 -0
  290. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_ex_test.cc +92 -0
  291. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test.py +171 -0
  292. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_throw_on_failure_test_.cc +72 -0
  293. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test.py +70 -0
  294. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_uninitialized_test_.cc +43 -0
  295. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_unittest.cc +7706 -0
  296. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile1_test_.cc +49 -0
  297. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfile2_test_.cc +49 -0
  298. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_outfiles_test.py +132 -0
  299. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest.py +308 -0
  300. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_output_unittest_.cc +181 -0
  301. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/gtest_xml_test_utils.py +194 -0
  302. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.cc +36 -0
  303. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/test/production.h +55 -0
  304. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/DebugProject.xcconfig +30 -0
  305. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/FrameworkTarget.xcconfig +17 -0
  306. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/General.xcconfig +41 -0
  307. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/ReleaseProject.xcconfig +32 -0
  308. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/StaticLibraryTarget.xcconfig +18 -0
  309. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Config/TestTarget.xcconfig +8 -0
  310. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Resources/Info.plist +30 -0
  311. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/Info.plist +28 -0
  312. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/WidgetFramework.xcodeproj/project.pbxproj +457 -0
  313. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/runtests.sh +62 -0
  314. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.cc +63 -0
  315. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget.h +59 -0
  316. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Samples/FrameworkSample/widget_test.cc +68 -0
  317. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/runtests.sh +65 -0
  318. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/Scripts/versiongenerate.py +100 -0
  319. data/ext/rj_schema/rapidjson/thirdparty/gtest/googletest/xcode/gtest.xcodeproj/project.pbxproj +1135 -0
  320. data/ext/rj_schema/rapidjson/thirdparty/gtest/travis.sh +15 -0
  321. data/ext/rj_schema/rj_schema.cpp +64 -41
  322. data/lib/rj_schema.rb +1 -1
  323. metadata +378 -5
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2007 Neal Norwitz
4
+ # Portions Copyright 2007 Google Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ """C++ keywords and helper utilities for determining keywords."""
19
+
20
+ __author__ = 'nnorwitz@google.com (Neal Norwitz)'
21
+
22
+
23
+ try:
24
+ # Python 3.x
25
+ import builtins
26
+ except ImportError:
27
+ # Python 2.x
28
+ import __builtin__ as builtins
29
+
30
+
31
+ if not hasattr(builtins, 'set'):
32
+ # Nominal support for Python 2.3.
33
+ from sets import Set as set
34
+
35
+
36
+ TYPES = set('bool char int long short double float void wchar_t unsigned signed'.split())
37
+ TYPE_MODIFIERS = set('auto register const inline extern static virtual volatile mutable'.split())
38
+ ACCESS = set('public protected private friend'.split())
39
+
40
+ CASTS = set('static_cast const_cast dynamic_cast reinterpret_cast'.split())
41
+
42
+ OTHERS = set('true false asm class namespace using explicit this operator sizeof'.split())
43
+ OTHER_TYPES = set('new delete typedef struct union enum typeid typename template'.split())
44
+
45
+ CONTROL = set('case switch default if else return goto'.split())
46
+ EXCEPTION = set('try catch throw'.split())
47
+ LOOP = set('while do for break continue'.split())
48
+
49
+ ALL = TYPES | TYPE_MODIFIERS | ACCESS | CASTS | OTHERS | OTHER_TYPES | CONTROL | EXCEPTION | LOOP
50
+
51
+
52
+ def IsKeyword(token):
53
+ return token in ALL
54
+
55
+ def IsBuiltinType(token):
56
+ if token in ('virtual', 'inline'):
57
+ # These only apply to methods, they can't be types by themselves.
58
+ return False
59
+ return token in TYPES or token in TYPE_MODIFIERS
@@ -0,0 +1,287 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2007 Neal Norwitz
4
+ # Portions Copyright 2007 Google Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ """Tokenize C++ source code."""
19
+
20
+ __author__ = 'nnorwitz@google.com (Neal Norwitz)'
21
+
22
+
23
+ try:
24
+ # Python 3.x
25
+ import builtins
26
+ except ImportError:
27
+ # Python 2.x
28
+ import __builtin__ as builtins
29
+
30
+
31
+ import sys
32
+
33
+ from cpp import utils
34
+
35
+
36
+ if not hasattr(builtins, 'set'):
37
+ # Nominal support for Python 2.3.
38
+ from sets import Set as set
39
+
40
+
41
+ # Add $ as a valid identifier char since so much code uses it.
42
+ _letters = 'abcdefghijklmnopqrstuvwxyz'
43
+ VALID_IDENTIFIER_CHARS = set(_letters + _letters.upper() + '_0123456789$')
44
+ HEX_DIGITS = set('0123456789abcdefABCDEF')
45
+ INT_OR_FLOAT_DIGITS = set('01234567890eE-+')
46
+
47
+
48
+ # C++0x string preffixes.
49
+ _STR_PREFIXES = set(('R', 'u8', 'u8R', 'u', 'uR', 'U', 'UR', 'L', 'LR'))
50
+
51
+
52
+ # Token types.
53
+ UNKNOWN = 'UNKNOWN'
54
+ SYNTAX = 'SYNTAX'
55
+ CONSTANT = 'CONSTANT'
56
+ NAME = 'NAME'
57
+ PREPROCESSOR = 'PREPROCESSOR'
58
+
59
+ # Where the token originated from. This can be used for backtracking.
60
+ # It is always set to WHENCE_STREAM in this code.
61
+ WHENCE_STREAM, WHENCE_QUEUE = range(2)
62
+
63
+
64
+ class Token(object):
65
+ """Data container to represent a C++ token.
66
+
67
+ Tokens can be identifiers, syntax char(s), constants, or
68
+ pre-processor directives.
69
+
70
+ start contains the index of the first char of the token in the source
71
+ end contains the index of the last char of the token in the source
72
+ """
73
+
74
+ def __init__(self, token_type, name, start, end):
75
+ self.token_type = token_type
76
+ self.name = name
77
+ self.start = start
78
+ self.end = end
79
+ self.whence = WHENCE_STREAM
80
+
81
+ def __str__(self):
82
+ if not utils.DEBUG:
83
+ return 'Token(%r)' % self.name
84
+ return 'Token(%r, %s, %s)' % (self.name, self.start, self.end)
85
+
86
+ __repr__ = __str__
87
+
88
+
89
+ def _GetString(source, start, i):
90
+ i = source.find('"', i+1)
91
+ while source[i-1] == '\\':
92
+ # Count the trailing backslashes.
93
+ backslash_count = 1
94
+ j = i - 2
95
+ while source[j] == '\\':
96
+ backslash_count += 1
97
+ j -= 1
98
+ # When trailing backslashes are even, they escape each other.
99
+ if (backslash_count % 2) == 0:
100
+ break
101
+ i = source.find('"', i+1)
102
+ return i + 1
103
+
104
+
105
+ def _GetChar(source, start, i):
106
+ # NOTE(nnorwitz): may not be quite correct, should be good enough.
107
+ i = source.find("'", i+1)
108
+ while source[i-1] == '\\':
109
+ # Need to special case '\\'.
110
+ if (i - 2) > start and source[i-2] == '\\':
111
+ break
112
+ i = source.find("'", i+1)
113
+ # Try to handle unterminated single quotes (in a #if 0 block).
114
+ if i < 0:
115
+ i = start
116
+ return i + 1
117
+
118
+
119
+ def GetTokens(source):
120
+ """Returns a sequence of Tokens.
121
+
122
+ Args:
123
+ source: string of C++ source code.
124
+
125
+ Yields:
126
+ Token that represents the next token in the source.
127
+ """
128
+ # Cache various valid character sets for speed.
129
+ valid_identifier_chars = VALID_IDENTIFIER_CHARS
130
+ hex_digits = HEX_DIGITS
131
+ int_or_float_digits = INT_OR_FLOAT_DIGITS
132
+ int_or_float_digits2 = int_or_float_digits | set('.')
133
+
134
+ # Only ignore errors while in a #if 0 block.
135
+ ignore_errors = False
136
+ count_ifs = 0
137
+
138
+ i = 0
139
+ end = len(source)
140
+ while i < end:
141
+ # Skip whitespace.
142
+ while i < end and source[i].isspace():
143
+ i += 1
144
+ if i >= end:
145
+ return
146
+
147
+ token_type = UNKNOWN
148
+ start = i
149
+ c = source[i]
150
+ if c.isalpha() or c == '_': # Find a string token.
151
+ token_type = NAME
152
+ while source[i] in valid_identifier_chars:
153
+ i += 1
154
+ # String and character constants can look like a name if
155
+ # they are something like L"".
156
+ if (source[i] == "'" and (i - start) == 1 and
157
+ source[start:i] in 'uUL'):
158
+ # u, U, and L are valid C++0x character preffixes.
159
+ token_type = CONSTANT
160
+ i = _GetChar(source, start, i)
161
+ elif source[i] == "'" and source[start:i] in _STR_PREFIXES:
162
+ token_type = CONSTANT
163
+ i = _GetString(source, start, i)
164
+ elif c == '/' and source[i+1] == '/': # Find // comments.
165
+ i = source.find('\n', i)
166
+ if i == -1: # Handle EOF.
167
+ i = end
168
+ continue
169
+ elif c == '/' and source[i+1] == '*': # Find /* comments. */
170
+ i = source.find('*/', i) + 2
171
+ continue
172
+ elif c in ':+-<>&|*=': # : or :: (plus other chars).
173
+ token_type = SYNTAX
174
+ i += 1
175
+ new_ch = source[i]
176
+ if new_ch == c and c != '>': # Treat ">>" as two tokens.
177
+ i += 1
178
+ elif c == '-' and new_ch == '>':
179
+ i += 1
180
+ elif new_ch == '=':
181
+ i += 1
182
+ elif c in '()[]{}~!?^%;/.,': # Handle single char tokens.
183
+ token_type = SYNTAX
184
+ i += 1
185
+ if c == '.' and source[i].isdigit():
186
+ token_type = CONSTANT
187
+ i += 1
188
+ while source[i] in int_or_float_digits:
189
+ i += 1
190
+ # Handle float suffixes.
191
+ for suffix in ('l', 'f'):
192
+ if suffix == source[i:i+1].lower():
193
+ i += 1
194
+ break
195
+ elif c.isdigit(): # Find integer.
196
+ token_type = CONSTANT
197
+ if c == '0' and source[i+1] in 'xX':
198
+ # Handle hex digits.
199
+ i += 2
200
+ while source[i] in hex_digits:
201
+ i += 1
202
+ else:
203
+ while source[i] in int_or_float_digits2:
204
+ i += 1
205
+ # Handle integer (and float) suffixes.
206
+ for suffix in ('ull', 'll', 'ul', 'l', 'f', 'u'):
207
+ size = len(suffix)
208
+ if suffix == source[i:i+size].lower():
209
+ i += size
210
+ break
211
+ elif c == '"': # Find string.
212
+ token_type = CONSTANT
213
+ i = _GetString(source, start, i)
214
+ elif c == "'": # Find char.
215
+ token_type = CONSTANT
216
+ i = _GetChar(source, start, i)
217
+ elif c == '#': # Find pre-processor command.
218
+ token_type = PREPROCESSOR
219
+ got_if = source[i:i+3] == '#if' and source[i+3:i+4].isspace()
220
+ if got_if:
221
+ count_ifs += 1
222
+ elif source[i:i+6] == '#endif':
223
+ count_ifs -= 1
224
+ if count_ifs == 0:
225
+ ignore_errors = False
226
+
227
+ # TODO(nnorwitz): handle preprocessor statements (\ continuations).
228
+ while 1:
229
+ i1 = source.find('\n', i)
230
+ i2 = source.find('//', i)
231
+ i3 = source.find('/*', i)
232
+ i4 = source.find('"', i)
233
+ # NOTE(nnorwitz): doesn't handle comments in #define macros.
234
+ # Get the first important symbol (newline, comment, EOF/end).
235
+ i = min([x for x in (i1, i2, i3, i4, end) if x != -1])
236
+
237
+ # Handle #include "dir//foo.h" properly.
238
+ if source[i] == '"':
239
+ i = source.find('"', i+1) + 1
240
+ assert i > 0
241
+ continue
242
+ # Keep going if end of the line and the line ends with \.
243
+ if not (i == i1 and source[i-1] == '\\'):
244
+ if got_if:
245
+ condition = source[start+4:i].lstrip()
246
+ if (condition.startswith('0') or
247
+ condition.startswith('(0)')):
248
+ ignore_errors = True
249
+ break
250
+ i += 1
251
+ elif c == '\\': # Handle \ in code.
252
+ # This is different from the pre-processor \ handling.
253
+ i += 1
254
+ continue
255
+ elif ignore_errors:
256
+ # The tokenizer seems to be in pretty good shape. This
257
+ # raise is conditionally disabled so that bogus code
258
+ # in an #if 0 block can be handled. Since we will ignore
259
+ # it anyways, this is probably fine. So disable the
260
+ # exception and return the bogus char.
261
+ i += 1
262
+ else:
263
+ sys.stderr.write('Got invalid token in %s @ %d token:%s: %r\n' %
264
+ ('?', i, c, source[i-10:i+10]))
265
+ raise RuntimeError('unexpected token')
266
+
267
+ if i <= 0:
268
+ print('Invalid index, exiting now.')
269
+ return
270
+ yield Token(token_type, source[start:i], start, i)
271
+
272
+
273
+ if __name__ == '__main__':
274
+ def main(argv):
275
+ """Driver mostly for testing purposes."""
276
+ for filename in argv[1:]:
277
+ source = utils.ReadFile(filename)
278
+ if source is None:
279
+ continue
280
+
281
+ for token in GetTokens(source):
282
+ print('%-12s: %s' % (token.token_type, token.name))
283
+ # print('\r%6.2f%%' % (100.0 * index / token.end),)
284
+ sys.stdout.write('\n')
285
+
286
+
287
+ main(sys.argv)
@@ -0,0 +1,41 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2007 Neal Norwitz
4
+ # Portions Copyright 2007 Google Inc.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # http://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+
18
+ """Generic utilities for C++ parsing."""
19
+
20
+ __author__ = 'nnorwitz@google.com (Neal Norwitz)'
21
+
22
+
23
+ import sys
24
+
25
+
26
+ # Set to True to see the start/end token indices.
27
+ DEBUG = True
28
+
29
+
30
+ def ReadFile(filename, print_error=True):
31
+ """Returns the contents of a file."""
32
+ try:
33
+ fp = open(filename)
34
+ try:
35
+ return fp.read()
36
+ finally:
37
+ fp.close()
38
+ except IOError:
39
+ if print_error:
40
+ print('Error reading %s: %s' % (filename, sys.exc_info()[1]))
41
+ return None
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env python
2
+ #
3
+ # Copyright 2008 Google Inc. All Rights Reserved.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ """Driver for starting up Google Mock class generator."""
18
+
19
+ __author__ = 'nnorwitz@google.com (Neal Norwitz)'
20
+
21
+ import os
22
+ import sys
23
+
24
+ if __name__ == '__main__':
25
+ # Add the directory of this script to the path so we can import gmock_class.
26
+ sys.path.append(os.path.dirname(__file__))
27
+
28
+ from cpp import gmock_class
29
+ # Fix the docstring in case they require the usage.
30
+ gmock_class.__doc__ = gmock_class.__doc__.replace('gmock_class.py', __file__)
31
+ gmock_class.main()
@@ -0,0 +1,303 @@
1
+ #!/bin/sh
2
+
3
+ # These variables are automatically filled in by the configure script.
4
+ name="@PACKAGE_TARNAME@"
5
+ version="@PACKAGE_VERSION@"
6
+
7
+ show_usage()
8
+ {
9
+ echo "Usage: gmock-config [OPTIONS...]"
10
+ }
11
+
12
+ show_help()
13
+ {
14
+ show_usage
15
+ cat <<\EOF
16
+
17
+ The `gmock-config' script provides access to the necessary compile and linking
18
+ flags to connect with Google C++ Mocking Framework, both in a build prior to
19
+ installation, and on the system proper after installation. The installation
20
+ overrides may be issued in combination with any other queries, but will only
21
+ affect installation queries if called on a built but not installed gmock. The
22
+ installation queries may not be issued with any other types of queries, and
23
+ only one installation query may be made at a time. The version queries and
24
+ compiler flag queries may be combined as desired but not mixed. Different
25
+ version queries are always combined with logical "and" semantics, and only the
26
+ last of any particular query is used while all previous ones ignored. All
27
+ versions must be specified as a sequence of numbers separated by periods.
28
+ Compiler flag queries output the union of the sets of flags when combined.
29
+
30
+ Examples:
31
+ gmock-config --min-version=1.0 || echo "Insufficient Google Mock version."
32
+
33
+ g++ $(gmock-config --cppflags --cxxflags) -o foo.o -c foo.cpp
34
+ g++ $(gmock-config --ldflags --libs) -o foo foo.o
35
+
36
+ # When using a built but not installed Google Mock:
37
+ g++ $(../../my_gmock_build/scripts/gmock-config ...) ...
38
+
39
+ # When using an installed Google Mock, but with installation overrides:
40
+ export GMOCK_PREFIX="/opt"
41
+ g++ $(gmock-config --libdir="/opt/lib64" ...) ...
42
+
43
+ Help:
44
+ --usage brief usage information
45
+ --help display this help message
46
+
47
+ Installation Overrides:
48
+ --prefix=<dir> overrides the installation prefix
49
+ --exec-prefix=<dir> overrides the executable installation prefix
50
+ --libdir=<dir> overrides the library installation prefix
51
+ --includedir=<dir> overrides the header file installation prefix
52
+
53
+ Installation Queries:
54
+ --prefix installation prefix
55
+ --exec-prefix executable installation prefix
56
+ --libdir library installation directory
57
+ --includedir header file installation directory
58
+ --version the version of the Google Mock installation
59
+
60
+ Version Queries:
61
+ --min-version=VERSION return 0 if the version is at least VERSION
62
+ --exact-version=VERSION return 0 if the version is exactly VERSION
63
+ --max-version=VERSION return 0 if the version is at most VERSION
64
+
65
+ Compilation Flag Queries:
66
+ --cppflags compile flags specific to the C-like preprocessors
67
+ --cxxflags compile flags appropriate for C++ programs
68
+ --ldflags linker flags
69
+ --libs libraries for linking
70
+
71
+ EOF
72
+ }
73
+
74
+ # This function bounds our version with a min and a max. It uses some clever
75
+ # POSIX-compliant variable expansion to portably do all the work in the shell
76
+ # and avoid any dependency on a particular "sed" or "awk" implementation.
77
+ # Notable is that it will only ever compare the first 3 components of versions.
78
+ # Further components will be cleanly stripped off. All versions must be
79
+ # unadorned, so "v1.0" will *not* work. The minimum version must be in $1, and
80
+ # the max in $2. TODO(chandlerc@google.com): If this ever breaks, we should
81
+ # investigate expanding this via autom4te from AS_VERSION_COMPARE rather than
82
+ # continuing to maintain our own shell version.
83
+ check_versions()
84
+ {
85
+ major_version=${version%%.*}
86
+ minor_version="0"
87
+ point_version="0"
88
+ if test "${version#*.}" != "${version}"; then
89
+ minor_version=${version#*.}
90
+ minor_version=${minor_version%%.*}
91
+ fi
92
+ if test "${version#*.*.}" != "${version}"; then
93
+ point_version=${version#*.*.}
94
+ point_version=${point_version%%.*}
95
+ fi
96
+
97
+ min_version="$1"
98
+ min_major_version=${min_version%%.*}
99
+ min_minor_version="0"
100
+ min_point_version="0"
101
+ if test "${min_version#*.}" != "${min_version}"; then
102
+ min_minor_version=${min_version#*.}
103
+ min_minor_version=${min_minor_version%%.*}
104
+ fi
105
+ if test "${min_version#*.*.}" != "${min_version}"; then
106
+ min_point_version=${min_version#*.*.}
107
+ min_point_version=${min_point_version%%.*}
108
+ fi
109
+
110
+ max_version="$2"
111
+ max_major_version=${max_version%%.*}
112
+ max_minor_version="0"
113
+ max_point_version="0"
114
+ if test "${max_version#*.}" != "${max_version}"; then
115
+ max_minor_version=${max_version#*.}
116
+ max_minor_version=${max_minor_version%%.*}
117
+ fi
118
+ if test "${max_version#*.*.}" != "${max_version}"; then
119
+ max_point_version=${max_version#*.*.}
120
+ max_point_version=${max_point_version%%.*}
121
+ fi
122
+
123
+ test $(($major_version)) -lt $(($min_major_version)) && exit 1
124
+ if test $(($major_version)) -eq $(($min_major_version)); then
125
+ test $(($minor_version)) -lt $(($min_minor_version)) && exit 1
126
+ if test $(($minor_version)) -eq $(($min_minor_version)); then
127
+ test $(($point_version)) -lt $(($min_point_version)) && exit 1
128
+ fi
129
+ fi
130
+
131
+ test $(($major_version)) -gt $(($max_major_version)) && exit 1
132
+ if test $(($major_version)) -eq $(($max_major_version)); then
133
+ test $(($minor_version)) -gt $(($max_minor_version)) && exit 1
134
+ if test $(($minor_version)) -eq $(($max_minor_version)); then
135
+ test $(($point_version)) -gt $(($max_point_version)) && exit 1
136
+ fi
137
+ fi
138
+
139
+ exit 0
140
+ }
141
+
142
+ # Show the usage line when no arguments are specified.
143
+ if test $# -eq 0; then
144
+ show_usage
145
+ exit 1
146
+ fi
147
+
148
+ while test $# -gt 0; do
149
+ case $1 in
150
+ --usage) show_usage; exit 0;;
151
+ --help) show_help; exit 0;;
152
+
153
+ # Installation overrides
154
+ --prefix=*) GMOCK_PREFIX=${1#--prefix=};;
155
+ --exec-prefix=*) GMOCK_EXEC_PREFIX=${1#--exec-prefix=};;
156
+ --libdir=*) GMOCK_LIBDIR=${1#--libdir=};;
157
+ --includedir=*) GMOCK_INCLUDEDIR=${1#--includedir=};;
158
+
159
+ # Installation queries
160
+ --prefix|--exec-prefix|--libdir|--includedir|--version)
161
+ if test -n "${do_query}"; then
162
+ show_usage
163
+ exit 1
164
+ fi
165
+ do_query=${1#--}
166
+ ;;
167
+
168
+ # Version checking
169
+ --min-version=*)
170
+ do_check_versions=yes
171
+ min_version=${1#--min-version=}
172
+ ;;
173
+ --max-version=*)
174
+ do_check_versions=yes
175
+ max_version=${1#--max-version=}
176
+ ;;
177
+ --exact-version=*)
178
+ do_check_versions=yes
179
+ exact_version=${1#--exact-version=}
180
+ ;;
181
+
182
+ # Compiler flag output
183
+ --cppflags) echo_cppflags=yes;;
184
+ --cxxflags) echo_cxxflags=yes;;
185
+ --ldflags) echo_ldflags=yes;;
186
+ --libs) echo_libs=yes;;
187
+
188
+ # Everything else is an error
189
+ *) show_usage; exit 1;;
190
+ esac
191
+ shift
192
+ done
193
+
194
+ # These have defaults filled in by the configure script but can also be
195
+ # overridden by environment variables or command line parameters.
196
+ prefix="${GMOCK_PREFIX:-@prefix@}"
197
+ exec_prefix="${GMOCK_EXEC_PREFIX:-@exec_prefix@}"
198
+ libdir="${GMOCK_LIBDIR:-@libdir@}"
199
+ includedir="${GMOCK_INCLUDEDIR:-@includedir@}"
200
+
201
+ # We try and detect if our binary is not located at its installed location. If
202
+ # it's not, we provide variables pointing to the source and build tree rather
203
+ # than to the install tree. We also locate Google Test using the configured
204
+ # gtest-config script rather than searching the PATH and our bindir for one.
205
+ # This allows building against a just-built gmock rather than an installed
206
+ # gmock.
207
+ bindir="@bindir@"
208
+ this_relative_bindir=`dirname $0`
209
+ this_bindir=`cd ${this_relative_bindir}; pwd -P`
210
+ if test "${this_bindir}" = "${this_bindir%${bindir}}"; then
211
+ # The path to the script doesn't end in the bindir sequence from Autoconf,
212
+ # assume that we are in a build tree.
213
+ build_dir=`dirname ${this_bindir}`
214
+ src_dir=`cd ${this_bindir}/@top_srcdir@; pwd -P`
215
+
216
+ # TODO(chandlerc@google.com): This is a dangerous dependency on libtool, we
217
+ # should work to remove it, and/or remove libtool altogether, replacing it
218
+ # with direct references to the library and a link path.
219
+ gmock_libs="${build_dir}/lib/libgmock.la"
220
+ gmock_ldflags=""
221
+
222
+ # We provide hooks to include from either the source or build dir, where the
223
+ # build dir is always preferred. This will potentially allow us to write
224
+ # build rules for generated headers and have them automatically be preferred
225
+ # over provided versions.
226
+ gmock_cppflags="-I${build_dir}/include -I${src_dir}/include"
227
+ gmock_cxxflags=""
228
+
229
+ # Directly invoke the gtest-config script used during the build process.
230
+ gtest_config="@GTEST_CONFIG@"
231
+ else
232
+ # We're using an installed gmock, although it may be staged under some
233
+ # prefix. Assume (as our own libraries do) that we can resolve the prefix,
234
+ # and are present in the dynamic link paths.
235
+ gmock_ldflags="-L${libdir}"
236
+ gmock_libs="-l${name}"
237
+ gmock_cppflags="-I${includedir}"
238
+ gmock_cxxflags=""
239
+
240
+ # We also prefer any gtest-config script installed in our prefix. Lacking
241
+ # one, we look in the PATH for one.
242
+ gtest_config="${bindir}/gtest-config"
243
+ if test ! -x "${gtest_config}"; then
244
+ gtest_config=`which gtest-config`
245
+ fi
246
+ fi
247
+
248
+ # Ensure that we have located a Google Test to link against.
249
+ if ! test -x "${gtest_config}"; then
250
+ echo "Unable to locate Google Test, check your Google Mock configuration" \
251
+ "and installation" >&2
252
+ exit 1
253
+ elif ! "${gtest_config}" "--exact-version=@GTEST_VERSION@"; then
254
+ echo "The Google Test found is not the same version as Google Mock was " \
255
+ "built against" >&2
256
+ exit 1
257
+ fi
258
+
259
+ # Add the necessary Google Test bits into the various flag variables
260
+ gmock_cppflags="${gmock_cppflags} `${gtest_config} --cppflags`"
261
+ gmock_cxxflags="${gmock_cxxflags} `${gtest_config} --cxxflags`"
262
+ gmock_ldflags="${gmock_ldflags} `${gtest_config} --ldflags`"
263
+ gmock_libs="${gmock_libs} `${gtest_config} --libs`"
264
+
265
+ # Do an installation query if requested.
266
+ if test -n "$do_query"; then
267
+ case $do_query in
268
+ prefix) echo $prefix; exit 0;;
269
+ exec-prefix) echo $exec_prefix; exit 0;;
270
+ libdir) echo $libdir; exit 0;;
271
+ includedir) echo $includedir; exit 0;;
272
+ version) echo $version; exit 0;;
273
+ *) show_usage; exit 1;;
274
+ esac
275
+ fi
276
+
277
+ # Do a version check if requested.
278
+ if test "$do_check_versions" = "yes"; then
279
+ # Make sure we didn't receive a bad combination of parameters.
280
+ test "$echo_cppflags" = "yes" && show_usage && exit 1
281
+ test "$echo_cxxflags" = "yes" && show_usage && exit 1
282
+ test "$echo_ldflags" = "yes" && show_usage && exit 1
283
+ test "$echo_libs" = "yes" && show_usage && exit 1
284
+
285
+ if test "$exact_version" != ""; then
286
+ check_versions $exact_version $exact_version
287
+ # unreachable
288
+ else
289
+ check_versions ${min_version:-0.0.0} ${max_version:-9999.9999.9999}
290
+ # unreachable
291
+ fi
292
+ fi
293
+
294
+ # Do the output in the correct order so that these can be used in-line of
295
+ # a compiler invocation.
296
+ output=""
297
+ test "$echo_cppflags" = "yes" && output="$output $gmock_cppflags"
298
+ test "$echo_cxxflags" = "yes" && output="$output $gmock_cxxflags"
299
+ test "$echo_ldflags" = "yes" && output="$output $gmock_ldflags"
300
+ test "$echo_libs" = "yes" && output="$output $gmock_libs"
301
+ echo $output
302
+
303
+ exit 0