mack 0.8.2 → 0.8.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (602) hide show
  1. data/CHANGELOG +17 -1
  2. data/bin/env_handler.rb +1 -1
  3. data/bin/mack +2 -2
  4. data/bin/mackery-server +1 -1
  5. data/lib/gems.rb +6 -1
  6. data/lib/gems/builder-2.1.2/lib/blankslate.rb +2 -2
  7. data/lib/gems/builder-2.1.2/lib/builder/xchar.rb +3 -3
  8. data/lib/gems/builder-2.1.2/lib/builder/xmlbase.rb +9 -9
  9. data/lib/gems/builder-2.1.2/lib/builder/xmlmarkup.rb +15 -15
  10. data/lib/gems/configatron-2.2.2/lib/configatron.rb +9 -0
  11. data/lib/gems/{configatron-2.1.5 → configatron-2.2.2}/lib/configatron/configatron.rb +8 -6
  12. data/lib/gems/configatron-2.2.2/lib/configatron/core_ext/class.rb +26 -0
  13. data/lib/gems/{configatron-2.1.5/lib/configatron → configatron-2.2.2/lib/configatron/core_ext}/kernel.rb +0 -0
  14. data/lib/gems/configatron-2.2.2/lib/configatron/core_ext/object.rb +9 -0
  15. data/lib/gems/configatron-2.2.2/lib/configatron/core_ext/string.rb +84 -0
  16. data/lib/gems/configatron-2.2.2/lib/configatron/errors.rb +13 -0
  17. data/lib/gems/{configatron-2.1.5 → configatron-2.2.2}/lib/configatron/store.rb +37 -6
  18. data/lib/gems/cucumber-0.1.15/lib/autotest/cucumber.rb +6 -0
  19. data/lib/gems/cucumber-0.1.15/lib/autotest/cucumber_mixin.rb +130 -0
  20. data/lib/gems/cucumber-0.1.15/lib/autotest/cucumber_rails.rb +6 -0
  21. data/lib/gems/cucumber-0.1.15/lib/autotest/cucumber_rails_rspec.rb +6 -0
  22. data/lib/gems/cucumber-0.1.15/lib/autotest/cucumber_rspec.rb +6 -0
  23. data/lib/gems/cucumber-0.1.15/lib/autotest/discover.rb +9 -0
  24. data/lib/gems/cucumber-0.1.15/lib/cucumber.rb +19 -0
  25. data/lib/gems/cucumber-0.1.15/lib/cucumber/broadcaster.rb +20 -0
  26. data/lib/gems/cucumber-0.1.15/lib/cucumber/cli.rb +360 -0
  27. data/lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/exception.rb +20 -0
  28. data/lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/proc.rb +69 -0
  29. data/lib/gems/cucumber-0.1.15/lib/cucumber/core_ext/string.rb +29 -0
  30. data/lib/gems/cucumber-0.1.15/lib/cucumber/executor.rb +205 -0
  31. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters.rb +1 -0
  32. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/ansicolor.rb +105 -0
  33. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/autotest_formatter.rb +23 -0
  34. data/lib/gems/{rspec-1.1.11/story_server/prototype/stylesheets/rspec.css → cucumber-0.1.15/lib/cucumber/formatters/cucumber.css} +33 -37
  35. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/cucumber.js +11 -0
  36. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/html_formatter.rb +151 -0
  37. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/jquery.js +32 -0
  38. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/pretty_formatter.rb +285 -0
  39. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/profile_formatter.rb +92 -0
  40. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/progress_formatter.rb +61 -0
  41. data/lib/gems/cucumber-0.1.15/lib/cucumber/formatters/unicode.rb +35 -0
  42. data/lib/gems/cucumber-0.1.15/lib/cucumber/languages.yml +271 -0
  43. data/lib/gems/cucumber-0.1.15/lib/cucumber/model.rb +1 -0
  44. data/lib/gems/cucumber-0.1.15/lib/cucumber/model/table.rb +28 -0
  45. data/lib/gems/cucumber-0.1.15/lib/cucumber/platform.rb +32 -0
  46. data/lib/gems/cucumber-0.1.15/lib/cucumber/rails/rspec.rb +12 -0
  47. data/lib/gems/cucumber-0.1.15/lib/cucumber/rails/world.rb +73 -0
  48. data/lib/gems/cucumber-0.1.15/lib/cucumber/rake/task.rb +101 -0
  49. data/lib/gems/cucumber-0.1.15/lib/cucumber/step_methods.rb +49 -0
  50. data/lib/gems/cucumber-0.1.15/lib/cucumber/step_mother.rb +98 -0
  51. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree.rb +16 -0
  52. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/feature.rb +89 -0
  53. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/features.rb +21 -0
  54. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/given_scenario.rb +13 -0
  55. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/scenario.rb +236 -0
  56. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/step.rb +173 -0
  57. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/table.rb +26 -0
  58. data/lib/gems/cucumber-0.1.15/lib/cucumber/tree/top_down_visitor.rb +23 -0
  59. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature.treetop.erb +254 -0
  60. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ar.rb +1951 -0
  61. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_cy.rb +1951 -0
  62. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_da.rb +1951 -0
  63. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_de.rb +1951 -0
  64. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_en-lol.rb +1951 -0
  65. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_en-tx.rb +1951 -0
  66. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_en.rb +1951 -0
  67. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_es.rb +1951 -0
  68. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_et.rb +1951 -0
  69. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_fr.rb +1951 -0
  70. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_id.rb +1951 -0
  71. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_it.rb +1951 -0
  72. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ja.rb +1951 -0
  73. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ko.rb +1951 -0
  74. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_lt.rb +1951 -0
  75. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_nl.rb +1951 -0
  76. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_no.rb +1951 -0
  77. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_parser.rb +36 -0
  78. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_pl.rb +1951 -0
  79. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_pt.rb +1951 -0
  80. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ro.rb +1951 -0
  81. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ro2.rb +1951 -0
  82. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_ru.rb +1951 -0
  83. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_se.rb +1951 -0
  84. data/lib/gems/cucumber-0.1.15/lib/cucumber/treetop_parser/feature_zh-CN.rb +1951 -0
  85. data/lib/gems/cucumber-0.1.15/lib/cucumber/version.rb +10 -0
  86. data/lib/gems/cucumber-0.1.15/lib/cucumber/world.rb +1 -0
  87. data/lib/gems/cucumber-0.1.15/lib/cucumber/world/pending.rb +22 -0
  88. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs.rb +1105 -0
  89. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/array.rb +21 -0
  90. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/block.rb +51 -0
  91. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/callbacks.rb +322 -0
  92. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/change.rb +169 -0
  93. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/hunk.rb +257 -0
  94. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/ldiff.rb +226 -0
  95. data/lib/gems/diff-lcs-1.1.2/lib/diff/lcs/string.rb +19 -0
  96. data/lib/gems/polyglot-0.2.3/lib/polyglot.rb +62 -0
  97. data/lib/gems/polyglot-0.2.3/lib/polyglot/version.rb +9 -0
  98. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack.rb +7 -2
  99. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/adapter/camping.rb +1 -1
  100. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/abstract/handler.rb +0 -0
  101. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/abstract/request.rb +0 -0
  102. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/basic.rb +0 -0
  103. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/digest/md5.rb +0 -0
  104. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/digest/nonce.rb +0 -0
  105. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/digest/params.rb +0 -0
  106. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/digest/request.rb +0 -0
  107. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/auth/openid.rb +4 -3
  108. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/builder.rb +12 -1
  109. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/cascade.rb +0 -0
  110. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/commonlogger.rb +0 -0
  111. data/lib/gems/rack-0.9.1/lib/rack/conditionalget.rb +43 -0
  112. data/lib/gems/rack-0.9.1/lib/rack/content_length.rb +25 -0
  113. data/lib/gems/rack-0.9.1/lib/rack/deflater.rb +87 -0
  114. data/lib/gems/rack-0.9.1/lib/rack/directory.rb +150 -0
  115. data/lib/gems/rack-0.9.1/lib/rack/file.rb +85 -0
  116. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler.rb +4 -0
  117. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/cgi.rb +0 -0
  118. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/evented_mongrel.rb +1 -1
  119. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/fastcgi.rb +2 -0
  120. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/lsws.rb +0 -0
  121. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/mongrel.rb +6 -2
  122. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/scgi.rb +0 -0
  123. data/lib/gems/rack-0.9.1/lib/rack/handler/swiftiplied_mongrel.rb +8 -0
  124. data/lib/gems/rack-0.9.1/lib/rack/handler/thin.rb +15 -0
  125. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/handler/webrick.rb +8 -4
  126. data/lib/gems/rack-0.9.1/lib/rack/head.rb +19 -0
  127. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/lint.rb +74 -10
  128. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/lobster.rb +13 -13
  129. data/lib/gems/rack-0.9.1/lib/rack/methodoverride.rb +27 -0
  130. data/lib/gems/rack-0.9.1/lib/rack/mime.rb +204 -0
  131. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/mock.rb +0 -0
  132. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/recursive.rb +0 -0
  133. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/reloader.rb +0 -0
  134. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/request.rb +10 -1
  135. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/response.rb +7 -2
  136. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/session/abstract/id.rb +14 -1
  137. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/session/cookie.rb +19 -1
  138. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/session/memcache.rb +1 -1
  139. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/session/pool.rb +1 -1
  140. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/showexceptions.rb +5 -1
  141. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/showstatus.rb +3 -2
  142. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/static.rb +0 -0
  143. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/urlmap.rb +1 -1
  144. data/lib/gems/{rack-0.4.0 → rack-0.9.1}/lib/rack/utils.rb +42 -13
  145. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/bin/autospec +0 -0
  146. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/bin/spec +0 -0
  147. data/lib/gems/{rspec-1.1.11/plugins → rspec-1.1.12/lib/adapters}/mock_frameworks/flexmock.rb +1 -1
  148. data/lib/gems/{rspec-1.1.11/plugins → rspec-1.1.12/lib/adapters}/mock_frameworks/mocha.rb +1 -1
  149. data/lib/gems/{rspec-1.1.11/plugins → rspec-1.1.12/lib/adapters}/mock_frameworks/rr.rb +1 -1
  150. data/lib/gems/{rspec-1.1.11/plugins → rspec-1.1.12/lib/adapters}/mock_frameworks/rspec.rb +2 -2
  151. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/autotest/discover.rb +0 -0
  152. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/autotest/rspec.rb +4 -3
  153. data/lib/gems/rspec-1.1.12/lib/spec.rb +7 -0
  154. data/lib/gems/rspec-1.1.12/lib/spec/dsl.rb +1 -0
  155. data/lib/gems/{rspec-1.1.11/lib/spec/extensions → rspec-1.1.12/lib/spec/dsl}/main.rb +10 -10
  156. data/lib/gems/rspec-1.1.12/lib/spec/example.rb +186 -0
  157. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/before_and_after_hooks.rb +30 -24
  158. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/errors.rb +0 -0
  159. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/example_group.rb +1 -0
  160. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/example_group_factory.rb +26 -9
  161. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/example_group_methods.rb +138 -113
  162. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/example_matcher.rb +0 -0
  163. data/lib/gems/rspec-1.1.12/lib/spec/example/example_methods.rb +168 -0
  164. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/module_reopening_fix.rb +0 -0
  165. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/example/pending.rb +0 -0
  166. data/lib/gems/rspec-1.1.12/lib/spec/example/shared_example_group.rb +59 -0
  167. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations.rb +22 -18
  168. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations/differs/default.rb +0 -0
  169. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations/errors.rb +0 -0
  170. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations/extensions.rb +0 -0
  171. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations/extensions/object.rb +0 -0
  172. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/expectations/extensions/string_and_symbol.rb +0 -0
  173. data/lib/gems/rspec-1.1.12/lib/spec/expectations/handler.rb +32 -0
  174. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test.rb +0 -0
  175. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test/unit/autorunner.rb +0 -0
  176. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test/unit/testcase.rb +19 -17
  177. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test/unit/testresult.rb +1 -1
  178. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test/unit/testsuite_adapter.rb +1 -1
  179. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/interop/test/unit/ui/console/testrunner.rb +0 -0
  180. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers.rb +7 -28
  181. data/lib/gems/rspec-1.1.12/lib/spec/matchers/be.rb +208 -0
  182. data/lib/gems/rspec-1.1.12/lib/spec/matchers/be_close.rb +21 -0
  183. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/change.rb +0 -0
  184. data/lib/gems/rspec-1.1.12/lib/spec/matchers/eql.rb +25 -0
  185. data/lib/gems/rspec-1.1.12/lib/spec/matchers/equal.rb +25 -0
  186. data/lib/gems/rspec-1.1.12/lib/spec/matchers/errors.rb +5 -0
  187. data/lib/gems/rspec-1.1.12/lib/spec/matchers/exist.rb +16 -0
  188. data/lib/gems/rspec-1.1.12/lib/spec/matchers/generated_descriptions.rb +48 -0
  189. data/lib/gems/rspec-1.1.12/lib/spec/matchers/has.rb +18 -0
  190. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/have.rb +0 -0
  191. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/include.rb +12 -9
  192. data/lib/gems/rspec-1.1.12/lib/spec/matchers/match.rb +22 -0
  193. data/lib/gems/rspec-1.1.12/lib/spec/matchers/match_array.rb +79 -0
  194. data/lib/gems/rspec-1.1.12/lib/spec/matchers/method_missing.rb +9 -0
  195. data/lib/gems/rspec-1.1.12/lib/spec/matchers/operator_matcher.rb +70 -0
  196. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/raise_error.rb +4 -8
  197. data/lib/gems/rspec-1.1.12/lib/spec/matchers/respond_to.rb +71 -0
  198. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/satisfy.rb +0 -0
  199. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/matchers/simple_matcher.rb +0 -0
  200. data/lib/gems/rspec-1.1.12/lib/spec/matchers/throw_symbol.rb +106 -0
  201. data/lib/gems/rspec-1.1.12/lib/spec/matchers/wrap_expectation.rb +55 -0
  202. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks.rb +0 -0
  203. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/argument_constraints.rb +77 -5
  204. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/argument_expectation.rb +0 -0
  205. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/error_generator.rb +0 -0
  206. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/errors.rb +0 -0
  207. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/extensions.rb +0 -0
  208. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/extensions/object.rb +0 -0
  209. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/framework.rb +0 -0
  210. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/message_expectation.rb +7 -7
  211. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/methods.rb +0 -0
  212. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/mock.rb +0 -0
  213. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/order_group.rb +0 -0
  214. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/proxy.rb +14 -12
  215. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/space.rb +0 -0
  216. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/mocks/spec_methods.rb +0 -0
  217. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/rake/spectask.rb +4 -6
  218. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/rake/verify_rcov.rb +0 -0
  219. data/lib/gems/rspec-1.1.12/lib/spec/ruby.rb +9 -0
  220. data/lib/gems/rspec-1.1.12/lib/spec/runner.rb +88 -0
  221. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/backtrace_tweaker.rb +5 -3
  222. data/lib/gems/rspec-1.1.12/lib/spec/runner/class_and_arguments_parser.rb +14 -0
  223. data/lib/gems/rspec-1.1.12/lib/spec/runner/command_line.rb +15 -0
  224. data/lib/gems/{rspec-1.1.11/lib/spec/example → rspec-1.1.12/lib/spec/runner}/configuration.rb +46 -47
  225. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/drb_command_line.rb +0 -0
  226. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/example_group_runner.rb +15 -4
  227. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/base_formatter.rb +0 -0
  228. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/base_text_formatter.rb +4 -3
  229. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/failing_example_groups_formatter.rb +0 -0
  230. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/failing_examples_formatter.rb +0 -0
  231. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/html_formatter.rb +14 -11
  232. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/nested_text_formatter.rb +2 -2
  233. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/profile_formatter.rb +0 -0
  234. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/progress_bar_formatter.rb +0 -0
  235. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/snippet_extractor.rb +0 -0
  236. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/specdoc_formatter.rb +0 -0
  237. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/story/html_formatter.rb +0 -0
  238. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/story/plain_text_formatter.rb +0 -0
  239. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/story/progress_bar_formatter.rb +0 -0
  240. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/formatter/text_mate_formatter.rb +0 -0
  241. data/lib/gems/rspec-1.1.12/lib/spec/runner/heckle_runner.rb +74 -0
  242. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/heckle_runner_unsupported.rb +0 -0
  243. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/option_parser.rb +8 -4
  244. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/options.rb +29 -14
  245. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/reporter.rb +1 -1
  246. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/runner/spec_parser.rb +11 -9
  247. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story.rb +0 -0
  248. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/extensions.rb +0 -0
  249. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/extensions/main.rb +0 -0
  250. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/extensions/regexp.rb +0 -0
  251. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/extensions/string.rb +0 -0
  252. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/given_scenario.rb +0 -0
  253. data/lib/gems/rspec-1.1.12/lib/spec/story/runner.rb +57 -0
  254. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/plain_text_story_runner.rb +0 -0
  255. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/scenario_collector.rb +0 -0
  256. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/scenario_runner.rb +0 -0
  257. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/story_mediator.rb +0 -0
  258. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/story_parser.rb +0 -0
  259. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/runner/story_runner.rb +10 -6
  260. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/scenario.rb +0 -0
  261. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/step.rb +0 -0
  262. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/step_group.rb +0 -0
  263. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/step_mother.rb +0 -0
  264. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/story/story.rb +0 -0
  265. data/lib/gems/rspec-1.1.12/lib/spec/story/world.rb +124 -0
  266. data/lib/gems/{rspec-1.1.11 → rspec-1.1.12}/lib/spec/version.rb +4 -2
  267. data/lib/gems/rubyforge-1.0.1/lib/rubyforge.rb +475 -0
  268. data/lib/gems/rubyforge-1.0.1/lib/rubyforge/client.rb +134 -0
  269. data/lib/gems/rubyforge-1.0.1/lib/rubyforge/cookie_manager.rb +51 -0
  270. data/lib/gems/term-ansicolor-1.0.3/VERSION +1 -0
  271. data/lib/gems/term-ansicolor-1.0.3/lib/term/ansicolor.rb +220 -0
  272. data/lib/gems/{rspec-1.1.11/spec/spec/runner/empty_file.txt → treetop-1.2.4/lib/metagrammar.rb} +0 -0
  273. data/lib/gems/treetop-1.2.4/lib/treetop.rb +11 -0
  274. data/lib/gems/treetop-1.2.4/lib/treetop/bootstrap_gen_1_metagrammar.rb +45 -0
  275. data/lib/gems/treetop-1.2.4/lib/treetop/compiler.rb +6 -0
  276. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/grammar_compiler.rb +40 -0
  277. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/lexical_address_space.rb +17 -0
  278. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.rb +2887 -0
  279. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/metagrammar.treetop +404 -0
  280. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes.rb +19 -0
  281. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/anything_symbol.rb +18 -0
  282. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/atomic_expression.rb +14 -0
  283. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/character_class.rb +19 -0
  284. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/choice.rb +31 -0
  285. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/declaration_sequence.rb +24 -0
  286. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/grammar.rb +28 -0
  287. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/inline_module.rb +27 -0
  288. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/nonterminal.rb +13 -0
  289. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/optional.rb +19 -0
  290. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/parenthesized_expression.rb +9 -0
  291. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/parsing_expression.rb +138 -0
  292. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/parsing_rule.rb +55 -0
  293. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/predicate.rb +45 -0
  294. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/repetition.rb +55 -0
  295. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/sequence.rb +68 -0
  296. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/terminal.rb +20 -0
  297. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/transient_prefix.rb +9 -0
  298. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/node_classes/treetop_file.rb +9 -0
  299. data/lib/gems/treetop-1.2.4/lib/treetop/compiler/ruby_builder.rb +113 -0
  300. data/lib/gems/treetop-1.2.4/lib/treetop/ruby_extensions.rb +2 -0
  301. data/lib/gems/treetop-1.2.4/lib/treetop/ruby_extensions/string.rb +42 -0
  302. data/lib/gems/treetop-1.2.4/lib/treetop/runtime.rb +5 -0
  303. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/compiled_parser.rb +87 -0
  304. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/interval_skip_list.rb +4 -0
  305. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/interval_skip_list/head_node.rb +15 -0
  306. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/interval_skip_list/interval_skip_list.rb +200 -0
  307. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/interval_skip_list/node.rb +164 -0
  308. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/syntax_node.rb +72 -0
  309. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_parse_failure.rb +16 -0
  310. data/lib/gems/treetop-1.2.4/lib/treetop/runtime/terminal_syntax_node.rb +17 -0
  311. data/lib/mack/application.rb +5 -5
  312. data/lib/mack/boot/configuration.rb +3 -1
  313. data/lib/mack/boot/console.rb +2 -2
  314. data/lib/mack/boot/core.rb +3 -3
  315. data/lib/mack/boot/environment.rb +1 -1
  316. data/lib/mack/boot/logging.rb +1 -1
  317. data/lib/mack/boot/logging/filter.rb +1 -1
  318. data/lib/mack/boot/paths.rb +34 -30
  319. data/lib/mack/boot/plugins.rb +2 -2
  320. data/lib/mack/controller/controller.rb +2 -2
  321. data/lib/mack/controller/request.rb +32 -32
  322. data/lib/mack/core_extensions/kernel.rb +1 -1
  323. data/lib/mack/generators/controller_generator/controller_generator.rb +14 -4
  324. data/lib/mack/generators/controller_generator/manifest.yml +7 -7
  325. data/lib/mack/generators/controller_generator/templates/test/controllers/rspec.rb.template +1 -1
  326. data/lib/mack/generators/controller_generator/templates/test/controllers/test_case.rb.template +1 -1
  327. data/lib/mack/generators/controller_helper_generator/manifest.yml +6 -6
  328. data/lib/mack/generators/mack_application_generator/mack_application_generator.rb +2 -2
  329. data/lib/mack/generators/mack_application_generator/manifest.yml +57 -54
  330. data/lib/mack/generators/mack_application_generator/templates/config/configatron/default.rb.template +1 -1
  331. data/lib/mack/generators/mack_application_generator/templates/config/database.yml.template +15 -15
  332. data/lib/mack/generators/mack_application_generator/templates/config/initializers/gems.rb.template +4 -1
  333. data/lib/mack/generators/mack_application_generator/templates/test/controllers/default_controller_spec.rb.template +1 -1
  334. data/lib/mack/generators/mack_application_generator/templates/test/controllers/default_controller_test.rb.template +1 -1
  335. data/lib/mack/generators/mack_application_generator/templates/test/spec_helper.rb.template +3 -3
  336. data/lib/mack/generators/mack_application_generator/templates/test/test_helper.rb.template +3 -3
  337. data/lib/mack/generators/passenger_generator/templates/config.ru.template +1 -1
  338. data/lib/mack/generators/view_helper_generator/manifest.yml +6 -6
  339. data/lib/mack/rendering/engine/builder.rb +1 -1
  340. data/lib/mack/routing/route_map.rb +1 -15
  341. data/lib/mack/routing/urls.rb +16 -2
  342. data/lib/mack/runner_helpers/request_logger.rb +1 -1
  343. data/lib/mack/tasks/mack_update_tasks.rake +5 -5
  344. data/lib/mack/tasks/rake_rules.rake +1 -1
  345. data/lib/mack/tasks/test_tasks.rake +2 -2
  346. data/lib/mack/testing/helpers.rb +24 -24
  347. data/lib/mack/testing/rspec.rb +5 -23
  348. data/lib/mack/testing/test_assertions.rb +0 -1
  349. data/lib/mack/utils/ansi/ansi_color.rb +1 -1
  350. data/lib/mack/version.rb +1 -1
  351. data/lib/mack/view/default_form_builder.rb +9 -0
  352. data/lib/mack/view/form_builder.rb +151 -0
  353. data/lib/mack/view_helpers/form_helpers.rb +7 -6
  354. data/lib/mack_core.rb +3 -3
  355. data/lib/mack_tasks.rb +1 -1
  356. metadata +381 -477
  357. data/lib/gems/builder-2.1.2/lib/builder/css.rb +0 -250
  358. data/lib/gems/configatron-2.1.5/lib/configatron.rb +0 -6
  359. data/lib/gems/configatron-2.1.5/lib/configatron/errors.rb +0 -7
  360. data/lib/gems/lockfile-1.4.3/bin/rlock +0 -360
  361. data/lib/gems/lockfile-1.4.3/bin/rlock-1.4.3 +0 -360
  362. data/lib/gems/logging-0.9.4/data/bad_logging_1.rb +0 -13
  363. data/lib/gems/logging-0.9.4/data/bad_logging_2.rb +0 -21
  364. data/lib/gems/logging-0.9.4/data/logging.rb +0 -42
  365. data/lib/gems/logging-0.9.4/data/logging.yaml +0 -63
  366. data/lib/gems/logging-0.9.4/data/simple_logging.rb +0 -13
  367. data/lib/gems/rack-0.4.0/bin/rackup +0 -172
  368. data/lib/gems/rack-0.4.0/lib/rack/deflater.rb +0 -63
  369. data/lib/gems/rack-0.4.0/lib/rack/directory.rb +0 -158
  370. data/lib/gems/rack-0.4.0/lib/rack/file.rb +0 -116
  371. data/lib/gems/rcov-0.8.1.2.0/ext/rcovrt/callsite.c +0 -242
  372. data/lib/gems/rcov-0.8.1.2.0/ext/rcovrt/extconf.rb +0 -11
  373. data/lib/gems/rcov-0.8.1.2.0/ext/rcovrt/rcovrt.c +0 -329
  374. data/lib/gems/rspec-1.1.11/lib/spec.rb +0 -32
  375. data/lib/gems/rspec-1.1.11/lib/spec/adapters.rb +0 -1
  376. data/lib/gems/rspec-1.1.11/lib/spec/adapters/ruby_engine.rb +0 -26
  377. data/lib/gems/rspec-1.1.11/lib/spec/adapters/ruby_engine/mri.rb +0 -8
  378. data/lib/gems/rspec-1.1.11/lib/spec/adapters/ruby_engine/rubinius.rb +0 -8
  379. data/lib/gems/rspec-1.1.11/lib/spec/example.rb +0 -12
  380. data/lib/gems/rspec-1.1.11/lib/spec/example/example_methods.rb +0 -105
  381. data/lib/gems/rspec-1.1.11/lib/spec/example/shared_example_group.rb +0 -52
  382. data/lib/gems/rspec-1.1.11/lib/spec/expectations/handler.rb +0 -52
  383. data/lib/gems/rspec-1.1.11/lib/spec/extensions.rb +0 -4
  384. data/lib/gems/rspec-1.1.11/lib/spec/extensions/class.rb +0 -24
  385. data/lib/gems/rspec-1.1.11/lib/spec/extensions/metaclass.rb +0 -7
  386. data/lib/gems/rspec-1.1.11/lib/spec/extensions/object.rb +0 -6
  387. data/lib/gems/rspec-1.1.11/lib/spec/matchers/be.rb +0 -221
  388. data/lib/gems/rspec-1.1.11/lib/spec/matchers/be_close.rb +0 -37
  389. data/lib/gems/rspec-1.1.11/lib/spec/matchers/eql.rb +0 -43
  390. data/lib/gems/rspec-1.1.11/lib/spec/matchers/equal.rb +0 -43
  391. data/lib/gems/rspec-1.1.11/lib/spec/matchers/exist.rb +0 -22
  392. data/lib/gems/rspec-1.1.11/lib/spec/matchers/has.rb +0 -34
  393. data/lib/gems/rspec-1.1.11/lib/spec/matchers/match.rb +0 -41
  394. data/lib/gems/rspec-1.1.11/lib/spec/matchers/operator_matcher.rb +0 -79
  395. data/lib/gems/rspec-1.1.11/lib/spec/matchers/respond_to.rb +0 -46
  396. data/lib/gems/rspec-1.1.11/lib/spec/matchers/throw_symbol.rb +0 -74
  397. data/lib/gems/rspec-1.1.11/lib/spec/runner.rb +0 -213
  398. data/lib/gems/rspec-1.1.11/lib/spec/runner/class_and_arguments_parser.rb +0 -16
  399. data/lib/gems/rspec-1.1.11/lib/spec/runner/command_line.rb +0 -17
  400. data/lib/gems/rspec-1.1.11/lib/spec/runner/heckle_runner.rb +0 -72
  401. data/lib/gems/rspec-1.1.11/lib/spec/story/runner.rb +0 -59
  402. data/lib/gems/rspec-1.1.11/lib/spec/story/world.rb +0 -128
  403. data/lib/gems/rspec-1.1.11/rake_tasks/examples.rake +0 -7
  404. data/lib/gems/rspec-1.1.11/rake_tasks/examples_with_rcov.rake +0 -9
  405. data/lib/gems/rspec-1.1.11/rake_tasks/failing_examples_with_html.rake +0 -9
  406. data/lib/gems/rspec-1.1.11/rake_tasks/verify_rcov.rake +0 -7
  407. data/lib/gems/rspec-1.1.11/spec/README.jruby +0 -15
  408. data/lib/gems/rspec-1.1.11/spec/autotest/autotest_helper.rb +0 -6
  409. data/lib/gems/rspec-1.1.11/spec/autotest/autotest_matchers.rb +0 -47
  410. data/lib/gems/rspec-1.1.11/spec/autotest/discover_spec.rb +0 -19
  411. data/lib/gems/rspec-1.1.11/spec/autotest/rspec_spec.rb +0 -150
  412. data/lib/gems/rspec-1.1.11/spec/rspec_suite.rb +0 -6
  413. data/lib/gems/rspec-1.1.11/spec/ruby_forker.rb +0 -13
  414. data/lib/gems/rspec-1.1.11/spec/spec.opts +0 -6
  415. data/lib/gems/rspec-1.1.11/spec/spec/adapters/ruby_engine_spec.rb +0 -16
  416. data/lib/gems/rspec-1.1.11/spec/spec/example/configuration_spec.rb +0 -296
  417. data/lib/gems/rspec-1.1.11/spec/spec/example/example_group_class_definition_spec.rb +0 -48
  418. data/lib/gems/rspec-1.1.11/spec/spec/example/example_group_factory_spec.rb +0 -165
  419. data/lib/gems/rspec-1.1.11/spec/spec/example/example_group_methods_spec.rb +0 -584
  420. data/lib/gems/rspec-1.1.11/spec/spec/example/example_group_spec.rb +0 -683
  421. data/lib/gems/rspec-1.1.11/spec/spec/example/example_matcher_spec.rb +0 -96
  422. data/lib/gems/rspec-1.1.11/spec/spec/example/example_methods_spec.rb +0 -169
  423. data/lib/gems/rspec-1.1.11/spec/spec/example/example_runner_spec.rb +0 -194
  424. data/lib/gems/rspec-1.1.11/spec/spec/example/nested_example_group_spec.rb +0 -71
  425. data/lib/gems/rspec-1.1.11/spec/spec/example/pending_module_spec.rb +0 -145
  426. data/lib/gems/rspec-1.1.11/spec/spec/example/predicate_matcher_spec.rb +0 -21
  427. data/lib/gems/rspec-1.1.11/spec/spec/example/shared_example_group_spec.rb +0 -281
  428. data/lib/gems/rspec-1.1.11/spec/spec/example/subclassing_example_group_spec.rb +0 -25
  429. data/lib/gems/rspec-1.1.11/spec/spec/expectations/differs/default_spec.rb +0 -127
  430. data/lib/gems/rspec-1.1.11/spec/spec/expectations/extensions/object_spec.rb +0 -95
  431. data/lib/gems/rspec-1.1.11/spec/spec/expectations/fail_with_spec.rb +0 -71
  432. data/lib/gems/rspec-1.1.11/spec/spec/extensions/main_spec.rb +0 -71
  433. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/spec_that_fails.rb +0 -10
  434. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/spec_that_passes.rb +0 -10
  435. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/spec_with_errors.rb +0 -10
  436. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/spec_with_options_hash.rb +0 -13
  437. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/test_case_that_fails.rb +0 -10
  438. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/test_case_that_passes.rb +0 -10
  439. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/test_case_with_errors.rb +0 -10
  440. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/resources/testsuite_adapter_spec_with_test_unit.rb +0 -38
  441. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/spec_spec.rb +0 -52
  442. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/test_unit_spec_helper.rb +0 -14
  443. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/testcase_spec.rb +0 -49
  444. data/lib/gems/rspec-1.1.11/spec/spec/interop/test/unit/testsuite_adapter_spec.rb +0 -9
  445. data/lib/gems/rspec-1.1.11/spec/spec/matchers/be_close_spec.rb +0 -39
  446. data/lib/gems/rspec-1.1.11/spec/spec/matchers/be_spec.rb +0 -248
  447. data/lib/gems/rspec-1.1.11/spec/spec/matchers/change_spec.rb +0 -329
  448. data/lib/gems/rspec-1.1.11/spec/spec/matchers/description_generation_spec.rb +0 -153
  449. data/lib/gems/rspec-1.1.11/spec/spec/matchers/eql_spec.rb +0 -28
  450. data/lib/gems/rspec-1.1.11/spec/spec/matchers/equal_spec.rb +0 -28
  451. data/lib/gems/rspec-1.1.11/spec/spec/matchers/exist_spec.rb +0 -57
  452. data/lib/gems/rspec-1.1.11/spec/spec/matchers/handler_spec.rb +0 -150
  453. data/lib/gems/rspec-1.1.11/spec/spec/matchers/has_spec.rb +0 -63
  454. data/lib/gems/rspec-1.1.11/spec/spec/matchers/have_spec.rb +0 -394
  455. data/lib/gems/rspec-1.1.11/spec/spec/matchers/include_spec.rb +0 -64
  456. data/lib/gems/rspec-1.1.11/spec/spec/matchers/match_spec.rb +0 -37
  457. data/lib/gems/rspec-1.1.11/spec/spec/matchers/matcher_methods_spec.rb +0 -78
  458. data/lib/gems/rspec-1.1.11/spec/spec/matchers/mock_constraint_matchers_spec.rb +0 -24
  459. data/lib/gems/rspec-1.1.11/spec/spec/matchers/operator_matcher_spec.rb +0 -191
  460. data/lib/gems/rspec-1.1.11/spec/spec/matchers/raise_error_spec.rb +0 -315
  461. data/lib/gems/rspec-1.1.11/spec/spec/matchers/respond_to_spec.rb +0 -54
  462. data/lib/gems/rspec-1.1.11/spec/spec/matchers/satisfy_spec.rb +0 -36
  463. data/lib/gems/rspec-1.1.11/spec/spec/matchers/simple_matcher_spec.rb +0 -93
  464. data/lib/gems/rspec-1.1.11/spec/spec/matchers/throw_symbol_spec.rb +0 -54
  465. data/lib/gems/rspec-1.1.11/spec/spec/mocks/any_number_of_times_spec.rb +0 -36
  466. data/lib/gems/rspec-1.1.11/spec/spec/mocks/argument_expectation_spec.rb +0 -23
  467. data/lib/gems/rspec-1.1.11/spec/spec/mocks/at_least_spec.rb +0 -97
  468. data/lib/gems/rspec-1.1.11/spec/spec/mocks/at_most_spec.rb +0 -93
  469. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_10260_spec.rb +0 -8
  470. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_10263_spec.rb +0 -24
  471. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_11545_spec.rb +0 -33
  472. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_15719_spec.rb +0 -30
  473. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_496.rb +0 -17
  474. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_7611_spec.rb +0 -19
  475. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_7805_spec.rb +0 -22
  476. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_8165_spec.rb +0 -31
  477. data/lib/gems/rspec-1.1.11/spec/spec/mocks/bug_report_8302_spec.rb +0 -26
  478. data/lib/gems/rspec-1.1.11/spec/spec/mocks/failing_mock_argument_constraints_spec.rb +0 -95
  479. data/lib/gems/rspec-1.1.11/spec/spec/mocks/hash_including_matcher_spec.rb +0 -53
  480. data/lib/gems/rspec-1.1.11/spec/spec/mocks/mock_ordering_spec.rb +0 -84
  481. data/lib/gems/rspec-1.1.11/spec/spec/mocks/mock_space_spec.rb +0 -54
  482. data/lib/gems/rspec-1.1.11/spec/spec/mocks/mock_spec.rb +0 -555
  483. data/lib/gems/rspec-1.1.11/spec/spec/mocks/multiple_return_value_spec.rb +0 -113
  484. data/lib/gems/rspec-1.1.11/spec/spec/mocks/nil_expectation_warning_spec.rb +0 -53
  485. data/lib/gems/rspec-1.1.11/spec/spec/mocks/null_object_mock_spec.rb +0 -54
  486. data/lib/gems/rspec-1.1.11/spec/spec/mocks/once_counts_spec.rb +0 -53
  487. data/lib/gems/rspec-1.1.11/spec/spec/mocks/options_hash_spec.rb +0 -35
  488. data/lib/gems/rspec-1.1.11/spec/spec/mocks/partial_mock_spec.rb +0 -149
  489. data/lib/gems/rspec-1.1.11/spec/spec/mocks/partial_mock_using_mocks_directly_spec.rb +0 -66
  490. data/lib/gems/rspec-1.1.11/spec/spec/mocks/passing_mock_argument_constraints_spec.rb +0 -130
  491. data/lib/gems/rspec-1.1.11/spec/spec/mocks/precise_counts_spec.rb +0 -52
  492. data/lib/gems/rspec-1.1.11/spec/spec/mocks/record_messages_spec.rb +0 -26
  493. data/lib/gems/rspec-1.1.11/spec/spec/mocks/stub_spec.rb +0 -188
  494. data/lib/gems/rspec-1.1.11/spec/spec/mocks/twice_counts_spec.rb +0 -67
  495. data/lib/gems/rspec-1.1.11/spec/spec/package/bin_spec_spec.rb +0 -22
  496. data/lib/gems/rspec-1.1.11/spec/spec/runner/class_and_argument_parser_spec.rb +0 -23
  497. data/lib/gems/rspec-1.1.11/spec/spec/runner/command_line_spec.rb +0 -141
  498. data/lib/gems/rspec-1.1.11/spec/spec/runner/drb_command_line_spec.rb +0 -97
  499. data/lib/gems/rspec-1.1.11/spec/spec/runner/examples.txt +0 -2
  500. data/lib/gems/rspec-1.1.11/spec/spec/runner/failed.txt +0 -3
  501. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/base_formatter_spec.rb +0 -112
  502. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/failing_example_groups_formatter_spec.rb +0 -45
  503. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/failing_examples_formatter_spec.rb +0 -33
  504. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatted-1.8.4.html +0 -365
  505. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatted-1.8.5-jruby.html +0 -387
  506. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatted-1.8.5.html +0 -371
  507. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatted-1.8.6-jruby.html +0 -381
  508. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatted-1.8.6.html +0 -370
  509. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/html_formatter_spec.rb +0 -61
  510. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/nested_text_formatter_spec.rb +0 -318
  511. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/profile_formatter_spec.rb +0 -65
  512. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/progress_bar_formatter_spec.rb +0 -155
  513. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/snippet_extractor_spec.rb +0 -18
  514. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/spec_mate_formatter_spec.rb +0 -103
  515. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/specdoc_formatter_spec.rb +0 -159
  516. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/story/html_formatter_spec.rb +0 -135
  517. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/story/plain_text_formatter_spec.rb +0 -600
  518. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/story/progress_bar_formatter_spec.rb +0 -82
  519. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/text_mate_formatted-1.8.4.html +0 -365
  520. data/lib/gems/rspec-1.1.11/spec/spec/runner/formatter/text_mate_formatted-1.8.6.html +0 -370
  521. data/lib/gems/rspec-1.1.11/spec/spec/runner/heckle_runner_spec.rb +0 -78
  522. data/lib/gems/rspec-1.1.11/spec/spec/runner/heckler_spec.rb +0 -13
  523. data/lib/gems/rspec-1.1.11/spec/spec/runner/noisy_backtrace_tweaker_spec.rb +0 -45
  524. data/lib/gems/rspec-1.1.11/spec/spec/runner/option_parser_spec.rb +0 -421
  525. data/lib/gems/rspec-1.1.11/spec/spec/runner/options_spec.rb +0 -450
  526. data/lib/gems/rspec-1.1.11/spec/spec/runner/output_one_time_fixture.rb +0 -7
  527. data/lib/gems/rspec-1.1.11/spec/spec/runner/output_one_time_fixture_runner.rb +0 -8
  528. data/lib/gems/rspec-1.1.11/spec/spec/runner/output_one_time_spec.rb +0 -16
  529. data/lib/gems/rspec-1.1.11/spec/spec/runner/quiet_backtrace_tweaker_spec.rb +0 -62
  530. data/lib/gems/rspec-1.1.11/spec/spec/runner/reporter_spec.rb +0 -238
  531. data/lib/gems/rspec-1.1.11/spec/spec/runner/resources/a_bar.rb +0 -0
  532. data/lib/gems/rspec-1.1.11/spec/spec/runner/resources/a_foo.rb +0 -0
  533. data/lib/gems/rspec-1.1.11/spec/spec/runner/resources/a_spec.rb +0 -1
  534. data/lib/gems/rspec-1.1.11/spec/spec/runner/spec.opts +0 -2
  535. data/lib/gems/rspec-1.1.11/spec/spec/runner/spec_drb.opts +0 -1
  536. data/lib/gems/rspec-1.1.11/spec/spec/runner/spec_parser/spec_parser_fixture.rb +0 -70
  537. data/lib/gems/rspec-1.1.11/spec/spec/runner/spec_parser_spec.rb +0 -85
  538. data/lib/gems/rspec-1.1.11/spec/spec/runner/spec_spaced.opts +0 -2
  539. data/lib/gems/rspec-1.1.11/spec/spec/runner_spec.rb +0 -11
  540. data/lib/gems/rspec-1.1.11/spec/spec/spec_classes.rb +0 -133
  541. data/lib/gems/rspec-1.1.11/spec/spec/story/builders.rb +0 -46
  542. data/lib/gems/rspec-1.1.11/spec/spec/story/extensions/main_spec.rb +0 -161
  543. data/lib/gems/rspec-1.1.11/spec/spec/story/extensions_spec.rb +0 -14
  544. data/lib/gems/rspec-1.1.11/spec/spec/story/given_scenario_spec.rb +0 -27
  545. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/plain_text_story_runner_spec.rb +0 -90
  546. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/scenario_collector_spec.rb +0 -27
  547. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/scenario_runner_spec.rb +0 -214
  548. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/story_mediator_spec.rb +0 -143
  549. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/story_parser_spec.rb +0 -401
  550. data/lib/gems/rspec-1.1.11/spec/spec/story/runner/story_runner_spec.rb +0 -294
  551. data/lib/gems/rspec-1.1.11/spec/spec/story/runner_spec.rb +0 -93
  552. data/lib/gems/rspec-1.1.11/spec/spec/story/scenario_spec.rb +0 -18
  553. data/lib/gems/rspec-1.1.11/spec/spec/story/step_group_spec.rb +0 -157
  554. data/lib/gems/rspec-1.1.11/spec/spec/story/step_mother_spec.rb +0 -84
  555. data/lib/gems/rspec-1.1.11/spec/spec/story/step_spec.rb +0 -272
  556. data/lib/gems/rspec-1.1.11/spec/spec/story/story_helper.rb +0 -2
  557. data/lib/gems/rspec-1.1.11/spec/spec/story/story_spec.rb +0 -84
  558. data/lib/gems/rspec-1.1.11/spec/spec/story/world_spec.rb +0 -423
  559. data/lib/gems/rspec-1.1.11/spec/spec_helper.rb +0 -77
  560. data/lib/gems/rspec-1.1.11/stories/all.rb +0 -5
  561. data/lib/gems/rspec-1.1.11/stories/configuration/before_blocks.story +0 -21
  562. data/lib/gems/rspec-1.1.11/stories/configuration/stories.rb +0 -7
  563. data/lib/gems/rspec-1.1.11/stories/example_groups/autogenerated_docstrings +0 -45
  564. data/lib/gems/rspec-1.1.11/stories/example_groups/example_group_with_should_methods +0 -17
  565. data/lib/gems/rspec-1.1.11/stories/example_groups/nested_groups +0 -17
  566. data/lib/gems/rspec-1.1.11/stories/example_groups/output +0 -25
  567. data/lib/gems/rspec-1.1.11/stories/example_groups/stories.rb +0 -7
  568. data/lib/gems/rspec-1.1.11/stories/helper.rb +0 -6
  569. data/lib/gems/rspec-1.1.11/stories/interop/examples_and_tests_together +0 -30
  570. data/lib/gems/rspec-1.1.11/stories/interop/stories.rb +0 -7
  571. data/lib/gems/rspec-1.1.11/stories/interop/test_case_with_should_methods +0 -17
  572. data/lib/gems/rspec-1.1.11/stories/mock_framework_integration/stories.rb +0 -7
  573. data/lib/gems/rspec-1.1.11/stories/mock_framework_integration/use_flexmock.story +0 -9
  574. data/lib/gems/rspec-1.1.11/stories/pending_stories/README +0 -3
  575. data/lib/gems/rspec-1.1.11/stories/resources/helpers/cmdline.rb +0 -9
  576. data/lib/gems/rspec-1.1.11/stories/resources/helpers/story_helper.rb +0 -16
  577. data/lib/gems/rspec-1.1.11/stories/resources/matchers/smart_match.rb +0 -37
  578. data/lib/gems/rspec-1.1.11/stories/resources/spec/before_blocks_example.rb +0 -32
  579. data/lib/gems/rspec-1.1.11/stories/resources/spec/example_group_with_should_methods.rb +0 -12
  580. data/lib/gems/rspec-1.1.11/stories/resources/spec/simple_spec.rb +0 -8
  581. data/lib/gems/rspec-1.1.11/stories/resources/spec/spec_with_flexmock.rb +0 -18
  582. data/lib/gems/rspec-1.1.11/stories/resources/steps/running_rspec.rb +0 -50
  583. data/lib/gems/rspec-1.1.11/stories/resources/stories/failing_story.rb +0 -15
  584. data/lib/gems/rspec-1.1.11/stories/resources/test/spec_and_test_together.rb +0 -57
  585. data/lib/gems/rspec-1.1.11/stories/resources/test/test_case_with_should_methods.rb +0 -30
  586. data/lib/gems/rspec-1.1.11/stories/stories/multiline_steps.story +0 -23
  587. data/lib/gems/rspec-1.1.11/stories/stories/steps/multiline_steps.rb +0 -13
  588. data/lib/gems/rspec-1.1.11/stories/stories/stories.rb +0 -6
  589. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/builder.js +0 -136
  590. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/controls.js +0 -972
  591. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/dragdrop.js +0 -976
  592. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/effects.js +0 -1117
  593. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/prototype.js +0 -4140
  594. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/rspec.js +0 -149
  595. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/scriptaculous.js +0 -58
  596. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/slider.js +0 -276
  597. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/sound.js +0 -55
  598. data/lib/gems/rspec-1.1.11/story_server/prototype/javascripts/unittest.js +0 -568
  599. data/lib/gems/rspec-1.1.11/story_server/prototype/lib/server.rb +0 -24
  600. data/lib/gems/rspec-1.1.11/story_server/prototype/stories.html +0 -176
  601. data/lib/gems/rspec-1.1.11/story_server/prototype/stylesheets/test.css +0 -90
  602. data/lib/mack/testing/test_case.rb +0 -52
@@ -0,0 +1,6 @@
1
+ dir = File.dirname(__FILE__)
2
+ require File.join(dir, *%w[compiler lexical_address_space])
3
+ require File.join(dir, *%w[compiler ruby_builder])
4
+ require File.join(dir, *%w[compiler node_classes])
5
+ require File.join(dir, *%w[compiler metagrammar]) unless $exclude_metagrammar
6
+ require File.join(dir, *%w[compiler grammar_compiler])
@@ -0,0 +1,40 @@
1
+ module Treetop
2
+ module Compiler
3
+ class GrammarCompiler
4
+ def compile(source_path, target_path = source_path.gsub(/\.(treetop|tt)\Z/, '.rb'))
5
+ File.open(target_path, 'w') do |target_file|
6
+ target_file.write(ruby_source(source_path))
7
+ end
8
+ end
9
+
10
+ # compile a treetop file into ruby
11
+ def ruby_source(source_path)
12
+ ruby_source_from_string(File.read(source_path))
13
+ end
14
+
15
+ # compile a string containing treetop source into ruby
16
+ def ruby_source_from_string(s)
17
+ parser = MetagrammarParser.new
18
+ result = parser.parse(s)
19
+ unless result
20
+ raise RuntimeError.new(parser.failure_reason)
21
+ end
22
+ result.compile
23
+ end
24
+ end
25
+ end
26
+
27
+ # compile a treetop source file and load it
28
+ def self.load(path)
29
+ adjusted_path = path =~ /\.(treetop|tt)\Z/ ? path : path + '.treetop'
30
+ File.open(adjusted_path) do |source_file|
31
+ load_from_string(source_file.read)
32
+ end
33
+ end
34
+
35
+ # compile a treetop source string and load it
36
+ def self.load_from_string(s)
37
+ compiler = Treetop::Compiler::GrammarCompiler.new
38
+ Object.class_eval(compiler.ruby_source_from_string(s))
39
+ end
40
+ end
@@ -0,0 +1,17 @@
1
+ module Treetop
2
+ module Compiler
3
+ class LexicalAddressSpace
4
+ def initialize
5
+ reset_addresses
6
+ end
7
+
8
+ def next_address
9
+ @next_address += 1
10
+ end
11
+
12
+ def reset_addresses
13
+ @next_address = -1
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,2887 @@
1
+ module Treetop
2
+ module Compiler
3
+ module Metagrammar
4
+ include Treetop::Runtime
5
+
6
+ def root
7
+ @root || :treetop_file
8
+ end
9
+
10
+ module TreetopFile0
11
+ def prefix
12
+ elements[0]
13
+ end
14
+
15
+ def module_or_grammar
16
+ elements[1]
17
+ end
18
+
19
+ def suffix
20
+ elements[2]
21
+ end
22
+ end
23
+
24
+ module TreetopFile1
25
+ def compile
26
+ prefix.text_value + module_or_grammar.compile + suffix.text_value
27
+ end
28
+ end
29
+
30
+ def _nt_treetop_file
31
+ start_index = index
32
+ if node_cache[:treetop_file].has_key?(index)
33
+ cached = node_cache[:treetop_file][index]
34
+ @index = cached.interval.end if cached
35
+ return cached
36
+ end
37
+
38
+ i0, s0 = index, []
39
+ r2 = _nt_space
40
+ if r2
41
+ r1 = r2
42
+ else
43
+ r1 = SyntaxNode.new(input, index...index)
44
+ end
45
+ s0 << r1
46
+ if r1
47
+ i3 = index
48
+ r4 = _nt_module_declaration
49
+ if r4
50
+ r3 = r4
51
+ else
52
+ r5 = _nt_grammar
53
+ if r5
54
+ r3 = r5
55
+ else
56
+ self.index = i3
57
+ r3 = nil
58
+ end
59
+ end
60
+ s0 << r3
61
+ if r3
62
+ r7 = _nt_space
63
+ if r7
64
+ r6 = r7
65
+ else
66
+ r6 = SyntaxNode.new(input, index...index)
67
+ end
68
+ s0 << r6
69
+ end
70
+ end
71
+ if s0.last
72
+ r0 = (SyntaxNode).new(input, i0...index, s0)
73
+ r0.extend(TreetopFile0)
74
+ r0.extend(TreetopFile1)
75
+ else
76
+ self.index = i0
77
+ r0 = nil
78
+ end
79
+
80
+ node_cache[:treetop_file][start_index] = r0
81
+
82
+ return r0
83
+ end
84
+
85
+ module ModuleDeclaration0
86
+ def space
87
+ elements[1]
88
+ end
89
+
90
+ def space
91
+ elements[4]
92
+ end
93
+ end
94
+
95
+ module ModuleDeclaration1
96
+ def space
97
+ elements[0]
98
+ end
99
+
100
+ end
101
+
102
+ module ModuleDeclaration2
103
+ def prefix
104
+ elements[0]
105
+ end
106
+
107
+ def module_contents
108
+ elements[1]
109
+ end
110
+
111
+ def suffix
112
+ elements[2]
113
+ end
114
+ end
115
+
116
+ module ModuleDeclaration3
117
+ def compile
118
+ prefix.text_value + module_contents.compile + suffix.text_value
119
+ end
120
+ end
121
+
122
+ def _nt_module_declaration
123
+ start_index = index
124
+ if node_cache[:module_declaration].has_key?(index)
125
+ cached = node_cache[:module_declaration][index]
126
+ @index = cached.interval.end if cached
127
+ return cached
128
+ end
129
+
130
+ i0, s0 = index, []
131
+ i1, s1 = index, []
132
+ if input.index('module', index) == index
133
+ r2 = (SyntaxNode).new(input, index...(index + 6))
134
+ @index += 6
135
+ else
136
+ terminal_parse_failure('module')
137
+ r2 = nil
138
+ end
139
+ s1 << r2
140
+ if r2
141
+ r3 = _nt_space
142
+ s1 << r3
143
+ if r3
144
+ if input.index(Regexp.new('[A-Z]'), index) == index
145
+ r4 = (SyntaxNode).new(input, index...(index + 1))
146
+ @index += 1
147
+ else
148
+ r4 = nil
149
+ end
150
+ s1 << r4
151
+ if r4
152
+ s5, i5 = [], index
153
+ loop do
154
+ r6 = _nt_alphanumeric_char
155
+ if r6
156
+ s5 << r6
157
+ else
158
+ break
159
+ end
160
+ end
161
+ r5 = SyntaxNode.new(input, i5...index, s5)
162
+ s1 << r5
163
+ if r5
164
+ r7 = _nt_space
165
+ s1 << r7
166
+ end
167
+ end
168
+ end
169
+ end
170
+ if s1.last
171
+ r1 = (SyntaxNode).new(input, i1...index, s1)
172
+ r1.extend(ModuleDeclaration0)
173
+ else
174
+ self.index = i1
175
+ r1 = nil
176
+ end
177
+ s0 << r1
178
+ if r1
179
+ i8 = index
180
+ r9 = _nt_module_declaration
181
+ if r9
182
+ r8 = r9
183
+ else
184
+ r10 = _nt_grammar
185
+ if r10
186
+ r8 = r10
187
+ else
188
+ self.index = i8
189
+ r8 = nil
190
+ end
191
+ end
192
+ s0 << r8
193
+ if r8
194
+ i11, s11 = index, []
195
+ r12 = _nt_space
196
+ s11 << r12
197
+ if r12
198
+ if input.index('end', index) == index
199
+ r13 = (SyntaxNode).new(input, index...(index + 3))
200
+ @index += 3
201
+ else
202
+ terminal_parse_failure('end')
203
+ r13 = nil
204
+ end
205
+ s11 << r13
206
+ end
207
+ if s11.last
208
+ r11 = (SyntaxNode).new(input, i11...index, s11)
209
+ r11.extend(ModuleDeclaration1)
210
+ else
211
+ self.index = i11
212
+ r11 = nil
213
+ end
214
+ s0 << r11
215
+ end
216
+ end
217
+ if s0.last
218
+ r0 = (SyntaxNode).new(input, i0...index, s0)
219
+ r0.extend(ModuleDeclaration2)
220
+ r0.extend(ModuleDeclaration3)
221
+ else
222
+ self.index = i0
223
+ r0 = nil
224
+ end
225
+
226
+ node_cache[:module_declaration][start_index] = r0
227
+
228
+ return r0
229
+ end
230
+
231
+ module Grammar0
232
+ def space
233
+ elements[1]
234
+ end
235
+
236
+ def grammar_name
237
+ elements[2]
238
+ end
239
+
240
+ def space
241
+ elements[3]
242
+ end
243
+
244
+ def declaration_sequence
245
+ elements[4]
246
+ end
247
+
248
+ end
249
+
250
+ def _nt_grammar
251
+ start_index = index
252
+ if node_cache[:grammar].has_key?(index)
253
+ cached = node_cache[:grammar][index]
254
+ @index = cached.interval.end if cached
255
+ return cached
256
+ end
257
+
258
+ i0, s0 = index, []
259
+ if input.index('grammar', index) == index
260
+ r1 = (SyntaxNode).new(input, index...(index + 7))
261
+ @index += 7
262
+ else
263
+ terminal_parse_failure('grammar')
264
+ r1 = nil
265
+ end
266
+ s0 << r1
267
+ if r1
268
+ r2 = _nt_space
269
+ s0 << r2
270
+ if r2
271
+ r3 = _nt_grammar_name
272
+ s0 << r3
273
+ if r3
274
+ r4 = _nt_space
275
+ s0 << r4
276
+ if r4
277
+ r5 = _nt_declaration_sequence
278
+ s0 << r5
279
+ if r5
280
+ r7 = _nt_space
281
+ if r7
282
+ r6 = r7
283
+ else
284
+ r6 = SyntaxNode.new(input, index...index)
285
+ end
286
+ s0 << r6
287
+ if r6
288
+ if input.index('end', index) == index
289
+ r8 = (SyntaxNode).new(input, index...(index + 3))
290
+ @index += 3
291
+ else
292
+ terminal_parse_failure('end')
293
+ r8 = nil
294
+ end
295
+ s0 << r8
296
+ end
297
+ end
298
+ end
299
+ end
300
+ end
301
+ end
302
+ if s0.last
303
+ r0 = (Grammar).new(input, i0...index, s0)
304
+ r0.extend(Grammar0)
305
+ else
306
+ self.index = i0
307
+ r0 = nil
308
+ end
309
+
310
+ node_cache[:grammar][start_index] = r0
311
+
312
+ return r0
313
+ end
314
+
315
+ module GrammarName0
316
+ end
317
+
318
+ def _nt_grammar_name
319
+ start_index = index
320
+ if node_cache[:grammar_name].has_key?(index)
321
+ cached = node_cache[:grammar_name][index]
322
+ @index = cached.interval.end if cached
323
+ return cached
324
+ end
325
+
326
+ i0, s0 = index, []
327
+ if input.index(Regexp.new('[A-Z]'), index) == index
328
+ r1 = (SyntaxNode).new(input, index...(index + 1))
329
+ @index += 1
330
+ else
331
+ r1 = nil
332
+ end
333
+ s0 << r1
334
+ if r1
335
+ s2, i2 = [], index
336
+ loop do
337
+ r3 = _nt_alphanumeric_char
338
+ if r3
339
+ s2 << r3
340
+ else
341
+ break
342
+ end
343
+ end
344
+ r2 = SyntaxNode.new(input, i2...index, s2)
345
+ s0 << r2
346
+ end
347
+ if s0.last
348
+ r0 = (SyntaxNode).new(input, i0...index, s0)
349
+ r0.extend(GrammarName0)
350
+ else
351
+ self.index = i0
352
+ r0 = nil
353
+ end
354
+
355
+ node_cache[:grammar_name][start_index] = r0
356
+
357
+ return r0
358
+ end
359
+
360
+ module DeclarationSequence0
361
+ def space
362
+ elements[0]
363
+ end
364
+
365
+ def declaration
366
+ elements[1]
367
+ end
368
+ end
369
+
370
+ module DeclarationSequence1
371
+ def head
372
+ elements[0]
373
+ end
374
+
375
+ def tail
376
+ elements[1]
377
+ end
378
+ end
379
+
380
+ module DeclarationSequence2
381
+ def declarations
382
+ [head] + tail
383
+ end
384
+
385
+ def tail
386
+ super.elements.map { |elt| elt.declaration }
387
+ end
388
+ end
389
+
390
+ module DeclarationSequence3
391
+ def compile(builder)
392
+ end
393
+ end
394
+
395
+ def _nt_declaration_sequence
396
+ start_index = index
397
+ if node_cache[:declaration_sequence].has_key?(index)
398
+ cached = node_cache[:declaration_sequence][index]
399
+ @index = cached.interval.end if cached
400
+ return cached
401
+ end
402
+
403
+ i0 = index
404
+ i1, s1 = index, []
405
+ r2 = _nt_declaration
406
+ s1 << r2
407
+ if r2
408
+ s3, i3 = [], index
409
+ loop do
410
+ i4, s4 = index, []
411
+ r5 = _nt_space
412
+ s4 << r5
413
+ if r5
414
+ r6 = _nt_declaration
415
+ s4 << r6
416
+ end
417
+ if s4.last
418
+ r4 = (SyntaxNode).new(input, i4...index, s4)
419
+ r4.extend(DeclarationSequence0)
420
+ else
421
+ self.index = i4
422
+ r4 = nil
423
+ end
424
+ if r4
425
+ s3 << r4
426
+ else
427
+ break
428
+ end
429
+ end
430
+ r3 = SyntaxNode.new(input, i3...index, s3)
431
+ s1 << r3
432
+ end
433
+ if s1.last
434
+ r1 = (DeclarationSequence).new(input, i1...index, s1)
435
+ r1.extend(DeclarationSequence1)
436
+ r1.extend(DeclarationSequence2)
437
+ else
438
+ self.index = i1
439
+ r1 = nil
440
+ end
441
+ if r1
442
+ r0 = r1
443
+ else
444
+ if input.index('', index) == index
445
+ r7 = (SyntaxNode).new(input, index...(index + 0))
446
+ r7.extend(DeclarationSequence3)
447
+ @index += 0
448
+ else
449
+ terminal_parse_failure('')
450
+ r7 = nil
451
+ end
452
+ if r7
453
+ r0 = r7
454
+ else
455
+ self.index = i0
456
+ r0 = nil
457
+ end
458
+ end
459
+
460
+ node_cache[:declaration_sequence][start_index] = r0
461
+
462
+ return r0
463
+ end
464
+
465
+ def _nt_declaration
466
+ start_index = index
467
+ if node_cache[:declaration].has_key?(index)
468
+ cached = node_cache[:declaration][index]
469
+ @index = cached.interval.end if cached
470
+ return cached
471
+ end
472
+
473
+ i0 = index
474
+ r1 = _nt_parsing_rule
475
+ if r1
476
+ r0 = r1
477
+ else
478
+ r2 = _nt_include_declaration
479
+ if r2
480
+ r0 = r2
481
+ else
482
+ self.index = i0
483
+ r0 = nil
484
+ end
485
+ end
486
+
487
+ node_cache[:declaration][start_index] = r0
488
+
489
+ return r0
490
+ end
491
+
492
+ module IncludeDeclaration0
493
+ def space
494
+ elements[1]
495
+ end
496
+
497
+ end
498
+
499
+ module IncludeDeclaration1
500
+ def compile(builder)
501
+ builder << text_value
502
+ end
503
+ end
504
+
505
+ def _nt_include_declaration
506
+ start_index = index
507
+ if node_cache[:include_declaration].has_key?(index)
508
+ cached = node_cache[:include_declaration][index]
509
+ @index = cached.interval.end if cached
510
+ return cached
511
+ end
512
+
513
+ i0, s0 = index, []
514
+ if input.index('include', index) == index
515
+ r1 = (SyntaxNode).new(input, index...(index + 7))
516
+ @index += 7
517
+ else
518
+ terminal_parse_failure('include')
519
+ r1 = nil
520
+ end
521
+ s0 << r1
522
+ if r1
523
+ r2 = _nt_space
524
+ s0 << r2
525
+ if r2
526
+ if input.index(Regexp.new('[A-Z]'), index) == index
527
+ r3 = (SyntaxNode).new(input, index...(index + 1))
528
+ @index += 1
529
+ else
530
+ r3 = nil
531
+ end
532
+ s0 << r3
533
+ if r3
534
+ s4, i4 = [], index
535
+ loop do
536
+ i5 = index
537
+ r6 = _nt_alphanumeric_char
538
+ if r6
539
+ r5 = r6
540
+ else
541
+ if input.index('::', index) == index
542
+ r7 = (SyntaxNode).new(input, index...(index + 2))
543
+ @index += 2
544
+ else
545
+ terminal_parse_failure('::')
546
+ r7 = nil
547
+ end
548
+ if r7
549
+ r5 = r7
550
+ else
551
+ self.index = i5
552
+ r5 = nil
553
+ end
554
+ end
555
+ if r5
556
+ s4 << r5
557
+ else
558
+ break
559
+ end
560
+ end
561
+ r4 = SyntaxNode.new(input, i4...index, s4)
562
+ s0 << r4
563
+ end
564
+ end
565
+ end
566
+ if s0.last
567
+ r0 = (SyntaxNode).new(input, i0...index, s0)
568
+ r0.extend(IncludeDeclaration0)
569
+ r0.extend(IncludeDeclaration1)
570
+ else
571
+ self.index = i0
572
+ r0 = nil
573
+ end
574
+
575
+ node_cache[:include_declaration][start_index] = r0
576
+
577
+ return r0
578
+ end
579
+
580
+ module ParsingRule0
581
+ def space
582
+ elements[1]
583
+ end
584
+
585
+ def nonterminal
586
+ elements[2]
587
+ end
588
+
589
+ def space
590
+ elements[3]
591
+ end
592
+
593
+ def parsing_expression
594
+ elements[4]
595
+ end
596
+
597
+ def space
598
+ elements[5]
599
+ end
600
+
601
+ end
602
+
603
+ def _nt_parsing_rule
604
+ start_index = index
605
+ if node_cache[:parsing_rule].has_key?(index)
606
+ cached = node_cache[:parsing_rule][index]
607
+ @index = cached.interval.end if cached
608
+ return cached
609
+ end
610
+
611
+ i0, s0 = index, []
612
+ if input.index('rule', index) == index
613
+ r1 = (SyntaxNode).new(input, index...(index + 4))
614
+ @index += 4
615
+ else
616
+ terminal_parse_failure('rule')
617
+ r1 = nil
618
+ end
619
+ s0 << r1
620
+ if r1
621
+ r2 = _nt_space
622
+ s0 << r2
623
+ if r2
624
+ r3 = _nt_nonterminal
625
+ s0 << r3
626
+ if r3
627
+ r4 = _nt_space
628
+ s0 << r4
629
+ if r4
630
+ r5 = _nt_parsing_expression
631
+ s0 << r5
632
+ if r5
633
+ r6 = _nt_space
634
+ s0 << r6
635
+ if r6
636
+ if input.index('end', index) == index
637
+ r7 = (SyntaxNode).new(input, index...(index + 3))
638
+ @index += 3
639
+ else
640
+ terminal_parse_failure('end')
641
+ r7 = nil
642
+ end
643
+ s0 << r7
644
+ end
645
+ end
646
+ end
647
+ end
648
+ end
649
+ end
650
+ if s0.last
651
+ r0 = (ParsingRule).new(input, i0...index, s0)
652
+ r0.extend(ParsingRule0)
653
+ else
654
+ self.index = i0
655
+ r0 = nil
656
+ end
657
+
658
+ node_cache[:parsing_rule][start_index] = r0
659
+
660
+ return r0
661
+ end
662
+
663
+ def _nt_parsing_expression
664
+ start_index = index
665
+ if node_cache[:parsing_expression].has_key?(index)
666
+ cached = node_cache[:parsing_expression][index]
667
+ @index = cached.interval.end if cached
668
+ return cached
669
+ end
670
+
671
+ i0 = index
672
+ r1 = _nt_choice
673
+ if r1
674
+ r0 = r1
675
+ else
676
+ r2 = _nt_sequence
677
+ if r2
678
+ r0 = r2
679
+ else
680
+ r3 = _nt_primary
681
+ if r3
682
+ r0 = r3
683
+ else
684
+ self.index = i0
685
+ r0 = nil
686
+ end
687
+ end
688
+ end
689
+
690
+ node_cache[:parsing_expression][start_index] = r0
691
+
692
+ return r0
693
+ end
694
+
695
+ module Choice0
696
+ def alternative
697
+ elements[3]
698
+ end
699
+ end
700
+
701
+ module Choice1
702
+ def head
703
+ elements[0]
704
+ end
705
+
706
+ def tail
707
+ elements[1]
708
+ end
709
+ end
710
+
711
+ module Choice2
712
+ def alternatives
713
+ [head] + tail
714
+ end
715
+
716
+ def tail
717
+ super.elements.map {|elt| elt.alternative}
718
+ end
719
+
720
+ def inline_modules
721
+ (alternatives.map {|alt| alt.inline_modules }).flatten
722
+ end
723
+ end
724
+
725
+ def _nt_choice
726
+ start_index = index
727
+ if node_cache[:choice].has_key?(index)
728
+ cached = node_cache[:choice][index]
729
+ @index = cached.interval.end if cached
730
+ return cached
731
+ end
732
+
733
+ i0, s0 = index, []
734
+ r1 = _nt_alternative
735
+ s0 << r1
736
+ if r1
737
+ s2, i2 = [], index
738
+ loop do
739
+ i3, s3 = index, []
740
+ r5 = _nt_space
741
+ if r5
742
+ r4 = r5
743
+ else
744
+ r4 = SyntaxNode.new(input, index...index)
745
+ end
746
+ s3 << r4
747
+ if r4
748
+ if input.index('/', index) == index
749
+ r6 = (SyntaxNode).new(input, index...(index + 1))
750
+ @index += 1
751
+ else
752
+ terminal_parse_failure('/')
753
+ r6 = nil
754
+ end
755
+ s3 << r6
756
+ if r6
757
+ r8 = _nt_space
758
+ if r8
759
+ r7 = r8
760
+ else
761
+ r7 = SyntaxNode.new(input, index...index)
762
+ end
763
+ s3 << r7
764
+ if r7
765
+ r9 = _nt_alternative
766
+ s3 << r9
767
+ end
768
+ end
769
+ end
770
+ if s3.last
771
+ r3 = (SyntaxNode).new(input, i3...index, s3)
772
+ r3.extend(Choice0)
773
+ else
774
+ self.index = i3
775
+ r3 = nil
776
+ end
777
+ if r3
778
+ s2 << r3
779
+ else
780
+ break
781
+ end
782
+ end
783
+ if s2.empty?
784
+ self.index = i2
785
+ r2 = nil
786
+ else
787
+ r2 = SyntaxNode.new(input, i2...index, s2)
788
+ end
789
+ s0 << r2
790
+ end
791
+ if s0.last
792
+ r0 = (Choice).new(input, i0...index, s0)
793
+ r0.extend(Choice1)
794
+ r0.extend(Choice2)
795
+ else
796
+ self.index = i0
797
+ r0 = nil
798
+ end
799
+
800
+ node_cache[:choice][start_index] = r0
801
+
802
+ return r0
803
+ end
804
+
805
+ module Sequence0
806
+ def space
807
+ elements[0]
808
+ end
809
+
810
+ def labeled_sequence_primary
811
+ elements[1]
812
+ end
813
+ end
814
+
815
+ module Sequence1
816
+ def head
817
+ elements[0]
818
+ end
819
+
820
+ def tail
821
+ elements[1]
822
+ end
823
+
824
+ def node_class_declarations
825
+ elements[2]
826
+ end
827
+ end
828
+
829
+ module Sequence2
830
+ def sequence_elements
831
+ [head] + tail
832
+ end
833
+
834
+ def tail
835
+ super.elements.map {|elt| elt.labeled_sequence_primary }
836
+ end
837
+
838
+ def inline_modules
839
+ (sequence_elements.map {|elt| elt.inline_modules}).flatten +
840
+ [sequence_element_accessor_module] +
841
+ node_class_declarations.inline_modules
842
+ end
843
+
844
+ def inline_module_name
845
+ node_class_declarations.inline_module_name
846
+ end
847
+ end
848
+
849
+ def _nt_sequence
850
+ start_index = index
851
+ if node_cache[:sequence].has_key?(index)
852
+ cached = node_cache[:sequence][index]
853
+ @index = cached.interval.end if cached
854
+ return cached
855
+ end
856
+
857
+ i0, s0 = index, []
858
+ r1 = _nt_labeled_sequence_primary
859
+ s0 << r1
860
+ if r1
861
+ s2, i2 = [], index
862
+ loop do
863
+ i3, s3 = index, []
864
+ r4 = _nt_space
865
+ s3 << r4
866
+ if r4
867
+ r5 = _nt_labeled_sequence_primary
868
+ s3 << r5
869
+ end
870
+ if s3.last
871
+ r3 = (SyntaxNode).new(input, i3...index, s3)
872
+ r3.extend(Sequence0)
873
+ else
874
+ self.index = i3
875
+ r3 = nil
876
+ end
877
+ if r3
878
+ s2 << r3
879
+ else
880
+ break
881
+ end
882
+ end
883
+ if s2.empty?
884
+ self.index = i2
885
+ r2 = nil
886
+ else
887
+ r2 = SyntaxNode.new(input, i2...index, s2)
888
+ end
889
+ s0 << r2
890
+ if r2
891
+ r6 = _nt_node_class_declarations
892
+ s0 << r6
893
+ end
894
+ end
895
+ if s0.last
896
+ r0 = (Sequence).new(input, i0...index, s0)
897
+ r0.extend(Sequence1)
898
+ r0.extend(Sequence2)
899
+ else
900
+ self.index = i0
901
+ r0 = nil
902
+ end
903
+
904
+ node_cache[:sequence][start_index] = r0
905
+
906
+ return r0
907
+ end
908
+
909
+ def _nt_alternative
910
+ start_index = index
911
+ if node_cache[:alternative].has_key?(index)
912
+ cached = node_cache[:alternative][index]
913
+ @index = cached.interval.end if cached
914
+ return cached
915
+ end
916
+
917
+ i0 = index
918
+ r1 = _nt_sequence
919
+ if r1
920
+ r0 = r1
921
+ else
922
+ r2 = _nt_primary
923
+ if r2
924
+ r0 = r2
925
+ else
926
+ self.index = i0
927
+ r0 = nil
928
+ end
929
+ end
930
+
931
+ node_cache[:alternative][start_index] = r0
932
+
933
+ return r0
934
+ end
935
+
936
+ module Primary0
937
+ def prefix
938
+ elements[0]
939
+ end
940
+
941
+ def atomic
942
+ elements[1]
943
+ end
944
+ end
945
+
946
+ module Primary1
947
+ def compile(address, builder, parent_expression=nil)
948
+ prefix.compile(address, builder, self)
949
+ end
950
+
951
+ def prefixed_expression
952
+ atomic
953
+ end
954
+
955
+ def inline_modules
956
+ atomic.inline_modules
957
+ end
958
+
959
+ def inline_module_name
960
+ nil
961
+ end
962
+ end
963
+
964
+ module Primary2
965
+ def atomic
966
+ elements[0]
967
+ end
968
+
969
+ def suffix
970
+ elements[1]
971
+ end
972
+
973
+ def node_class_declarations
974
+ elements[2]
975
+ end
976
+ end
977
+
978
+ module Primary3
979
+ def compile(address, builder, parent_expression=nil)
980
+ suffix.compile(address, builder, self)
981
+ end
982
+
983
+ def optional_expression
984
+ atomic
985
+ end
986
+
987
+ def node_class_name
988
+ node_class_declarations.node_class_name
989
+ end
990
+
991
+ def inline_modules
992
+ atomic.inline_modules + node_class_declarations.inline_modules
993
+ end
994
+
995
+ def inline_module_name
996
+ node_class_declarations.inline_module_name
997
+ end
998
+ end
999
+
1000
+ module Primary4
1001
+ def atomic
1002
+ elements[0]
1003
+ end
1004
+
1005
+ def node_class_declarations
1006
+ elements[1]
1007
+ end
1008
+ end
1009
+
1010
+ module Primary5
1011
+ def compile(address, builder, parent_expression=nil)
1012
+ atomic.compile(address, builder, self)
1013
+ end
1014
+
1015
+ def node_class_name
1016
+ node_class_declarations.node_class_name
1017
+ end
1018
+
1019
+ def inline_modules
1020
+ atomic.inline_modules + node_class_declarations.inline_modules
1021
+ end
1022
+
1023
+ def inline_module_name
1024
+ node_class_declarations.inline_module_name
1025
+ end
1026
+ end
1027
+
1028
+ def _nt_primary
1029
+ start_index = index
1030
+ if node_cache[:primary].has_key?(index)
1031
+ cached = node_cache[:primary][index]
1032
+ @index = cached.interval.end if cached
1033
+ return cached
1034
+ end
1035
+
1036
+ i0 = index
1037
+ i1, s1 = index, []
1038
+ r2 = _nt_prefix
1039
+ s1 << r2
1040
+ if r2
1041
+ r3 = _nt_atomic
1042
+ s1 << r3
1043
+ end
1044
+ if s1.last
1045
+ r1 = (SyntaxNode).new(input, i1...index, s1)
1046
+ r1.extend(Primary0)
1047
+ r1.extend(Primary1)
1048
+ else
1049
+ self.index = i1
1050
+ r1 = nil
1051
+ end
1052
+ if r1
1053
+ r0 = r1
1054
+ else
1055
+ i4, s4 = index, []
1056
+ r5 = _nt_atomic
1057
+ s4 << r5
1058
+ if r5
1059
+ r6 = _nt_suffix
1060
+ s4 << r6
1061
+ if r6
1062
+ r7 = _nt_node_class_declarations
1063
+ s4 << r7
1064
+ end
1065
+ end
1066
+ if s4.last
1067
+ r4 = (SyntaxNode).new(input, i4...index, s4)
1068
+ r4.extend(Primary2)
1069
+ r4.extend(Primary3)
1070
+ else
1071
+ self.index = i4
1072
+ r4 = nil
1073
+ end
1074
+ if r4
1075
+ r0 = r4
1076
+ else
1077
+ i8, s8 = index, []
1078
+ r9 = _nt_atomic
1079
+ s8 << r9
1080
+ if r9
1081
+ r10 = _nt_node_class_declarations
1082
+ s8 << r10
1083
+ end
1084
+ if s8.last
1085
+ r8 = (SyntaxNode).new(input, i8...index, s8)
1086
+ r8.extend(Primary4)
1087
+ r8.extend(Primary5)
1088
+ else
1089
+ self.index = i8
1090
+ r8 = nil
1091
+ end
1092
+ if r8
1093
+ r0 = r8
1094
+ else
1095
+ self.index = i0
1096
+ r0 = nil
1097
+ end
1098
+ end
1099
+ end
1100
+
1101
+ node_cache[:primary][start_index] = r0
1102
+
1103
+ return r0
1104
+ end
1105
+
1106
+ module LabeledSequencePrimary0
1107
+ def label
1108
+ elements[0]
1109
+ end
1110
+
1111
+ def sequence_primary
1112
+ elements[1]
1113
+ end
1114
+ end
1115
+
1116
+ module LabeledSequencePrimary1
1117
+ def compile(lexical_address, builder)
1118
+ sequence_primary.compile(lexical_address, builder)
1119
+ end
1120
+
1121
+ def inline_modules
1122
+ sequence_primary.inline_modules
1123
+ end
1124
+
1125
+ def label_name
1126
+ if label.name
1127
+ label.name
1128
+ elsif sequence_primary.instance_of?(Nonterminal)
1129
+ sequence_primary.text_value
1130
+ else
1131
+ nil
1132
+ end
1133
+ end
1134
+ end
1135
+
1136
+ def _nt_labeled_sequence_primary
1137
+ start_index = index
1138
+ if node_cache[:labeled_sequence_primary].has_key?(index)
1139
+ cached = node_cache[:labeled_sequence_primary][index]
1140
+ @index = cached.interval.end if cached
1141
+ return cached
1142
+ end
1143
+
1144
+ i0, s0 = index, []
1145
+ r1 = _nt_label
1146
+ s0 << r1
1147
+ if r1
1148
+ r2 = _nt_sequence_primary
1149
+ s0 << r2
1150
+ end
1151
+ if s0.last
1152
+ r0 = (SyntaxNode).new(input, i0...index, s0)
1153
+ r0.extend(LabeledSequencePrimary0)
1154
+ r0.extend(LabeledSequencePrimary1)
1155
+ else
1156
+ self.index = i0
1157
+ r0 = nil
1158
+ end
1159
+
1160
+ node_cache[:labeled_sequence_primary][start_index] = r0
1161
+
1162
+ return r0
1163
+ end
1164
+
1165
+ module Label0
1166
+ def alpha_char
1167
+ elements[0]
1168
+ end
1169
+
1170
+ end
1171
+
1172
+ module Label1
1173
+ end
1174
+
1175
+ module Label2
1176
+ def name
1177
+ elements[0].text_value
1178
+ end
1179
+ end
1180
+
1181
+ module Label3
1182
+ def name
1183
+ nil
1184
+ end
1185
+ end
1186
+
1187
+ def _nt_label
1188
+ start_index = index
1189
+ if node_cache[:label].has_key?(index)
1190
+ cached = node_cache[:label][index]
1191
+ @index = cached.interval.end if cached
1192
+ return cached
1193
+ end
1194
+
1195
+ i0 = index
1196
+ i1, s1 = index, []
1197
+ i2, s2 = index, []
1198
+ r3 = _nt_alpha_char
1199
+ s2 << r3
1200
+ if r3
1201
+ s4, i4 = [], index
1202
+ loop do
1203
+ r5 = _nt_alphanumeric_char
1204
+ if r5
1205
+ s4 << r5
1206
+ else
1207
+ break
1208
+ end
1209
+ end
1210
+ r4 = SyntaxNode.new(input, i4...index, s4)
1211
+ s2 << r4
1212
+ end
1213
+ if s2.last
1214
+ r2 = (SyntaxNode).new(input, i2...index, s2)
1215
+ r2.extend(Label0)
1216
+ else
1217
+ self.index = i2
1218
+ r2 = nil
1219
+ end
1220
+ s1 << r2
1221
+ if r2
1222
+ if input.index(':', index) == index
1223
+ r6 = (SyntaxNode).new(input, index...(index + 1))
1224
+ @index += 1
1225
+ else
1226
+ terminal_parse_failure(':')
1227
+ r6 = nil
1228
+ end
1229
+ s1 << r6
1230
+ end
1231
+ if s1.last
1232
+ r1 = (SyntaxNode).new(input, i1...index, s1)
1233
+ r1.extend(Label1)
1234
+ r1.extend(Label2)
1235
+ else
1236
+ self.index = i1
1237
+ r1 = nil
1238
+ end
1239
+ if r1
1240
+ r0 = r1
1241
+ else
1242
+ if input.index('', index) == index
1243
+ r7 = (SyntaxNode).new(input, index...(index + 0))
1244
+ r7.extend(Label3)
1245
+ @index += 0
1246
+ else
1247
+ terminal_parse_failure('')
1248
+ r7 = nil
1249
+ end
1250
+ if r7
1251
+ r0 = r7
1252
+ else
1253
+ self.index = i0
1254
+ r0 = nil
1255
+ end
1256
+ end
1257
+
1258
+ node_cache[:label][start_index] = r0
1259
+
1260
+ return r0
1261
+ end
1262
+
1263
+ module SequencePrimary0
1264
+ def prefix
1265
+ elements[0]
1266
+ end
1267
+
1268
+ def atomic
1269
+ elements[1]
1270
+ end
1271
+ end
1272
+
1273
+ module SequencePrimary1
1274
+ def compile(lexical_address, builder)
1275
+ prefix.compile(lexical_address, builder, self)
1276
+ end
1277
+
1278
+ def prefixed_expression
1279
+ elements[1]
1280
+ end
1281
+
1282
+ def inline_modules
1283
+ atomic.inline_modules
1284
+ end
1285
+
1286
+ def inline_module_name
1287
+ nil
1288
+ end
1289
+ end
1290
+
1291
+ module SequencePrimary2
1292
+ def atomic
1293
+ elements[0]
1294
+ end
1295
+
1296
+ def suffix
1297
+ elements[1]
1298
+ end
1299
+ end
1300
+
1301
+ module SequencePrimary3
1302
+ def compile(lexical_address, builder)
1303
+ suffix.compile(lexical_address, builder, self)
1304
+ end
1305
+
1306
+ def node_class_name
1307
+ nil
1308
+ end
1309
+
1310
+ def inline_modules
1311
+ atomic.inline_modules
1312
+ end
1313
+
1314
+ def inline_module_name
1315
+ nil
1316
+ end
1317
+ end
1318
+
1319
+ def _nt_sequence_primary
1320
+ start_index = index
1321
+ if node_cache[:sequence_primary].has_key?(index)
1322
+ cached = node_cache[:sequence_primary][index]
1323
+ @index = cached.interval.end if cached
1324
+ return cached
1325
+ end
1326
+
1327
+ i0 = index
1328
+ i1, s1 = index, []
1329
+ r2 = _nt_prefix
1330
+ s1 << r2
1331
+ if r2
1332
+ r3 = _nt_atomic
1333
+ s1 << r3
1334
+ end
1335
+ if s1.last
1336
+ r1 = (SyntaxNode).new(input, i1...index, s1)
1337
+ r1.extend(SequencePrimary0)
1338
+ r1.extend(SequencePrimary1)
1339
+ else
1340
+ self.index = i1
1341
+ r1 = nil
1342
+ end
1343
+ if r1
1344
+ r0 = r1
1345
+ else
1346
+ i4, s4 = index, []
1347
+ r5 = _nt_atomic
1348
+ s4 << r5
1349
+ if r5
1350
+ r6 = _nt_suffix
1351
+ s4 << r6
1352
+ end
1353
+ if s4.last
1354
+ r4 = (SyntaxNode).new(input, i4...index, s4)
1355
+ r4.extend(SequencePrimary2)
1356
+ r4.extend(SequencePrimary3)
1357
+ else
1358
+ self.index = i4
1359
+ r4 = nil
1360
+ end
1361
+ if r4
1362
+ r0 = r4
1363
+ else
1364
+ r7 = _nt_atomic
1365
+ if r7
1366
+ r0 = r7
1367
+ else
1368
+ self.index = i0
1369
+ r0 = nil
1370
+ end
1371
+ end
1372
+ end
1373
+
1374
+ node_cache[:sequence_primary][start_index] = r0
1375
+
1376
+ return r0
1377
+ end
1378
+
1379
+ def _nt_suffix
1380
+ start_index = index
1381
+ if node_cache[:suffix].has_key?(index)
1382
+ cached = node_cache[:suffix][index]
1383
+ @index = cached.interval.end if cached
1384
+ return cached
1385
+ end
1386
+
1387
+ i0 = index
1388
+ r1 = _nt_repetition_suffix
1389
+ if r1
1390
+ r0 = r1
1391
+ else
1392
+ r2 = _nt_optional_suffix
1393
+ if r2
1394
+ r0 = r2
1395
+ else
1396
+ self.index = i0
1397
+ r0 = nil
1398
+ end
1399
+ end
1400
+
1401
+ node_cache[:suffix][start_index] = r0
1402
+
1403
+ return r0
1404
+ end
1405
+
1406
+ def _nt_optional_suffix
1407
+ start_index = index
1408
+ if node_cache[:optional_suffix].has_key?(index)
1409
+ cached = node_cache[:optional_suffix][index]
1410
+ @index = cached.interval.end if cached
1411
+ return cached
1412
+ end
1413
+
1414
+ if input.index('?', index) == index
1415
+ r0 = (Optional).new(input, index...(index + 1))
1416
+ @index += 1
1417
+ else
1418
+ terminal_parse_failure('?')
1419
+ r0 = nil
1420
+ end
1421
+
1422
+ node_cache[:optional_suffix][start_index] = r0
1423
+
1424
+ return r0
1425
+ end
1426
+
1427
+ module NodeClassDeclarations0
1428
+ def node_class_expression
1429
+ elements[0]
1430
+ end
1431
+
1432
+ def trailing_inline_module
1433
+ elements[1]
1434
+ end
1435
+ end
1436
+
1437
+ module NodeClassDeclarations1
1438
+ def node_class_name
1439
+ node_class_expression.node_class_name
1440
+ end
1441
+
1442
+ def inline_modules
1443
+ trailing_inline_module.inline_modules
1444
+ end
1445
+
1446
+ def inline_module
1447
+ trailing_inline_module.inline_module
1448
+ end
1449
+
1450
+ def inline_module_name
1451
+ inline_module.module_name if inline_module
1452
+ end
1453
+ end
1454
+
1455
+ def _nt_node_class_declarations
1456
+ start_index = index
1457
+ if node_cache[:node_class_declarations].has_key?(index)
1458
+ cached = node_cache[:node_class_declarations][index]
1459
+ @index = cached.interval.end if cached
1460
+ return cached
1461
+ end
1462
+
1463
+ i0, s0 = index, []
1464
+ r1 = _nt_node_class_expression
1465
+ s0 << r1
1466
+ if r1
1467
+ r2 = _nt_trailing_inline_module
1468
+ s0 << r2
1469
+ end
1470
+ if s0.last
1471
+ r0 = (SyntaxNode).new(input, i0...index, s0)
1472
+ r0.extend(NodeClassDeclarations0)
1473
+ r0.extend(NodeClassDeclarations1)
1474
+ else
1475
+ self.index = i0
1476
+ r0 = nil
1477
+ end
1478
+
1479
+ node_cache[:node_class_declarations][start_index] = r0
1480
+
1481
+ return r0
1482
+ end
1483
+
1484
+ def _nt_repetition_suffix
1485
+ start_index = index
1486
+ if node_cache[:repetition_suffix].has_key?(index)
1487
+ cached = node_cache[:repetition_suffix][index]
1488
+ @index = cached.interval.end if cached
1489
+ return cached
1490
+ end
1491
+
1492
+ i0 = index
1493
+ if input.index('+', index) == index
1494
+ r1 = (OneOrMore).new(input, index...(index + 1))
1495
+ @index += 1
1496
+ else
1497
+ terminal_parse_failure('+')
1498
+ r1 = nil
1499
+ end
1500
+ if r1
1501
+ r0 = r1
1502
+ else
1503
+ if input.index('*', index) == index
1504
+ r2 = (ZeroOrMore).new(input, index...(index + 1))
1505
+ @index += 1
1506
+ else
1507
+ terminal_parse_failure('*')
1508
+ r2 = nil
1509
+ end
1510
+ if r2
1511
+ r0 = r2
1512
+ else
1513
+ self.index = i0
1514
+ r0 = nil
1515
+ end
1516
+ end
1517
+
1518
+ node_cache[:repetition_suffix][start_index] = r0
1519
+
1520
+ return r0
1521
+ end
1522
+
1523
+ def _nt_prefix
1524
+ start_index = index
1525
+ if node_cache[:prefix].has_key?(index)
1526
+ cached = node_cache[:prefix][index]
1527
+ @index = cached.interval.end if cached
1528
+ return cached
1529
+ end
1530
+
1531
+ i0 = index
1532
+ if input.index('&', index) == index
1533
+ r1 = (AndPredicate).new(input, index...(index + 1))
1534
+ @index += 1
1535
+ else
1536
+ terminal_parse_failure('&')
1537
+ r1 = nil
1538
+ end
1539
+ if r1
1540
+ r0 = r1
1541
+ else
1542
+ if input.index('!', index) == index
1543
+ r2 = (NotPredicate).new(input, index...(index + 1))
1544
+ @index += 1
1545
+ else
1546
+ terminal_parse_failure('!')
1547
+ r2 = nil
1548
+ end
1549
+ if r2
1550
+ r0 = r2
1551
+ else
1552
+ if input.index('~', index) == index
1553
+ r3 = (TransientPrefix).new(input, index...(index + 1))
1554
+ @index += 1
1555
+ else
1556
+ terminal_parse_failure('~')
1557
+ r3 = nil
1558
+ end
1559
+ if r3
1560
+ r0 = r3
1561
+ else
1562
+ self.index = i0
1563
+ r0 = nil
1564
+ end
1565
+ end
1566
+ end
1567
+
1568
+ node_cache[:prefix][start_index] = r0
1569
+
1570
+ return r0
1571
+ end
1572
+
1573
+ def _nt_atomic
1574
+ start_index = index
1575
+ if node_cache[:atomic].has_key?(index)
1576
+ cached = node_cache[:atomic][index]
1577
+ @index = cached.interval.end if cached
1578
+ return cached
1579
+ end
1580
+
1581
+ i0 = index
1582
+ r1 = _nt_terminal
1583
+ if r1
1584
+ r0 = r1
1585
+ else
1586
+ r2 = _nt_nonterminal
1587
+ if r2
1588
+ r0 = r2
1589
+ else
1590
+ r3 = _nt_parenthesized_expression
1591
+ if r3
1592
+ r0 = r3
1593
+ else
1594
+ self.index = i0
1595
+ r0 = nil
1596
+ end
1597
+ end
1598
+ end
1599
+
1600
+ node_cache[:atomic][start_index] = r0
1601
+
1602
+ return r0
1603
+ end
1604
+
1605
+ module ParenthesizedExpression0
1606
+ def parsing_expression
1607
+ elements[2]
1608
+ end
1609
+
1610
+ end
1611
+
1612
+ module ParenthesizedExpression1
1613
+ def inline_modules
1614
+ parsing_expression.inline_modules
1615
+ end
1616
+ end
1617
+
1618
+ def _nt_parenthesized_expression
1619
+ start_index = index
1620
+ if node_cache[:parenthesized_expression].has_key?(index)
1621
+ cached = node_cache[:parenthesized_expression][index]
1622
+ @index = cached.interval.end if cached
1623
+ return cached
1624
+ end
1625
+
1626
+ i0, s0 = index, []
1627
+ if input.index('(', index) == index
1628
+ r1 = (SyntaxNode).new(input, index...(index + 1))
1629
+ @index += 1
1630
+ else
1631
+ terminal_parse_failure('(')
1632
+ r1 = nil
1633
+ end
1634
+ s0 << r1
1635
+ if r1
1636
+ r3 = _nt_space
1637
+ if r3
1638
+ r2 = r3
1639
+ else
1640
+ r2 = SyntaxNode.new(input, index...index)
1641
+ end
1642
+ s0 << r2
1643
+ if r2
1644
+ r4 = _nt_parsing_expression
1645
+ s0 << r4
1646
+ if r4
1647
+ r6 = _nt_space
1648
+ if r6
1649
+ r5 = r6
1650
+ else
1651
+ r5 = SyntaxNode.new(input, index...index)
1652
+ end
1653
+ s0 << r5
1654
+ if r5
1655
+ if input.index(')', index) == index
1656
+ r7 = (SyntaxNode).new(input, index...(index + 1))
1657
+ @index += 1
1658
+ else
1659
+ terminal_parse_failure(')')
1660
+ r7 = nil
1661
+ end
1662
+ s0 << r7
1663
+ end
1664
+ end
1665
+ end
1666
+ end
1667
+ if s0.last
1668
+ r0 = (ParenthesizedExpression).new(input, i0...index, s0)
1669
+ r0.extend(ParenthesizedExpression0)
1670
+ r0.extend(ParenthesizedExpression1)
1671
+ else
1672
+ self.index = i0
1673
+ r0 = nil
1674
+ end
1675
+
1676
+ node_cache[:parenthesized_expression][start_index] = r0
1677
+
1678
+ return r0
1679
+ end
1680
+
1681
+ module Nonterminal0
1682
+ def alpha_char
1683
+ elements[0]
1684
+ end
1685
+
1686
+ end
1687
+
1688
+ module Nonterminal1
1689
+ end
1690
+
1691
+ def _nt_nonterminal
1692
+ start_index = index
1693
+ if node_cache[:nonterminal].has_key?(index)
1694
+ cached = node_cache[:nonterminal][index]
1695
+ @index = cached.interval.end if cached
1696
+ return cached
1697
+ end
1698
+
1699
+ i0, s0 = index, []
1700
+ i1 = index
1701
+ r2 = _nt_keyword_inside_grammar
1702
+ if r2
1703
+ r1 = nil
1704
+ else
1705
+ self.index = i1
1706
+ r1 = SyntaxNode.new(input, index...index)
1707
+ end
1708
+ s0 << r1
1709
+ if r1
1710
+ i3, s3 = index, []
1711
+ r4 = _nt_alpha_char
1712
+ s3 << r4
1713
+ if r4
1714
+ s5, i5 = [], index
1715
+ loop do
1716
+ r6 = _nt_alphanumeric_char
1717
+ if r6
1718
+ s5 << r6
1719
+ else
1720
+ break
1721
+ end
1722
+ end
1723
+ r5 = SyntaxNode.new(input, i5...index, s5)
1724
+ s3 << r5
1725
+ end
1726
+ if s3.last
1727
+ r3 = (SyntaxNode).new(input, i3...index, s3)
1728
+ r3.extend(Nonterminal0)
1729
+ else
1730
+ self.index = i3
1731
+ r3 = nil
1732
+ end
1733
+ s0 << r3
1734
+ end
1735
+ if s0.last
1736
+ r0 = (Nonterminal).new(input, i0...index, s0)
1737
+ r0.extend(Nonterminal1)
1738
+ else
1739
+ self.index = i0
1740
+ r0 = nil
1741
+ end
1742
+
1743
+ node_cache[:nonterminal][start_index] = r0
1744
+
1745
+ return r0
1746
+ end
1747
+
1748
+ def _nt_terminal
1749
+ start_index = index
1750
+ if node_cache[:terminal].has_key?(index)
1751
+ cached = node_cache[:terminal][index]
1752
+ @index = cached.interval.end if cached
1753
+ return cached
1754
+ end
1755
+
1756
+ i0 = index
1757
+ r1 = _nt_quoted_string
1758
+ if r1
1759
+ r0 = r1
1760
+ else
1761
+ r2 = _nt_character_class
1762
+ if r2
1763
+ r0 = r2
1764
+ else
1765
+ r3 = _nt_anything_symbol
1766
+ if r3
1767
+ r0 = r3
1768
+ else
1769
+ self.index = i0
1770
+ r0 = nil
1771
+ end
1772
+ end
1773
+ end
1774
+
1775
+ node_cache[:terminal][start_index] = r0
1776
+
1777
+ return r0
1778
+ end
1779
+
1780
+ module QuotedString0
1781
+ def string
1782
+ super.text_value
1783
+ end
1784
+ end
1785
+
1786
+ def _nt_quoted_string
1787
+ start_index = index
1788
+ if node_cache[:quoted_string].has_key?(index)
1789
+ cached = node_cache[:quoted_string][index]
1790
+ @index = cached.interval.end if cached
1791
+ return cached
1792
+ end
1793
+
1794
+ i0 = index
1795
+ r1 = _nt_single_quoted_string
1796
+ if r1
1797
+ r0 = r1
1798
+ r0.extend(QuotedString0)
1799
+ else
1800
+ r2 = _nt_double_quoted_string
1801
+ if r2
1802
+ r0 = r2
1803
+ r0.extend(QuotedString0)
1804
+ else
1805
+ self.index = i0
1806
+ r0 = nil
1807
+ end
1808
+ end
1809
+
1810
+ node_cache[:quoted_string][start_index] = r0
1811
+
1812
+ return r0
1813
+ end
1814
+
1815
+ module DoubleQuotedString0
1816
+ end
1817
+
1818
+ module DoubleQuotedString1
1819
+ def string
1820
+ elements[1]
1821
+ end
1822
+
1823
+ end
1824
+
1825
+ def _nt_double_quoted_string
1826
+ start_index = index
1827
+ if node_cache[:double_quoted_string].has_key?(index)
1828
+ cached = node_cache[:double_quoted_string][index]
1829
+ @index = cached.interval.end if cached
1830
+ return cached
1831
+ end
1832
+
1833
+ i0, s0 = index, []
1834
+ if input.index('"', index) == index
1835
+ r1 = (SyntaxNode).new(input, index...(index + 1))
1836
+ @index += 1
1837
+ else
1838
+ terminal_parse_failure('"')
1839
+ r1 = nil
1840
+ end
1841
+ s0 << r1
1842
+ if r1
1843
+ s2, i2 = [], index
1844
+ loop do
1845
+ i3, s3 = index, []
1846
+ i4 = index
1847
+ if input.index('"', index) == index
1848
+ r5 = (SyntaxNode).new(input, index...(index + 1))
1849
+ @index += 1
1850
+ else
1851
+ terminal_parse_failure('"')
1852
+ r5 = nil
1853
+ end
1854
+ if r5
1855
+ r4 = nil
1856
+ else
1857
+ self.index = i4
1858
+ r4 = SyntaxNode.new(input, index...index)
1859
+ end
1860
+ s3 << r4
1861
+ if r4
1862
+ i6 = index
1863
+ if input.index("\\\\", index) == index
1864
+ r7 = (SyntaxNode).new(input, index...(index + 2))
1865
+ @index += 2
1866
+ else
1867
+ terminal_parse_failure("\\\\")
1868
+ r7 = nil
1869
+ end
1870
+ if r7
1871
+ r6 = r7
1872
+ else
1873
+ if input.index('\"', index) == index
1874
+ r8 = (SyntaxNode).new(input, index...(index + 2))
1875
+ @index += 2
1876
+ else
1877
+ terminal_parse_failure('\"')
1878
+ r8 = nil
1879
+ end
1880
+ if r8
1881
+ r6 = r8
1882
+ else
1883
+ if index < input_length
1884
+ r9 = (SyntaxNode).new(input, index...(index + 1))
1885
+ @index += 1
1886
+ else
1887
+ terminal_parse_failure("any character")
1888
+ r9 = nil
1889
+ end
1890
+ if r9
1891
+ r6 = r9
1892
+ else
1893
+ self.index = i6
1894
+ r6 = nil
1895
+ end
1896
+ end
1897
+ end
1898
+ s3 << r6
1899
+ end
1900
+ if s3.last
1901
+ r3 = (SyntaxNode).new(input, i3...index, s3)
1902
+ r3.extend(DoubleQuotedString0)
1903
+ else
1904
+ self.index = i3
1905
+ r3 = nil
1906
+ end
1907
+ if r3
1908
+ s2 << r3
1909
+ else
1910
+ break
1911
+ end
1912
+ end
1913
+ r2 = SyntaxNode.new(input, i2...index, s2)
1914
+ s0 << r2
1915
+ if r2
1916
+ if input.index('"', index) == index
1917
+ r10 = (SyntaxNode).new(input, index...(index + 1))
1918
+ @index += 1
1919
+ else
1920
+ terminal_parse_failure('"')
1921
+ r10 = nil
1922
+ end
1923
+ s0 << r10
1924
+ end
1925
+ end
1926
+ if s0.last
1927
+ r0 = (Terminal).new(input, i0...index, s0)
1928
+ r0.extend(DoubleQuotedString1)
1929
+ else
1930
+ self.index = i0
1931
+ r0 = nil
1932
+ end
1933
+
1934
+ node_cache[:double_quoted_string][start_index] = r0
1935
+
1936
+ return r0
1937
+ end
1938
+
1939
+ module SingleQuotedString0
1940
+ end
1941
+
1942
+ module SingleQuotedString1
1943
+ def string
1944
+ elements[1]
1945
+ end
1946
+
1947
+ end
1948
+
1949
+ def _nt_single_quoted_string
1950
+ start_index = index
1951
+ if node_cache[:single_quoted_string].has_key?(index)
1952
+ cached = node_cache[:single_quoted_string][index]
1953
+ @index = cached.interval.end if cached
1954
+ return cached
1955
+ end
1956
+
1957
+ i0, s0 = index, []
1958
+ if input.index("'", index) == index
1959
+ r1 = (SyntaxNode).new(input, index...(index + 1))
1960
+ @index += 1
1961
+ else
1962
+ terminal_parse_failure("'")
1963
+ r1 = nil
1964
+ end
1965
+ s0 << r1
1966
+ if r1
1967
+ s2, i2 = [], index
1968
+ loop do
1969
+ i3, s3 = index, []
1970
+ i4 = index
1971
+ if input.index("'", index) == index
1972
+ r5 = (SyntaxNode).new(input, index...(index + 1))
1973
+ @index += 1
1974
+ else
1975
+ terminal_parse_failure("'")
1976
+ r5 = nil
1977
+ end
1978
+ if r5
1979
+ r4 = nil
1980
+ else
1981
+ self.index = i4
1982
+ r4 = SyntaxNode.new(input, index...index)
1983
+ end
1984
+ s3 << r4
1985
+ if r4
1986
+ i6 = index
1987
+ if input.index("\\\\", index) == index
1988
+ r7 = (SyntaxNode).new(input, index...(index + 2))
1989
+ @index += 2
1990
+ else
1991
+ terminal_parse_failure("\\\\")
1992
+ r7 = nil
1993
+ end
1994
+ if r7
1995
+ r6 = r7
1996
+ else
1997
+ if input.index("\\'", index) == index
1998
+ r8 = (SyntaxNode).new(input, index...(index + 2))
1999
+ @index += 2
2000
+ else
2001
+ terminal_parse_failure("\\'")
2002
+ r8 = nil
2003
+ end
2004
+ if r8
2005
+ r6 = r8
2006
+ else
2007
+ if index < input_length
2008
+ r9 = (SyntaxNode).new(input, index...(index + 1))
2009
+ @index += 1
2010
+ else
2011
+ terminal_parse_failure("any character")
2012
+ r9 = nil
2013
+ end
2014
+ if r9
2015
+ r6 = r9
2016
+ else
2017
+ self.index = i6
2018
+ r6 = nil
2019
+ end
2020
+ end
2021
+ end
2022
+ s3 << r6
2023
+ end
2024
+ if s3.last
2025
+ r3 = (SyntaxNode).new(input, i3...index, s3)
2026
+ r3.extend(SingleQuotedString0)
2027
+ else
2028
+ self.index = i3
2029
+ r3 = nil
2030
+ end
2031
+ if r3
2032
+ s2 << r3
2033
+ else
2034
+ break
2035
+ end
2036
+ end
2037
+ r2 = SyntaxNode.new(input, i2...index, s2)
2038
+ s0 << r2
2039
+ if r2
2040
+ if input.index("'", index) == index
2041
+ r10 = (SyntaxNode).new(input, index...(index + 1))
2042
+ @index += 1
2043
+ else
2044
+ terminal_parse_failure("'")
2045
+ r10 = nil
2046
+ end
2047
+ s0 << r10
2048
+ end
2049
+ end
2050
+ if s0.last
2051
+ r0 = (Terminal).new(input, i0...index, s0)
2052
+ r0.extend(SingleQuotedString1)
2053
+ else
2054
+ self.index = i0
2055
+ r0 = nil
2056
+ end
2057
+
2058
+ node_cache[:single_quoted_string][start_index] = r0
2059
+
2060
+ return r0
2061
+ end
2062
+
2063
+ module CharacterClass0
2064
+ end
2065
+
2066
+ module CharacterClass1
2067
+ end
2068
+
2069
+ module CharacterClass2
2070
+ end
2071
+
2072
+ module CharacterClass3
2073
+ def characters
2074
+ elements[1]
2075
+ end
2076
+
2077
+ end
2078
+
2079
+ module CharacterClass4
2080
+ def characters
2081
+ super.text_value
2082
+ end
2083
+ end
2084
+
2085
+ def _nt_character_class
2086
+ start_index = index
2087
+ if node_cache[:character_class].has_key?(index)
2088
+ cached = node_cache[:character_class][index]
2089
+ @index = cached.interval.end if cached
2090
+ return cached
2091
+ end
2092
+
2093
+ i0, s0 = index, []
2094
+ if input.index('[', index) == index
2095
+ r1 = (SyntaxNode).new(input, index...(index + 1))
2096
+ @index += 1
2097
+ else
2098
+ terminal_parse_failure('[')
2099
+ r1 = nil
2100
+ end
2101
+ s0 << r1
2102
+ if r1
2103
+ s2, i2 = [], index
2104
+ loop do
2105
+ i3, s3 = index, []
2106
+ i4 = index
2107
+ if input.index(']', index) == index
2108
+ r5 = (SyntaxNode).new(input, index...(index + 1))
2109
+ @index += 1
2110
+ else
2111
+ terminal_parse_failure(']')
2112
+ r5 = nil
2113
+ end
2114
+ if r5
2115
+ r4 = nil
2116
+ else
2117
+ self.index = i4
2118
+ r4 = SyntaxNode.new(input, index...index)
2119
+ end
2120
+ s3 << r4
2121
+ if r4
2122
+ i6 = index
2123
+ i7, s7 = index, []
2124
+ if input.index('\\', index) == index
2125
+ r8 = (SyntaxNode).new(input, index...(index + 1))
2126
+ @index += 1
2127
+ else
2128
+ terminal_parse_failure('\\')
2129
+ r8 = nil
2130
+ end
2131
+ s7 << r8
2132
+ if r8
2133
+ if index < input_length
2134
+ r9 = (SyntaxNode).new(input, index...(index + 1))
2135
+ @index += 1
2136
+ else
2137
+ terminal_parse_failure("any character")
2138
+ r9 = nil
2139
+ end
2140
+ s7 << r9
2141
+ end
2142
+ if s7.last
2143
+ r7 = (SyntaxNode).new(input, i7...index, s7)
2144
+ r7.extend(CharacterClass0)
2145
+ else
2146
+ self.index = i7
2147
+ r7 = nil
2148
+ end
2149
+ if r7
2150
+ r6 = r7
2151
+ else
2152
+ i10, s10 = index, []
2153
+ i11 = index
2154
+ if input.index('\\', index) == index
2155
+ r12 = (SyntaxNode).new(input, index...(index + 1))
2156
+ @index += 1
2157
+ else
2158
+ terminal_parse_failure('\\')
2159
+ r12 = nil
2160
+ end
2161
+ if r12
2162
+ r11 = nil
2163
+ else
2164
+ self.index = i11
2165
+ r11 = SyntaxNode.new(input, index...index)
2166
+ end
2167
+ s10 << r11
2168
+ if r11
2169
+ if index < input_length
2170
+ r13 = (SyntaxNode).new(input, index...(index + 1))
2171
+ @index += 1
2172
+ else
2173
+ terminal_parse_failure("any character")
2174
+ r13 = nil
2175
+ end
2176
+ s10 << r13
2177
+ end
2178
+ if s10.last
2179
+ r10 = (SyntaxNode).new(input, i10...index, s10)
2180
+ r10.extend(CharacterClass1)
2181
+ else
2182
+ self.index = i10
2183
+ r10 = nil
2184
+ end
2185
+ if r10
2186
+ r6 = r10
2187
+ else
2188
+ self.index = i6
2189
+ r6 = nil
2190
+ end
2191
+ end
2192
+ s3 << r6
2193
+ end
2194
+ if s3.last
2195
+ r3 = (SyntaxNode).new(input, i3...index, s3)
2196
+ r3.extend(CharacterClass2)
2197
+ else
2198
+ self.index = i3
2199
+ r3 = nil
2200
+ end
2201
+ if r3
2202
+ s2 << r3
2203
+ else
2204
+ break
2205
+ end
2206
+ end
2207
+ if s2.empty?
2208
+ self.index = i2
2209
+ r2 = nil
2210
+ else
2211
+ r2 = SyntaxNode.new(input, i2...index, s2)
2212
+ end
2213
+ s0 << r2
2214
+ if r2
2215
+ if input.index(']', index) == index
2216
+ r14 = (SyntaxNode).new(input, index...(index + 1))
2217
+ @index += 1
2218
+ else
2219
+ terminal_parse_failure(']')
2220
+ r14 = nil
2221
+ end
2222
+ s0 << r14
2223
+ end
2224
+ end
2225
+ if s0.last
2226
+ r0 = (CharacterClass).new(input, i0...index, s0)
2227
+ r0.extend(CharacterClass3)
2228
+ r0.extend(CharacterClass4)
2229
+ else
2230
+ self.index = i0
2231
+ r0 = nil
2232
+ end
2233
+
2234
+ node_cache[:character_class][start_index] = r0
2235
+
2236
+ return r0
2237
+ end
2238
+
2239
+ def _nt_anything_symbol
2240
+ start_index = index
2241
+ if node_cache[:anything_symbol].has_key?(index)
2242
+ cached = node_cache[:anything_symbol][index]
2243
+ @index = cached.interval.end if cached
2244
+ return cached
2245
+ end
2246
+
2247
+ if input.index('.', index) == index
2248
+ r0 = (AnythingSymbol).new(input, index...(index + 1))
2249
+ @index += 1
2250
+ else
2251
+ terminal_parse_failure('.')
2252
+ r0 = nil
2253
+ end
2254
+
2255
+ node_cache[:anything_symbol][start_index] = r0
2256
+
2257
+ return r0
2258
+ end
2259
+
2260
+ module NodeClassExpression0
2261
+ end
2262
+
2263
+ module NodeClassExpression1
2264
+ def space
2265
+ elements[0]
2266
+ end
2267
+
2268
+ end
2269
+
2270
+ module NodeClassExpression2
2271
+ def node_class_name
2272
+ elements[2].text_value
2273
+ end
2274
+ end
2275
+
2276
+ module NodeClassExpression3
2277
+ def node_class_name
2278
+ nil
2279
+ end
2280
+ end
2281
+
2282
+ def _nt_node_class_expression
2283
+ start_index = index
2284
+ if node_cache[:node_class_expression].has_key?(index)
2285
+ cached = node_cache[:node_class_expression][index]
2286
+ @index = cached.interval.end if cached
2287
+ return cached
2288
+ end
2289
+
2290
+ i0 = index
2291
+ i1, s1 = index, []
2292
+ r2 = _nt_space
2293
+ s1 << r2
2294
+ if r2
2295
+ if input.index('<', index) == index
2296
+ r3 = (SyntaxNode).new(input, index...(index + 1))
2297
+ @index += 1
2298
+ else
2299
+ terminal_parse_failure('<')
2300
+ r3 = nil
2301
+ end
2302
+ s1 << r3
2303
+ if r3
2304
+ s4, i4 = [], index
2305
+ loop do
2306
+ i5, s5 = index, []
2307
+ i6 = index
2308
+ if input.index('>', index) == index
2309
+ r7 = (SyntaxNode).new(input, index...(index + 1))
2310
+ @index += 1
2311
+ else
2312
+ terminal_parse_failure('>')
2313
+ r7 = nil
2314
+ end
2315
+ if r7
2316
+ r6 = nil
2317
+ else
2318
+ self.index = i6
2319
+ r6 = SyntaxNode.new(input, index...index)
2320
+ end
2321
+ s5 << r6
2322
+ if r6
2323
+ if index < input_length
2324
+ r8 = (SyntaxNode).new(input, index...(index + 1))
2325
+ @index += 1
2326
+ else
2327
+ terminal_parse_failure("any character")
2328
+ r8 = nil
2329
+ end
2330
+ s5 << r8
2331
+ end
2332
+ if s5.last
2333
+ r5 = (SyntaxNode).new(input, i5...index, s5)
2334
+ r5.extend(NodeClassExpression0)
2335
+ else
2336
+ self.index = i5
2337
+ r5 = nil
2338
+ end
2339
+ if r5
2340
+ s4 << r5
2341
+ else
2342
+ break
2343
+ end
2344
+ end
2345
+ if s4.empty?
2346
+ self.index = i4
2347
+ r4 = nil
2348
+ else
2349
+ r4 = SyntaxNode.new(input, i4...index, s4)
2350
+ end
2351
+ s1 << r4
2352
+ if r4
2353
+ if input.index('>', index) == index
2354
+ r9 = (SyntaxNode).new(input, index...(index + 1))
2355
+ @index += 1
2356
+ else
2357
+ terminal_parse_failure('>')
2358
+ r9 = nil
2359
+ end
2360
+ s1 << r9
2361
+ end
2362
+ end
2363
+ end
2364
+ if s1.last
2365
+ r1 = (SyntaxNode).new(input, i1...index, s1)
2366
+ r1.extend(NodeClassExpression1)
2367
+ r1.extend(NodeClassExpression2)
2368
+ else
2369
+ self.index = i1
2370
+ r1 = nil
2371
+ end
2372
+ if r1
2373
+ r0 = r1
2374
+ else
2375
+ if input.index('', index) == index
2376
+ r10 = (SyntaxNode).new(input, index...(index + 0))
2377
+ r10.extend(NodeClassExpression3)
2378
+ @index += 0
2379
+ else
2380
+ terminal_parse_failure('')
2381
+ r10 = nil
2382
+ end
2383
+ if r10
2384
+ r0 = r10
2385
+ else
2386
+ self.index = i0
2387
+ r0 = nil
2388
+ end
2389
+ end
2390
+
2391
+ node_cache[:node_class_expression][start_index] = r0
2392
+
2393
+ return r0
2394
+ end
2395
+
2396
+ module TrailingInlineModule0
2397
+ def space
2398
+ elements[0]
2399
+ end
2400
+
2401
+ def inline_module
2402
+ elements[1]
2403
+ end
2404
+ end
2405
+
2406
+ module TrailingInlineModule1
2407
+ def inline_modules
2408
+ [inline_module]
2409
+ end
2410
+
2411
+ def inline_module_name
2412
+ inline_module.module_name
2413
+ end
2414
+ end
2415
+
2416
+ module TrailingInlineModule2
2417
+ def inline_modules
2418
+ []
2419
+ end
2420
+
2421
+ def inline_module
2422
+ nil
2423
+ end
2424
+
2425
+ def inline_module_name
2426
+ nil
2427
+ end
2428
+ end
2429
+
2430
+ def _nt_trailing_inline_module
2431
+ start_index = index
2432
+ if node_cache[:trailing_inline_module].has_key?(index)
2433
+ cached = node_cache[:trailing_inline_module][index]
2434
+ @index = cached.interval.end if cached
2435
+ return cached
2436
+ end
2437
+
2438
+ i0 = index
2439
+ i1, s1 = index, []
2440
+ r2 = _nt_space
2441
+ s1 << r2
2442
+ if r2
2443
+ r3 = _nt_inline_module
2444
+ s1 << r3
2445
+ end
2446
+ if s1.last
2447
+ r1 = (SyntaxNode).new(input, i1...index, s1)
2448
+ r1.extend(TrailingInlineModule0)
2449
+ r1.extend(TrailingInlineModule1)
2450
+ else
2451
+ self.index = i1
2452
+ r1 = nil
2453
+ end
2454
+ if r1
2455
+ r0 = r1
2456
+ else
2457
+ if input.index('', index) == index
2458
+ r4 = (SyntaxNode).new(input, index...(index + 0))
2459
+ r4.extend(TrailingInlineModule2)
2460
+ @index += 0
2461
+ else
2462
+ terminal_parse_failure('')
2463
+ r4 = nil
2464
+ end
2465
+ if r4
2466
+ r0 = r4
2467
+ else
2468
+ self.index = i0
2469
+ r0 = nil
2470
+ end
2471
+ end
2472
+
2473
+ node_cache[:trailing_inline_module][start_index] = r0
2474
+
2475
+ return r0
2476
+ end
2477
+
2478
+ module InlineModule0
2479
+ end
2480
+
2481
+ module InlineModule1
2482
+ end
2483
+
2484
+ def _nt_inline_module
2485
+ start_index = index
2486
+ if node_cache[:inline_module].has_key?(index)
2487
+ cached = node_cache[:inline_module][index]
2488
+ @index = cached.interval.end if cached
2489
+ return cached
2490
+ end
2491
+
2492
+ i0, s0 = index, []
2493
+ if input.index('{', index) == index
2494
+ r1 = (SyntaxNode).new(input, index...(index + 1))
2495
+ @index += 1
2496
+ else
2497
+ terminal_parse_failure('{')
2498
+ r1 = nil
2499
+ end
2500
+ s0 << r1
2501
+ if r1
2502
+ s2, i2 = [], index
2503
+ loop do
2504
+ i3 = index
2505
+ r4 = _nt_inline_module
2506
+ if r4
2507
+ r3 = r4
2508
+ else
2509
+ i5, s5 = index, []
2510
+ i6 = index
2511
+ if input.index(Regexp.new('[{}]'), index) == index
2512
+ r7 = (SyntaxNode).new(input, index...(index + 1))
2513
+ @index += 1
2514
+ else
2515
+ r7 = nil
2516
+ end
2517
+ if r7
2518
+ r6 = nil
2519
+ else
2520
+ self.index = i6
2521
+ r6 = SyntaxNode.new(input, index...index)
2522
+ end
2523
+ s5 << r6
2524
+ if r6
2525
+ if index < input_length
2526
+ r8 = (SyntaxNode).new(input, index...(index + 1))
2527
+ @index += 1
2528
+ else
2529
+ terminal_parse_failure("any character")
2530
+ r8 = nil
2531
+ end
2532
+ s5 << r8
2533
+ end
2534
+ if s5.last
2535
+ r5 = (SyntaxNode).new(input, i5...index, s5)
2536
+ r5.extend(InlineModule0)
2537
+ else
2538
+ self.index = i5
2539
+ r5 = nil
2540
+ end
2541
+ if r5
2542
+ r3 = r5
2543
+ else
2544
+ self.index = i3
2545
+ r3 = nil
2546
+ end
2547
+ end
2548
+ if r3
2549
+ s2 << r3
2550
+ else
2551
+ break
2552
+ end
2553
+ end
2554
+ r2 = SyntaxNode.new(input, i2...index, s2)
2555
+ s0 << r2
2556
+ if r2
2557
+ if input.index('}', index) == index
2558
+ r9 = (SyntaxNode).new(input, index...(index + 1))
2559
+ @index += 1
2560
+ else
2561
+ terminal_parse_failure('}')
2562
+ r9 = nil
2563
+ end
2564
+ s0 << r9
2565
+ end
2566
+ end
2567
+ if s0.last
2568
+ r0 = (InlineModule).new(input, i0...index, s0)
2569
+ r0.extend(InlineModule1)
2570
+ else
2571
+ self.index = i0
2572
+ r0 = nil
2573
+ end
2574
+
2575
+ node_cache[:inline_module][start_index] = r0
2576
+
2577
+ return r0
2578
+ end
2579
+
2580
+ module KeywordInsideGrammar0
2581
+ end
2582
+
2583
+ def _nt_keyword_inside_grammar
2584
+ start_index = index
2585
+ if node_cache[:keyword_inside_grammar].has_key?(index)
2586
+ cached = node_cache[:keyword_inside_grammar][index]
2587
+ @index = cached.interval.end if cached
2588
+ return cached
2589
+ end
2590
+
2591
+ i0, s0 = index, []
2592
+ i1 = index
2593
+ if input.index('rule', index) == index
2594
+ r2 = (SyntaxNode).new(input, index...(index + 4))
2595
+ @index += 4
2596
+ else
2597
+ terminal_parse_failure('rule')
2598
+ r2 = nil
2599
+ end
2600
+ if r2
2601
+ r1 = r2
2602
+ else
2603
+ if input.index('end', index) == index
2604
+ r3 = (SyntaxNode).new(input, index...(index + 3))
2605
+ @index += 3
2606
+ else
2607
+ terminal_parse_failure('end')
2608
+ r3 = nil
2609
+ end
2610
+ if r3
2611
+ r1 = r3
2612
+ else
2613
+ self.index = i1
2614
+ r1 = nil
2615
+ end
2616
+ end
2617
+ s0 << r1
2618
+ if r1
2619
+ i4 = index
2620
+ r5 = _nt_non_space_char
2621
+ if r5
2622
+ r4 = nil
2623
+ else
2624
+ self.index = i4
2625
+ r4 = SyntaxNode.new(input, index...index)
2626
+ end
2627
+ s0 << r4
2628
+ end
2629
+ if s0.last
2630
+ r0 = (SyntaxNode).new(input, i0...index, s0)
2631
+ r0.extend(KeywordInsideGrammar0)
2632
+ else
2633
+ self.index = i0
2634
+ r0 = nil
2635
+ end
2636
+
2637
+ node_cache[:keyword_inside_grammar][start_index] = r0
2638
+
2639
+ return r0
2640
+ end
2641
+
2642
+ module NonSpaceChar0
2643
+ end
2644
+
2645
+ def _nt_non_space_char
2646
+ start_index = index
2647
+ if node_cache[:non_space_char].has_key?(index)
2648
+ cached = node_cache[:non_space_char][index]
2649
+ @index = cached.interval.end if cached
2650
+ return cached
2651
+ end
2652
+
2653
+ i0, s0 = index, []
2654
+ i1 = index
2655
+ r2 = _nt_space
2656
+ if r2
2657
+ r1 = nil
2658
+ else
2659
+ self.index = i1
2660
+ r1 = SyntaxNode.new(input, index...index)
2661
+ end
2662
+ s0 << r1
2663
+ if r1
2664
+ if index < input_length
2665
+ r3 = (SyntaxNode).new(input, index...(index + 1))
2666
+ @index += 1
2667
+ else
2668
+ terminal_parse_failure("any character")
2669
+ r3 = nil
2670
+ end
2671
+ s0 << r3
2672
+ end
2673
+ if s0.last
2674
+ r0 = (SyntaxNode).new(input, i0...index, s0)
2675
+ r0.extend(NonSpaceChar0)
2676
+ else
2677
+ self.index = i0
2678
+ r0 = nil
2679
+ end
2680
+
2681
+ node_cache[:non_space_char][start_index] = r0
2682
+
2683
+ return r0
2684
+ end
2685
+
2686
+ def _nt_alpha_char
2687
+ start_index = index
2688
+ if node_cache[:alpha_char].has_key?(index)
2689
+ cached = node_cache[:alpha_char][index]
2690
+ @index = cached.interval.end if cached
2691
+ return cached
2692
+ end
2693
+
2694
+ if input.index(Regexp.new('[A-Za-z_]'), index) == index
2695
+ r0 = (SyntaxNode).new(input, index...(index + 1))
2696
+ @index += 1
2697
+ else
2698
+ r0 = nil
2699
+ end
2700
+
2701
+ node_cache[:alpha_char][start_index] = r0
2702
+
2703
+ return r0
2704
+ end
2705
+
2706
+ def _nt_alphanumeric_char
2707
+ start_index = index
2708
+ if node_cache[:alphanumeric_char].has_key?(index)
2709
+ cached = node_cache[:alphanumeric_char][index]
2710
+ @index = cached.interval.end if cached
2711
+ return cached
2712
+ end
2713
+
2714
+ i0 = index
2715
+ r1 = _nt_alpha_char
2716
+ if r1
2717
+ r0 = r1
2718
+ else
2719
+ if input.index(Regexp.new('[0-9]'), index) == index
2720
+ r2 = (SyntaxNode).new(input, index...(index + 1))
2721
+ @index += 1
2722
+ else
2723
+ r2 = nil
2724
+ end
2725
+ if r2
2726
+ r0 = r2
2727
+ else
2728
+ self.index = i0
2729
+ r0 = nil
2730
+ end
2731
+ end
2732
+
2733
+ node_cache[:alphanumeric_char][start_index] = r0
2734
+
2735
+ return r0
2736
+ end
2737
+
2738
+ def _nt_space
2739
+ start_index = index
2740
+ if node_cache[:space].has_key?(index)
2741
+ cached = node_cache[:space][index]
2742
+ @index = cached.interval.end if cached
2743
+ return cached
2744
+ end
2745
+
2746
+ s0, i0 = [], index
2747
+ loop do
2748
+ i1 = index
2749
+ r2 = _nt_white
2750
+ if r2
2751
+ r1 = r2
2752
+ else
2753
+ r3 = _nt_comment_to_eol
2754
+ if r3
2755
+ r1 = r3
2756
+ else
2757
+ self.index = i1
2758
+ r1 = nil
2759
+ end
2760
+ end
2761
+ if r1
2762
+ s0 << r1
2763
+ else
2764
+ break
2765
+ end
2766
+ end
2767
+ if s0.empty?
2768
+ self.index = i0
2769
+ r0 = nil
2770
+ else
2771
+ r0 = SyntaxNode.new(input, i0...index, s0)
2772
+ end
2773
+
2774
+ node_cache[:space][start_index] = r0
2775
+
2776
+ return r0
2777
+ end
2778
+
2779
+ module CommentToEol0
2780
+ end
2781
+
2782
+ module CommentToEol1
2783
+ end
2784
+
2785
+ def _nt_comment_to_eol
2786
+ start_index = index
2787
+ if node_cache[:comment_to_eol].has_key?(index)
2788
+ cached = node_cache[:comment_to_eol][index]
2789
+ @index = cached.interval.end if cached
2790
+ return cached
2791
+ end
2792
+
2793
+ i0, s0 = index, []
2794
+ if input.index('#', index) == index
2795
+ r1 = (SyntaxNode).new(input, index...(index + 1))
2796
+ @index += 1
2797
+ else
2798
+ terminal_parse_failure('#')
2799
+ r1 = nil
2800
+ end
2801
+ s0 << r1
2802
+ if r1
2803
+ s2, i2 = [], index
2804
+ loop do
2805
+ i3, s3 = index, []
2806
+ i4 = index
2807
+ if input.index("\n", index) == index
2808
+ r5 = (SyntaxNode).new(input, index...(index + 1))
2809
+ @index += 1
2810
+ else
2811
+ terminal_parse_failure("\n")
2812
+ r5 = nil
2813
+ end
2814
+ if r5
2815
+ r4 = nil
2816
+ else
2817
+ self.index = i4
2818
+ r4 = SyntaxNode.new(input, index...index)
2819
+ end
2820
+ s3 << r4
2821
+ if r4
2822
+ if index < input_length
2823
+ r6 = (SyntaxNode).new(input, index...(index + 1))
2824
+ @index += 1
2825
+ else
2826
+ terminal_parse_failure("any character")
2827
+ r6 = nil
2828
+ end
2829
+ s3 << r6
2830
+ end
2831
+ if s3.last
2832
+ r3 = (SyntaxNode).new(input, i3...index, s3)
2833
+ r3.extend(CommentToEol0)
2834
+ else
2835
+ self.index = i3
2836
+ r3 = nil
2837
+ end
2838
+ if r3
2839
+ s2 << r3
2840
+ else
2841
+ break
2842
+ end
2843
+ end
2844
+ r2 = SyntaxNode.new(input, i2...index, s2)
2845
+ s0 << r2
2846
+ end
2847
+ if s0.last
2848
+ r0 = (SyntaxNode).new(input, i0...index, s0)
2849
+ r0.extend(CommentToEol1)
2850
+ else
2851
+ self.index = i0
2852
+ r0 = nil
2853
+ end
2854
+
2855
+ node_cache[:comment_to_eol][start_index] = r0
2856
+
2857
+ return r0
2858
+ end
2859
+
2860
+ def _nt_white
2861
+ start_index = index
2862
+ if node_cache[:white].has_key?(index)
2863
+ cached = node_cache[:white][index]
2864
+ @index = cached.interval.end if cached
2865
+ return cached
2866
+ end
2867
+
2868
+ if input.index(Regexp.new('[ \\t\\n\\r]'), index) == index
2869
+ r0 = (SyntaxNode).new(input, index...(index + 1))
2870
+ @index += 1
2871
+ else
2872
+ r0 = nil
2873
+ end
2874
+
2875
+ node_cache[:white][start_index] = r0
2876
+
2877
+ return r0
2878
+ end
2879
+
2880
+ end
2881
+
2882
+ class MetagrammarParser < Treetop::Runtime::CompiledParser
2883
+ include Metagrammar
2884
+ end
2885
+
2886
+ end
2887
+ end