lounge_lizard 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (348) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/.gitmodules +3 -0
  4. data/.rspec +2 -0
  5. data/CODE_OF_CONDUCT.md +74 -0
  6. data/Gemfile +4 -0
  7. data/Guardfile +33 -0
  8. data/LICENSE.txt +21 -0
  9. data/README.md +50 -0
  10. data/Rakefile +43 -0
  11. data/bin/console +14 -0
  12. data/bin/setup +8 -0
  13. data/circle.yml +14 -0
  14. data/ext/drafter/CHANGELOG.md +278 -0
  15. data/ext/drafter/Dockerfile +17 -0
  16. data/ext/drafter/Makefile +62 -0
  17. data/ext/drafter/appveyor.yml +17 -0
  18. data/ext/drafter/bin/drafter +0 -0
  19. data/ext/drafter/build/Makefile +387 -0
  20. data/ext/drafter/build/drafter.Makefile +6 -0
  21. data/ext/drafter/build/drafter.target.mk +159 -0
  22. data/ext/drafter/build/ext/snowcrash/libmarkdownparser.target.mk +141 -0
  23. data/ext/drafter/build/ext/snowcrash/libsnowcrash.target.mk +154 -0
  24. data/ext/drafter/build/ext/snowcrash/libsundown.target.mk +149 -0
  25. data/ext/drafter/build/ext/snowcrash/perf-libsnowcrash.target.mk +147 -0
  26. data/ext/drafter/build/ext/snowcrash/snowcrash.Makefile +6 -0
  27. data/ext/drafter/build/gyp-mac-tool +606 -0
  28. data/ext/drafter/build/libdrafter.target.mk +186 -0
  29. data/ext/drafter/build/libsos.target.mk +137 -0
  30. data/ext/drafter/build/out/Release/drafter +0 -0
  31. data/ext/drafter/build/out/Release/libdrafter.dylib +0 -0
  32. data/ext/drafter/build/out/Release/libmarkdownparser.a +0 -0
  33. data/ext/drafter/build/out/Release/libsnowcrash.a +0 -0
  34. data/ext/drafter/build/out/Release/libsos.a +0 -0
  35. data/ext/drafter/build/out/Release/libsundown.a +0 -0
  36. data/ext/drafter/build/out/Release/obj.target/drafter/src/config.o +0 -0
  37. data/ext/drafter/build/out/Release/obj.target/drafter/src/main.o +0 -0
  38. data/ext/drafter/build/out/Release/obj.target/drafter/src/reporting.o +0 -0
  39. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/ConversionContext.o +0 -0
  40. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/NamedTypesRegistry.o +0 -0
  41. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractAPI.o +0 -0
  42. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractDataStructure.o +0 -0
  43. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractElementFactory.o +0 -0
  44. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/RefractSourceMap.o +0 -0
  45. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Render.o +0 -0
  46. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/Serialize.o +0 -0
  47. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeAST.o +0 -0
  48. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeResult.o +0 -0
  49. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/SerializeSourcemap.o +0 -0
  50. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter.o +0 -0
  51. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/drafter_private.o +0 -0
  52. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ComparableVisitor.o +0 -0
  53. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Element.o +0 -0
  54. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/ExpandVisitor.o +0 -0
  55. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/IsExpandableVisitor.o +0 -0
  56. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/JSONSchemaVisitor.o +0 -0
  57. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/PrintVisitor.o +0 -0
  58. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Query.o +0 -0
  59. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/Registry.o +0 -0
  60. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/RenderJSONVisitor.o +0 -0
  61. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeCompactVisitor.o +0 -0
  62. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/SerializeVisitor.o +0 -0
  63. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/TypeQueryVisitor.o +0 -0
  64. data/ext/drafter/build/out/Release/obj.target/libdrafter/src/refract/VisitorUtils.o +0 -0
  65. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.o +0 -0
  66. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.o +0 -0
  67. data/ext/drafter/build/out/Release/obj.target/libmarkdownparser/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.o +0 -0
  68. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Blueprint.o +0 -0
  69. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/BlueprintSourcemap.o +0 -0
  70. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HTTP.o +0 -0
  71. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/HeadersParser.o +0 -0
  72. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSON.o +0 -0
  73. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONOneOfParser.o +0 -0
  74. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONSourcemap.o +0 -0
  75. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONTypeSectionParser.o +0 -0
  76. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/MSONValueMemberParser.o +0 -0
  77. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Section.o +0 -0
  78. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/Signature.o +0 -0
  79. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/UriTemplateParser.o +0 -0
  80. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/posix/RegexMatch.o +0 -0
  81. data/ext/drafter/build/out/Release/obj.target/libsnowcrash/ext/snowcrash/src/snowcrash.o +0 -0
  82. data/ext/drafter/build/out/Release/obj.target/libsos/ext/sos/src/sos.o +0 -0
  83. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.o +0 -0
  84. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.o +0 -0
  85. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.o +0 -0
  86. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.o +0 -0
  87. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.o +0 -0
  88. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.o +0 -0
  89. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.o +0 -0
  90. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.o +0 -0
  91. data/ext/drafter/build/out/Release/obj.target/libsundown/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.o +0 -0
  92. data/ext/drafter/circle.yml +32 -0
  93. data/ext/drafter/config.gypi +10 -0
  94. data/ext/drafter/config.mk +5 -0
  95. data/ext/drafter/configure +224 -0
  96. data/ext/drafter/drafter.gyp +189 -0
  97. data/ext/drafter/drafter.xcworkspace/contents.xcworkspacedata +13 -0
  98. data/ext/drafter/ext/snowcrash/Makefile +58 -0
  99. data/ext/drafter/ext/snowcrash/appveyor.yml +7 -0
  100. data/ext/drafter/ext/snowcrash/common.gypi +165 -0
  101. data/ext/drafter/ext/snowcrash/configure +197 -0
  102. data/ext/drafter/ext/snowcrash/ext/markdown-parser/Makefile +90 -0
  103. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/CONTRIBUTING.md +10 -0
  104. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile +84 -0
  105. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/Makefile.win +33 -0
  106. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/smartypants.c +72 -0
  107. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/examples/sundown.c +80 -0
  108. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini.h +37 -0
  109. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_href_e.c +108 -0
  110. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/houdini_html_e.c +84 -0
  111. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.c +647 -0
  112. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html.h +77 -0
  113. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html/html_smartypants.c +389 -0
  114. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/html_block_names.txt +25 -0
  115. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.c +297 -0
  116. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/autolink.h +51 -0
  117. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.c +225 -0
  118. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/buffer.h +96 -0
  119. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/html_blocks.h +206 -0
  120. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.c +2726 -0
  121. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/markdown.h +147 -0
  122. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.c +204 -0
  123. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/src_map.h +58 -0
  124. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.c +81 -0
  125. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/src/stack.h +29 -0
  126. data/ext/drafter/ext/snowcrash/ext/markdown-parser/ext/sundown/sundown.def +20 -0
  127. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/markdown/markdown.vcproj +188 -0
  128. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/msvc.sln +38 -0
  129. data/ext/drafter/ext/snowcrash/ext/markdown-parser/msvc/sundown/sundown.vcproj +206 -0
  130. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.cc +160 -0
  131. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/ByteBuffer.h +90 -0
  132. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.cc +152 -0
  133. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownNode.h +103 -0
  134. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.cc +388 -0
  135. data/ext/drafter/ext/snowcrash/ext/markdown-parser/src/MarkdownParser.h +106 -0
  136. data/ext/drafter/ext/snowcrash/snowcrash.gyp +196 -0
  137. data/ext/drafter/ext/snowcrash/src/ActionParser.h +560 -0
  138. data/ext/drafter/ext/snowcrash/src/AssetParser.h +123 -0
  139. data/ext/drafter/ext/snowcrash/src/AttributesParser.h +123 -0
  140. data/ext/drafter/ext/snowcrash/src/Blueprint.cc +90 -0
  141. data/ext/drafter/ext/snowcrash/src/Blueprint.h +489 -0
  142. data/ext/drafter/ext/snowcrash/src/BlueprintParser.h +845 -0
  143. data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.cc +81 -0
  144. data/ext/drafter/ext/snowcrash/src/BlueprintSourcemap.h +345 -0
  145. data/ext/drafter/ext/snowcrash/src/BlueprintUtility.h +111 -0
  146. data/ext/drafter/ext/snowcrash/src/CodeBlockUtility.h +276 -0
  147. data/ext/drafter/ext/snowcrash/src/DataStructureGroupParser.h +157 -0
  148. data/ext/drafter/ext/snowcrash/src/HTTP.cc +49 -0
  149. data/ext/drafter/ext/snowcrash/src/HTTP.h +108 -0
  150. data/ext/drafter/ext/snowcrash/src/HeadersParser.cc +117 -0
  151. data/ext/drafter/ext/snowcrash/src/HeadersParser.h +377 -0
  152. data/ext/drafter/ext/snowcrash/src/MSON.cc +272 -0
  153. data/ext/drafter/ext/snowcrash/src/MSON.h +405 -0
  154. data/ext/drafter/ext/snowcrash/src/MSONMixinParser.h +103 -0
  155. data/ext/drafter/ext/snowcrash/src/MSONNamedTypeParser.h +135 -0
  156. data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.cc +132 -0
  157. data/ext/drafter/ext/snowcrash/src/MSONOneOfParser.h +80 -0
  158. data/ext/drafter/ext/snowcrash/src/MSONParameterParser.h +166 -0
  159. data/ext/drafter/ext/snowcrash/src/MSONPropertyMemberParser.h +106 -0
  160. data/ext/drafter/ext/snowcrash/src/MSONSourcemap.cc +141 -0
  161. data/ext/drafter/ext/snowcrash/src/MSONSourcemap.h +181 -0
  162. data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.cc +209 -0
  163. data/ext/drafter/ext/snowcrash/src/MSONTypeSectionParser.h +213 -0
  164. data/ext/drafter/ext/snowcrash/src/MSONUtility.h +506 -0
  165. data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.cc +214 -0
  166. data/ext/drafter/ext/snowcrash/src/MSONValueMemberParser.h +390 -0
  167. data/ext/drafter/ext/snowcrash/src/ModelTable.h +87 -0
  168. data/ext/drafter/ext/snowcrash/src/ParameterParser.h +516 -0
  169. data/ext/drafter/ext/snowcrash/src/ParametersParser.h +222 -0
  170. data/ext/drafter/ext/snowcrash/src/PayloadParser.h +733 -0
  171. data/ext/drafter/ext/snowcrash/src/Platform.h +33 -0
  172. data/ext/drafter/ext/snowcrash/src/RegexMatch.h +32 -0
  173. data/ext/drafter/ext/snowcrash/src/RelationParser.h +87 -0
  174. data/ext/drafter/ext/snowcrash/src/ResourceGroupParser.h +297 -0
  175. data/ext/drafter/ext/snowcrash/src/ResourceParser.h +536 -0
  176. data/ext/drafter/ext/snowcrash/src/Section.cc +48 -0
  177. data/ext/drafter/ext/snowcrash/src/Section.h +60 -0
  178. data/ext/drafter/ext/snowcrash/src/SectionParser.h +246 -0
  179. data/ext/drafter/ext/snowcrash/src/SectionParserData.h +109 -0
  180. data/ext/drafter/ext/snowcrash/src/SectionProcessor.h +299 -0
  181. data/ext/drafter/ext/snowcrash/src/Signature.cc +75 -0
  182. data/ext/drafter/ext/snowcrash/src/Signature.h +103 -0
  183. data/ext/drafter/ext/snowcrash/src/SignatureSectionProcessor.h +442 -0
  184. data/ext/drafter/ext/snowcrash/src/SourceAnnotation.h +166 -0
  185. data/ext/drafter/ext/snowcrash/src/StringUtility.h +323 -0
  186. data/ext/drafter/ext/snowcrash/src/UriTemplateParser.cc +195 -0
  187. data/ext/drafter/ext/snowcrash/src/UriTemplateParser.h +240 -0
  188. data/ext/drafter/ext/snowcrash/src/ValuesParser.h +111 -0
  189. data/ext/drafter/ext/snowcrash/src/posix/RegexMatch.cc +99 -0
  190. data/ext/drafter/ext/snowcrash/src/snowcrash.cc +90 -0
  191. data/ext/drafter/ext/snowcrash/src/snowcrash.h +44 -0
  192. data/ext/drafter/ext/snowcrash/src/win/RegexMatch.cc +78 -0
  193. data/ext/drafter/ext/snowcrash/tools/gyp/AUTHORS +12 -0
  194. data/ext/drafter/ext/snowcrash/tools/gyp/DEPS +23 -0
  195. data/ext/drafter/ext/snowcrash/tools/gyp/OWNERS +1 -0
  196. data/ext/drafter/ext/snowcrash/tools/gyp/PRESUBMIT.py +137 -0
  197. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/buildbot_run.py +136 -0
  198. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/OWNERS +6 -0
  199. data/ext/drafter/ext/snowcrash/tools/gyp/buildbot/commit_queue/cq_config.json +15 -0
  200. data/ext/drafter/ext/snowcrash/tools/gyp/codereview.settings +10 -0
  201. data/ext/drafter/ext/snowcrash/tools/gyp/data/win/large-pdb-shim.cc +12 -0
  202. data/ext/drafter/ext/snowcrash/tools/gyp/gyp +8 -0
  203. data/ext/drafter/ext/snowcrash/tools/gyp/gyp.bat +5 -0
  204. data/ext/drafter/ext/snowcrash/tools/gyp/gyp_main.py +16 -0
  205. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSNew.py +340 -0
  206. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSProject.py +208 -0
  207. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSSettings.py +1096 -0
  208. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSToolFile.py +58 -0
  209. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUserFile.py +147 -0
  210. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.py +270 -0
  211. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSUtil.pyc +0 -0
  212. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.py +445 -0
  213. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/MSVSVersion.pyc +0 -0
  214. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.py +548 -0
  215. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/__init__.pyc +0 -0
  216. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.py +608 -0
  217. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/common.pyc +0 -0
  218. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/easy_xml.py +157 -0
  219. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/flock_tool.py +54 -0
  220. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.py +0 -0
  221. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/__init__.pyc +0 -0
  222. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/analyzer.py +741 -0
  223. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/android.py +1069 -0
  224. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/cmake.py +1248 -0
  225. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/dump_dependency_json.py +99 -0
  226. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/eclipse.py +425 -0
  227. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypd.py +94 -0
  228. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/gypsh.py +56 -0
  229. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.py +2218 -0
  230. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/make.pyc +0 -0
  231. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/msvs.py +3467 -0
  232. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.py +2427 -0
  233. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/ninja.pyc +0 -0
  234. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.py +1300 -0
  235. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/generator/xcode.pyc +0 -0
  236. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.py +2899 -0
  237. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/input.pyc +0 -0
  238. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/mac_tool.py +605 -0
  239. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.py +1093 -0
  240. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/msvs_emulation.pyc +0 -0
  241. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.py +160 -0
  242. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ninja_syntax.pyc +0 -0
  243. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/ordered_dict.py +289 -0
  244. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.py +46 -0
  245. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/simple_copy.pyc +0 -0
  246. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/win_tool.py +314 -0
  247. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.py +1664 -0
  248. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_emulation.pyc +0 -0
  249. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.py +276 -0
  250. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcode_ninja.pyc +0 -0
  251. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.py +2927 -0
  252. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xcodeproj_file.pyc +0 -0
  253. data/ext/drafter/ext/snowcrash/tools/gyp/pylib/gyp/xml_fix.py +69 -0
  254. data/ext/drafter/ext/snowcrash/tools/gyp/pylintrc +307 -0
  255. data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples +81 -0
  256. data/ext/drafter/ext/snowcrash/tools/gyp/samples/samples.bat +5 -0
  257. data/ext/drafter/ext/snowcrash/tools/gyp/setup.py +19 -0
  258. data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.pbfilespec +27 -0
  259. data/ext/drafter/ext/snowcrash/tools/gyp/tools/Xcode/Specifications/gyp.xclangspec +226 -0
  260. data/ext/drafter/ext/snowcrash/tools/gyp/tools/emacs/gyp.el +275 -0
  261. data/ext/drafter/ext/snowcrash/tools/gyp/tools/graphviz.py +100 -0
  262. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_gyp.py +155 -0
  263. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_sln.py +169 -0
  264. data/ext/drafter/ext/snowcrash/tools/gyp/tools/pretty_vcproj.py +329 -0
  265. data/ext/drafter/ext/snowcrash/vcbuild.bat +139 -0
  266. data/ext/drafter/ext/sos/Makefile +62 -0
  267. data/ext/drafter/ext/sos/src/sos.cc +235 -0
  268. data/ext/drafter/ext/sos/src/sos.h +188 -0
  269. data/ext/drafter/ext/sos/src/sosJSON.h +121 -0
  270. data/ext/drafter/ext/sos/src/sosYAML.h +105 -0
  271. data/ext/drafter/src/ConversionContext.cc +39 -0
  272. data/ext/drafter/src/ConversionContext.h +34 -0
  273. data/ext/drafter/src/NamedTypesRegistry.cc +405 -0
  274. data/ext/drafter/src/NamedTypesRegistry.h +28 -0
  275. data/ext/drafter/src/NodeInfo.h +143 -0
  276. data/ext/drafter/src/RefractAPI.cc +579 -0
  277. data/ext/drafter/src/RefractAPI.h +28 -0
  278. data/ext/drafter/src/RefractDataStructure.cc +1199 -0
  279. data/ext/drafter/src/RefractDataStructure.h +26 -0
  280. data/ext/drafter/src/RefractElementFactory.cc +107 -0
  281. data/ext/drafter/src/RefractElementFactory.h +67 -0
  282. data/ext/drafter/src/RefractSourceMap.cc +29 -0
  283. data/ext/drafter/src/RefractSourceMap.h +57 -0
  284. data/ext/drafter/src/Render.cc +157 -0
  285. data/ext/drafter/src/Render.h +40 -0
  286. data/ext/drafter/src/Serialize.cc +160 -0
  287. data/ext/drafter/src/Serialize.h +289 -0
  288. data/ext/drafter/src/SerializeAST.cc +507 -0
  289. data/ext/drafter/src/SerializeAST.h +29 -0
  290. data/ext/drafter/src/SerializeResult.cc +170 -0
  291. data/ext/drafter/src/SerializeResult.h +34 -0
  292. data/ext/drafter/src/SerializeSourcemap.cc +331 -0
  293. data/ext/drafter/src/SerializeSourcemap.h +21 -0
  294. data/ext/drafter/src/Version.h +40 -0
  295. data/ext/drafter/src/config.cc +91 -0
  296. data/ext/drafter/src/config.h +38 -0
  297. data/ext/drafter/src/drafter.cc +137 -0
  298. data/ext/drafter/src/drafter.h +102 -0
  299. data/ext/drafter/src/drafter_private.cc +85 -0
  300. data/ext/drafter/src/drafter_private.h +34 -0
  301. data/ext/drafter/src/main.cc +137 -0
  302. data/ext/drafter/src/refract/AppendDecorator.h +58 -0
  303. data/ext/drafter/src/refract/Build.h +67 -0
  304. data/ext/drafter/src/refract/ComparableVisitor.cc +43 -0
  305. data/ext/drafter/src/refract/ComparableVisitor.h +62 -0
  306. data/ext/drafter/src/refract/Element.cc +409 -0
  307. data/ext/drafter/src/refract/Element.h +656 -0
  308. data/ext/drafter/src/refract/ElementFwd.h +37 -0
  309. data/ext/drafter/src/refract/ElementInserter.h +59 -0
  310. data/ext/drafter/src/refract/Exception.h +31 -0
  311. data/ext/drafter/src/refract/ExpandVisitor.cc +359 -0
  312. data/ext/drafter/src/refract/ExpandVisitor.h +58 -0
  313. data/ext/drafter/src/refract/FilterVisitor.h +52 -0
  314. data/ext/drafter/src/refract/IsExpandableVisitor.cc +140 -0
  315. data/ext/drafter/src/refract/IsExpandableVisitor.h +31 -0
  316. data/ext/drafter/src/refract/Iterate.h +160 -0
  317. data/ext/drafter/src/refract/JSONSchemaVisitor.cc +675 -0
  318. data/ext/drafter/src/refract/JSONSchemaVisitor.h +73 -0
  319. data/ext/drafter/src/refract/PrintVisitor.cc +164 -0
  320. data/ext/drafter/src/refract/PrintVisitor.h +50 -0
  321. data/ext/drafter/src/refract/Query.cc +13 -0
  322. data/ext/drafter/src/refract/Query.h +38 -0
  323. data/ext/drafter/src/refract/Registry.cc +114 -0
  324. data/ext/drafter/src/refract/Registry.h +43 -0
  325. data/ext/drafter/src/refract/RenderJSONVisitor.cc +255 -0
  326. data/ext/drafter/src/refract/RenderJSONVisitor.h +51 -0
  327. data/ext/drafter/src/refract/SerializeCompactVisitor.cc +167 -0
  328. data/ext/drafter/src/refract/SerializeCompactVisitor.h +56 -0
  329. data/ext/drafter/src/refract/SerializeVisitor.cc +214 -0
  330. data/ext/drafter/src/refract/SerializeVisitor.h +55 -0
  331. data/ext/drafter/src/refract/TypeQueryVisitor.cc +46 -0
  332. data/ext/drafter/src/refract/TypeQueryVisitor.h +110 -0
  333. data/ext/drafter/src/refract/Visitor.h +126 -0
  334. data/ext/drafter/src/refract/VisitorUtils.cc +63 -0
  335. data/ext/drafter/src/refract/VisitorUtils.h +231 -0
  336. data/ext/drafter/src/reporting.cc +263 -0
  337. data/ext/drafter/src/reporting.h +39 -0
  338. data/ext/drafter/src/stream.h +148 -0
  339. data/ext/drafter/tools/homebrew/drafter.rb +18 -0
  340. data/ext/drafter/tools/make-tarball.sh +39 -0
  341. data/ext/drafter/tools/refract-filter.py +96 -0
  342. data/ext/drafter/tools/release.sh +17 -0
  343. data/ext/drafter/vcbuild.bat +203 -0
  344. data/lib/lounge_lizard/binding.rb +29 -0
  345. data/lib/lounge_lizard/version.rb +3 -0
  346. data/lib/lounge_lizard.rb +18 -0
  347. data/lounge_lizard.gemspec +37 -0
  348. metadata +547 -0
@@ -0,0 +1,99 @@
1
+ # Copyright (c) 2012 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ import collections
6
+ import os
7
+ import gyp
8
+ import gyp.common
9
+ import gyp.msvs_emulation
10
+ import json
11
+ import sys
12
+
13
+ generator_supports_multiple_toolsets = True
14
+
15
+ generator_wants_static_library_dependencies_adjusted = False
16
+
17
+ generator_filelist_paths = {
18
+ }
19
+
20
+ generator_default_variables = {
21
+ }
22
+ for dirname in ['INTERMEDIATE_DIR', 'SHARED_INTERMEDIATE_DIR', 'PRODUCT_DIR',
23
+ 'LIB_DIR', 'SHARED_LIB_DIR']:
24
+ # Some gyp steps fail if these are empty(!).
25
+ generator_default_variables[dirname] = 'dir'
26
+ for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
27
+ 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
28
+ 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
29
+ 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
30
+ 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
31
+ 'CONFIGURATION_NAME']:
32
+ generator_default_variables[unused] = ''
33
+
34
+
35
+ def CalculateVariables(default_variables, params):
36
+ generator_flags = params.get('generator_flags', {})
37
+ for key, val in generator_flags.items():
38
+ default_variables.setdefault(key, val)
39
+ default_variables.setdefault('OS', gyp.common.GetFlavor(params))
40
+
41
+ flavor = gyp.common.GetFlavor(params)
42
+ if flavor =='win':
43
+ # Copy additional generator configuration data from VS, which is shared
44
+ # by the Windows Ninja generator.
45
+ import gyp.generator.msvs as msvs_generator
46
+ generator_additional_non_configuration_keys = getattr(msvs_generator,
47
+ 'generator_additional_non_configuration_keys', [])
48
+ generator_additional_path_sections = getattr(msvs_generator,
49
+ 'generator_additional_path_sections', [])
50
+
51
+ gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
52
+
53
+
54
+ def CalculateGeneratorInputInfo(params):
55
+ """Calculate the generator specific info that gets fed to input (called by
56
+ gyp)."""
57
+ generator_flags = params.get('generator_flags', {})
58
+ if generator_flags.get('adjust_static_libraries', False):
59
+ global generator_wants_static_library_dependencies_adjusted
60
+ generator_wants_static_library_dependencies_adjusted = True
61
+
62
+ toplevel = params['options'].toplevel_dir
63
+ generator_dir = os.path.relpath(params['options'].generator_output or '.')
64
+ # output_dir: relative path from generator_dir to the build directory.
65
+ output_dir = generator_flags.get('output_dir', 'out')
66
+ qualified_out_dir = os.path.normpath(os.path.join(
67
+ toplevel, generator_dir, output_dir, 'gypfiles'))
68
+ global generator_filelist_paths
69
+ generator_filelist_paths = {
70
+ 'toplevel': toplevel,
71
+ 'qualified_out_dir': qualified_out_dir,
72
+ }
73
+
74
+ def GenerateOutput(target_list, target_dicts, data, params):
75
+ # Map of target -> list of targets it depends on.
76
+ edges = {}
77
+
78
+ # Queue of targets to visit.
79
+ targets_to_visit = target_list[:]
80
+
81
+ while len(targets_to_visit) > 0:
82
+ target = targets_to_visit.pop()
83
+ if target in edges:
84
+ continue
85
+ edges[target] = []
86
+
87
+ for dep in target_dicts[target].get('dependencies', []):
88
+ edges[target].append(dep)
89
+ targets_to_visit.append(dep)
90
+
91
+ try:
92
+ filepath = params['generator_flags']['output_dir']
93
+ except KeyError:
94
+ filepath = '.'
95
+ filename = os.path.join(filepath, 'dump.json')
96
+ f = open(filename, 'w')
97
+ json.dump(edges, f)
98
+ f.close()
99
+ print 'Wrote json to %s.' % filename
@@ -0,0 +1,425 @@
1
+ # Copyright (c) 2012 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ """GYP backend that generates Eclipse CDT settings files.
6
+
7
+ This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML
8
+ files that can be imported into an Eclipse CDT project. The XML file contains a
9
+ list of include paths and symbols (i.e. defines).
10
+
11
+ Because a full .cproject definition is not created by this generator, it's not
12
+ possible to properly define the include dirs and symbols for each file
13
+ individually. Instead, one set of includes/symbols is generated for the entire
14
+ project. This works fairly well (and is a vast improvement in general), but may
15
+ still result in a few indexer issues here and there.
16
+
17
+ This generator has no automated tests, so expect it to be broken.
18
+ """
19
+
20
+ from xml.sax.saxutils import escape
21
+ import os.path
22
+ import subprocess
23
+ import gyp
24
+ import gyp.common
25
+ import gyp.msvs_emulation
26
+ import shlex
27
+ import xml.etree.cElementTree as ET
28
+
29
+ generator_wants_static_library_dependencies_adjusted = False
30
+
31
+ generator_default_variables = {
32
+ }
33
+
34
+ for dirname in ['INTERMEDIATE_DIR', 'PRODUCT_DIR', 'LIB_DIR', 'SHARED_LIB_DIR']:
35
+ # Some gyp steps fail if these are empty(!), so we convert them to variables
36
+ generator_default_variables[dirname] = '$' + dirname
37
+
38
+ for unused in ['RULE_INPUT_PATH', 'RULE_INPUT_ROOT', 'RULE_INPUT_NAME',
39
+ 'RULE_INPUT_DIRNAME', 'RULE_INPUT_EXT',
40
+ 'EXECUTABLE_PREFIX', 'EXECUTABLE_SUFFIX',
41
+ 'STATIC_LIB_PREFIX', 'STATIC_LIB_SUFFIX',
42
+ 'SHARED_LIB_PREFIX', 'SHARED_LIB_SUFFIX',
43
+ 'CONFIGURATION_NAME']:
44
+ generator_default_variables[unused] = ''
45
+
46
+ # Include dirs will occasionally use the SHARED_INTERMEDIATE_DIR variable as
47
+ # part of the path when dealing with generated headers. This value will be
48
+ # replaced dynamically for each configuration.
49
+ generator_default_variables['SHARED_INTERMEDIATE_DIR'] = \
50
+ '$SHARED_INTERMEDIATE_DIR'
51
+
52
+
53
+ def CalculateVariables(default_variables, params):
54
+ generator_flags = params.get('generator_flags', {})
55
+ for key, val in generator_flags.items():
56
+ default_variables.setdefault(key, val)
57
+ flavor = gyp.common.GetFlavor(params)
58
+ default_variables.setdefault('OS', flavor)
59
+ if flavor == 'win':
60
+ # Copy additional generator configuration data from VS, which is shared
61
+ # by the Eclipse generator.
62
+ import gyp.generator.msvs as msvs_generator
63
+ generator_additional_non_configuration_keys = getattr(msvs_generator,
64
+ 'generator_additional_non_configuration_keys', [])
65
+ generator_additional_path_sections = getattr(msvs_generator,
66
+ 'generator_additional_path_sections', [])
67
+
68
+ gyp.msvs_emulation.CalculateCommonVariables(default_variables, params)
69
+
70
+
71
+ def CalculateGeneratorInputInfo(params):
72
+ """Calculate the generator specific info that gets fed to input (called by
73
+ gyp)."""
74
+ generator_flags = params.get('generator_flags', {})
75
+ if generator_flags.get('adjust_static_libraries', False):
76
+ global generator_wants_static_library_dependencies_adjusted
77
+ generator_wants_static_library_dependencies_adjusted = True
78
+
79
+
80
+ def GetAllIncludeDirectories(target_list, target_dicts,
81
+ shared_intermediate_dirs, config_name, params,
82
+ compiler_path):
83
+ """Calculate the set of include directories to be used.
84
+
85
+ Returns:
86
+ A list including all the include_dir's specified for every target followed
87
+ by any include directories that were added as cflag compiler options.
88
+ """
89
+
90
+ gyp_includes_set = set()
91
+ compiler_includes_list = []
92
+
93
+ # Find compiler's default include dirs.
94
+ if compiler_path:
95
+ command = shlex.split(compiler_path)
96
+ command.extend(['-E', '-xc++', '-v', '-'])
97
+ proc = subprocess.Popen(args=command, stdin=subprocess.PIPE,
98
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
99
+ output = proc.communicate()[1]
100
+ # Extract the list of include dirs from the output, which has this format:
101
+ # ...
102
+ # #include "..." search starts here:
103
+ # #include <...> search starts here:
104
+ # /usr/include/c++/4.6
105
+ # /usr/local/include
106
+ # End of search list.
107
+ # ...
108
+ in_include_list = False
109
+ for line in output.splitlines():
110
+ if line.startswith('#include'):
111
+ in_include_list = True
112
+ continue
113
+ if line.startswith('End of search list.'):
114
+ break
115
+ if in_include_list:
116
+ include_dir = line.strip()
117
+ if include_dir not in compiler_includes_list:
118
+ compiler_includes_list.append(include_dir)
119
+
120
+ flavor = gyp.common.GetFlavor(params)
121
+ if flavor == 'win':
122
+ generator_flags = params.get('generator_flags', {})
123
+ for target_name in target_list:
124
+ target = target_dicts[target_name]
125
+ if config_name in target['configurations']:
126
+ config = target['configurations'][config_name]
127
+
128
+ # Look for any include dirs that were explicitly added via cflags. This
129
+ # may be done in gyp files to force certain includes to come at the end.
130
+ # TODO(jgreenwald): Change the gyp files to not abuse cflags for this, and
131
+ # remove this.
132
+ if flavor == 'win':
133
+ msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
134
+ cflags = msvs_settings.GetCflags(config_name)
135
+ else:
136
+ cflags = config['cflags']
137
+ for cflag in cflags:
138
+ if cflag.startswith('-I'):
139
+ include_dir = cflag[2:]
140
+ if include_dir not in compiler_includes_list:
141
+ compiler_includes_list.append(include_dir)
142
+
143
+ # Find standard gyp include dirs.
144
+ if config.has_key('include_dirs'):
145
+ include_dirs = config['include_dirs']
146
+ for shared_intermediate_dir in shared_intermediate_dirs:
147
+ for include_dir in include_dirs:
148
+ include_dir = include_dir.replace('$SHARED_INTERMEDIATE_DIR',
149
+ shared_intermediate_dir)
150
+ if not os.path.isabs(include_dir):
151
+ base_dir = os.path.dirname(target_name)
152
+
153
+ include_dir = base_dir + '/' + include_dir
154
+ include_dir = os.path.abspath(include_dir)
155
+
156
+ gyp_includes_set.add(include_dir)
157
+
158
+ # Generate a list that has all the include dirs.
159
+ all_includes_list = list(gyp_includes_set)
160
+ all_includes_list.sort()
161
+ for compiler_include in compiler_includes_list:
162
+ if not compiler_include in gyp_includes_set:
163
+ all_includes_list.append(compiler_include)
164
+
165
+ # All done.
166
+ return all_includes_list
167
+
168
+
169
+ def GetCompilerPath(target_list, data, options):
170
+ """Determine a command that can be used to invoke the compiler.
171
+
172
+ Returns:
173
+ If this is a gyp project that has explicit make settings, try to determine
174
+ the compiler from that. Otherwise, see if a compiler was specified via the
175
+ CC_target environment variable.
176
+ """
177
+ # First, see if the compiler is configured in make's settings.
178
+ build_file, _, _ = gyp.common.ParseQualifiedTarget(target_list[0])
179
+ make_global_settings_dict = data[build_file].get('make_global_settings', {})
180
+ for key, value in make_global_settings_dict:
181
+ if key in ['CC', 'CXX']:
182
+ return os.path.join(options.toplevel_dir, value)
183
+
184
+ # Check to see if the compiler was specified as an environment variable.
185
+ for key in ['CC_target', 'CC', 'CXX']:
186
+ compiler = os.environ.get(key)
187
+ if compiler:
188
+ return compiler
189
+
190
+ return 'gcc'
191
+
192
+
193
+ def GetAllDefines(target_list, target_dicts, data, config_name, params,
194
+ compiler_path):
195
+ """Calculate the defines for a project.
196
+
197
+ Returns:
198
+ A dict that includes explict defines declared in gyp files along with all of
199
+ the default defines that the compiler uses.
200
+ """
201
+
202
+ # Get defines declared in the gyp files.
203
+ all_defines = {}
204
+ flavor = gyp.common.GetFlavor(params)
205
+ if flavor == 'win':
206
+ generator_flags = params.get('generator_flags', {})
207
+ for target_name in target_list:
208
+ target = target_dicts[target_name]
209
+
210
+ if flavor == 'win':
211
+ msvs_settings = gyp.msvs_emulation.MsvsSettings(target, generator_flags)
212
+ extra_defines = msvs_settings.GetComputedDefines(config_name)
213
+ else:
214
+ extra_defines = []
215
+ if config_name in target['configurations']:
216
+ config = target['configurations'][config_name]
217
+ target_defines = config['defines']
218
+ else:
219
+ target_defines = []
220
+ for define in target_defines + extra_defines:
221
+ split_define = define.split('=', 1)
222
+ if len(split_define) == 1:
223
+ split_define.append('1')
224
+ if split_define[0].strip() in all_defines:
225
+ # Already defined
226
+ continue
227
+ all_defines[split_define[0].strip()] = split_define[1].strip()
228
+ # Get default compiler defines (if possible).
229
+ if flavor == 'win':
230
+ return all_defines # Default defines already processed in the loop above.
231
+ if compiler_path:
232
+ command = shlex.split(compiler_path)
233
+ command.extend(['-E', '-dM', '-'])
234
+ cpp_proc = subprocess.Popen(args=command, cwd='.',
235
+ stdin=subprocess.PIPE, stdout=subprocess.PIPE)
236
+ cpp_output = cpp_proc.communicate()[0]
237
+ cpp_lines = cpp_output.split('\n')
238
+ for cpp_line in cpp_lines:
239
+ if not cpp_line.strip():
240
+ continue
241
+ cpp_line_parts = cpp_line.split(' ', 2)
242
+ key = cpp_line_parts[1]
243
+ if len(cpp_line_parts) >= 3:
244
+ val = cpp_line_parts[2]
245
+ else:
246
+ val = '1'
247
+ all_defines[key] = val
248
+
249
+ return all_defines
250
+
251
+
252
+ def WriteIncludePaths(out, eclipse_langs, include_dirs):
253
+ """Write the includes section of a CDT settings export file."""
254
+
255
+ out.write(' <section name="org.eclipse.cdt.internal.ui.wizards.' \
256
+ 'settingswizards.IncludePaths">\n')
257
+ out.write(' <language name="holder for library settings"></language>\n')
258
+ for lang in eclipse_langs:
259
+ out.write(' <language name="%s">\n' % lang)
260
+ for include_dir in include_dirs:
261
+ out.write(' <includepath workspace_path="false">%s</includepath>\n' %
262
+ include_dir)
263
+ out.write(' </language>\n')
264
+ out.write(' </section>\n')
265
+
266
+
267
+ def WriteMacros(out, eclipse_langs, defines):
268
+ """Write the macros section of a CDT settings export file."""
269
+
270
+ out.write(' <section name="org.eclipse.cdt.internal.ui.wizards.' \
271
+ 'settingswizards.Macros">\n')
272
+ out.write(' <language name="holder for library settings"></language>\n')
273
+ for lang in eclipse_langs:
274
+ out.write(' <language name="%s">\n' % lang)
275
+ for key in sorted(defines.iterkeys()):
276
+ out.write(' <macro><name>%s</name><value>%s</value></macro>\n' %
277
+ (escape(key), escape(defines[key])))
278
+ out.write(' </language>\n')
279
+ out.write(' </section>\n')
280
+
281
+
282
+ def GenerateOutputForConfig(target_list, target_dicts, data, params,
283
+ config_name):
284
+ options = params['options']
285
+ generator_flags = params.get('generator_flags', {})
286
+
287
+ # build_dir: relative path from source root to our output files.
288
+ # e.g. "out/Debug"
289
+ build_dir = os.path.join(generator_flags.get('output_dir', 'out'),
290
+ config_name)
291
+
292
+ toplevel_build = os.path.join(options.toplevel_dir, build_dir)
293
+ # Ninja uses out/Debug/gen while make uses out/Debug/obj/gen as the
294
+ # SHARED_INTERMEDIATE_DIR. Include both possible locations.
295
+ shared_intermediate_dirs = [os.path.join(toplevel_build, 'obj', 'gen'),
296
+ os.path.join(toplevel_build, 'gen')]
297
+
298
+ GenerateCdtSettingsFile(target_list,
299
+ target_dicts,
300
+ data,
301
+ params,
302
+ config_name,
303
+ os.path.join(toplevel_build,
304
+ 'eclipse-cdt-settings.xml'),
305
+ options,
306
+ shared_intermediate_dirs)
307
+ GenerateClasspathFile(target_list,
308
+ target_dicts,
309
+ options.toplevel_dir,
310
+ toplevel_build,
311
+ os.path.join(toplevel_build,
312
+ 'eclipse-classpath.xml'))
313
+
314
+
315
+ def GenerateCdtSettingsFile(target_list, target_dicts, data, params,
316
+ config_name, out_name, options,
317
+ shared_intermediate_dirs):
318
+ gyp.common.EnsureDirExists(out_name)
319
+ with open(out_name, 'w') as out:
320
+ out.write('<?xml version="1.0" encoding="UTF-8"?>\n')
321
+ out.write('<cdtprojectproperties>\n')
322
+
323
+ eclipse_langs = ['C++ Source File', 'C Source File', 'Assembly Source File',
324
+ 'GNU C++', 'GNU C', 'Assembly']
325
+ compiler_path = GetCompilerPath(target_list, data, options)
326
+ include_dirs = GetAllIncludeDirectories(target_list, target_dicts,
327
+ shared_intermediate_dirs,
328
+ config_name, params, compiler_path)
329
+ WriteIncludePaths(out, eclipse_langs, include_dirs)
330
+ defines = GetAllDefines(target_list, target_dicts, data, config_name,
331
+ params, compiler_path)
332
+ WriteMacros(out, eclipse_langs, defines)
333
+
334
+ out.write('</cdtprojectproperties>\n')
335
+
336
+
337
+ def GenerateClasspathFile(target_list, target_dicts, toplevel_dir,
338
+ toplevel_build, out_name):
339
+ '''Generates a classpath file suitable for symbol navigation and code
340
+ completion of Java code (such as in Android projects) by finding all
341
+ .java and .jar files used as action inputs.'''
342
+ gyp.common.EnsureDirExists(out_name)
343
+ result = ET.Element('classpath')
344
+
345
+ def AddElements(kind, paths):
346
+ # First, we need to normalize the paths so they are all relative to the
347
+ # toplevel dir.
348
+ rel_paths = set()
349
+ for path in paths:
350
+ if os.path.isabs(path):
351
+ rel_paths.add(os.path.relpath(path, toplevel_dir))
352
+ else:
353
+ rel_paths.add(path)
354
+
355
+ for path in sorted(rel_paths):
356
+ entry_element = ET.SubElement(result, 'classpathentry')
357
+ entry_element.set('kind', kind)
358
+ entry_element.set('path', path)
359
+
360
+ AddElements('lib', GetJavaJars(target_list, target_dicts, toplevel_dir))
361
+ AddElements('src', GetJavaSourceDirs(target_list, target_dicts, toplevel_dir))
362
+ # Include the standard JRE container and a dummy out folder
363
+ AddElements('con', ['org.eclipse.jdt.launching.JRE_CONTAINER'])
364
+ # Include a dummy out folder so that Eclipse doesn't use the default /bin
365
+ # folder in the root of the project.
366
+ AddElements('output', [os.path.join(toplevel_build, '.eclipse-java-build')])
367
+
368
+ ET.ElementTree(result).write(out_name)
369
+
370
+
371
+ def GetJavaJars(target_list, target_dicts, toplevel_dir):
372
+ '''Generates a sequence of all .jars used as inputs.'''
373
+ for target_name in target_list:
374
+ target = target_dicts[target_name]
375
+ for action in target.get('actions', []):
376
+ for input_ in action['inputs']:
377
+ if os.path.splitext(input_)[1] == '.jar' and not input_.startswith('$'):
378
+ if os.path.isabs(input_):
379
+ yield input_
380
+ else:
381
+ yield os.path.join(os.path.dirname(target_name), input_)
382
+
383
+
384
+ def GetJavaSourceDirs(target_list, target_dicts, toplevel_dir):
385
+ '''Generates a sequence of all likely java package root directories.'''
386
+ for target_name in target_list:
387
+ target = target_dicts[target_name]
388
+ for action in target.get('actions', []):
389
+ for input_ in action['inputs']:
390
+ if (os.path.splitext(input_)[1] == '.java' and
391
+ not input_.startswith('$')):
392
+ dir_ = os.path.dirname(os.path.join(os.path.dirname(target_name),
393
+ input_))
394
+ # If there is a parent 'src' or 'java' folder, navigate up to it -
395
+ # these are canonical package root names in Chromium. This will
396
+ # break if 'src' or 'java' exists in the package structure. This
397
+ # could be further improved by inspecting the java file for the
398
+ # package name if this proves to be too fragile in practice.
399
+ parent_search = dir_
400
+ while os.path.basename(parent_search) not in ['src', 'java']:
401
+ parent_search, _ = os.path.split(parent_search)
402
+ if not parent_search or parent_search == toplevel_dir:
403
+ # Didn't find a known root, just return the original path
404
+ yield dir_
405
+ break
406
+ else:
407
+ yield parent_search
408
+
409
+
410
+ def GenerateOutput(target_list, target_dicts, data, params):
411
+ """Generate an XML settings file that can be imported into a CDT project."""
412
+
413
+ if params['options'].generator_output:
414
+ raise NotImplementedError("--generator_output not implemented for eclipse")
415
+
416
+ user_config = params.get('generator_flags', {}).get('config', None)
417
+ if user_config:
418
+ GenerateOutputForConfig(target_list, target_dicts, data, params,
419
+ user_config)
420
+ else:
421
+ config_names = target_dicts[target_list[0]]['configurations'].keys()
422
+ for config_name in config_names:
423
+ GenerateOutputForConfig(target_list, target_dicts, data, params,
424
+ config_name)
425
+
@@ -0,0 +1,94 @@
1
+ # Copyright (c) 2011 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ """gypd output module
6
+
7
+ This module produces gyp input as its output. Output files are given the
8
+ .gypd extension to avoid overwriting the .gyp files that they are generated
9
+ from. Internal references to .gyp files (such as those found in
10
+ "dependencies" sections) are not adjusted to point to .gypd files instead;
11
+ unlike other paths, which are relative to the .gyp or .gypd file, such paths
12
+ are relative to the directory from which gyp was run to create the .gypd file.
13
+
14
+ This generator module is intended to be a sample and a debugging aid, hence
15
+ the "d" for "debug" in .gypd. It is useful to inspect the results of the
16
+ various merges, expansions, and conditional evaluations performed by gyp
17
+ and to see a representation of what would be fed to a generator module.
18
+
19
+ It's not advisable to rename .gypd files produced by this module to .gyp,
20
+ because they will have all merges, expansions, and evaluations already
21
+ performed and the relevant constructs not present in the output; paths to
22
+ dependencies may be wrong; and various sections that do not belong in .gyp
23
+ files such as such as "included_files" and "*_excluded" will be present.
24
+ Output will also be stripped of comments. This is not intended to be a
25
+ general-purpose gyp pretty-printer; for that, you probably just want to
26
+ run "pprint.pprint(eval(open('source.gyp').read()))", which will still strip
27
+ comments but won't do all of the other things done to this module's output.
28
+
29
+ The specific formatting of the output generated by this module is subject
30
+ to change.
31
+ """
32
+
33
+
34
+ import gyp.common
35
+ import errno
36
+ import os
37
+ import pprint
38
+
39
+
40
+ # These variables should just be spit back out as variable references.
41
+ _generator_identity_variables = [
42
+ 'CONFIGURATION_NAME',
43
+ 'EXECUTABLE_PREFIX',
44
+ 'EXECUTABLE_SUFFIX',
45
+ 'INTERMEDIATE_DIR',
46
+ 'LIB_DIR',
47
+ 'PRODUCT_DIR',
48
+ 'RULE_INPUT_ROOT',
49
+ 'RULE_INPUT_DIRNAME',
50
+ 'RULE_INPUT_EXT',
51
+ 'RULE_INPUT_NAME',
52
+ 'RULE_INPUT_PATH',
53
+ 'SHARED_INTERMEDIATE_DIR',
54
+ 'SHARED_LIB_DIR',
55
+ 'SHARED_LIB_PREFIX',
56
+ 'SHARED_LIB_SUFFIX',
57
+ 'STATIC_LIB_PREFIX',
58
+ 'STATIC_LIB_SUFFIX',
59
+ ]
60
+
61
+ # gypd doesn't define a default value for OS like many other generator
62
+ # modules. Specify "-D OS=whatever" on the command line to provide a value.
63
+ generator_default_variables = {
64
+ }
65
+
66
+ # gypd supports multiple toolsets
67
+ generator_supports_multiple_toolsets = True
68
+
69
+ # TODO(mark): This always uses <, which isn't right. The input module should
70
+ # notify the generator to tell it which phase it is operating in, and this
71
+ # module should use < for the early phase and then switch to > for the late
72
+ # phase. Bonus points for carrying @ back into the output too.
73
+ for v in _generator_identity_variables:
74
+ generator_default_variables[v] = '<(%s)' % v
75
+
76
+
77
+ def GenerateOutput(target_list, target_dicts, data, params):
78
+ output_files = {}
79
+ for qualified_target in target_list:
80
+ [input_file, target] = \
81
+ gyp.common.ParseQualifiedTarget(qualified_target)[0:2]
82
+
83
+ if input_file[-4:] != '.gyp':
84
+ continue
85
+ input_file_stem = input_file[:-4]
86
+ output_file = input_file_stem + params['options'].suffix + '.gypd'
87
+
88
+ if not output_file in output_files:
89
+ output_files[output_file] = input_file
90
+
91
+ for output_file, input_file in output_files.iteritems():
92
+ output = open(output_file, 'w')
93
+ pprint.pprint(data[input_file], output)
94
+ output.close()
@@ -0,0 +1,56 @@
1
+ # Copyright (c) 2011 Google Inc. All rights reserved.
2
+ # Use of this source code is governed by a BSD-style license that can be
3
+ # found in the LICENSE file.
4
+
5
+ """gypsh output module
6
+
7
+ gypsh is a GYP shell. It's not really a generator per se. All it does is
8
+ fire up an interactive Python session with a few local variables set to the
9
+ variables passed to the generator. Like gypd, it's intended as a debugging
10
+ aid, to facilitate the exploration of .gyp structures after being processed
11
+ by the input module.
12
+
13
+ The expected usage is "gyp -f gypsh -D OS=desired_os".
14
+ """
15
+
16
+
17
+ import code
18
+ import sys
19
+
20
+
21
+ # All of this stuff about generator variables was lovingly ripped from gypd.py.
22
+ # That module has a much better description of what's going on and why.
23
+ _generator_identity_variables = [
24
+ 'EXECUTABLE_PREFIX',
25
+ 'EXECUTABLE_SUFFIX',
26
+ 'INTERMEDIATE_DIR',
27
+ 'PRODUCT_DIR',
28
+ 'RULE_INPUT_ROOT',
29
+ 'RULE_INPUT_DIRNAME',
30
+ 'RULE_INPUT_EXT',
31
+ 'RULE_INPUT_NAME',
32
+ 'RULE_INPUT_PATH',
33
+ 'SHARED_INTERMEDIATE_DIR',
34
+ ]
35
+
36
+ generator_default_variables = {
37
+ }
38
+
39
+ for v in _generator_identity_variables:
40
+ generator_default_variables[v] = '<(%s)' % v
41
+
42
+
43
+ def GenerateOutput(target_list, target_dicts, data, params):
44
+ locals = {
45
+ 'target_list': target_list,
46
+ 'target_dicts': target_dicts,
47
+ 'data': data,
48
+ }
49
+
50
+ # Use a banner that looks like the stock Python one and like what
51
+ # code.interact uses by default, but tack on something to indicate what
52
+ # locals are available, and identify gypsh.
53
+ banner='Python %s on %s\nlocals.keys() = %s\ngypsh' % \
54
+ (sys.version, sys.platform, repr(sorted(locals.keys())))
55
+
56
+ code.interact(banner, local=locals)