brakeman 5.2.2 → 7.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (952) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +153 -0
  3. data/README.md +9 -6
  4. data/bundle/load.rb +16 -15
  5. data/bundle/ruby/3.1.0/gems/csv-3.3.5/LICENSE.txt +33 -0
  6. data/bundle/ruby/3.1.0/gems/csv-3.3.5/NEWS.md +1009 -0
  7. data/bundle/ruby/3.1.0/gems/csv-3.3.5/README.md +55 -0
  8. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/array.rb +9 -0
  9. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/core_ext/string.rb +9 -0
  10. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/fields_converter.rb +96 -0
  11. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/input_record_separator.rb +18 -0
  12. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/parser.rb +1302 -0
  13. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/row.rb +757 -0
  14. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/table.rb +1055 -0
  15. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/version.rb +6 -0
  16. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv/writer.rb +209 -0
  17. data/bundle/ruby/3.1.0/gems/csv-3.3.5/lib/csv.rb +3017 -0
  18. data/bundle/ruby/3.1.0/gems/haml-6.4.0/CHANGELOG.md +1681 -0
  19. data/bundle/ruby/3.1.0/gems/haml-6.4.0/FAQ.md +147 -0
  20. data/bundle/ruby/3.1.0/gems/haml-6.4.0/Gemfile +34 -0
  21. data/bundle/ruby/3.1.0/gems/haml-6.4.0/MIT-LICENSE +20 -0
  22. data/bundle/ruby/3.1.0/gems/haml-6.4.0/README.md +205 -0
  23. data/bundle/ruby/3.1.0/gems/haml-6.4.0/REFERENCE.md +1309 -0
  24. data/bundle/ruby/3.1.0/gems/haml-6.4.0/exe/haml +6 -0
  25. data/bundle/ruby/3.1.0/gems/haml-6.4.0/haml.gemspec +45 -0
  26. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ambles.rb +20 -0
  27. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_builder.rb +162 -0
  28. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_compiler.rb +133 -0
  29. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/attribute_parser.rb +116 -0
  30. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/cli.rb +154 -0
  31. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/children_compiler.rb +155 -0
  32. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/comment_compiler.rb +51 -0
  33. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/doctype_compiler.rb +52 -0
  34. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/script_compiler.rb +114 -0
  35. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/silent_script_compiler.rb +24 -0
  36. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler/tag_compiler.rb +76 -0
  37. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/compiler.rb +97 -0
  38. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/dynamic_merger.rb +67 -0
  39. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/engine.rb +59 -0
  40. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/error.rb +66 -0
  41. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape.rb +13 -0
  42. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/escape_any.rb +21 -0
  43. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/base.rb +12 -0
  44. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/cdata.rb +20 -0
  45. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/coffee.rb +17 -0
  46. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/css.rb +33 -0
  47. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/erb.rb +10 -0
  48. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/escaped.rb +22 -0
  49. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/javascript.rb +33 -0
  50. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/less.rb +20 -0
  51. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/markdown.rb +11 -0
  52. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/plain.rb +29 -0
  53. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/preserve.rb +22 -0
  54. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/ruby.rb +10 -0
  55. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/sass.rb +15 -0
  56. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/scss.rb +15 -0
  57. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/text_base.rb +25 -0
  58. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters/tilt_base.rb +59 -0
  59. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/filters.rb +75 -0
  60. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/force_escape.rb +29 -0
  61. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/helpers.rb +15 -0
  62. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/html.rb +22 -0
  63. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/identity.rb +13 -0
  64. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/object_ref.rb +35 -0
  65. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/parser.rb +991 -0
  66. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_helpers.rb +53 -0
  67. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/rails_template.rb +62 -0
  68. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/railtie.rb +10 -0
  69. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/ruby_expression.rb +32 -0
  70. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/string_splitter.rb +140 -0
  71. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/template.rb +20 -0
  72. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/temple_line_counter.rb +31 -0
  73. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/util.rb +262 -0
  74. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/version.rb +4 -0
  75. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml/whitespace.rb +8 -0
  76. data/bundle/ruby/3.1.0/gems/haml-6.4.0/lib/haml.rb +13 -0
  77. data/bundle/ruby/3.1.0/gems/highline-3.1.2/Changelog.md +658 -0
  78. data/bundle/ruby/3.1.0/gems/highline-3.1.2/Gemfile +21 -0
  79. data/bundle/ruby/3.1.0/gems/highline-3.1.2/README.md +240 -0
  80. data/bundle/ruby/3.1.0/gems/highline-3.1.2/highline.gemspec +40 -0
  81. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/io_console_compatible.rb +37 -0
  82. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/list_renderer.rb +261 -0
  83. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/menu.rb +578 -0
  84. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question/answer_converter.rb +100 -0
  85. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question.rb +640 -0
  86. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/question_asker.rb +152 -0
  87. data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/style.rb +0 -0
  88. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/io_console.rb +36 -0
  89. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal/unix_stty.rb +53 -0
  90. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/terminal.rb +192 -0
  91. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline/version.rb +6 -0
  92. data/bundle/ruby/3.1.0/gems/highline-3.1.2/lib/highline.rb +676 -0
  93. data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel/version.rb +4 -0
  94. data/bundle/ruby/3.1.0/gems/parallel-1.27.0/lib/parallel.rb +708 -0
  95. data/bundle/ruby/3.1.0/gems/reline-0.6.2/COPYING +56 -0
  96. data/bundle/ruby/3.1.0/gems/reline-0.6.2/README.md +94 -0
  97. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/config.rb +378 -0
  98. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/face.rb +199 -0
  99. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/history.rb +76 -0
  100. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/ansi.rb +322 -0
  101. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/dumb.rb +120 -0
  102. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io/windows.rb +530 -0
  103. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/io.rb +55 -0
  104. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/base.rb +37 -0
  105. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/composite.rb +17 -0
  106. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/emacs.rb +517 -0
  107. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_command.rb +518 -0
  108. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor/vi_insert.rb +517 -0
  109. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_actor.rb +8 -0
  110. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/key_stroke.rb +119 -0
  111. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/kill_ring.rb +125 -0
  112. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/line_editor.rb +2356 -0
  113. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode/east_asian_width.rb +1292 -0
  114. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/unicode.rb +421 -0
  115. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline/version.rb +3 -0
  116. data/bundle/ruby/3.1.0/gems/reline-0.6.2/lib/reline.rb +527 -0
  117. data/bundle/ruby/3.1.0/gems/reline-0.6.2/license_of_rb-readline +25 -0
  118. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/LICENSE.txt +22 -0
  119. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/NEWS.md +843 -0
  120. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/README.md +57 -0
  121. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/attribute.rb +210 -0
  122. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/cdata.rb +68 -0
  123. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/child.rb +96 -0
  124. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/comment.rb +80 -0
  125. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/doctype.rb +306 -0
  126. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/document.rb +471 -0
  127. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/element.rb +2578 -0
  128. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/encoding.rb +48 -0
  129. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/entity.rb +142 -0
  130. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/formatters/pretty.rb +142 -0
  131. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/functions.rb +446 -0
  132. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/instruction.rb +79 -0
  133. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/namespace.rb +63 -0
  134. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/node.rb +80 -0
  135. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parseexception.rb +53 -0
  136. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/baseparser.rb +949 -0
  137. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/pullparser.rb +213 -0
  138. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/sax2parser.rb +270 -0
  139. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/streamparser.rb +67 -0
  140. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/treeparser.rb +89 -0
  141. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/parsers/xpathparser.rb +739 -0
  142. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/quickpath.rb +267 -0
  143. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/rexml.rb +39 -0
  144. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/security.rb +28 -0
  145. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/source.rb +388 -0
  146. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/text.rb +420 -0
  147. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/relaxng.rb +540 -0
  148. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/validation/validation.rb +144 -0
  149. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath.rb +70 -0
  150. data/bundle/ruby/3.1.0/gems/rexml-3.4.4/lib/rexml/xpath_parser.rb +980 -0
  151. data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/History.rdoc +463 -0
  152. data/bundle/ruby/3.1.0/gems/ruby2ruby-2.5.2/lib/ruby2ruby.rb +1448 -0
  153. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/History.rdoc +1345 -0
  154. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/Manifest.txt +48 -0
  155. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/README.rdoc +113 -0
  156. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/compare/normalize.rb +219 -0
  157. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.rb +10956 -0
  158. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby20_parser.y +2707 -0
  159. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.rb +10981 -0
  160. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby21_parser.y +2724 -0
  161. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.rb +11122 -0
  162. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby22_parser.y +2735 -0
  163. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.rb +11163 -0
  164. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby23_parser.y +2737 -0
  165. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.rb +11212 -0
  166. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby24_parser.y +2745 -0
  167. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.rb +11212 -0
  168. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby25_parser.y +2745 -0
  169. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.rb +11234 -0
  170. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby26_parser.y +2760 -0
  171. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.rb +12963 -0
  172. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby27_parser.y +3360 -0
  173. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.rb +13316 -0
  174. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby30_parser.y +3508 -0
  175. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.rb +13649 -0
  176. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby31_parser.y +3542 -0
  177. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.rb +13601 -0
  178. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby32_parser.y +3543 -0
  179. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby3_parser.yy +3635 -0
  180. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rb +1159 -0
  181. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer.rex.rb +399 -0
  182. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_lexer_strings.rb +638 -0
  183. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.rb +100 -0
  184. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser.yy +3501 -0
  185. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/lib/ruby_parser_extras.rb +1878 -0
  186. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/munge.rb +256 -0
  187. data/bundle/ruby/3.1.0/gems/ruby_parser-3.20.3/tools/ripper.rb +46 -0
  188. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/History.rdoc +493 -0
  189. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/pt_testcase.rb +3137 -0
  190. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp.rb +397 -0
  191. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_matcher.rb +1100 -0
  192. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/sexp_processor.rb +754 -0
  193. data/bundle/ruby/3.1.0/gems/sexp_processor-4.17.4/lib/strict_sexp.rb +149 -0
  194. data/bundle/ruby/3.1.0/gems/slim-5.2.1/CHANGES +496 -0
  195. data/bundle/ruby/3.1.0/gems/slim-5.2.1/Gemfile +43 -0
  196. data/bundle/ruby/3.1.0/gems/slim-5.2.1/LICENSE +21 -0
  197. data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.jp.md +1276 -0
  198. data/bundle/ruby/3.1.0/gems/slim-5.2.1/README.md +1313 -0
  199. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/code_attributes.rb +68 -0
  200. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/command.rb +122 -0
  201. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/controls.rb +61 -0
  202. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/do_inserter.rb +34 -0
  203. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/embedded.rb +248 -0
  204. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/end_inserter.rb +63 -0
  205. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/engine.rb +42 -0
  206. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/erb_converter.rb +15 -0
  207. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/filter.rb +31 -0
  208. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/grammar.rb +24 -0
  209. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/include.rb +58 -0
  210. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/interpolation.rb +36 -0
  211. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/context.rb +126 -0
  212. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less/filter.rb +81 -0
  213. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/logic_less.rb +6 -0
  214. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/parser.rb +535 -0
  215. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/railtie.rb +19 -0
  216. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/escaper.rb +42 -0
  217. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/filter.rb +97 -0
  218. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart/parser.rb +35 -0
  219. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/smart.rb +9 -0
  220. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/builder.rb +115 -0
  221. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/splat/filter.rb +93 -0
  222. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/template.rb +6 -0
  223. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/translator.rb +119 -0
  224. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim/version.rb +6 -0
  225. data/bundle/ruby/3.1.0/gems/slim-5.2.1/lib/slim.rb +16 -0
  226. data/bundle/ruby/3.1.0/gems/slim-5.2.1/slim.gemspec +33 -0
  227. data/bundle/ruby/3.1.0/gems/temple-0.10.4/CHANGES +302 -0
  228. data/bundle/ruby/3.1.0/gems/temple-0.10.4/Gemfile +2 -0
  229. data/bundle/ruby/3.1.0/gems/temple-0.10.4/README.md +267 -0
  230. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/engine.rb +68 -0
  231. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/engine.rb +18 -0
  232. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/parser.rb +41 -0
  233. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/template.rb +12 -0
  234. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/erb/trimming.rb +24 -0
  235. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/exceptions.rb +14 -0
  236. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filter.rb +10 -0
  237. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/ambles.rb +22 -0
  238. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/code_merger.rb +31 -0
  239. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/control_flow.rb +43 -0
  240. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_inliner.rb +72 -0
  241. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/dynamic_merger.rb +69 -0
  242. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/encoding.rb +25 -0
  243. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/eraser.rb +23 -0
  244. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/escapable.rb +41 -0
  245. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/multi_flattener.rb +26 -0
  246. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/remove_bom.rb +14 -0
  247. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_analyzer.rb +31 -0
  248. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/static_merger.rb +38 -0
  249. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/string_splitter.rb +142 -0
  250. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/filters/validator.rb +16 -0
  251. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generator.rb +91 -0
  252. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array.rb +22 -0
  253. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/array_buffer.rb +30 -0
  254. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/erb.rb +33 -0
  255. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/rails_output_buffer.rb +35 -0
  256. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/generators/string_buffer.rb +26 -0
  257. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/grammar.rb +58 -0
  258. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_merger.rb +43 -0
  259. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_remover.rb +36 -0
  260. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/attribute_sorter.rb +22 -0
  261. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/dispatcher.rb +32 -0
  262. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/fast.rb +131 -0
  263. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/filter.rb +22 -0
  264. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/pretty.rb +104 -0
  265. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/html/safe.rb +24 -0
  266. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/map.rb +106 -0
  267. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/dispatcher.rb +162 -0
  268. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/engine_dsl.rb +146 -0
  269. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/grammar_dsl.rb +172 -0
  270. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/options.rb +88 -0
  271. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/mixins/template.rb +29 -0
  272. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/parser.rb +9 -0
  273. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/static_analyzer.rb +78 -0
  274. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/rails.rb +31 -0
  275. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates/tilt.rb +39 -0
  276. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/templates.rb +12 -0
  277. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/utils.rb +91 -0
  278. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple/version.rb +4 -0
  279. data/bundle/ruby/3.1.0/gems/temple-0.10.4/lib/temple.rb +70 -0
  280. data/bundle/ruby/3.1.0/gems/temple-0.10.4/temple.gemspec +27 -0
  281. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/History.rdoc +149 -0
  282. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/README.md +417 -0
  283. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/cell.rb +94 -0
  284. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/row.rb +66 -0
  285. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/separator.rb +66 -0
  286. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/style.rb +284 -0
  287. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/table.rb +374 -0
  288. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/util.rb +13 -0
  289. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table/version.rb +5 -0
  290. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/lib/terminal-table.rb +26 -0
  291. data/bundle/ruby/3.1.0/gems/terminal-table-4.0.0/terminal-table.gemspec +25 -0
  292. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/COPYING +19 -0
  293. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_emacs_org.rb +2 -0
  294. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_handlebars.rb +2 -0
  295. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_jbuilder.rb +2 -0
  296. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/_org.rb +2 -0
  297. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/asciidoc.rb +15 -0
  298. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/babel.rb +8 -0
  299. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/builder.rb +42 -0
  300. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/cli.rb +134 -0
  301. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/coffee.rb +39 -0
  302. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/commonmarker.rb +95 -0
  303. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/creole.rb +16 -0
  304. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/csv.rb +53 -0
  305. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erb.rb +65 -0
  306. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/erubi.rb +55 -0
  307. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/etanni.rb +28 -0
  308. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/haml.rb +94 -0
  309. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/kramdown.rb +13 -0
  310. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/liquid.rb +37 -0
  311. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/livescript.rb +11 -0
  312. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/mapping.rb +412 -0
  313. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/markaby.rb +43 -0
  314. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/nokogiri.rb +37 -0
  315. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pandoc.rb +39 -0
  316. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/pipeline.rb +19 -0
  317. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/plain.rb +5 -0
  318. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/prawn.rb +28 -0
  319. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/radius.rb +41 -0
  320. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdiscount.rb +23 -0
  321. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rdoc.rb +11 -0
  322. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcarpet.rb +31 -0
  323. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/redcloth.rb +13 -0
  324. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/rst-pandoc.rb +10 -0
  325. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/sass.rb +78 -0
  326. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/slim.rb +5 -0
  327. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/string.rb +27 -0
  328. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/template.rb +611 -0
  329. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/typescript.rb +19 -0
  330. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt/yajl.rb +81 -0
  331. data/bundle/ruby/3.1.0/gems/tilt-2.6.1/lib/tilt.rb +192 -0
  332. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/CHANGELOG.md +299 -0
  333. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/MIT-LICENSE.txt +22 -0
  334. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/README.md +194 -0
  335. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/data/display_width.marshal.gz +0 -0
  336. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/constants.rb +10 -0
  337. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/emoji_support.rb +55 -0
  338. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/index.rb +34 -0
  339. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/no_string_ext.rb +8 -0
  340. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/reline_ext.rb +14 -0
  341. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width/string_ext.rb +9 -0
  342. data/bundle/ruby/3.1.0/gems/unicode-display_width-3.2.0/lib/unicode/display_width.rb +247 -0
  343. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CHANGELOG.md +196 -0
  344. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/CODE_OF_CONDUCT.md +74 -0
  345. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile +7 -0
  346. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/Gemfile.lock +33 -0
  347. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/MIT-LICENSE.txt +20 -0
  348. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/README.md +205 -0
  349. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/emoji.marshal.gz +0 -0
  350. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/data/generate_constants.rb +344 -0
  351. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/constants.rb +49 -0
  352. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex.rb +8 -0
  353. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_basic.rb +8 -0
  354. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_emoji_keycap.rb +8 -0
  355. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe.rb +8 -0
  356. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_mqe_uqe.rb +8 -0
  357. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_include_text.rb +8 -0
  358. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto.rb +8 -0
  359. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_picto_no_emoji.rb +8 -0
  360. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_possible.rb +8 -0
  361. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_component.rb +8 -0
  362. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_emoji.rb +8 -0
  363. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier.rb +8 -0
  364. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_modifier_base.rb +8 -0
  365. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_prop_presentation.rb +8 -0
  366. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text.rb +8 -0
  367. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_text_presentation.rb +8 -0
  368. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid.rb +8 -0
  369. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_valid_include_text.rb +8 -0
  370. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed.rb +8 -0
  371. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated/regex_well_formed_include_text.rb +8 -0
  372. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex.rb +8 -0
  373. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_basic.rb +8 -0
  374. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_emoji_keycap.rb +8 -0
  375. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe.rb +8 -0
  376. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_mqe_uqe.rb +8 -0
  377. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_include_text.rb +8 -0
  378. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto.rb +8 -0
  379. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_picto_no_emoji.rb +8 -0
  380. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_possible.rb +8 -0
  381. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_component.rb +8 -0
  382. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_emoji.rb +8 -0
  383. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier.rb +8 -0
  384. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_modifier_base.rb +8 -0
  385. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_prop_presentation.rb +8 -0
  386. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text.rb +8 -0
  387. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_text_presentation.rb +8 -0
  388. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid.rb +8 -0
  389. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_valid_include_text.rb +8 -0
  390. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed.rb +8 -0
  391. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/generated_native/regex_well_formed_include_text.rb +8 -0
  392. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/index.rb +14 -0
  393. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/lazy_constants.rb +56 -0
  394. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji/list.rb +13 -0
  395. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/lib/unicode/emoji.rb +111 -0
  396. data/bundle/ruby/3.1.0/gems/unicode-emoji-4.1.0/unicode-emoji.gemspec +22 -0
  397. data/lib/brakeman/app_tree.rb +98 -19
  398. data/lib/brakeman/checks/base_check.rb +7 -5
  399. data/lib/brakeman/checks/check_basic_auth.rb +4 -2
  400. data/lib/brakeman/checks/check_basic_auth_timing_attack.rb +2 -1
  401. data/lib/brakeman/checks/check_content_tag.rb +16 -9
  402. data/lib/brakeman/checks/check_cookie_serialization.rb +2 -1
  403. data/lib/brakeman/checks/check_create_with.rb +4 -2
  404. data/lib/brakeman/checks/check_cross_site_scripting.rb +6 -3
  405. data/lib/brakeman/checks/check_csrf_token_forgery_cve.rb +2 -1
  406. data/lib/brakeman/checks/check_default_routes.rb +6 -3
  407. data/lib/brakeman/checks/check_deserialize.rb +6 -2
  408. data/lib/brakeman/checks/check_detailed_exceptions.rb +4 -2
  409. data/lib/brakeman/checks/check_digest_dos.rb +2 -1
  410. data/lib/brakeman/checks/check_divide_by_zero.rb +2 -1
  411. data/lib/brakeman/checks/check_dynamic_finders.rb +2 -1
  412. data/lib/brakeman/checks/check_eol_rails.rb +7 -0
  413. data/lib/brakeman/checks/check_eol_ruby.rb +5 -1
  414. data/lib/brakeman/checks/check_escape_function.rb +2 -1
  415. data/lib/brakeman/checks/check_evaluation.rb +45 -7
  416. data/lib/brakeman/checks/check_execute.rb +34 -3
  417. data/lib/brakeman/checks/check_file_access.rb +2 -1
  418. data/lib/brakeman/checks/check_file_disclosure.rb +2 -1
  419. data/lib/brakeman/checks/check_filter_skipping.rb +2 -1
  420. data/lib/brakeman/checks/check_force_ssl.rb +2 -1
  421. data/lib/brakeman/checks/check_forgery_setting.rb +4 -2
  422. data/lib/brakeman/checks/check_header_dos.rb +2 -1
  423. data/lib/brakeman/checks/check_i18n_xss.rb +2 -1
  424. data/lib/brakeman/checks/check_jruby_xml.rb +2 -1
  425. data/lib/brakeman/checks/check_json_encoding.rb +2 -1
  426. data/lib/brakeman/checks/check_json_entity_escape.rb +4 -2
  427. data/lib/brakeman/checks/check_json_parsing.rb +4 -2
  428. data/lib/brakeman/checks/check_link_to.rb +2 -1
  429. data/lib/brakeman/checks/check_link_to_href.rb +4 -2
  430. data/lib/brakeman/checks/check_mail_to.rb +2 -1
  431. data/lib/brakeman/checks/check_mass_assignment.rb +6 -3
  432. data/lib/brakeman/checks/check_mime_type_dos.rb +2 -1
  433. data/lib/brakeman/checks/check_model_attr_accessible.rb +3 -1
  434. data/lib/brakeman/checks/check_model_attributes.rb +4 -2
  435. data/lib/brakeman/checks/check_model_serialize.rb +2 -1
  436. data/lib/brakeman/checks/check_nested_attributes.rb +2 -1
  437. data/lib/brakeman/checks/check_nested_attributes_bypass.rb +2 -1
  438. data/lib/brakeman/checks/check_number_to_currency.rb +4 -2
  439. data/lib/brakeman/checks/check_page_caching_cve.rb +2 -1
  440. data/lib/brakeman/checks/check_pathname.rb +48 -0
  441. data/lib/brakeman/checks/check_permit_attributes.rb +2 -1
  442. data/lib/brakeman/checks/check_quote_table_name.rb +2 -1
  443. data/lib/brakeman/checks/check_ransack.rb +53 -0
  444. data/lib/brakeman/checks/check_redirect.rb +67 -31
  445. data/lib/brakeman/checks/check_regex_dos.rb +2 -1
  446. data/lib/brakeman/checks/check_render.rb +15 -3
  447. data/lib/brakeman/checks/check_render_dos.rb +2 -1
  448. data/lib/brakeman/checks/check_render_inline.rb +4 -2
  449. data/lib/brakeman/checks/check_response_splitting.rb +2 -1
  450. data/lib/brakeman/checks/check_reverse_tabnabbing.rb +2 -1
  451. data/lib/brakeman/checks/check_route_dos.rb +2 -1
  452. data/lib/brakeman/checks/check_safe_buffer_manipulation.rb +2 -1
  453. data/lib/brakeman/checks/check_sanitize_config_cve.rb +120 -0
  454. data/lib/brakeman/checks/check_sanitize_methods.rb +6 -3
  455. data/lib/brakeman/checks/check_secrets.rb +2 -1
  456. data/lib/brakeman/checks/check_select_tag.rb +2 -1
  457. data/lib/brakeman/checks/check_select_vulnerability.rb +2 -1
  458. data/lib/brakeman/checks/check_send.rb +2 -1
  459. data/lib/brakeman/checks/check_session_manipulation.rb +2 -1
  460. data/lib/brakeman/checks/check_session_settings.rb +8 -6
  461. data/lib/brakeman/checks/check_simple_format.rb +4 -2
  462. data/lib/brakeman/checks/check_single_quotes.rb +2 -1
  463. data/lib/brakeman/checks/check_skip_before_filter.rb +4 -2
  464. data/lib/brakeman/checks/check_sprockets_path_traversal.rb +2 -1
  465. data/lib/brakeman/checks/check_sql.rb +14 -5
  466. data/lib/brakeman/checks/check_sql_cves.rb +4 -2
  467. data/lib/brakeman/checks/check_ssl_verify.rb +2 -1
  468. data/lib/brakeman/checks/check_strip_tags.rb +6 -3
  469. data/lib/brakeman/checks/check_symbol_dos.rb +2 -1
  470. data/lib/brakeman/checks/check_symbol_dos_cve.rb +2 -1
  471. data/lib/brakeman/checks/check_template_injection.rb +2 -1
  472. data/lib/brakeman/checks/check_translate_bug.rb +2 -1
  473. data/lib/brakeman/checks/check_unsafe_reflection.rb +2 -1
  474. data/lib/brakeman/checks/check_unsafe_reflection_methods.rb +2 -1
  475. data/lib/brakeman/checks/check_unscoped_find.rb +10 -1
  476. data/lib/brakeman/checks/check_validation_regex.rb +2 -1
  477. data/lib/brakeman/checks/check_verb_confusion.rb +2 -1
  478. data/lib/brakeman/checks/check_weak_hash.rb +6 -3
  479. data/lib/brakeman/checks/check_weak_rsa_key.rb +112 -0
  480. data/lib/brakeman/checks/check_without_protection.rb +2 -1
  481. data/lib/brakeman/checks/check_xml_dos.rb +2 -1
  482. data/lib/brakeman/checks/check_yaml_parsing.rb +4 -2
  483. data/lib/brakeman/checks/eol_check.rb +4 -2
  484. data/lib/brakeman/commandline.rb +5 -0
  485. data/lib/brakeman/file_parser.rb +35 -2
  486. data/lib/brakeman/file_path.rb +4 -0
  487. data/lib/brakeman/messages.rb +1 -1
  488. data/lib/brakeman/options.rb +50 -5
  489. data/lib/brakeman/parsers/erubis_patch.rb +11 -0
  490. data/lib/brakeman/parsers/haml6_embedded.rb +23 -0
  491. data/lib/brakeman/parsers/rails2_erubis.rb +3 -0
  492. data/lib/brakeman/parsers/rails2_xss_plugin_erubis.rb +4 -0
  493. data/lib/brakeman/parsers/rails3_erubis.rb +5 -1
  494. data/lib/brakeman/parsers/slim_embedded.rb +2 -0
  495. data/lib/brakeman/parsers/template_parser.rb +32 -7
  496. data/lib/brakeman/processor.rb +2 -0
  497. data/lib/brakeman/processors/alias_processor.rb +160 -44
  498. data/lib/brakeman/processors/base_processor.rb +2 -0
  499. data/lib/brakeman/processors/gem_processor.rb +2 -2
  500. data/lib/brakeman/processors/haml6_template_processor.rb +92 -0
  501. data/lib/brakeman/processors/haml_template_processor.rb +8 -2
  502. data/lib/brakeman/processors/lib/file_type_detector.rb +9 -7
  503. data/lib/brakeman/processors/lib/find_all_calls.rb +1 -0
  504. data/lib/brakeman/processors/lib/module_helper.rb +31 -1
  505. data/lib/brakeman/processors/lib/rails3_config_processor.rb +1 -1
  506. data/lib/brakeman/processors/lib/render_helper.rb +38 -1
  507. data/lib/brakeman/processors/library_processor.rb +6 -0
  508. data/lib/brakeman/processors/template_processor.rb +1 -1
  509. data/lib/brakeman/report/ignore/config.rb +0 -1
  510. data/lib/brakeman/report/ignore/interactive.rb +2 -2
  511. data/lib/brakeman/report/pager.rb +2 -2
  512. data/lib/brakeman/report/report_codeclimate.rb +1 -1
  513. data/lib/brakeman/report/report_csv.rb +2 -0
  514. data/lib/brakeman/report/report_github.rb +1 -1
  515. data/lib/brakeman/report/report_html.rb +1 -1
  516. data/lib/brakeman/report/report_junit.rb +6 -59
  517. data/lib/brakeman/report/report_markdown.rb +1 -1
  518. data/lib/brakeman/report/report_sarif.rb +122 -2
  519. data/lib/brakeman/report/report_table.rb +7 -7
  520. data/lib/brakeman/report/report_tabs.rb +0 -1
  521. data/lib/brakeman/report/report_text.rb +10 -1
  522. data/lib/brakeman/report/templates/controller_warnings.html.erb +2 -0
  523. data/lib/brakeman/report/templates/header.html.erb +8 -3
  524. data/lib/brakeman/report/templates/ignored_warnings.html.erb +5 -3
  525. data/lib/brakeman/report/templates/model_warnings.html.erb +2 -0
  526. data/lib/brakeman/report/templates/security_warnings.html.erb +2 -0
  527. data/lib/brakeman/report/templates/view_warnings.html.erb +2 -0
  528. data/lib/brakeman/rescanner.rb +40 -388
  529. data/lib/brakeman/scanner.rb +182 -88
  530. data/lib/brakeman/tracker/config.rb +89 -34
  531. data/lib/brakeman/tracker/controller.rb +14 -10
  532. data/lib/brakeman/tracker/file_cache.rb +83 -0
  533. data/lib/brakeman/tracker.rb +27 -4
  534. data/lib/brakeman/util.rb +21 -7
  535. data/lib/brakeman/version.rb +1 -1
  536. data/lib/brakeman/warning.rb +6 -3
  537. data/lib/brakeman/warning_codes.rb +6 -0
  538. data/lib/brakeman.rb +33 -7
  539. data/lib/ruby_parser/bm_sexp.rb +5 -1
  540. metadata +515 -422
  541. data/bundle/ruby/2.7.0/gems/haml-5.2.2/CHANGELOG.md +0 -1505
  542. data/bundle/ruby/2.7.0/gems/haml-5.2.2/FAQ.md +0 -147
  543. data/bundle/ruby/2.7.0/gems/haml-5.2.2/Gemfile +0 -16
  544. data/bundle/ruby/2.7.0/gems/haml-5.2.2/MIT-LICENSE +0 -20
  545. data/bundle/ruby/2.7.0/gems/haml-5.2.2/README.md +0 -216
  546. data/bundle/ruby/2.7.0/gems/haml-5.2.2/REFERENCE.md +0 -1380
  547. data/bundle/ruby/2.7.0/gems/haml-5.2.2/TODO +0 -24
  548. data/bundle/ruby/2.7.0/gems/haml-5.2.2/haml.gemspec +0 -45
  549. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_builder.rb +0 -219
  550. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_compiler.rb +0 -237
  551. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/attribute_parser.rb +0 -150
  552. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/buffer.rb +0 -182
  553. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/compiler.rb +0 -330
  554. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/engine.rb +0 -238
  555. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/error.rb +0 -65
  556. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/escapable.rb +0 -77
  557. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/exec.rb +0 -347
  558. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/filters.rb +0 -399
  559. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/generator.rb +0 -42
  560. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_extensions.rb +0 -60
  561. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_mods.rb +0 -132
  562. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/action_view_xss_mods.rb +0 -60
  563. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubi_template.rb +0 -20
  564. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/safe_erubis_template.rb +0 -33
  565. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers/xss_mods.rb +0 -114
  566. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/helpers.rb +0 -709
  567. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/options.rb +0 -273
  568. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/parser.rb +0 -856
  569. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/plugin.rb +0 -54
  570. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/railtie.rb +0 -53
  571. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/sass_rails_filter.rb +0 -47
  572. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template/options.rb +0 -27
  573. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/template.rb +0 -39
  574. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_engine.rb +0 -124
  575. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/temple_line_counter.rb +0 -30
  576. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/util.rb +0 -258
  577. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml/version.rb +0 -5
  578. data/bundle/ruby/2.7.0/gems/haml-5.2.2/lib/haml.rb +0 -25
  579. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/fulldoc/html/css/common.sass +0 -15
  580. data/bundle/ruby/2.7.0/gems/haml-5.2.2/yard/default/layout/html/footer.erb +0 -12
  581. data/bundle/ruby/2.7.0/gems/highline-2.0.3/Changelog.md +0 -620
  582. data/bundle/ruby/2.7.0/gems/highline-2.0.3/Gemfile +0 -22
  583. data/bundle/ruby/2.7.0/gems/highline-2.0.3/README.md +0 -202
  584. data/bundle/ruby/2.7.0/gems/highline-2.0.3/appveyor.yml +0 -37
  585. data/bundle/ruby/2.7.0/gems/highline-2.0.3/highline.gemspec +0 -35
  586. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/io_console_compatible.rb +0 -37
  587. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/list_renderer.rb +0 -261
  588. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/menu.rb +0 -576
  589. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question/answer_converter.rb +0 -103
  590. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question.rb +0 -630
  591. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/question_asker.rb +0 -150
  592. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/io_console.rb +0 -36
  593. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal/unix_stty.rb +0 -51
  594. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/terminal.rb +0 -190
  595. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline/version.rb +0 -6
  596. data/bundle/ruby/2.7.0/gems/highline-2.0.3/lib/highline.rb +0 -650
  597. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/processor_count.rb +0 -44
  598. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel/version.rb +0 -4
  599. data/bundle/ruby/2.7.0/gems/parallel-1.22.1/lib/parallel.rb +0 -612
  600. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/NEWS.md +0 -178
  601. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/README.md +0 -48
  602. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/attribute.rb +0 -205
  603. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/cdata.rb +0 -68
  604. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/child.rb +0 -97
  605. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/comment.rb +0 -80
  606. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/doctype.rb +0 -311
  607. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/document.rb +0 -451
  608. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/element.rb +0 -2599
  609. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/encoding.rb +0 -51
  610. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/entity.rb +0 -171
  611. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/formatters/pretty.rb +0 -142
  612. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/functions.rb +0 -447
  613. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/instruction.rb +0 -79
  614. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/namespace.rb +0 -59
  615. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/node.rb +0 -76
  616. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parseexception.rb +0 -52
  617. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/baseparser.rb +0 -694
  618. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/pullparser.rb +0 -197
  619. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/sax2parser.rb +0 -273
  620. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/streamparser.rb +0 -61
  621. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/treeparser.rb +0 -101
  622. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/parsers/xpathparser.rb +0 -689
  623. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/quickpath.rb +0 -266
  624. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/rexml.rb +0 -37
  625. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/security.rb +0 -28
  626. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/source.rb +0 -298
  627. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/text.rb +0 -424
  628. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/relaxng.rb +0 -539
  629. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/validation/validation.rb +0 -144
  630. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath.rb +0 -81
  631. data/bundle/ruby/2.7.0/gems/rexml-3.2.5/lib/rexml/xpath_parser.rb +0 -974
  632. data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/History.rdoc +0 -435
  633. data/bundle/ruby/2.7.0/gems/ruby2ruby-2.4.4/lib/ruby2ruby.rb +0 -1309
  634. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/History.rdoc +0 -1297
  635. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/Manifest.txt +0 -46
  636. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/README.rdoc +0 -112
  637. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/compare/normalize.rb +0 -218
  638. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.rb +0 -10973
  639. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby20_parser.y +0 -2683
  640. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.rb +0 -10980
  641. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby21_parser.y +0 -2700
  642. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.rb +0 -11123
  643. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby22_parser.y +0 -2711
  644. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.rb +0 -11132
  645. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby23_parser.y +0 -2713
  646. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.rb +0 -11231
  647. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby24_parser.y +0 -2721
  648. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.rb +0 -11231
  649. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby25_parser.y +0 -2721
  650. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.rb +0 -11253
  651. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby26_parser.y +0 -2736
  652. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.rb +0 -12980
  653. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby27_parser.y +0 -3324
  654. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.rb +0 -13242
  655. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby30_parser.y +0 -3447
  656. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.rb +0 -13622
  657. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby31_parser.y +0 -3481
  658. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby3_parser.yy +0 -3536
  659. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rb +0 -1144
  660. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer.rex.rb +0 -399
  661. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_lexer_strings.rb +0 -638
  662. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.rb +0 -98
  663. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser.yy +0 -3465
  664. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/lib/ruby_parser_extras.rb +0 -1865
  665. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/munge.rb +0 -250
  666. data/bundle/ruby/2.7.0/gems/ruby_parser-3.19.1/tools/ripper.rb +0 -44
  667. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/History.rdoc +0 -6
  668. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/Manifest.txt +0 -19
  669. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/README.rdoc +0 -54
  670. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.rb +0 -5794
  671. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby18_parser.y +0 -1909
  672. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.rb +0 -6186
  673. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby19_parser.y +0 -2117
  674. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rb +0 -1412
  675. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex +0 -179
  676. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_lexer.rex.rb +0 -323
  677. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser.rb +0 -30
  678. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy/ruby_parser_extras.rb +0 -1388
  679. data/bundle/ruby/2.7.0/gems/ruby_parser-legacy-1.0.0/lib/ruby_parser/legacy.rb +0 -5
  680. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/CHANGES.md +0 -154
  681. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/Gemfile +0 -11
  682. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/LICENSE.txt +0 -22
  683. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/README.md +0 -191
  684. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/bundle_install_all_ruby_versions.sh +0 -11
  685. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/deep.rb +0 -34
  686. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/libyaml_checker.rb +0 -36
  687. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/load.rb +0 -181
  688. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/date.rb +0 -37
  689. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/hexadecimal.rb +0 -12
  690. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/parse/sexagesimal.rb +0 -26
  691. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_handler.rb +0 -99
  692. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/psych_resolver.rb +0 -52
  693. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/resolver.rb +0 -94
  694. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/safe_to_ruby_visitor.rb +0 -29
  695. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/store.rb +0 -39
  696. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_hack.rb +0 -36
  697. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_node_monkeypatch.rb +0 -43
  698. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/syck_resolver.rb +0 -38
  699. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_boolean.rb +0 -21
  700. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_date.rb +0 -13
  701. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_float.rb +0 -33
  702. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_integer.rb +0 -26
  703. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_nil.rb +0 -18
  704. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/to_symbol.rb +0 -17
  705. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform/transformation_map.rb +0 -47
  706. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/transform.rb +0 -41
  707. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml/version.rb +0 -3
  708. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/lib/safe_yaml.rb +0 -94
  709. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/run_specs_all_ruby_versions.sh +0 -38
  710. data/bundle/ruby/2.7.0/gems/safe_yaml-1.0.5/safe_yaml.gemspec +0 -19
  711. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/History.rdoc +0 -448
  712. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/pt_testcase.rb +0 -3133
  713. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp.rb +0 -391
  714. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_matcher.rb +0 -1100
  715. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/sexp_processor.rb +0 -754
  716. data/bundle/ruby/2.7.0/gems/sexp_processor-4.16.0/lib/strict_sexp.rb +0 -148
  717. data/bundle/ruby/2.7.0/gems/slim-4.1.0/CHANGES +0 -460
  718. data/bundle/ruby/2.7.0/gems/slim-4.1.0/Gemfile +0 -70
  719. data/bundle/ruby/2.7.0/gems/slim-4.1.0/LICENSE +0 -21
  720. data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.jp.md +0 -1289
  721. data/bundle/ruby/2.7.0/gems/slim-4.1.0/README.md +0 -1290
  722. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/code_attributes.rb +0 -67
  723. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/command.rb +0 -128
  724. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/controls.rb +0 -60
  725. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/do_inserter.rb +0 -33
  726. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/embedded.rb +0 -248
  727. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/end_inserter.rb +0 -62
  728. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/engine.rb +0 -39
  729. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/erb_converter.rb +0 -14
  730. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/filter.rb +0 -30
  731. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/grammar.rb +0 -23
  732. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/include.rb +0 -57
  733. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/interpolation.rb +0 -35
  734. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/context.rb +0 -127
  735. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less/filter.rb +0 -80
  736. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/logic_less.rb +0 -5
  737. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/parser.rb +0 -548
  738. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/escaper.rb +0 -42
  739. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/filter.rb +0 -96
  740. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart/parser.rb +0 -34
  741. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/smart.rb +0 -8
  742. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/builder.rb +0 -107
  743. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/splat/filter.rb +0 -91
  744. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/template.rb +0 -19
  745. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/translator.rb +0 -118
  746. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim/version.rb +0 -5
  747. data/bundle/ruby/2.7.0/gems/slim-4.1.0/lib/slim.rb +0 -14
  748. data/bundle/ruby/2.7.0/gems/slim-4.1.0/slim.gemspec +0 -24
  749. data/bundle/ruby/2.7.0/gems/temple-0.8.2/CHANGES +0 -260
  750. data/bundle/ruby/2.7.0/gems/temple-0.8.2/Gemfile +0 -3
  751. data/bundle/ruby/2.7.0/gems/temple-0.8.2/README.md +0 -267
  752. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/engine.rb +0 -67
  753. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/engine.rb +0 -15
  754. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/parser.rb +0 -40
  755. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/template.rb +0 -11
  756. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/erb/trimming.rb +0 -23
  757. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/exceptions.rb +0 -13
  758. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filter.rb +0 -9
  759. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/code_merger.rb +0 -30
  760. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/control_flow.rb +0 -42
  761. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/dynamic_inliner.rb +0 -71
  762. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/encoding.rb +0 -24
  763. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/eraser.rb +0 -22
  764. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/escapable.rb +0 -40
  765. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/multi_flattener.rb +0 -25
  766. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/remove_bom.rb +0 -13
  767. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_analyzer.rb +0 -30
  768. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/static_merger.rb +0 -37
  769. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/string_splitter.rb +0 -130
  770. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/filters/validator.rb +0 -15
  771. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generator.rb +0 -88
  772. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array.rb +0 -21
  773. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/array_buffer.rb +0 -29
  774. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/erb.rb +0 -32
  775. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/rails_output_buffer.rb +0 -35
  776. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/generators/string_buffer.rb +0 -25
  777. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/grammar.rb +0 -57
  778. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_merger.rb +0 -42
  779. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_remover.rb +0 -35
  780. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/attribute_sorter.rb +0 -21
  781. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/dispatcher.rb +0 -31
  782. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/fast.rb +0 -130
  783. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/filter.rb +0 -21
  784. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/pretty.rb +0 -103
  785. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/html/safe.rb +0 -23
  786. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/map.rb +0 -105
  787. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/dispatcher.rb +0 -161
  788. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/engine_dsl.rb +0 -145
  789. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/grammar_dsl.rb +0 -170
  790. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/options.rb +0 -87
  791. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/mixins/template.rb +0 -28
  792. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/parser.rb +0 -8
  793. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/static_analyzer.rb +0 -77
  794. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/rails.rb +0 -26
  795. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates/tilt.rb +0 -46
  796. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/templates.rb +0 -11
  797. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/utils.rb +0 -101
  798. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple/version.rb +0 -3
  799. data/bundle/ruby/2.7.0/gems/temple-0.8.2/lib/temple.rb +0 -67
  800. data/bundle/ruby/2.7.0/gems/temple-0.8.2/temple.gemspec +0 -29
  801. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/History.rdoc +0 -85
  802. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/README.rdoc +0 -247
  803. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/cell.rb +0 -94
  804. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/row.rb +0 -52
  805. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/separator.rb +0 -14
  806. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/style.rb +0 -79
  807. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/table.rb +0 -343
  808. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table/version.rb +0 -5
  809. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/lib/terminal-table.rb +0 -26
  810. data/bundle/ruby/2.7.0/gems/terminal-table-1.8.0/terminal-table.gemspec +0 -26
  811. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/COPYING +0 -18
  812. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/asciidoc.rb +0 -27
  813. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/babel.rb +0 -16
  814. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/bluecloth.rb +0 -24
  815. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/builder.rb +0 -37
  816. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/coffee.rb +0 -58
  817. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/commonmarker.rb +0 -78
  818. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/creole.rb +0 -25
  819. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/csv.rb +0 -65
  820. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/dummy.rb +0 -3
  821. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erb.rb +0 -63
  822. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubi.rb +0 -32
  823. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/erubis.rb +0 -43
  824. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/etanni.rb +0 -27
  825. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/haml.rb +0 -86
  826. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/kramdown.rb +0 -25
  827. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/less.rb +0 -30
  828. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/liquid.rb +0 -44
  829. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/livescript.rb +0 -23
  830. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/mapping.rb +0 -293
  831. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/markaby.rb +0 -45
  832. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/maruku.rb +0 -22
  833. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/nokogiri.rb +0 -36
  834. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/pandoc.rb +0 -49
  835. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/plain.rb +0 -16
  836. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/prawn.rb +0 -43
  837. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/radius.rb +0 -48
  838. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdiscount.rb +0 -39
  839. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rdoc.rb +0 -40
  840. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcarpet.rb +0 -83
  841. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/redcloth.rb +0 -23
  842. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/rst-pandoc.rb +0 -18
  843. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sass.rb +0 -52
  844. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/sigil.rb +0 -34
  845. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/string.rb +0 -21
  846. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/template.rb +0 -297
  847. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/typescript.rb +0 -26
  848. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/wikicloth.rb +0 -22
  849. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt/yajl.rb +0 -87
  850. data/bundle/ruby/2.7.0/gems/tilt-2.0.10/lib/tilt.rb +0 -166
  851. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/CHANGELOG.md +0 -137
  852. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/MIT-LICENSE.txt +0 -22
  853. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/README.md +0 -124
  854. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/data/display_width.marshal.gz +0 -0
  855. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/constants.rb +0 -8
  856. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/index.rb +0 -12
  857. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/no_string_ext.rb +0 -7
  858. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width/string_ext.rb +0 -17
  859. data/bundle/ruby/2.7.0/gems/unicode-display_width-1.8.0/lib/unicode/display_width.rb +0 -51
  860. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/CHANGES.txt +0 -0
  861. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/MIT-LICENSE +0 -0
  862. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/README.txt +0 -0
  863. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis +0 -0
  864. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/erubis-run.rb +0 -0
  865. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/contrib/inline-require +0 -0
  866. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/context.rb +0 -0
  867. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/converter.rb +0 -0
  868. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ec.rb +0 -0
  869. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ecpp.rb +0 -0
  870. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejava.rb +0 -0
  871. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ejavascript.rb +0 -0
  872. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/enhanced.rb +0 -0
  873. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eperl.rb +0 -0
  874. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/ephp.rb +0 -0
  875. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/eruby.rb +0 -0
  876. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/escheme.rb +0 -0
  877. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine/optimized.rb +0 -0
  878. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/engine.rb +0 -0
  879. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/enhancer.rb +0 -0
  880. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/error.rb +0 -0
  881. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/evaluator.rb +0 -0
  882. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/generator.rb +0 -0
  883. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helper.rb +0 -0
  884. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_form_helper.rb +0 -0
  885. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/helpers/rails_helper.rb +0 -0
  886. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/local-setting.rb +0 -0
  887. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/main.rb +0 -0
  888. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/preprocessing.rb +0 -0
  889. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/tiny.rb +0 -0
  890. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis/util.rb +0 -0
  891. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/lib/erubis.rb +0 -0
  892. /data/bundle/ruby/{2.7.0 → 3.1.0}/gems/erubis-2.7.0/setup.rb +0 -0
  893. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/AUTHORS +0 -0
  894. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/COPYING +0 -0
  895. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/LICENSE +0 -0
  896. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/TODO +0 -0
  897. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/builtin_styles.rb +0 -0
  898. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/color_scheme.rb +0 -0
  899. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/compatibility.rb +0 -0
  900. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/custom_errors.rb +0 -0
  901. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/import.rb +0 -0
  902. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/list.rb +0 -0
  903. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/menu/item.rb +0 -0
  904. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/paginator.rb +0 -0
  905. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/simulate.rb +0 -0
  906. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/statement.rb +0 -0
  907. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string.rb +0 -0
  908. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/string_extensions.rb +0 -0
  909. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/template_renderer.rb +0 -0
  910. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/terminal/ncurses.rb +0 -0
  911. /data/bundle/ruby/{2.7.0/gems/highline-2.0.3 → 3.1.0/gems/highline-3.1.2}/lib/highline/wrapper.rb +0 -0
  912. /data/bundle/ruby/{2.7.0/gems/parallel-1.22.1 → 3.1.0/gems/parallel-1.27.0}/MIT-LICENSE.txt +0 -0
  913. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5/LICENSE.txt → 3.1.0/gems/reline-0.6.2/BSDL} +0 -0
  914. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/attlistdecl.rb +0 -0
  915. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/attlistdecl.rb +0 -0
  916. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/dtd.rb +0 -0
  917. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/elementdecl.rb +0 -0
  918. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/entitydecl.rb +0 -0
  919. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/dtd/notationdecl.rb +0 -0
  920. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/default.rb +0 -0
  921. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/formatters/transitive.rb +0 -0
  922. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/light/node.rb +0 -0
  923. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/output.rb +0 -0
  924. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parent.rb +0 -0
  925. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/lightparser.rb +0 -0
  926. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/parsers/ultralightparser.rb +0 -0
  927. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/sax2listener.rb +0 -0
  928. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/streamlistener.rb +0 -0
  929. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/undefinednamespaceexception.rb +0 -0
  930. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/validation/validationexception.rb +0 -0
  931. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmldecl.rb +0 -0
  932. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml/xmltokens.rb +0 -0
  933. /data/bundle/ruby/{2.7.0/gems/rexml-3.2.5 → 3.1.0/gems/rexml-3.4.4}/lib/rexml.rb +0 -0
  934. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/Manifest.txt +0 -0
  935. /data/bundle/ruby/{2.7.0/gems/ruby2ruby-2.4.4 → 3.1.0/gems/ruby2ruby-2.5.2}/README.rdoc +0 -0
  936. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/debugging.md +0 -0
  937. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/gauntlet.md +0 -0
  938. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_extensions.rb +0 -0
  939. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/rp_stringscanner.rb +0 -0
  940. /data/bundle/ruby/{2.7.0/gems/ruby_parser-3.19.1 → 3.1.0/gems/ruby_parser-3.20.3}/lib/ruby_lexer.rex +0 -0
  941. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/Manifest.txt +0 -0
  942. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/README.rdoc +0 -0
  943. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/composite_sexp_processor.rb +0 -0
  944. /data/bundle/ruby/{2.7.0/gems/sexp_processor-4.16.0 → 3.1.0/gems/sexp_processor-4.17.4}/lib/unique.rb +0 -0
  945. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/EXPRESSIONS.md +0 -0
  946. /data/bundle/ruby/{2.7.0/gems/temple-0.8.2 → 3.1.0/gems/temple-0.10.4}/LICENSE +0 -0
  947. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Gemfile +0 -0
  948. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/LICENSE.txt +0 -0
  949. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Manifest +0 -0
  950. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/Todo.rdoc +0 -0
  951. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/import.rb +0 -0
  952. /data/bundle/ruby/{2.7.0/gems/terminal-table-1.8.0 → 3.1.0/gems/terminal-table-4.0.0}/lib/terminal-table/table_helper.rb +0 -0
@@ -0,0 +1,3501 @@
1
+ # -*- racc -*-
2
+
3
+ #if V==20
4
+ class Ruby20Parser
5
+ #elif V==21
6
+ class Ruby21Parser
7
+ #elif V == 22
8
+ class Ruby22Parser
9
+ #elif V == 23
10
+ class Ruby23Parser
11
+ #elif V == 24
12
+ class Ruby24Parser
13
+ #elif V == 25
14
+ class Ruby25Parser
15
+ #elif V == 26
16
+ class Ruby26Parser
17
+ #elif V == 27
18
+ class Ruby27Parser
19
+ #else
20
+ fail "version not specified or supported on code generation"
21
+ #endif
22
+
23
+ token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
24
+ kTHEN kELSIF kELSE kCASE kWHEN kWHILE kUNTIL kFOR kBREAK kNEXT
25
+ kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kDO_LAMBDA kRETURN kYIELD kSUPER
26
+ kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD
27
+ kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__
28
+ k__FILE__ k__ENCODING__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT
29
+ tLABEL tCVAR tNTH_REF tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT
30
+ tREGEXP_END tUPLUS tUMINUS tUMINUS_NUM tPOW tCMP tEQ tEQQ tNEQ
31
+ tGEQ tLEQ tANDOP tOROP tMATCH tNMATCH tDOT tDOT2 tDOT3 tAREF
32
+ tASET tLSHFT tRSHFT tCOLON2 tCOLON3 tOP_ASGN tASSOC tLPAREN
33
+ tLPAREN2 tRPAREN tLPAREN_ARG tLBRACK tLBRACK2 tRBRACK tLBRACE
34
+ tLBRACE_ARG tSTAR tSTAR2 tAMPER tAMPER2 tTILDE tPERCENT tDIVIDE
35
+ tPLUS tMINUS tLT tGT tPIPE tBANG tCARET tLCURLY tRCURLY
36
+ tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG
37
+ tWORDS_BEG tQWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END
38
+ tSTRING tSYMBOL tNL tEH tCOLON tCOMMA tSPACE tSEMI tLAMBDA
39
+ tLAMBEG tDSTAR tCHAR tSYMBOLS_BEG tQSYMBOLS_BEG tSTRING_DEND
40
+ #if V >= 21
41
+ tRATIONAL tIMAGINARY
42
+ #endif
43
+ #if V >= 22
44
+ tLABEL_END
45
+ #endif
46
+ #if V >= 23
47
+ tLONELY
48
+ #endif
49
+ #if V >= 26
50
+ tBDOT2 tBDOT3
51
+ #endif
52
+
53
+ preclow
54
+ nonassoc tLOWEST
55
+ nonassoc tLBRACE_ARG
56
+ nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
57
+ left kOR kAND
58
+ right kNOT
59
+ nonassoc kDEFINED
60
+ right tEQL tOP_ASGN
61
+ left kRESCUE_MOD
62
+ right tEH tCOLON
63
+ nonassoc tDOT2 tDOT3 tBDOT2 tBDOT3
64
+ left tOROP
65
+ left tANDOP
66
+ nonassoc tCMP tEQ tEQQ tNEQ tMATCH tNMATCH
67
+ left tGT tGEQ tLT tLEQ
68
+ left tPIPE tCARET
69
+ left tAMPER2
70
+ left tLSHFT tRSHFT
71
+ left tPLUS tMINUS
72
+ left tSTAR2 tDIVIDE tPERCENT # TODO: tSTAR2 -> tMULT
73
+ right tUMINUS_NUM tUMINUS
74
+ right tPOW
75
+ right tBANG tTILDE tUPLUS
76
+ prechigh
77
+
78
+ rule
79
+
80
+ program: {
81
+ self.lexer.lex_state = EXPR_BEG
82
+ }
83
+ top_compstmt
84
+ {
85
+ result = new_compstmt val
86
+
87
+ lexer.cond.pop # local_pop
88
+ lexer.cmdarg.pop
89
+ }
90
+
91
+ top_compstmt: top_stmts opt_terms
92
+ {
93
+ stmt, _ = val
94
+ result = stmt
95
+ }
96
+
97
+ top_stmts: none
98
+ | top_stmt
99
+ | top_stmts terms top_stmt
100
+ {
101
+ result = self.block_append val[0], val[2]
102
+ }
103
+ | error top_stmt
104
+
105
+ top_stmt: stmt
106
+ | klBEGIN
107
+ {
108
+ if (self.in_def || self.in_single > 0) then
109
+ debug 11
110
+ yyerror "BEGIN in method"
111
+ end
112
+ self.env.extend
113
+ }
114
+ begin_block
115
+ {
116
+ (_, lineno), _, iter = val
117
+ iter.line lineno
118
+
119
+ (_, preexe,) = iter
120
+ preexe.line lineno
121
+
122
+ result = iter
123
+ }
124
+
125
+ begin_block: tLCURLY { result = lexer.lineno } top_compstmt tRCURLY
126
+ {
127
+ _, line, stmt, _ = val
128
+ result = new_iter s(:preexe).line(line), 0, stmt
129
+ }
130
+
131
+ bodystmt: compstmt opt_rescue k_else
132
+ {
133
+ res = _values[-2]
134
+ # TODO: move down to main match so I can just use val
135
+
136
+ #if V >= 26
137
+ yyerror "else without rescue is useless" unless res
138
+ #else
139
+ warn "else without rescue is useless" unless res
140
+ #endif
141
+ }
142
+ compstmt
143
+ opt_ensure
144
+ {
145
+ body, resc, _, _, els, ens = val
146
+
147
+ result = new_body [body, resc, els, ens]
148
+ }
149
+ | compstmt opt_rescue opt_ensure
150
+ {
151
+ body, resc, ens = val
152
+
153
+ result = new_body [body, resc, nil, ens]
154
+ }
155
+
156
+ compstmt: stmts opt_terms
157
+ {
158
+ result = new_compstmt val
159
+ }
160
+
161
+ stmts: none
162
+ | stmt_or_begin # TODO: newline_node ?
163
+ | stmts terms stmt_or_begin
164
+ {
165
+ result = self.block_append val[0], val[2]
166
+ }
167
+ | error stmt
168
+ {
169
+ result = val[1]
170
+ debug 12
171
+ }
172
+
173
+ stmt_or_begin: stmt
174
+ | klBEGIN
175
+ {
176
+ yyerror "BEGIN is permitted only at toplevel"
177
+ }
178
+ begin_block
179
+ {
180
+ result = val[2] # wtf?
181
+ }
182
+
183
+ stmt: kALIAS fitem
184
+ {
185
+ lexer.lex_state = EXPR_FNAME
186
+ }
187
+ fitem
188
+ {
189
+ (_, line), lhs, _, rhs = val
190
+ result = s(:alias, lhs, rhs).line(line).line line
191
+ }
192
+ | kALIAS tGVAR tGVAR
193
+ {
194
+ (_, line), (lhs, _), (rhs, _) = val
195
+ result = s(:valias, lhs.to_sym, rhs.to_sym).line line
196
+ }
197
+ | kALIAS tGVAR tBACK_REF
198
+ {
199
+ (_, line), (lhs, _), (rhs, _) = val
200
+ result = s(:valias, lhs.to_sym, :"$#{rhs}").line line
201
+ }
202
+ | kALIAS tGVAR tNTH_REF
203
+ {
204
+ yyerror "can't make alias for the number variables"
205
+ }
206
+ | kUNDEF undef_list
207
+ {
208
+ result = val[1]
209
+ }
210
+ | stmt kIF_MOD expr_value
211
+ {
212
+ t, _, c = val
213
+ result = new_if c, t, nil
214
+ }
215
+ | stmt kUNLESS_MOD expr_value
216
+ {
217
+ f, _, c = val
218
+ result = new_if c, nil, f
219
+ }
220
+ | stmt kWHILE_MOD expr_value
221
+ {
222
+ e, _, c = val
223
+ result = new_while e, c, true
224
+ }
225
+ | stmt kUNTIL_MOD expr_value
226
+ {
227
+ e, _, c = val
228
+ result = new_until e, c, true
229
+ }
230
+ | stmt kRESCUE_MOD stmt
231
+ {
232
+ body, _, resbody = val
233
+
234
+ resbody = new_resbody s(:array).line(resbody.line), resbody
235
+ result = new_rescue body, resbody
236
+ }
237
+ | klEND tLCURLY compstmt tRCURLY
238
+ {
239
+ (_, line), _, stmt, _ = val
240
+
241
+ if (self.in_def || self.in_single > 0) then
242
+ debug 13
243
+ yyerror "END in method; use at_exit"
244
+ end
245
+
246
+ result = new_iter s(:postexe).line(line), 0, stmt
247
+ }
248
+ | command_asgn
249
+ | mlhs tEQL command_call
250
+ {
251
+ result = new_masgn val[0], val[2], :wrap
252
+ }
253
+ | lhs tEQL mrhs
254
+ {
255
+ lhs, _, rhs = val
256
+
257
+ result = new_assign lhs, s(:svalue, rhs).line(rhs.line)
258
+ }
259
+ #if V == 20
260
+ | mlhs tEQL arg_value
261
+ {
262
+ result = new_masgn val[0], val[2], :wrap
263
+ }
264
+ #endif
265
+ #if V >= 27
266
+ | mlhs tEQL mrhs_arg kRESCUE_MOD stmt
267
+ {
268
+ # unwraps s(:to_ary, rhs)
269
+ lhs, _, (_, rhs), _, resbody = val
270
+
271
+ resbody = new_resbody s(:array).line(resbody.line), resbody
272
+
273
+ result = new_masgn lhs, new_rescue(rhs, resbody), :wrap
274
+ }
275
+ #endif
276
+ #if V == 20
277
+ | mlhs tEQL mrhs
278
+ #else
279
+ | mlhs tEQL mrhs_arg
280
+ #endif
281
+ {
282
+ result = new_masgn val[0], val[2]
283
+ }
284
+ | expr
285
+
286
+ command_asgn: lhs tEQL command_rhs
287
+ {
288
+ result = new_assign val[0], val[2]
289
+ }
290
+ # | lhs tEQL command_asgn
291
+ # {
292
+ # result = new_assign val[0], val[2]
293
+ # }
294
+ | var_lhs tOP_ASGN command_rhs
295
+ {
296
+ result = new_op_asgn val
297
+ }
298
+ | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN command_rhs
299
+ {
300
+ result = new_op_asgn1 val
301
+ }
302
+ | primary_value call_op tIDENTIFIER tOP_ASGN command_rhs
303
+ {
304
+ prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
305
+
306
+ result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
307
+ result.sexp_type = :safe_op_asgn if call_op == '&.'
308
+ result.line prim.line
309
+ }
310
+ | primary_value call_op tCONSTANT tOP_ASGN command_rhs
311
+ {
312
+ prim, (call_op, _), (id, _), (op_asgn, _), rhs = val
313
+
314
+ result = s(:op_asgn, prim, rhs, id.to_sym, op_asgn.to_sym)
315
+ result.sexp_type = :safe_op_asgn if call_op == '&.'
316
+ result.line prim.line
317
+ }
318
+ | primary_value tCOLON2 tCONSTANT tOP_ASGN command_rhs
319
+ {
320
+ lhs1, _, (lhs2, line), (id, _), rhs = val
321
+
322
+ result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
323
+ }
324
+ | primary_value tCOLON2 tIDENTIFIER tOP_ASGN command_rhs
325
+ {
326
+ lhs1, _, (lhs2, line), (id, _), rhs = val
327
+
328
+ result = s(:op_asgn, lhs1, rhs, lhs2.to_sym, id.to_sym).line line
329
+ }
330
+ | backref tOP_ASGN command_rhs
331
+ {
332
+ self.backref_assign_error val[0]
333
+ }
334
+
335
+ command_rhs: command_call =tOP_ASGN
336
+ {
337
+ expr, = val
338
+ result = value_expr expr
339
+ }
340
+ #if V >= 24
341
+ | command_call kRESCUE_MOD stmt
342
+ {
343
+ expr, (_, line), resbody = val
344
+
345
+ expr = value_expr expr
346
+ ary = s(:array).line line
347
+ result = new_rescue(expr, new_resbody(ary, resbody))
348
+ }
349
+ #endif
350
+ | command_asgn
351
+
352
+ expr: command_call
353
+ | expr kAND expr
354
+ {
355
+ lhs, _, rhs = val
356
+ result = logical_op :and, lhs, rhs
357
+ }
358
+ | expr kOR expr
359
+ {
360
+ lhs, _, rhs = val
361
+ result = logical_op :or, lhs, rhs
362
+ }
363
+ | kNOT opt_nl expr
364
+ {
365
+ (_, line), _, expr = val
366
+ result = new_call(expr, :"!").line line
367
+ # REFACTOR: call_uni_op
368
+ }
369
+ | tBANG command_call
370
+ {
371
+ _, cmd = val
372
+ result = new_call(cmd, :"!").line cmd.line
373
+ # TODO: fix line number to tBANG... but causes BAD shift/reduce conflict
374
+ # REFACTOR: call_uni_op -- see parse26.y
375
+ }
376
+ #if V >= 27
377
+ | arg
378
+ kIN
379
+ {
380
+ # TODO? value_expr($1);
381
+ self.lexer.lex_state = EXPR_BEG|EXPR_LABEL
382
+ self.lexer.command_start = false
383
+ result = self.in_kwarg
384
+ self.in_kwarg = true
385
+ self.env.extend
386
+ }
387
+ p_expr
388
+ {
389
+ self.env.unextend
390
+
391
+ expr, _, old_kwarg, pat = val
392
+
393
+ expr = value_expr expr
394
+
395
+ self.in_kwarg = old_kwarg
396
+ pat_in = new_in pat, nil, nil, expr.line
397
+ result = new_case expr, pat_in, expr.line
398
+ }
399
+ #endif
400
+ | arg =tLBRACE_ARG
401
+
402
+ expr_value: expr
403
+ {
404
+ result = value_expr(val[0])
405
+ }
406
+
407
+ expr_value_do: {
408
+ lexer.cond.push true
409
+ }
410
+ expr_value do
411
+ {
412
+ lexer.cond.pop
413
+ }
414
+ {
415
+ _, expr, _, _ = val
416
+ result = expr
417
+ }
418
+
419
+ command_call: command
420
+ | block_command
421
+
422
+ block_command: block_call
423
+ | block_call call_op2 operation2 command_args
424
+ {
425
+ blk, _, (msg, _line), args = val
426
+ result = new_call(blk, msg.to_sym, args).line blk.line
427
+ }
428
+
429
+ cmd_brace_block: tLBRACE_ARG
430
+ {
431
+ # self.env.extend(:dynamic)
432
+ result = self.lexer.lineno
433
+ }
434
+ brace_body tRCURLY
435
+ {
436
+ _, line, body, _ = val
437
+
438
+ result = body
439
+ result.line line
440
+
441
+ # self.env.unextend
442
+ }
443
+
444
+ fcall: operation
445
+ {
446
+ (msg, line), = val
447
+ result = new_call(nil, msg.to_sym).line line
448
+ }
449
+
450
+ command: fcall command_args =tLOWEST
451
+ {
452
+ call, args = val
453
+ result = call.concat args.sexp_body
454
+ }
455
+ | fcall command_args cmd_brace_block
456
+ {
457
+ call, args, block = val
458
+
459
+ result = call.concat args.sexp_body
460
+
461
+ if block then
462
+ block_dup_check result, block
463
+
464
+ result, operation = block, result
465
+ result.insert 1, operation
466
+ end
467
+ }
468
+ | primary_value call_op operation2 command_args =tLOWEST
469
+ {
470
+ lhs, callop, (op, _), args = val
471
+
472
+ result = new_call lhs, op.to_sym, args, callop
473
+ result.line lhs.line
474
+ }
475
+ | primary_value call_op operation2 command_args cmd_brace_block
476
+ {
477
+ recv, _, (msg, _line), args, block = val
478
+ call = new_call recv, msg.to_sym, args, val[1]
479
+
480
+ block_dup_check call, block
481
+
482
+ block.insert 1, call
483
+ result = block
484
+ }
485
+ | primary_value tCOLON2 operation2 command_args =tLOWEST
486
+ {
487
+ lhs, _, (id, line), args = val
488
+
489
+ result = new_call lhs, id.to_sym, args
490
+ result.line line
491
+ }
492
+ | primary_value tCOLON2 operation2 command_args cmd_brace_block
493
+ {
494
+ recv, _, (msg, _line), args, block = val
495
+ call = new_call recv, msg.to_sym, args
496
+
497
+ block_dup_check call, block
498
+
499
+ block.insert 1, call
500
+ result = block
501
+ }
502
+ | kSUPER command_args
503
+ {
504
+ result = new_super val[1]
505
+ }
506
+ | kYIELD command_args
507
+ {
508
+ (_, line), args = val
509
+ result = new_yield args
510
+ result.line line # TODO: push to new_yield
511
+ }
512
+ | k_return call_args
513
+ {
514
+ line = val[0].last
515
+ result = s(:return, ret_args(val[1])).line(line)
516
+ }
517
+ | kBREAK call_args
518
+ {
519
+ (_, line), args = val
520
+ result = s(:break, ret_args(args)).line line
521
+ }
522
+ | kNEXT call_args
523
+ {
524
+ line = val[0].last
525
+ result = s(:next, ret_args(val[1])).line(line)
526
+ }
527
+
528
+ mlhs: mlhs_basic
529
+ | tLPAREN mlhs_inner rparen
530
+ {
531
+ result = val[1]
532
+ }
533
+
534
+ mlhs_inner: mlhs_basic
535
+ | tLPAREN mlhs_inner rparen
536
+ {
537
+ _, arg, _ = val
538
+ l = arg.line
539
+
540
+ result = s(:masgn, s(:array, arg).line(l)).line l
541
+ }
542
+
543
+ mlhs_basic: mlhs_head
544
+ {
545
+ head, = val
546
+ result = s(:masgn, head).line head.line
547
+ }
548
+ | mlhs_head mlhs_item
549
+ {
550
+ lhs, rhs = val
551
+ result = s(:masgn, lhs << rhs.compact).line lhs.line
552
+ }
553
+ | mlhs_head tSTAR mlhs_node
554
+ {
555
+ head, _, tail = val
556
+ head << s(:splat, tail).line(tail.line)
557
+ result = s(:masgn, head).line head.line
558
+ }
559
+ | mlhs_head tSTAR mlhs_node tCOMMA mlhs_post
560
+ {
561
+ ary1, _, splat, _, ary2 = val
562
+
563
+ result = list_append ary1, s(:splat, splat).line(splat.line)
564
+ result.concat ary2.sexp_body
565
+ result = s(:masgn, result).line result.line
566
+ }
567
+ | mlhs_head tSTAR
568
+ {
569
+ head, _ = val
570
+ l = head.line
571
+ result = s(:masgn, head << s(:splat).line(l)).line l
572
+ }
573
+ | mlhs_head tSTAR tCOMMA mlhs_post
574
+ {
575
+ head, _, _, post = val
576
+ ary = list_append head, s(:splat).line(head.line)
577
+ ary.concat post.sexp_body
578
+ result = s(:masgn, ary).line ary.line
579
+ }
580
+ | tSTAR mlhs_node
581
+ {
582
+ _, node = val
583
+ l = node.line
584
+ splat = s(:splat, node).line l
585
+ ary = s(:array, splat).line l
586
+ result = s(:masgn, ary).line l
587
+ }
588
+ | tSTAR mlhs_node tCOMMA mlhs_post
589
+ {
590
+ _, node, _, post = val
591
+
592
+ splat = s(:splat, node).line node.line
593
+ ary = s(:array, splat).line splat.line
594
+ ary.concat post.sexp_body
595
+ result = s(:masgn, ary).line ary.line
596
+ }
597
+ | tSTAR
598
+ {
599
+ l = lexer.lineno
600
+ result = s(:masgn, s(:array, s(:splat).line(l)).line(l)).line l
601
+ }
602
+ | tSTAR tCOMMA mlhs_post
603
+ {
604
+ _, _, post = val
605
+ l = post.line
606
+
607
+ splat = s(:splat).line l
608
+ ary = s(:array, splat, *post.sexp_body).line l
609
+ result = s(:masgn, ary).line l
610
+ }
611
+
612
+ mlhs_item: mlhs_node
613
+ | tLPAREN mlhs_inner rparen
614
+ {
615
+ result = val[1]
616
+ }
617
+
618
+ mlhs_head: mlhs_item tCOMMA
619
+ {
620
+ lhs, _ = val
621
+ result = s(:array, lhs).line lhs.line
622
+ }
623
+ | mlhs_head mlhs_item tCOMMA
624
+ {
625
+ result = val[0] << val[1].compact
626
+ }
627
+
628
+ mlhs_post: mlhs_item
629
+ {
630
+ item, = val
631
+ result = s(:array, item).line item.line
632
+ }
633
+ | mlhs_post tCOMMA mlhs_item
634
+ {
635
+ result = list_append val[0], val[2]
636
+ }
637
+
638
+ mlhs_node: user_variable
639
+ {
640
+ result = self.assignable val[0]
641
+ }
642
+ | keyword_variable
643
+ {
644
+ result = self.assignable val[0]
645
+ }
646
+ | primary_value tLBRACK2 opt_call_args rbracket
647
+ {
648
+ result = self.aryset val[0], val[2]
649
+ }
650
+ | primary_value call_op tIDENTIFIER
651
+ {
652
+ lhs, call_op, (id, _line) = val
653
+
654
+ result = new_attrasgn lhs, id, call_op
655
+ }
656
+ | primary_value tCOLON2 tIDENTIFIER
657
+ {
658
+ recv, _, (id, _line) = val
659
+ result = new_attrasgn recv, id
660
+ }
661
+ | primary_value call_op tCONSTANT
662
+ {
663
+ lhs, call_op, (id, _line) = val
664
+
665
+ result = new_attrasgn lhs, id, call_op
666
+ }
667
+ | primary_value tCOLON2 tCONSTANT
668
+ {
669
+ if (self.in_def || self.in_single > 0) then
670
+ debug 14
671
+ yyerror "dynamic constant assignment"
672
+ end
673
+
674
+ expr, _, (id, _line) = val
675
+ l = expr.line
676
+
677
+ result = s(:const, s(:colon2, expr, id.to_sym).line(l), nil).line l
678
+ }
679
+ | tCOLON3 tCONSTANT
680
+ {
681
+ if (self.in_def || self.in_single > 0) then
682
+ debug 15
683
+ yyerror "dynamic constant assignment"
684
+ end
685
+
686
+ _, (id, l) = val
687
+
688
+ result = s(:const, nil, s(:colon3, id.to_sym).line(l)).line l
689
+ }
690
+ | backref
691
+ {
692
+ ref, = val
693
+
694
+ self.backref_assign_error ref
695
+ }
696
+
697
+ lhs: user_variable
698
+ {
699
+ var, = val
700
+
701
+ result = self.assignable var
702
+ }
703
+ | keyword_variable
704
+ {
705
+ var, = val
706
+
707
+ result = self.assignable var
708
+
709
+ debug 16
710
+ }
711
+ | primary_value tLBRACK2 opt_call_args rbracket
712
+ {
713
+ lhs, _, args, _ = val
714
+
715
+ result = self.aryset lhs, args
716
+ }
717
+ | primary_value call_op tIDENTIFIER # REFACTOR
718
+ {
719
+ lhs, op, (id, _line) = val
720
+
721
+ result = new_attrasgn lhs, id, op
722
+ }
723
+ | primary_value tCOLON2 tIDENTIFIER
724
+ {
725
+ lhs, _, (id, _line) = val
726
+
727
+ result = new_attrasgn lhs, id
728
+ }
729
+ | primary_value call_op tCONSTANT # REFACTOR?
730
+ {
731
+ lhs, call_op, (id, _line) = val
732
+
733
+ result = new_attrasgn lhs, id, call_op
734
+ }
735
+ | primary_value tCOLON2 tCONSTANT
736
+ {
737
+ expr, _, (id, _line) = val
738
+
739
+ if (self.in_def || self.in_single > 0) then
740
+ debug 17
741
+ yyerror "dynamic constant assignment"
742
+ end
743
+
744
+ l = expr.line
745
+ result = s(:const, s(:colon2, expr, id.to_sym).line(l)).line l
746
+ }
747
+ | tCOLON3 tCONSTANT
748
+ {
749
+ _, (id, l) = val
750
+
751
+ if (self.in_def || self.in_single > 0) then
752
+ debug 18
753
+ yyerror "dynamic constant assignment"
754
+ end
755
+
756
+ result = s(:const, s(:colon3, id.to_sym).line(l)).line l
757
+ }
758
+ | backref
759
+ {
760
+ self.backref_assign_error val[0]
761
+ }
762
+
763
+ cname: tIDENTIFIER
764
+ {
765
+ yyerror "class/module name must be CONSTANT"
766
+ }
767
+ | tCONSTANT
768
+
769
+ cpath: tCOLON3 cname
770
+ {
771
+ result = wrap :colon3, val[1]
772
+ }
773
+ | cname
774
+ {
775
+ (id, line), = val
776
+ result = [id.to_sym, line] # TODO: sexp?
777
+ }
778
+ | primary_value tCOLON2 cname
779
+ {
780
+ pval, _, (name, _line) = val
781
+
782
+ result = s(:colon2, pval, name.to_sym)
783
+ result.line pval.line
784
+ }
785
+
786
+ fname: tIDENTIFIER | tCONSTANT | tFID
787
+ | op
788
+ {
789
+ lexer.lex_state = EXPR_END
790
+ }
791
+
792
+ | reswords
793
+
794
+ fitem: fname
795
+ {
796
+ result = wrap :lit, val[0]
797
+ }
798
+ | symbol
799
+
800
+ undef_list: fitem
801
+ {
802
+ result = new_undef val[0]
803
+ }
804
+ |
805
+ undef_list tCOMMA
806
+ {
807
+ lexer.lex_state = EXPR_FNAME
808
+ }
809
+ fitem
810
+ {
811
+ result = new_undef val[0], val[3]
812
+ }
813
+
814
+ op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ
815
+ | tMATCH | tNMATCH | tGT | tGEQ | tLT | tLEQ
816
+ | tNEQ | tLSHFT | tRSHFT | tPLUS | tMINUS | tSTAR2
817
+ | tSTAR | tDIVIDE | tPERCENT | tPOW | tDSTAR | tBANG | tTILDE
818
+ | tUPLUS | tUMINUS | tAREF | tASET | tBACK_REF2
819
+
820
+ reswords: k__LINE__ | k__FILE__ | k__ENCODING__ | klBEGIN | klEND
821
+ | kALIAS | kAND | kBEGIN | kBREAK | kCASE
822
+ | kCLASS | kDEF | kDEFINED | kDO | kELSE
823
+ | kELSIF | kEND | kENSURE | kFALSE | kFOR
824
+ | kIN | kMODULE | kNEXT | kNIL | kNOT
825
+ | kOR | kREDO | kRESCUE | kRETRY | kRETURN
826
+ | kSELF | kSUPER | kTHEN | kTRUE | kUNDEF
827
+ | kWHEN | kYIELD | kIF | kUNLESS | kWHILE
828
+ | kUNTIL
829
+
830
+ arg: lhs tEQL arg_rhs
831
+ {
832
+ result = new_assign val[0], val[2]
833
+ }
834
+ | var_lhs tOP_ASGN arg_rhs
835
+ {
836
+ result = new_op_asgn val
837
+ }
838
+ | primary_value tLBRACK2 opt_call_args rbracket tOP_ASGN arg_rhs
839
+ {
840
+ result = new_op_asgn1 val
841
+ }
842
+ | primary_value call_op tIDENTIFIER tOP_ASGN arg_rhs
843
+ {
844
+ result = new_op_asgn2 val
845
+ }
846
+ | primary_value call_op tCONSTANT tOP_ASGN arg_rhs
847
+ {
848
+ result = new_op_asgn2 val
849
+ }
850
+ | primary_value tCOLON2 tIDENTIFIER tOP_ASGN arg_rhs
851
+ {
852
+ lhs, _, (id, _line), (op, _), rhs = val
853
+
854
+ result = s(:op_asgn, lhs, rhs, id.to_sym, op.to_sym).line lhs.line
855
+ }
856
+ | primary_value tCOLON2 tCONSTANT tOP_ASGN arg_rhs
857
+ {
858
+ lhs1, _, (lhs2, _line), op, rhs = val
859
+
860
+ lhs = s(:colon2, lhs1, lhs2.to_sym).line lhs1.line
861
+ result = new_const_op_asgn [lhs, op, rhs]
862
+ }
863
+ | tCOLON3 tCONSTANT tOP_ASGN arg_rhs
864
+ {
865
+ _, lhs, op, rhs = val
866
+
867
+ lhs = wrap :colon3, lhs
868
+ result = new_const_op_asgn [lhs, op, rhs]
869
+ }
870
+ | backref tOP_ASGN arg_rhs
871
+ {
872
+ # TODO: lhs = var_field val[0]
873
+ asgn = new_op_asgn val
874
+ result = self.backref_assign_error asgn
875
+ }
876
+ | arg tDOT2 arg
877
+ {
878
+ v1, v2 = val[0], val[2]
879
+ if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
880
+ result = s(:lit, (v1.last)..(v2.last)).line v1.line
881
+ else
882
+ result = s(:dot2, v1, v2).line v1.line
883
+ end
884
+ }
885
+ | arg tDOT3 arg
886
+ {
887
+ v1, v2 = val[0], val[2]
888
+ if v1.sexp_type == :lit and v2.sexp_type == :lit and Integer === v1.last and Integer === v2.last then
889
+ result = s(:lit, (v1.last)...(v2.last)).line v1.line
890
+ else
891
+ result = s(:dot3, v1, v2).line v1.line
892
+ end
893
+ }
894
+ #if V >= 26
895
+ | arg tDOT2
896
+ {
897
+ v1, _ = val
898
+ v2 = nil
899
+
900
+ result = s(:dot2, v1, v2).line v1.line
901
+ }
902
+ | arg tDOT3
903
+ {
904
+ v1, _ = val
905
+ v2 = nil
906
+
907
+ result = s(:dot3, v1, v2).line v1.line
908
+ }
909
+ #endif
910
+
911
+ #if V >= 27
912
+ | tBDOT2 arg
913
+ {
914
+ _, v2, = val
915
+ v1 = nil
916
+
917
+ result = s(:dot2, v1, v2).line v2.line
918
+ }
919
+ | tBDOT3 arg
920
+ {
921
+ _, v2 = val
922
+ v1 = nil
923
+
924
+ result = s(:dot3, v1, v2).line v2.line
925
+ }
926
+ #endif
927
+
928
+ | arg tPLUS arg
929
+ {
930
+ result = new_call val[0], :+, argl(val[2])
931
+ }
932
+ | arg tMINUS arg
933
+ {
934
+ result = new_call val[0], :-, argl(val[2])
935
+ }
936
+ | arg tSTAR2 arg # TODO: rename
937
+ {
938
+ result = new_call val[0], :*, argl(val[2])
939
+ }
940
+ | arg tDIVIDE arg
941
+ {
942
+ result = new_call val[0], :"/", argl(val[2])
943
+ }
944
+ | arg tPERCENT arg
945
+ {
946
+ result = new_call val[0], :"%", argl(val[2])
947
+ }
948
+ | arg tPOW arg
949
+ {
950
+ result = new_call val[0], :**, argl(val[2])
951
+ }
952
+ #if V == 20
953
+ | tUMINUS_NUM tINTEGER tPOW arg
954
+ {
955
+ _, (num, line), _, arg = val
956
+ lit = s(:lit, num).line line
957
+ result = new_call(new_call(lit, :"**", argl(arg)), :"-@")
958
+ }
959
+ | tUMINUS_NUM tFLOAT tPOW arg
960
+ #else
961
+ | tUMINUS_NUM simple_numeric tPOW arg
962
+ #endif
963
+ {
964
+ _, (num, line), _, arg = val
965
+ lit = s(:lit, num).line line
966
+ result = new_call(new_call(lit, :"**", argl(arg)), :"-@")
967
+
968
+ #if V == 20
969
+ ## TODO: why is this 2.0 only?
970
+ debug 19
971
+ #endif
972
+ }
973
+ | tUPLUS arg
974
+ {
975
+ result = new_call val[1], :"+@"
976
+ }
977
+ | tUMINUS arg
978
+ {
979
+ result = new_call val[1], :"-@"
980
+ }
981
+ | arg tPIPE arg
982
+ {
983
+ result = new_call val[0], :"|", argl(val[2])
984
+ }
985
+ | arg tCARET arg
986
+ {
987
+ result = new_call val[0], :"^", argl(val[2])
988
+ }
989
+ | arg tAMPER2 arg
990
+ {
991
+ result = new_call val[0], :"&", argl(val[2])
992
+ }
993
+ | arg tCMP arg
994
+ {
995
+ result = new_call val[0], :"<=>", argl(val[2])
996
+ }
997
+ | rel_expr =tCMP
998
+ | arg tEQ arg
999
+ {
1000
+ result = new_call val[0], :"==", argl(val[2])
1001
+ }
1002
+ | arg tEQQ arg
1003
+ {
1004
+ result = new_call val[0], :"===", argl(val[2])
1005
+ }
1006
+ | arg tNEQ arg
1007
+ {
1008
+ result = new_call val[0], :"!=", argl(val[2])
1009
+ }
1010
+ | arg tMATCH arg
1011
+ {
1012
+ lhs, _, rhs = val
1013
+ result = new_match lhs, rhs
1014
+ }
1015
+ | arg tNMATCH arg
1016
+ {
1017
+ lhs, _, rhs = val
1018
+ result = s(:not, new_match(lhs, rhs)).line lhs.line
1019
+ }
1020
+ | tBANG arg
1021
+ {
1022
+ _, arg = val
1023
+ result = new_call arg, :"!"
1024
+ result.line arg.line
1025
+ }
1026
+ | tTILDE arg
1027
+ {
1028
+ result = new_call value_expr(val[1]), :"~"
1029
+ }
1030
+ | arg tLSHFT arg
1031
+ {
1032
+ val[0] = value_expr val[0]
1033
+ val[2] = value_expr val[2]
1034
+ result = new_call val[0], :"\<\<", argl(val[2])
1035
+ }
1036
+ | arg tRSHFT arg
1037
+ {
1038
+ val[0] = value_expr val[0]
1039
+ val[2] = value_expr val[2]
1040
+ result = new_call val[0], :">>", argl(val[2])
1041
+ }
1042
+ | arg tANDOP arg
1043
+ {
1044
+ result = logical_op :and, val[0], val[2]
1045
+ }
1046
+ | arg tOROP arg
1047
+ {
1048
+ result = logical_op :or, val[0], val[2]
1049
+ }
1050
+ | kDEFINED opt_nl arg
1051
+ {
1052
+ (_, line), _, arg = val
1053
+ result = s(:defined, arg).line line
1054
+ }
1055
+ | arg tEH arg opt_nl tCOLON arg
1056
+ {
1057
+ c, _, t, _, _, f = val
1058
+ result = s(:if, c, t, f).line c.line
1059
+ }
1060
+ | primary
1061
+
1062
+ relop: tGT
1063
+ | tLT
1064
+ | tGEQ
1065
+ | tLEQ
1066
+
1067
+ rel_expr: arg relop arg =tGT
1068
+ {
1069
+ lhs, (op, _), rhs = val
1070
+ result = new_call lhs, op.to_sym, argl(rhs)
1071
+ }
1072
+ | rel_expr relop arg =tGT
1073
+ {
1074
+ lhs, (op, _), rhs = val
1075
+ warn "comparison '%s' after comparison", op
1076
+ result = new_call lhs, op.to_sym, argl(rhs)
1077
+ }
1078
+
1079
+ arg_value: arg
1080
+ {
1081
+ result = value_expr(val[0])
1082
+ }
1083
+
1084
+ aref_args: none
1085
+ | args trailer
1086
+ {
1087
+ result = args [val[0]]
1088
+ }
1089
+ | args tCOMMA assocs trailer
1090
+ {
1091
+ result = args [val[0], array_to_hash(val[2])]
1092
+ }
1093
+ | assocs trailer
1094
+ {
1095
+ result = args [array_to_hash(val[0])]
1096
+ }
1097
+
1098
+ arg_rhs: arg =tOP_ASGN
1099
+ | arg kRESCUE_MOD arg
1100
+ {
1101
+ body, (_, line), resbody = val
1102
+ body = value_expr body
1103
+ resbody = remove_begin resbody
1104
+
1105
+ ary = s(:array).line line
1106
+ result = new_rescue(body, new_resbody(ary, resbody))
1107
+ }
1108
+
1109
+ paren_args: tLPAREN2 opt_call_args rparen
1110
+ {
1111
+ _, args, (_, line_max) = val
1112
+
1113
+ result = args
1114
+ result.line_max = line_max if args
1115
+ }
1116
+ #if V >= 27
1117
+ | tLPAREN2 args tCOMMA args_forward rparen
1118
+ {
1119
+ yyerror "Unexpected ..." unless
1120
+ self.lexer.is_local_id(:"*") &&
1121
+ self.lexer.is_local_id(:"**") &&
1122
+ self.lexer.is_local_id(:"&")
1123
+
1124
+ result = call_args val
1125
+ }
1126
+ | tLPAREN2 args_forward rparen
1127
+ {
1128
+ yyerror "Unexpected ..." unless
1129
+ self.lexer.is_local_id(:"*") &&
1130
+ self.lexer.is_local_id(:"**") &&
1131
+ self.lexer.is_local_id(:"&")
1132
+
1133
+ result = call_args val
1134
+ }
1135
+ #endif
1136
+
1137
+ opt_paren_args: none
1138
+ | paren_args
1139
+
1140
+ opt_call_args: none
1141
+ | call_args
1142
+ | args tCOMMA
1143
+ {
1144
+ result = args val
1145
+ }
1146
+ | args tCOMMA assocs tCOMMA
1147
+ {
1148
+ result = args [val[0], array_to_hash(val[2])]
1149
+ }
1150
+ | assocs tCOMMA
1151
+ {
1152
+ result = args [array_to_hash(val[0])]
1153
+ }
1154
+
1155
+ call_args: command
1156
+ {
1157
+ warning "parenthesize argument(s) for future version"
1158
+ result = call_args val
1159
+ }
1160
+ | args opt_block_arg
1161
+ {
1162
+ result = call_args val
1163
+ }
1164
+ | assocs opt_block_arg
1165
+ {
1166
+ result = call_args [array_to_hash(val[0]), val[1]]
1167
+ }
1168
+ | args tCOMMA assocs opt_block_arg
1169
+ {
1170
+ result = call_args [val[0], array_to_hash(val[2]), val[3]]
1171
+ }
1172
+ | block_arg
1173
+ {
1174
+ result = call_args val
1175
+ }
1176
+
1177
+ command_args: {
1178
+ # parse26.y line 2200
1179
+
1180
+ # If call_args starts with a open paren '(' or
1181
+ # '[', look-ahead reading of the letters calls
1182
+ # CMDARG_PUSH(0), but the push must be done
1183
+ # after CMDARG_PUSH(1). So this code makes them
1184
+ # consistent by first cancelling the premature
1185
+ # CMDARG_PUSH(0), doing CMDARG_PUSH(1), and
1186
+ # finally redoing CMDARG_PUSH(0).
1187
+
1188
+ result = yychar = self.last_token_type.first
1189
+ lookahead = [:tLPAREN, :tLPAREN_ARG, :tLPAREN2, :tLBRACK, :tLBRACK2].include?(yychar)
1190
+ lexer.cmdarg.pop if lookahead
1191
+ lexer.cmdarg.push true
1192
+ lexer.cmdarg.push false if lookahead
1193
+ }
1194
+ call_args
1195
+ {
1196
+ yychar, args = val
1197
+
1198
+ # call_args can be followed by tLBRACE_ARG (that
1199
+ # does CMDARG_PUSH(0) in the lexer) but the push
1200
+ # must be done after CMDARG_POP() in the parser.
1201
+ # So this code does CMDARG_POP() to pop 0 pushed
1202
+ # by tLBRACE_ARG, CMDARG_POP() to pop 1 pushed
1203
+ # by command_args, and CMDARG_PUSH(0) to restore
1204
+ # back the flag set by tLBRACE_ARG.
1205
+
1206
+ lookahead = [:tLBRACE_ARG].include?(yychar)
1207
+ lexer.cmdarg.pop if lookahead
1208
+ lexer.cmdarg.pop
1209
+ lexer.cmdarg.push false if lookahead
1210
+ result = args
1211
+ }
1212
+
1213
+ block_arg: tAMPER arg_value
1214
+ {
1215
+ _, arg = val
1216
+ result = s(:block_pass, arg).line arg.line
1217
+ }
1218
+
1219
+ opt_block_arg: tCOMMA block_arg
1220
+ {
1221
+ result = val[1]
1222
+ }
1223
+ | none
1224
+
1225
+ args: arg_value
1226
+ {
1227
+ arg, = val
1228
+ lineno = arg.line || lexer.lineno # HACK
1229
+
1230
+ result = s(:array, arg).line lineno
1231
+ }
1232
+ | tSTAR arg_value
1233
+ {
1234
+ _, arg = val
1235
+ result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
1236
+ }
1237
+ | args tCOMMA arg_value
1238
+ {
1239
+ args, _, id = val
1240
+ result = self.list_append args, id
1241
+ }
1242
+ | args tCOMMA tSTAR arg_value
1243
+ {
1244
+ # TODO: the line number from tSTAR has been dropped
1245
+ args, _, _, id = val
1246
+ line = lexer.lineno
1247
+ result = self.list_append args, s(:splat, id).line(line)
1248
+ }
1249
+
1250
+ #if V >= 21
1251
+ mrhs_arg: mrhs
1252
+ {
1253
+ result = new_masgn_arg val[0]
1254
+ }
1255
+ | arg_value
1256
+ {
1257
+ result = new_masgn_arg val[0], :wrap
1258
+ }
1259
+
1260
+ #endif
1261
+ mrhs: args tCOMMA arg_value
1262
+ {
1263
+ result = val[0] << val[2]
1264
+ }
1265
+ | args tCOMMA tSTAR arg_value
1266
+ {
1267
+ # TODO: make all tXXXX terminals include lexer.lineno
1268
+ arg, _, _, splat = val
1269
+ result = self.arg_concat arg, splat
1270
+ }
1271
+ | tSTAR arg_value
1272
+ {
1273
+ _, arg = val
1274
+ result = s(:splat, arg).line arg.line
1275
+ }
1276
+
1277
+ primary: literal
1278
+ | strings
1279
+ | xstring
1280
+ | regexp
1281
+ | words
1282
+ | qwords
1283
+ | symbols
1284
+ | qsymbols
1285
+ | var_ref
1286
+ | backref
1287
+ | tFID
1288
+ {
1289
+ (msg, line), = val
1290
+ result = new_call nil, msg.to_sym
1291
+ result.line line
1292
+ }
1293
+ | k_begin
1294
+ {
1295
+ lexer.cmdarg.push false
1296
+ }
1297
+ bodystmt k_end
1298
+ {
1299
+ lexer.cmdarg.pop
1300
+ result = new_begin val
1301
+ }
1302
+ | tLPAREN_ARG
1303
+ {
1304
+ lexer.lex_state = EXPR_ENDARG
1305
+ result = lexer.lineno
1306
+ }
1307
+ rparen
1308
+ {
1309
+ _, line, _ = val
1310
+ result = s(:begin).line line
1311
+ }
1312
+ | tLPAREN_ARG
1313
+ stmt
1314
+ {
1315
+ lexer.lex_state = EXPR_ENDARG
1316
+ }
1317
+ rparen
1318
+ {
1319
+ _, stmt, _, _, = val
1320
+ # warning "(...) interpreted as grouped expression"
1321
+ result = stmt
1322
+ }
1323
+ | tLPAREN compstmt tRPAREN
1324
+ {
1325
+ _, stmt, _ = val
1326
+ result = stmt
1327
+ result ||= s(:nil).line lexer.lineno
1328
+ result.paren = true
1329
+ }
1330
+ | primary_value tCOLON2 tCONSTANT
1331
+ {
1332
+ expr, _, (id, _line) = val
1333
+
1334
+ result = s(:colon2, expr, id.to_sym).line expr.line
1335
+ }
1336
+ | tCOLON3 tCONSTANT
1337
+ {
1338
+ result = wrap :colon3, val[1]
1339
+ }
1340
+ | tLBRACK { result = lexer.lineno } aref_args rbracket
1341
+ {
1342
+ _, line, args, (_, line_max) = val
1343
+
1344
+ result = args || s(:array)
1345
+ result.sexp_type = :array # aref_args is :args
1346
+ result.line line
1347
+ result.line_max = line_max
1348
+ }
1349
+ | tLBRACE
1350
+ {
1351
+ result = self.lexer.lineno
1352
+ }
1353
+ assoc_list tRCURLY
1354
+ {
1355
+ result = new_hash val
1356
+ }
1357
+ | k_return
1358
+ {
1359
+ (_, line), = val
1360
+ result = s(:return).line line
1361
+ }
1362
+ | kYIELD tLPAREN2 call_args rparen
1363
+ {
1364
+ (_, line), _, args, _ = val
1365
+
1366
+ result = new_yield(args).line line
1367
+ }
1368
+ | kYIELD tLPAREN2 rparen
1369
+ {
1370
+ (_, line), _, _ = val
1371
+
1372
+ result = new_yield.line line
1373
+ }
1374
+ | kYIELD
1375
+ {
1376
+ (_, line), = val
1377
+
1378
+ result = new_yield.line line
1379
+ }
1380
+ | kDEFINED opt_nl tLPAREN2 expr rparen
1381
+ {
1382
+ (_, line), _, _, arg, _ = val
1383
+
1384
+ result = s(:defined, arg).line line
1385
+ }
1386
+ | kNOT tLPAREN2 expr rparen
1387
+ {
1388
+ _, _, lhs, _ = val
1389
+ result = new_call lhs, :"!"
1390
+ }
1391
+ | kNOT tLPAREN2 rparen
1392
+ {
1393
+ debug 20
1394
+ }
1395
+ | fcall brace_block
1396
+ {
1397
+ call, iter = val
1398
+
1399
+ iter.insert 1, call
1400
+ result = iter
1401
+ # FIX: probably not: call.line = iter.line
1402
+ }
1403
+ | method_call
1404
+ | method_call brace_block
1405
+ {
1406
+ call, iter = val[0], val[1]
1407
+ block_dup_check call, iter
1408
+ iter.insert 1, call # FIX
1409
+ result = iter
1410
+ }
1411
+ | lambda
1412
+ {
1413
+ expr, = val
1414
+ result = expr
1415
+ }
1416
+ | k_if expr_value then compstmt if_tail k_end
1417
+ {
1418
+ _, c, _, t, f, _ = val
1419
+ result = new_if c, t, f
1420
+ }
1421
+ | k_unless expr_value then compstmt opt_else k_end
1422
+ {
1423
+ _, c, _, t, f, _ = val
1424
+ result = new_if c, f, t
1425
+ }
1426
+ | k_while expr_value_do compstmt k_end
1427
+ {
1428
+ _, cond, body, _ = val
1429
+ result = new_while body, cond, true
1430
+ }
1431
+ | k_until expr_value_do compstmt k_end
1432
+ {
1433
+ _, cond, body, _ = val
1434
+ result = new_until body, cond, true
1435
+ }
1436
+ | k_case expr_value opt_terms case_body k_end
1437
+ {
1438
+ (_, line), expr, _, body, _ = val
1439
+ result = new_case expr, body, line
1440
+ }
1441
+ | k_case opt_terms case_body k_end
1442
+ {
1443
+ (_, line), _, body, _ = val
1444
+ result = new_case nil, body, line
1445
+ }
1446
+ #if V >= 27
1447
+ | k_case expr_value opt_terms p_case_body k_end
1448
+ {
1449
+ (_, line), expr, _, body, _ = val
1450
+
1451
+ result = new_case expr, body, line
1452
+ }
1453
+ #endif
1454
+ | k_for for_var kIN expr_value_do compstmt k_end
1455
+ {
1456
+ _, var, _, iter, body, _ = val
1457
+ result = new_for iter, var, body
1458
+ }
1459
+ | k_class
1460
+ cpath superclass
1461
+ {
1462
+ if (self.in_def || self.in_single > 0) then
1463
+ yyerror "class definition in method body"
1464
+ end
1465
+ self.env.extend
1466
+ }
1467
+ bodystmt k_end
1468
+ {
1469
+ result = new_class val
1470
+ self.env.unextend
1471
+ self.lexer.ignore_body_comments
1472
+ }
1473
+ | k_class tLSHFT
1474
+ expr
1475
+ {
1476
+ result = self.in_def
1477
+ self.in_def = false
1478
+ }
1479
+ term
1480
+ {
1481
+ result = self.in_single
1482
+ self.in_single = 0
1483
+ self.env.extend
1484
+ }
1485
+ bodystmt k_end
1486
+ {
1487
+ result = new_sclass val
1488
+ self.env.unextend
1489
+ self.lexer.ignore_body_comments
1490
+ }
1491
+ | k_module
1492
+ cpath
1493
+ {
1494
+ yyerror "module definition in method body" if
1495
+ self.in_def or self.in_single > 0
1496
+
1497
+ self.env.extend
1498
+ }
1499
+ bodystmt k_end
1500
+ {
1501
+ result = new_module val
1502
+ self.env.unextend
1503
+ self.lexer.ignore_body_comments
1504
+ }
1505
+ | k_def fname
1506
+ {
1507
+ result = self.in_def
1508
+
1509
+ self.in_def = true # group = local_push
1510
+ self.env.extend
1511
+ lexer.cmdarg.push false
1512
+ lexer.cond.push false
1513
+ }
1514
+ f_arglist bodystmt k_end
1515
+ {
1516
+ result, in_def = new_defn val
1517
+
1518
+ lexer.cond.pop # group = local_pop
1519
+ lexer.cmdarg.pop
1520
+ self.env.unextend
1521
+ self.in_def = in_def
1522
+
1523
+ self.lexer.ignore_body_comments
1524
+ }
1525
+ | k_def singleton dot_or_colon
1526
+ {
1527
+ lexer.lex_state = EXPR_FNAME
1528
+ }
1529
+ fname
1530
+ {
1531
+ result = self.in_def
1532
+
1533
+ self.in_single += 1 # TODO: remove?
1534
+
1535
+ self.in_def = true # local_push
1536
+ self.env.extend
1537
+ lexer.cmdarg.push false
1538
+ lexer.cond.push false
1539
+
1540
+ lexer.lex_state = EXPR_ENDFN|EXPR_LABEL
1541
+ }
1542
+ f_arglist bodystmt k_end
1543
+ {
1544
+
1545
+ # [kdef, recv, _, _, (name, line), in_def, args, body, kend]
1546
+ # =>
1547
+ # [kdef, recv, (name, line), in_def, args, body, kend]
1548
+
1549
+ val.delete_at 3
1550
+ val.delete_at 2
1551
+
1552
+ result, in_def = new_defs val
1553
+
1554
+ lexer.cond.pop # group = local_pop
1555
+ lexer.cmdarg.pop
1556
+ self.env.unextend
1557
+ self.in_def = in_def
1558
+
1559
+ self.in_single -= 1
1560
+
1561
+ # TODO: restore cur_arg ? what's cur_arg?
1562
+
1563
+ self.lexer.ignore_body_comments
1564
+ }
1565
+ | kBREAK
1566
+ {
1567
+ (_, line), = val
1568
+ result = s(:break).line line
1569
+ }
1570
+ | kNEXT
1571
+ {
1572
+ (_, line), = val
1573
+ result = s(:next).line line
1574
+ }
1575
+ | kREDO
1576
+ {
1577
+ (_, line), = val
1578
+ result = s(:redo).line line
1579
+ }
1580
+ | kRETRY
1581
+ {
1582
+ (_, line), = val
1583
+ result = s(:retry).line line
1584
+ }
1585
+
1586
+ primary_value: primary
1587
+ {
1588
+ result = value_expr(val[0])
1589
+ }
1590
+
1591
+ # These are really stupid
1592
+ k_begin: kBEGIN
1593
+ k_if: kIF
1594
+ k_unless: kUNLESS
1595
+ k_while: kWHILE
1596
+ k_until: kUNTIL
1597
+ k_case: kCASE
1598
+ k_for: kFOR
1599
+ k_class: kCLASS
1600
+ {
1601
+ self.comments.push self.lexer.comments
1602
+ }
1603
+ k_module: kMODULE
1604
+ {
1605
+ self.comments.push self.lexer.comments
1606
+ }
1607
+ k_def: kDEF
1608
+ {
1609
+ self.comments.push self.lexer.comments
1610
+ }
1611
+ k_do: kDO
1612
+ k_do_block: kDO_BLOCK
1613
+ k_rescue: kRESCUE
1614
+ k_ensure: kENSURE
1615
+ k_when: kWHEN
1616
+ k_else: kELSE
1617
+ k_elsif: kELSIF
1618
+ k_end: kEND
1619
+ k_return: kRETURN
1620
+
1621
+ then: term
1622
+ | kTHEN
1623
+ | term kTHEN
1624
+
1625
+ do: term
1626
+ | kDO_COND
1627
+
1628
+ if_tail: opt_else
1629
+ | k_elsif expr_value then compstmt if_tail
1630
+ {
1631
+ (_, line), c, _, t, rest = val
1632
+
1633
+ result = s(:if, c, t, rest).line line
1634
+ }
1635
+
1636
+ opt_else: none
1637
+ | kELSE compstmt
1638
+ {
1639
+ result = val[1]
1640
+ }
1641
+
1642
+ for_var: lhs
1643
+ | mlhs
1644
+ {
1645
+ val[0].delete_at 1 if val[0][1].nil? # HACK
1646
+ }
1647
+
1648
+ f_marg: f_norm_arg
1649
+ | tLPAREN f_margs rparen
1650
+ {
1651
+ result = val[1]
1652
+ }
1653
+
1654
+ f_marg_list: f_marg
1655
+ {
1656
+ sym, = val
1657
+
1658
+ result = s(:array, sym).line lexer.lineno
1659
+ }
1660
+ | f_marg_list tCOMMA f_marg
1661
+ {
1662
+ result = list_append val[0], val[2]
1663
+ }
1664
+
1665
+ f_margs: f_marg_list
1666
+ {
1667
+ args, = val
1668
+
1669
+ result = block_var args
1670
+ }
1671
+ | f_marg_list tCOMMA f_rest_marg
1672
+ {
1673
+ args, _, rest = val
1674
+
1675
+ result = block_var args, rest
1676
+ }
1677
+ | f_marg_list tCOMMA f_rest_marg tCOMMA f_marg_list
1678
+ {
1679
+ lhs, _, splat, _, rhs = val
1680
+
1681
+ result = block_var lhs, splat, rhs
1682
+ }
1683
+ | f_rest_marg
1684
+ {
1685
+ rest, = val
1686
+
1687
+ result = block_var rest
1688
+ }
1689
+ | f_rest_marg tCOMMA f_marg_list
1690
+ {
1691
+ splat, _, rest = val
1692
+
1693
+ result = block_var splat, rest
1694
+ }
1695
+
1696
+ f_rest_marg: tSTAR f_norm_arg
1697
+ {
1698
+ _, (id, line) = val
1699
+
1700
+ result = args ["*#{id}".to_sym]
1701
+ result.line line
1702
+ }
1703
+ | tSTAR
1704
+ {
1705
+ result = args [:*]
1706
+ result.line lexer.lineno # FIX: tSTAR -> line
1707
+ }
1708
+
1709
+ block_args_tail: f_block_kwarg tCOMMA f_kwrest opt_f_block_arg
1710
+ {
1711
+ result = call_args val
1712
+ }
1713
+ | f_block_kwarg opt_f_block_arg
1714
+ {
1715
+ result = call_args val
1716
+ }
1717
+ | f_kwrest opt_f_block_arg
1718
+ {
1719
+ result = call_args val
1720
+ }
1721
+ #if V >= 27
1722
+ | f_no_kwarg opt_f_block_arg
1723
+ {
1724
+ result = args val
1725
+ }
1726
+ #endif
1727
+ | f_block_arg
1728
+ {
1729
+ (id, line), = val
1730
+ result = call_args [id]
1731
+ result.line line
1732
+ }
1733
+
1734
+ opt_block_args_tail: tCOMMA block_args_tail
1735
+ {
1736
+ result = args val
1737
+ }
1738
+ | none
1739
+
1740
+ block_param: f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg opt_block_args_tail
1741
+ {
1742
+ result = args val
1743
+ }
1744
+ | f_arg tCOMMA f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1745
+ {
1746
+ result = args val
1747
+ }
1748
+ | f_arg tCOMMA f_block_optarg opt_block_args_tail
1749
+ {
1750
+ result = args val
1751
+ }
1752
+ | f_arg tCOMMA f_block_optarg tCOMMA f_arg opt_block_args_tail
1753
+ {
1754
+ result = args val
1755
+ }
1756
+ | f_arg tCOMMA f_rest_arg opt_block_args_tail
1757
+ {
1758
+ result = args val
1759
+ }
1760
+ | f_arg tCOMMA
1761
+ {
1762
+ result = args(val) << nil
1763
+ }
1764
+ | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1765
+ {
1766
+ result = args val
1767
+ }
1768
+ | f_arg opt_block_args_tail
1769
+ {
1770
+ result = args val
1771
+ }
1772
+ | f_block_optarg tCOMMA f_rest_arg opt_block_args_tail
1773
+ {
1774
+ result = args val
1775
+ }
1776
+ | f_block_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_block_args_tail
1777
+ {
1778
+ result = args val
1779
+ }
1780
+ | f_block_optarg opt_block_args_tail
1781
+ {
1782
+ result = args val
1783
+ }
1784
+ | f_block_optarg tCOMMA f_arg opt_block_args_tail
1785
+ {
1786
+ result = args val
1787
+ }
1788
+ | f_rest_arg opt_block_args_tail
1789
+ {
1790
+ result = args val
1791
+ }
1792
+ | f_rest_arg tCOMMA f_arg opt_block_args_tail
1793
+ {
1794
+ result = args val
1795
+ }
1796
+ | block_args_tail
1797
+ {
1798
+ result = args val
1799
+ }
1800
+
1801
+ opt_block_param: none { result = 0 }
1802
+ | block_param_def
1803
+ {
1804
+ self.lexer.command_start = true
1805
+ }
1806
+
1807
+ block_param_def: tPIPE opt_bv_decl tPIPE
1808
+ {
1809
+ # TODO: current_arg = 0
1810
+ result = args val
1811
+ }
1812
+ | tOROP
1813
+ {
1814
+ result = s(:args).line lexer.lineno
1815
+ }
1816
+ | tPIPE block_param opt_bv_decl tPIPE
1817
+ {
1818
+ # TODO: current_arg = 0
1819
+ result = args val
1820
+ }
1821
+
1822
+ opt_bv_decl: opt_nl
1823
+ | opt_nl tSEMI bv_decls opt_nl
1824
+ {
1825
+ result = args val
1826
+ }
1827
+
1828
+ bv_decls: bvar
1829
+ {
1830
+ result = args val
1831
+ }
1832
+ | bv_decls tCOMMA bvar
1833
+ {
1834
+ result = args val
1835
+ }
1836
+
1837
+ bvar: tIDENTIFIER
1838
+ {
1839
+ result = wrap :shadow, val[0]
1840
+ }
1841
+ | f_bad_arg
1842
+
1843
+ lambda: tLAMBDA
1844
+ {
1845
+ self.env.extend :dynamic
1846
+ result = [lexer.lineno, lexer.lpar_beg]
1847
+ lexer.paren_nest += 1
1848
+ lexer.lpar_beg = lexer.paren_nest
1849
+ }
1850
+ f_larglist
1851
+ {
1852
+ lexer.cmdarg.push false
1853
+ }
1854
+ lambda_body
1855
+ {
1856
+ _, (line, lpar), args, _cmdarg, body = val
1857
+ lexer.lpar_beg = lpar
1858
+
1859
+ lexer.cmdarg.pop
1860
+
1861
+ call = s(:lambda).line line
1862
+ result = new_iter call, args, body
1863
+ result.line line
1864
+ self.env.unextend # TODO: dynapush & dynapop
1865
+ }
1866
+
1867
+ f_larglist: tLPAREN2 f_args opt_bv_decl rparen
1868
+ {
1869
+ result = args val
1870
+ }
1871
+ | f_args
1872
+ {
1873
+ result = val[0]
1874
+ result = 0 if result == s(:args)
1875
+ }
1876
+
1877
+ lambda_body: tLAMBEG compstmt tRCURLY
1878
+ {
1879
+ result = val[1]
1880
+ }
1881
+ | kDO_LAMBDA bodystmt kEND
1882
+ {
1883
+ result = val[1]
1884
+ }
1885
+
1886
+ do_block: k_do_block do_body kEND
1887
+ {
1888
+ (_, line), iter, _ = val
1889
+ result = iter.line line
1890
+ }
1891
+
1892
+ block_call: command do_block
1893
+ {
1894
+ # TODO:
1895
+ ## if (nd_type($1) == NODE_YIELD) {
1896
+ ## compile_error(PARSER_ARG "block given to yield");
1897
+
1898
+ cmd, blk = val
1899
+
1900
+ syntax_error "Both block arg and actual block given." if
1901
+ cmd.block_pass?
1902
+
1903
+ if inverted? val then
1904
+ val = invert_block_call val
1905
+ cmd, blk = val
1906
+ end
1907
+
1908
+ result = blk
1909
+ result.insert 1, cmd
1910
+ }
1911
+ | block_call call_op2 operation2 opt_paren_args
1912
+ {
1913
+ lhs, _, (id, _line), args = val
1914
+
1915
+ result = new_call lhs, id.to_sym, args
1916
+ }
1917
+ | block_call call_op2 operation2 opt_paren_args brace_block
1918
+ {
1919
+ iter1, _, (name, _line), args, iter2 = val
1920
+
1921
+ call = new_call iter1, name.to_sym, args
1922
+ iter2.insert 1, call
1923
+
1924
+ result = iter2
1925
+ }
1926
+ | block_call call_op2 operation2 command_args do_block
1927
+ {
1928
+ iter1, _, (name, _line), args, iter2 = val
1929
+
1930
+ call = new_call iter1, name.to_sym, args
1931
+ iter2.insert 1, call
1932
+
1933
+ result = iter2
1934
+ }
1935
+
1936
+ method_call: fcall paren_args
1937
+ {
1938
+ call, args = val
1939
+
1940
+ result = call
1941
+
1942
+ if args then
1943
+ call.concat args.sexp_body
1944
+ result.line_max = args.line_max
1945
+ end
1946
+ }
1947
+ | primary_value call_op operation2 opt_paren_args
1948
+ {
1949
+ recv, call_op, (op, op_line), args = val
1950
+
1951
+ result = new_call recv, op.to_sym, args, call_op
1952
+ result.line_max = op_line unless args
1953
+ }
1954
+ | primary_value tCOLON2 operation2 paren_args
1955
+ {
1956
+ recv, _, (op, _line), args = val
1957
+
1958
+ result = new_call recv, op.to_sym, args
1959
+ }
1960
+ | primary_value tCOLON2 operation3
1961
+ {
1962
+ lhs, _, (id, _line) = val
1963
+
1964
+ result = new_call lhs, id.to_sym
1965
+ }
1966
+ | primary_value call_op paren_args
1967
+ {
1968
+ result = new_call val[0], :call, val[2], val[1]
1969
+ }
1970
+ | primary_value tCOLON2 paren_args
1971
+ {
1972
+ result = new_call val[0], :call, val[2]
1973
+ }
1974
+ | kSUPER paren_args
1975
+ {
1976
+ result = new_super val[1]
1977
+ }
1978
+ | kSUPER
1979
+ {
1980
+ result = s(:zsuper).line lexer.lineno
1981
+ }
1982
+ | primary_value tLBRACK2 opt_call_args rbracket
1983
+ {
1984
+ result = new_aref val
1985
+ }
1986
+
1987
+ brace_block: tLCURLY
1988
+ {
1989
+ self.env.extend :dynamic
1990
+ result = self.lexer.lineno
1991
+ }
1992
+ brace_body tRCURLY
1993
+ {
1994
+ _, line, body, _ = val
1995
+
1996
+ result = body
1997
+ result.line line
1998
+
1999
+ self.env.unextend
2000
+ }
2001
+ | k_do
2002
+ {
2003
+ self.env.extend :dynamic
2004
+ result = self.lexer.lineno
2005
+ }
2006
+ do_body kEND
2007
+ {
2008
+ _, line, body, _ = val
2009
+
2010
+ result = body
2011
+ result.line line
2012
+
2013
+ self.env.unextend
2014
+ }
2015
+
2016
+ brace_body: { self.env.extend :dynamic; result = self.lexer.lineno }
2017
+ { result = lexer.cmdarg.store(false) }
2018
+ opt_block_param compstmt
2019
+ {
2020
+ line, cmdarg, param, cmpstmt = val
2021
+
2022
+ result = new_brace_body param, cmpstmt, line
2023
+ self.env.unextend
2024
+ lexer.cmdarg.restore cmdarg
2025
+ lexer.cmdarg.pop # because of: cmdarg_stack >> 1 ?
2026
+ }
2027
+
2028
+ do_body: { self.env.extend :dynamic; result = self.lexer.lineno }
2029
+ { lexer.cmdarg.push false }
2030
+ opt_block_param
2031
+ #if V >= 25
2032
+ bodystmt
2033
+ #else
2034
+ compstmt
2035
+ #endif
2036
+ {
2037
+ line, _cmdarg, param, cmpstmt = val
2038
+
2039
+ result = new_do_body param, cmpstmt, line
2040
+ lexer.cmdarg.pop
2041
+ self.env.unextend
2042
+ }
2043
+
2044
+ case_args: arg_value
2045
+ {
2046
+ arg, = val
2047
+
2048
+ result = s(:array, arg).line arg.line
2049
+ }
2050
+ | tSTAR arg_value
2051
+ {
2052
+ _, arg = val
2053
+
2054
+ result = s(:array, s(:splat, arg).line(arg.line)).line arg.line
2055
+ }
2056
+ | case_args tCOMMA arg_value
2057
+ {
2058
+ args, _, id = val
2059
+
2060
+ result = self.list_append args, id
2061
+ }
2062
+ | case_args tCOMMA tSTAR arg_value
2063
+ {
2064
+ args, _, _, id = val
2065
+
2066
+ result = self.list_append args, s(:splat, id).line(id.line)
2067
+ }
2068
+
2069
+ case_body: k_when
2070
+ {
2071
+ result = self.lexer.lineno
2072
+ }
2073
+ case_args then compstmt cases
2074
+ {
2075
+ result = new_when(val[2], val[4])
2076
+ result.line val[1]
2077
+ result << val[5] if val[5]
2078
+ }
2079
+
2080
+ cases: opt_else | case_body
2081
+ #if V >= 27
2082
+ ######################################################################
2083
+
2084
+ p_case_body: kIN
2085
+ {
2086
+ self.lexer.lex_state = EXPR_BEG|EXPR_LABEL
2087
+ self.lexer.command_start = false
2088
+ result = self.in_kwarg
2089
+ self.in_kwarg = true
2090
+ push_pvtbl
2091
+ push_pktbl
2092
+ }
2093
+ p_top_expr then
2094
+ {
2095
+ pop_pktbl
2096
+ pop_pvtbl
2097
+ old_kwargs = _values[-3]
2098
+ self.in_kwarg = old_kwargs
2099
+ }
2100
+ compstmt
2101
+ p_cases
2102
+ {
2103
+ (_, line), _, pat, _, _, body, cases = val
2104
+
2105
+ result = new_in pat, body, cases, line
2106
+ }
2107
+
2108
+ p_cases: opt_else
2109
+ | p_case_body
2110
+
2111
+ p_top_expr: p_top_expr_body
2112
+ | p_top_expr_body kIF_MOD expr_value
2113
+ {
2114
+ body, _, cond = val
2115
+ body = remove_begin body
2116
+
2117
+ result = s(:if, cond, body, nil).line body.line
2118
+ }
2119
+ | p_top_expr_body kUNLESS_MOD expr_value
2120
+ {
2121
+ body, _, cond = val
2122
+ body = remove_begin body
2123
+
2124
+ result = s(:if, cond, nil, body).line body.line
2125
+ }
2126
+
2127
+ p_top_expr_body: p_expr
2128
+ | p_expr tCOMMA
2129
+ {
2130
+ expr, _ = val
2131
+
2132
+ tail = new_array_pattern_tail nil, true, nil, nil
2133
+ result = new_array_pattern nil, expr, tail, expr.line
2134
+ }
2135
+ | p_expr tCOMMA p_args
2136
+ {
2137
+ expr, _, args = val
2138
+
2139
+ result = new_array_pattern nil, expr, args, expr.line
2140
+ }
2141
+ | p_args_tail
2142
+ {
2143
+ args, = val
2144
+ result = new_array_pattern nil, nil, args, args.line
2145
+ }
2146
+ | p_kwargs
2147
+ {
2148
+ kwargs, = val
2149
+ result = new_hash_pattern nil, kwargs, kwargs.line
2150
+ }
2151
+
2152
+ p_expr: p_as
2153
+
2154
+ p_as: p_expr tASSOC p_variable
2155
+ {
2156
+ # NODE *n = NEW_LIST($1, &@$);
2157
+ # n = list_append(p, n, $3);
2158
+ # $$ = new_hash(p, n, &@$);
2159
+
2160
+ expr, _, var = val
2161
+
2162
+ id = var.last
2163
+
2164
+ self.env[id] = :lvar # HACK: need to extend env
2165
+ lhs = s(:lasgn, id).line var.line
2166
+
2167
+ result = new_assign lhs, expr
2168
+ }
2169
+ | p_alt
2170
+
2171
+ p_alt: p_alt tPIPE p_expr_basic
2172
+ {
2173
+ lhs, _, rhs = val
2174
+
2175
+ result = s(:or, lhs, rhs).line lhs.line
2176
+ }
2177
+ | p_expr_basic
2178
+
2179
+ p_lparen: tLPAREN2 { push_pktbl }
2180
+ p_lbracket: tLBRACK2 { push_pktbl }
2181
+
2182
+ p_expr_basic: p_value
2183
+ | p_const p_lparen p_args tRPAREN
2184
+ {
2185
+ lhs, _, args, _ = val
2186
+
2187
+ pop_pktbl
2188
+ result = new_array_pattern(lhs, nil, args, lhs.line)
2189
+ }
2190
+ | p_const p_lparen p_kwargs tRPAREN
2191
+ {
2192
+ lhs, _, kwargs, _ = val
2193
+
2194
+ pop_pktbl
2195
+ result = new_hash_pattern(lhs, kwargs, lhs.line)
2196
+ }
2197
+ | p_const tLPAREN2 tRPAREN
2198
+ {
2199
+ const, _, _ = val
2200
+
2201
+ tail = new_array_pattern_tail nil, nil, nil, nil
2202
+ result = new_array_pattern const, nil, tail, const.line
2203
+ }
2204
+ | p_const p_lbracket p_args rbracket
2205
+ {
2206
+ const, _, pre_arg, _ = val
2207
+
2208
+ pop_pktbl
2209
+ result = new_array_pattern const, nil, pre_arg, const.line
2210
+ }
2211
+ | p_const p_lbracket p_kwargs rbracket
2212
+ {
2213
+ const, _, kwargs, _ = val
2214
+
2215
+ result = new_hash_pattern const, kwargs, const.line
2216
+ }
2217
+ | p_const tLBRACK2 rbracket
2218
+ {
2219
+ const, _, _ = val
2220
+
2221
+ tail = new_array_pattern_tail nil, nil, nil, nil
2222
+ result = new_array_pattern const, nil, tail, const.line
2223
+ }
2224
+ | tLBRACK { push_pktbl } p_args rbracket
2225
+ {
2226
+ _, _, pat, _ = val
2227
+
2228
+ pop_pktbl
2229
+ result = new_array_pattern nil, nil, pat, pat.line
2230
+ }
2231
+ | tLBRACK rbracket
2232
+ {
2233
+ (_, line), _ = val
2234
+
2235
+ result = s(:array_pat).line line
2236
+ }
2237
+ | tLBRACE
2238
+ {
2239
+ push_pktbl
2240
+ result = self.in_kwarg
2241
+ self.in_kwarg = false
2242
+ }
2243
+ p_kwargs rbrace
2244
+ {
2245
+ _, in_kwarg, kwargs, _ = val
2246
+
2247
+ pop_pktbl
2248
+ self.in_kwarg = in_kwarg
2249
+
2250
+ result = new_hash_pattern(nil, kwargs, kwargs.line)
2251
+ }
2252
+ | tLBRACE rbrace
2253
+ {
2254
+ (_, line), _ = val
2255
+
2256
+ tail = new_hash_pattern_tail nil, nil, line
2257
+ result = new_hash_pattern nil, tail, line
2258
+ }
2259
+ | tLPAREN { push_pktbl } p_expr tRPAREN
2260
+ {
2261
+ _, _, expr, _ = val
2262
+
2263
+ pop_pktbl
2264
+ result = expr
2265
+ }
2266
+
2267
+ p_args: p_expr
2268
+ {
2269
+ expr, = val
2270
+
2271
+ ary = s(:array_TAIL, expr).line expr.line
2272
+ result = new_array_pattern_tail(ary, nil, nil, nil).line expr.line
2273
+ }
2274
+ | p_args_head
2275
+ {
2276
+ head, = val
2277
+
2278
+ result = new_array_pattern_tail head, true, nil, nil
2279
+ }
2280
+ | p_args_head p_arg
2281
+ {
2282
+ head, tail = val
2283
+
2284
+ both = array_pat_concat head, tail
2285
+
2286
+ result = new_array_pattern_tail both, nil, nil, nil
2287
+ result.line head.line
2288
+ }
2289
+ | p_args_head tSTAR tIDENTIFIER
2290
+ {
2291
+ head, _, (id, _line) = val
2292
+
2293
+ result = new_array_pattern_tail head, true, id.to_sym, nil
2294
+ result.line head.line
2295
+ }
2296
+ | p_args_head tSTAR tIDENTIFIER tCOMMA p_args_post
2297
+ {
2298
+ head, _, (id, _line), _, post = val
2299
+
2300
+ result = new_array_pattern_tail head, true, id.to_sym, post
2301
+ result.line head.line
2302
+ }
2303
+ | p_args_head tSTAR
2304
+ {
2305
+ expr, _ = val
2306
+
2307
+ result = new_array_pattern_tail(expr, true, nil, nil).line expr.line
2308
+ }
2309
+ | p_args_head tSTAR tCOMMA p_args_post
2310
+ {
2311
+ head, _, _, post = val
2312
+
2313
+ result = new_array_pattern_tail(head, true, nil, post).line head.line
2314
+ }
2315
+ | p_args_tail
2316
+
2317
+ p_args_head: p_arg tCOMMA
2318
+ {
2319
+ arg, _ = val
2320
+ result = arg
2321
+ }
2322
+ | p_args_head p_arg tCOMMA
2323
+ {
2324
+ head, tail, _ = val
2325
+
2326
+ result = s(:PATTERN, *head.sexp_body, *tail.sexp_body)
2327
+ result.line head.line
2328
+ }
2329
+
2330
+ p_args_tail: tSTAR tIDENTIFIER
2331
+ {
2332
+ _, (id, line) = val
2333
+
2334
+ result = new_array_pattern_tail nil, true, id.to_sym, nil
2335
+ result.line line
2336
+ }
2337
+ | tSTAR tIDENTIFIER tCOMMA p_args_post
2338
+ {
2339
+ _, (id, line), _, rhs = val
2340
+
2341
+ result = new_array_pattern_tail nil, true, id.to_sym, rhs
2342
+ result.line line
2343
+ }
2344
+ | tSTAR
2345
+ {
2346
+ (_, line), = val
2347
+
2348
+ result = new_array_pattern_tail nil, true, nil, nil
2349
+ result.line line
2350
+ }
2351
+ | tSTAR tCOMMA p_args_post
2352
+ {
2353
+ (_, line), _, args = val
2354
+
2355
+ result = new_array_pattern_tail nil, true, nil, args
2356
+ result.line line
2357
+ }
2358
+
2359
+ p_args_post: p_arg
2360
+ | p_args_post tCOMMA p_arg
2361
+ {
2362
+ lhs, _, rhs = val
2363
+
2364
+ result = array_pat_concat lhs, rhs
2365
+ }
2366
+
2367
+ p_arg: p_expr
2368
+ {
2369
+ expr, = val
2370
+ expr = s(:array_TAIL, expr).line expr.line unless
2371
+ expr.sexp_type == :array_TAIL
2372
+ result = expr
2373
+ }
2374
+
2375
+ p_kwargs: p_kwarg tCOMMA p_kwrest
2376
+ {
2377
+ kw_arg, _, rest = val
2378
+ # TODO? new_unique_key_hash(p, $1, &@$)
2379
+ result = new_hash_pattern_tail kw_arg, rest, kw_arg.line
2380
+ }
2381
+ | p_kwarg
2382
+ {
2383
+ kwarg, = val
2384
+ # TODO? new_unique_key_hash(p, $1, &@$)
2385
+ result = new_hash_pattern_tail kwarg, nil, kwarg.line
2386
+ }
2387
+ | p_kwarg tCOMMA
2388
+ {
2389
+ kwarg, _ = val
2390
+ # TODO? new_unique_key_hash(p, $1, &@$)
2391
+ result = new_hash_pattern_tail kwarg, nil, kwarg.line
2392
+ }
2393
+ | p_kwrest
2394
+ {
2395
+ rest, = val
2396
+
2397
+ result = new_hash_pattern_tail nil, rest, rest.line
2398
+ }
2399
+ | p_kwarg tCOMMA p_kwnorest
2400
+ {
2401
+ kwarg, _, norest = val
2402
+
2403
+ # TODO? new_unique_key_hash(p, $1, &@$)
2404
+ result = new_hash_pattern_tail kwarg, norest, kwarg.line
2405
+ }
2406
+ | p_kwnorest
2407
+ {
2408
+ norest, = val
2409
+
2410
+ result = new_hash_pattern_tail nil, norest, norest.line
2411
+ }
2412
+
2413
+ p_kwarg: p_kw # TODO? rb_ary_new_from_args(1, $1)
2414
+ | p_kwarg tCOMMA p_kw
2415
+ {
2416
+ kwarg, _, kw = val
2417
+ kwarg.concat kw.sexp_body
2418
+ result = kwarg
2419
+ }
2420
+
2421
+ p_kw: p_kw_label p_expr
2422
+ {
2423
+ # TODO: error_duplicate_pattern_key(p, get_id($1), &@1);
2424
+ lhs, rhs = val
2425
+
2426
+ result = s(:PAIR, lhs, rhs).line lhs.line
2427
+ }
2428
+ | p_kw_label
2429
+ {
2430
+ lhs, = val
2431
+
2432
+ # TODO: error_duplicate_pattern_variable(p, get_id($1), &@1);
2433
+
2434
+ # TODO: if ($1 && !is_local_id(get_id($1))) {
2435
+ # yyerror1(&@1, "key must be valid as local variables");
2436
+ # }
2437
+
2438
+ # $$ = list_append(p, NEW_LIST(NEW_LIT(ID2SYM($1), &@$), &@$),
2439
+ # assignable(p, $1, 0, &@$));
2440
+
2441
+
2442
+ case lhs.sexp_type
2443
+ when :lit then
2444
+ assignable [lhs.value, lhs.line]
2445
+ else
2446
+ # TODO or done?
2447
+ debug 666
2448
+ end
2449
+
2450
+ # TODO PAIR -> LIST ?
2451
+ result = s(:PAIR, lhs, nil).line lhs.line
2452
+ }
2453
+
2454
+ p_kw_label: tLABEL
2455
+ {
2456
+ result = wrap :lit, val[0]
2457
+ }
2458
+
2459
+ p_kwrest: kwrest_mark tIDENTIFIER
2460
+ {
2461
+ _, (id, line) = val
2462
+
2463
+ name = id.to_sym
2464
+ self.assignable [name, line]
2465
+ result = s(:kwrest, :"**#{name}").line line
2466
+ }
2467
+ | kwrest_mark
2468
+ {
2469
+ (_, line), = val
2470
+
2471
+ result = s(:kwrest, :"**").line line
2472
+ }
2473
+
2474
+ p_kwnorest: kwrest_mark kNIL
2475
+ {
2476
+ (_, line), _ = val
2477
+
2478
+ # TODO: or s(:norest)? s(:**nil)?
2479
+ result = s(:kwrest, :"**nil").line line
2480
+ }
2481
+
2482
+ p_value: p_primitive
2483
+ | p_primitive tDOT2 p_primitive
2484
+ {
2485
+ lhs, _, rhs = val
2486
+
2487
+ lhs = value_expr lhs
2488
+ rhs = value_expr rhs
2489
+
2490
+ result = s(:dot2, lhs, rhs).line lhs.line
2491
+ }
2492
+ | p_primitive tDOT3 p_primitive
2493
+ {
2494
+ lhs, _, rhs = val
2495
+
2496
+ lhs = value_expr lhs
2497
+ rhs = value_expr rhs
2498
+
2499
+ result = s(:dot3, lhs, rhs).line lhs.line
2500
+ }
2501
+ | p_primitive tDOT2
2502
+ {
2503
+ v1, _ = val
2504
+
2505
+ result = s(:dot2, v1, nil).line v1.line
2506
+ }
2507
+ | p_primitive tDOT3
2508
+ {
2509
+ v1, _ = val
2510
+
2511
+ result = s(:dot3, v1, nil).line v1.line
2512
+ }
2513
+ | p_variable
2514
+ | p_var_ref
2515
+ | p_const
2516
+ | tBDOT2 p_primitive
2517
+ {
2518
+ _, v1 = val
2519
+
2520
+ result = s(:dot2, nil, v1).line v1.line
2521
+ }
2522
+ | tBDOT3 p_primitive
2523
+ {
2524
+ _, v1 = val
2525
+
2526
+ result = s(:dot3, nil, v1).line v1.line
2527
+ }
2528
+
2529
+ p_primitive: literal
2530
+ | strings
2531
+ | xstring
2532
+ | regexp
2533
+ | words
2534
+ {
2535
+ result = ary_to_pat val[0]
2536
+ }
2537
+ | qwords
2538
+ {
2539
+ result = ary_to_pat val[0]
2540
+ }
2541
+ | symbols
2542
+ {
2543
+ result = ary_to_pat val[0]
2544
+ }
2545
+ | qsymbols
2546
+ {
2547
+ result = ary_to_pat val[0]
2548
+ }
2549
+ | keyword_variable
2550
+ {
2551
+ # TODO? if (!($$ = gettable(p, $1, &@$))) $$ = NEW_BEGIN(0, &@$);
2552
+ var, = val
2553
+
2554
+ result = var
2555
+ }
2556
+ | lambda
2557
+
2558
+ p_variable: tIDENTIFIER
2559
+ {
2560
+ # TODO: error_duplicate_pattern_variable(p, $1, &@1);
2561
+ # TODO: assignable(p, $1, 0, &@$);
2562
+ result = wrap :lasgn, val[0]
2563
+ }
2564
+
2565
+ p_var_ref: tCARET tIDENTIFIER
2566
+ {
2567
+ # TODO: check id against env for lvar or dvar
2568
+ result = wrap :lvar, val[1]
2569
+ }
2570
+
2571
+ p_const: tCOLON3 cname
2572
+ {
2573
+ result = wrap :colon3, val[1]
2574
+ }
2575
+ | p_const tCOLON2 cname
2576
+ {
2577
+ lhs, _, (id, _line) = val
2578
+
2579
+ l = lhs.line
2580
+ result = s(:const, s(:colon2, lhs, id.to_sym).line(l)).line l
2581
+ }
2582
+ | tCONSTANT
2583
+ {
2584
+ # TODO $$ = gettable(p, $1, &@$);
2585
+ result = wrap :const, val[0]
2586
+ }
2587
+ ######################################################################
2588
+ #endif
2589
+
2590
+ opt_rescue: k_rescue exc_list exc_var then compstmt opt_rescue
2591
+ {
2592
+ (_, line), klasses, var, _, body, rest = val
2593
+
2594
+ klasses ||= s(:array)
2595
+ klasses << new_assign(var, s(:gvar, :"$!").line(var.line)) if var
2596
+ klasses.line line
2597
+
2598
+ result = new_resbody(klasses, body)
2599
+ result << rest if rest # UGH, rewritten above
2600
+ }
2601
+ |
2602
+ {
2603
+ result = nil
2604
+ }
2605
+
2606
+ exc_list: arg_value
2607
+ {
2608
+ arg, = val
2609
+ result = s(:array, arg).line arg.line
2610
+ }
2611
+ | mrhs
2612
+ | none
2613
+
2614
+ exc_var: tASSOC lhs
2615
+ {
2616
+ result = val[1]
2617
+ }
2618
+ | none
2619
+
2620
+ opt_ensure: k_ensure compstmt
2621
+ {
2622
+ (_, line), body = val
2623
+
2624
+ result = body || s(:nil).line(line)
2625
+ }
2626
+ | none
2627
+
2628
+ literal: numeric
2629
+ {
2630
+ (lit, line), = val
2631
+ result = s(:lit, lit).line line
2632
+ }
2633
+ | symbol
2634
+
2635
+ strings: string
2636
+ {
2637
+ str, = val
2638
+ str = s(:dstr, str.value) if str.sexp_type == :evstr
2639
+ result = str
2640
+ }
2641
+
2642
+ string: tCHAR
2643
+ {
2644
+ debug 37
2645
+ }
2646
+ | string1
2647
+ | string string1
2648
+ {
2649
+ result = self.literal_concat val[0], val[1]
2650
+ }
2651
+
2652
+ string1: tSTRING_BEG string_contents tSTRING_END
2653
+ {
2654
+ (_, line), str, (_, func) = val
2655
+
2656
+ str = dedent str if func =~ RubyLexer::STR_FUNC_DEDENT
2657
+
2658
+ result = str.line line
2659
+ }
2660
+ | tSTRING
2661
+ {
2662
+ result = new_string val
2663
+ }
2664
+
2665
+ xstring: tXSTRING_BEG xstring_contents tSTRING_END
2666
+ {
2667
+ result = new_xstring val
2668
+ # TODO: dedent?!?! SERIOUSLY?!?
2669
+ }
2670
+
2671
+ regexp: tREGEXP_BEG regexp_contents tREGEXP_END
2672
+ {
2673
+ result = new_regexp val
2674
+ }
2675
+
2676
+ words: tWORDS_BEG tSPACE tSTRING_END
2677
+ {
2678
+ (_, line), _, (_, line_max) = val
2679
+
2680
+ result = s(:array).line line
2681
+ result.line_max = line_max
2682
+ }
2683
+ | tWORDS_BEG word_list tSTRING_END
2684
+ {
2685
+ (_, line), list, (_, line_max) = val
2686
+
2687
+ result = list.line line
2688
+ result.line_max = line_max
2689
+ }
2690
+
2691
+ word_list: none
2692
+ {
2693
+ result = new_word_list
2694
+ }
2695
+ | word_list word tSPACE
2696
+ {
2697
+ result = val[0].dup << new_word_list_entry(val)
2698
+ }
2699
+
2700
+ word: string_content
2701
+ | word string_content
2702
+ {
2703
+ result = self.literal_concat val[0], val[1]
2704
+ }
2705
+
2706
+ symbols: tSYMBOLS_BEG tSPACE tSTRING_END
2707
+ {
2708
+ (_, line), _, (_, line_max) = val
2709
+
2710
+ result = s(:array).line line
2711
+ result.line_max = line_max
2712
+ }
2713
+ | tSYMBOLS_BEG symbol_list tSTRING_END
2714
+ {
2715
+ (_, line), list, (_, line_max), = val
2716
+
2717
+ result = list.line line
2718
+ result.line_max = line_max
2719
+ }
2720
+
2721
+ symbol_list: none
2722
+ {
2723
+ result = new_symbol_list
2724
+ }
2725
+ | symbol_list word tSPACE
2726
+ {
2727
+ list, * = val
2728
+ result = list.dup << new_symbol_list_entry(val)
2729
+ }
2730
+
2731
+ qwords: tQWORDS_BEG tSPACE tSTRING_END
2732
+ {
2733
+ (_, line), _, (_, line_max) = val
2734
+
2735
+ result = s(:array).line line
2736
+ result.line_max = line_max
2737
+ }
2738
+ | tQWORDS_BEG qword_list tSTRING_END
2739
+ {
2740
+ (_, line), list, (_, line_max) = val
2741
+
2742
+ result = list.line line
2743
+ result.line_max = line_max
2744
+ }
2745
+
2746
+ qsymbols: tQSYMBOLS_BEG tSPACE tSTRING_END
2747
+ {
2748
+ (_, line), _, (_, line_max) = val
2749
+
2750
+ result = s(:array).line line
2751
+ result.line_max = line_max
2752
+ }
2753
+ | tQSYMBOLS_BEG qsym_list tSTRING_END
2754
+ {
2755
+ (_, line), list, (_, line_max) = val
2756
+
2757
+ result = list.line line
2758
+ result.line_max = line_max
2759
+ }
2760
+
2761
+ qword_list: none
2762
+ {
2763
+ result = new_qword_list
2764
+ }
2765
+ | qword_list tSTRING_CONTENT tSPACE
2766
+ {
2767
+ result = val[0].dup << new_qword_list_entry(val)
2768
+ }
2769
+
2770
+ qsym_list: none
2771
+ {
2772
+ result = new_qsym_list
2773
+ }
2774
+ | qsym_list tSTRING_CONTENT tSPACE
2775
+ {
2776
+ result = val[0].dup << new_qsym_list_entry(val)
2777
+ }
2778
+
2779
+ string_contents: none
2780
+ {
2781
+ line = prev_value_to_lineno _values.last
2782
+ result = s(:str, +"").line line
2783
+ }
2784
+ | string_contents string_content
2785
+ {
2786
+ v1, v2 = val
2787
+ result = literal_concat v1, v2
2788
+ }
2789
+
2790
+ xstring_contents: none
2791
+ {
2792
+ result = nil
2793
+ }
2794
+ | xstring_contents string_content
2795
+ {
2796
+ v1, v2 = val
2797
+ result = literal_concat v1, v2
2798
+ }
2799
+
2800
+ regexp_contents: none
2801
+ {
2802
+ result = nil
2803
+ }
2804
+ | regexp_contents string_content
2805
+ {
2806
+ v1, v2 = val
2807
+ result = literal_concat v1, v2
2808
+ }
2809
+
2810
+ string_content: tSTRING_CONTENT
2811
+ {
2812
+ result = new_string val
2813
+ }
2814
+ | tSTRING_DVAR
2815
+ {
2816
+ result = lexer.lex_strterm
2817
+
2818
+ lexer.lex_strterm = nil
2819
+ lexer.lex_state = EXPR_BEG
2820
+ }
2821
+ string_dvar
2822
+ {
2823
+ _, strterm, str = val
2824
+ lexer.lex_strterm = strterm
2825
+ result = s(:evstr, str).line str.line
2826
+ }
2827
+ | tSTRING_DBEG
2828
+ {
2829
+ result = [lexer.lex_strterm,
2830
+ lexer.brace_nest,
2831
+ lexer.string_nest, # TODO: remove
2832
+ lexer.lex_state,
2833
+ lexer.lineno,
2834
+ ]
2835
+
2836
+ lexer.cmdarg.push false
2837
+ lexer.cond.push false
2838
+
2839
+ lexer.lex_strterm = nil
2840
+ lexer.brace_nest = 0
2841
+ lexer.string_nest = 0
2842
+
2843
+ lexer.lex_state = EXPR_BEG
2844
+ }
2845
+ compstmt
2846
+ tSTRING_DEND
2847
+ {
2848
+ _, memo, stmt, _ = val
2849
+
2850
+ lex_strterm, brace_nest, string_nest, oldlex_state, line = memo
2851
+ # TODO: heredoc_indent
2852
+
2853
+ lexer.lex_strterm = lex_strterm
2854
+ lexer.brace_nest = brace_nest
2855
+ lexer.string_nest = string_nest
2856
+
2857
+ lexer.cond.pop
2858
+ lexer.cmdarg.pop
2859
+
2860
+ lexer.lex_state = oldlex_state
2861
+
2862
+ case stmt
2863
+ when Sexp then
2864
+ case stmt.sexp_type
2865
+ when :str, :dstr, :evstr then
2866
+ result = stmt
2867
+ else
2868
+ result = s(:evstr, stmt).line line
2869
+ end
2870
+ when nil then
2871
+ result = s(:evstr).line line
2872
+ else
2873
+ debug 38
2874
+ raise "unknown string body: #{stmt.inspect}"
2875
+ end
2876
+ }
2877
+
2878
+ string_dvar: tGVAR
2879
+ {
2880
+ result = wrap :gvar, val[0]
2881
+ }
2882
+ | tIVAR
2883
+ {
2884
+ result = wrap :ivar, val[0]
2885
+ }
2886
+ | tCVAR
2887
+ {
2888
+ result = wrap :cvar, val[0]
2889
+ }
2890
+ | backref
2891
+
2892
+ symbol: ssym
2893
+ | dsym
2894
+
2895
+ ssym: tSYMBEG sym
2896
+ {
2897
+ lexer.lex_state = EXPR_END
2898
+ result = wrap :lit, val[1]
2899
+ }
2900
+ | tSYMBOL
2901
+ {
2902
+ lexer.lex_state = EXPR_END
2903
+ result = wrap :lit, val[0]
2904
+ }
2905
+
2906
+ sym: fname | tIVAR | tGVAR | tCVAR
2907
+
2908
+ dsym: tSYMBEG string_contents tSTRING_END
2909
+ {
2910
+ _, result, _ = val
2911
+
2912
+ lexer.lex_state = EXPR_END
2913
+
2914
+ result ||= s(:str, "").line lexer.lineno
2915
+
2916
+ case result.sexp_type
2917
+ when :dstr then
2918
+ result.sexp_type = :dsym
2919
+ when :str then
2920
+ result = s(:lit, result.last.to_sym).line result.line
2921
+ when :evstr then
2922
+ result = s(:dsym, "", result).line result.line
2923
+ else
2924
+ debug 39
2925
+ end
2926
+ }
2927
+
2928
+ #if V == 20
2929
+ numeric: tINTEGER
2930
+ | tFLOAT
2931
+ | tUMINUS_NUM tINTEGER =tLOWEST
2932
+ #else
2933
+ numeric: simple_numeric
2934
+ | tUMINUS_NUM simple_numeric =tLOWEST
2935
+ #endif
2936
+ {
2937
+ _, (num, line) = val
2938
+ result = [-num, line]
2939
+ #if V == 20
2940
+ }
2941
+ | tUMINUS_NUM tFLOAT =tLOWEST
2942
+ {
2943
+ _, (num, line) = val
2944
+ result = [-num, line]
2945
+ #endif
2946
+ }
2947
+
2948
+ #if V >= 21
2949
+ simple_numeric: tINTEGER
2950
+ | tFLOAT
2951
+ | tRATIONAL
2952
+ | tIMAGINARY
2953
+
2954
+ #endif
2955
+ user_variable: tIDENTIFIER
2956
+ | tIVAR
2957
+ | tGVAR
2958
+ | tCONSTANT
2959
+ | tCVAR
2960
+
2961
+ keyword_variable: kNIL { result = s(:nil).line lexer.lineno }
2962
+ | kSELF { result = s(:self).line lexer.lineno }
2963
+ | kTRUE { result = s(:true).line lexer.lineno }
2964
+ | kFALSE { result = s(:false).line lexer.lineno }
2965
+ | k__FILE__ { result = s(:str, self.file).line lexer.lineno }
2966
+ | k__LINE__ { result = s(:lit, lexer.lineno).line lexer.lineno }
2967
+ | k__ENCODING__
2968
+ {
2969
+ l = lexer.lineno
2970
+ result =
2971
+ if defined? Encoding then
2972
+ s(:colon2, s(:const, :Encoding).line(l), :UTF_8).line l
2973
+ else
2974
+ s(:str, "Unsupported!").line l
2975
+ end
2976
+ }
2977
+
2978
+ var_ref: user_variable
2979
+ {
2980
+ raise "NO: #{val.inspect}" if Sexp === val.first
2981
+ (var, line), = val
2982
+ result = Sexp === var ? var : self.gettable(var)
2983
+ result.line line
2984
+ }
2985
+ | keyword_variable
2986
+ {
2987
+ var = val[0]
2988
+ result = Sexp === var ? var : self.gettable(var)
2989
+ }
2990
+
2991
+ var_lhs: user_variable
2992
+ {
2993
+ result = self.assignable val[0]
2994
+ }
2995
+ | keyword_variable
2996
+ {
2997
+ result = self.assignable val[0]
2998
+ debug 40
2999
+ }
3000
+
3001
+ backref: tNTH_REF
3002
+ {
3003
+ (ref, line), = val
3004
+ result = s(:nth_ref, ref).line line
3005
+ }
3006
+ | tBACK_REF
3007
+ {
3008
+ (ref, line), = val
3009
+ result = s(:back_ref, ref).line line
3010
+ }
3011
+
3012
+ superclass: tLT
3013
+ {
3014
+ lexer.lex_state = EXPR_BEG
3015
+ lexer.command_start = true
3016
+ }
3017
+ expr_value term
3018
+ {
3019
+ result = val[2]
3020
+ }
3021
+ | none
3022
+ {
3023
+ result = nil
3024
+ }
3025
+
3026
+ f_arglist: tLPAREN2 f_args rparen
3027
+ {
3028
+ result = end_args val
3029
+ }
3030
+ #if V == 27
3031
+ | tLPAREN2 f_arg tCOMMA args_forward rparen
3032
+ {
3033
+ result = end_args val
3034
+ }
3035
+ | tLPAREN2 args_forward rparen
3036
+ {
3037
+ result = end_args val
3038
+ }
3039
+ #endif
3040
+ | {
3041
+ result = self.in_kwarg
3042
+ self.in_kwarg = true
3043
+ self.lexer.lex_state |= EXPR_LABEL
3044
+ }
3045
+ f_args term
3046
+ {
3047
+ result = end_args val
3048
+ }
3049
+
3050
+ args_tail: f_kwarg tCOMMA f_kwrest opt_f_block_arg
3051
+ {
3052
+ result = args val
3053
+ }
3054
+ | f_kwarg opt_f_block_arg
3055
+ {
3056
+ result = args val
3057
+ }
3058
+ | f_kwrest opt_f_block_arg
3059
+ {
3060
+ result = args val
3061
+ }
3062
+ #if V >= 27
3063
+ | f_no_kwarg opt_f_block_arg
3064
+ {
3065
+ result = args val
3066
+ }
3067
+ #endif
3068
+ | f_block_arg
3069
+
3070
+ opt_args_tail: tCOMMA args_tail
3071
+ {
3072
+ result = val[1]
3073
+ }
3074
+ |
3075
+ {
3076
+ result = nil
3077
+ }
3078
+
3079
+ f_args: f_arg tCOMMA f_optarg tCOMMA f_rest_arg opt_args_tail
3080
+ {
3081
+ result = args val
3082
+ }
3083
+ | f_arg tCOMMA f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
3084
+ {
3085
+ result = args val
3086
+ }
3087
+ | f_arg tCOMMA f_optarg opt_args_tail
3088
+ {
3089
+ result = args val
3090
+ }
3091
+ | f_arg tCOMMA f_optarg tCOMMA f_arg opt_args_tail
3092
+ {
3093
+ result = args val
3094
+ }
3095
+ | f_arg tCOMMA f_rest_arg opt_args_tail
3096
+ {
3097
+ result = args val
3098
+ }
3099
+ | f_arg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
3100
+ {
3101
+ result = args val
3102
+ }
3103
+ | f_arg opt_args_tail
3104
+ {
3105
+ result = args val
3106
+ }
3107
+ | f_optarg tCOMMA f_rest_arg opt_args_tail
3108
+ {
3109
+ result = args val
3110
+ }
3111
+ | f_optarg tCOMMA f_rest_arg tCOMMA f_arg opt_args_tail
3112
+ {
3113
+ result = args val
3114
+ }
3115
+ | f_optarg opt_args_tail
3116
+ {
3117
+ result = args val
3118
+ }
3119
+ | f_optarg tCOMMA f_arg opt_args_tail
3120
+ {
3121
+ result = args val
3122
+ }
3123
+ | f_rest_arg opt_args_tail
3124
+ {
3125
+ result = args val
3126
+ }
3127
+ | f_rest_arg tCOMMA f_arg opt_args_tail
3128
+ {
3129
+ result = args val
3130
+ }
3131
+ | args_tail
3132
+ {
3133
+ result = args val
3134
+ }
3135
+ |
3136
+ {
3137
+ result = args val
3138
+ # result.line lexer.lineno
3139
+ }
3140
+
3141
+ #if V >= 27
3142
+ args_forward: tBDOT3
3143
+ {
3144
+ result = s(:forward_args).line lexer.lineno
3145
+ }
3146
+ #endif
3147
+
3148
+ f_bad_arg: tCONSTANT
3149
+ {
3150
+ yyerror "formal argument cannot be a constant"
3151
+ }
3152
+ | tIVAR
3153
+ {
3154
+ yyerror "formal argument cannot be an instance variable"
3155
+ }
3156
+ | tGVAR
3157
+ {
3158
+ yyerror "formal argument cannot be a global variable"
3159
+ }
3160
+ | tCVAR
3161
+ {
3162
+ yyerror "formal argument cannot be a class variable"
3163
+ }
3164
+
3165
+ f_norm_arg: f_bad_arg
3166
+ | tIDENTIFIER
3167
+ {
3168
+ (id, line), = val
3169
+ identifier = id.to_sym
3170
+ self.env[identifier] = :lvar
3171
+
3172
+ result = [identifier, line]
3173
+ }
3174
+
3175
+ #if V >= 22
3176
+ f_arg_asgn: f_norm_arg
3177
+
3178
+ f_arg_item: f_arg_asgn
3179
+ | tLPAREN f_margs rparen
3180
+ {
3181
+ _, margs, _ = val
3182
+
3183
+ result = margs
3184
+ }
3185
+ #else
3186
+ f_arg_item: f_norm_arg
3187
+ | tLPAREN f_margs rparen
3188
+ {
3189
+ _, margs, _ = val
3190
+
3191
+ result = margs
3192
+ }
3193
+ #endif
3194
+
3195
+ f_arg: f_arg_item
3196
+ {
3197
+ result = new_arg val
3198
+ }
3199
+ | f_arg tCOMMA f_arg_item
3200
+ {
3201
+ list, _, item = val
3202
+
3203
+ if list.sexp_type == :args then
3204
+ result = list
3205
+ else
3206
+ result = s(:args, list).line list.line
3207
+ end
3208
+
3209
+ if Sexp === item then
3210
+ line_max = item.line_max
3211
+ else
3212
+ item, line_max = item
3213
+ end
3214
+
3215
+ result << item
3216
+ result.line_max = line_max
3217
+ }
3218
+
3219
+ #if V == 20
3220
+ f_kw: tLABEL arg_value
3221
+ #else
3222
+ f_label: tLABEL
3223
+
3224
+ f_kw: f_label arg_value
3225
+ #endif
3226
+ {
3227
+ # TODO: new_kw_arg
3228
+ (label, line), arg = val
3229
+
3230
+ identifier = label.to_sym
3231
+ self.env[identifier] = :lvar
3232
+
3233
+ kwarg = s(:kwarg, identifier, arg).line line
3234
+ result = s(:array, kwarg).line line
3235
+ }
3236
+ #if V >= 21
3237
+ | f_label
3238
+ {
3239
+ (label, line), = val
3240
+
3241
+ id = label.to_sym
3242
+ self.env[id] = :lvar
3243
+
3244
+ result = s(:array, s(:kwarg, id).line(line)).line line
3245
+ }
3246
+ #endif
3247
+
3248
+ #if V == 20
3249
+ f_block_kw: tLABEL primary_value
3250
+ #else
3251
+ f_block_kw: f_label primary_value
3252
+ #endif
3253
+ {
3254
+ # TODO: new_kw_arg
3255
+ (label, line), expr = val
3256
+ id = label.to_sym
3257
+ self.env[id] = :lvar
3258
+
3259
+ result = s(:array, s(:kwarg, id, expr).line(line)).line line
3260
+ }
3261
+ #if V >= 21
3262
+ | f_label
3263
+ {
3264
+ # TODO: new_kw_arg
3265
+ (label, line), = val
3266
+ id = label.to_sym
3267
+ self.env[id] = :lvar
3268
+
3269
+ result = s(:array, s(:kwarg, id).line(line)).line line
3270
+ }
3271
+ #endif
3272
+
3273
+ f_block_kwarg: f_block_kw
3274
+ | f_block_kwarg tCOMMA f_block_kw
3275
+ {
3276
+ list, _, item = val
3277
+ result = list << item.last
3278
+ }
3279
+
3280
+ f_kwarg: f_kw
3281
+ | f_kwarg tCOMMA f_kw
3282
+ {
3283
+ result = args val
3284
+ }
3285
+
3286
+ kwrest_mark: tPOW
3287
+ | tDSTAR
3288
+
3289
+ #if V >= 27
3290
+ f_no_kwarg: kwrest_mark kNIL
3291
+ {
3292
+ result = :"**nil"
3293
+ }
3294
+ #endif
3295
+
3296
+ f_kwrest: kwrest_mark tIDENTIFIER
3297
+ {
3298
+ _, (id, line) = val
3299
+
3300
+ name = id.to_sym
3301
+ self.assignable [name, line]
3302
+ result = [:"**#{name}", line]
3303
+ }
3304
+ | kwrest_mark
3305
+ {
3306
+ id = :"**"
3307
+ self.env[id] = :lvar # TODO: needed?!?
3308
+ result = [id, lexer.lineno] # TODO: tPOW/tDSTAR include lineno
3309
+ }
3310
+
3311
+ #if V == 20
3312
+ f_opt: tIDENTIFIER tEQL arg_value
3313
+ #elif V == 21
3314
+ f_opt: f_norm_arg tEQL arg_value
3315
+ #else
3316
+ f_opt: f_arg_asgn tEQL arg_value
3317
+ #endif
3318
+ {
3319
+ lhs, _, rhs = val
3320
+ result = self.assignable lhs, rhs
3321
+ # TODO: detect duplicate names
3322
+ }
3323
+
3324
+ #if V == 20
3325
+ f_block_opt: tIDENTIFIER tEQL primary_value
3326
+ #elif V == 21
3327
+ f_block_opt: f_norm_arg tEQL primary_value
3328
+ #else
3329
+ f_block_opt: f_arg_asgn tEQL primary_value
3330
+ #endif
3331
+ {
3332
+ lhs, _, rhs = val
3333
+ result = self.assignable lhs, rhs
3334
+ }
3335
+
3336
+ f_block_optarg: f_block_opt
3337
+ {
3338
+ optblk, = val
3339
+ result = s(:block, optblk).line optblk.line
3340
+ }
3341
+ | f_block_optarg tCOMMA f_block_opt
3342
+ {
3343
+ optarg, _, optblk = val
3344
+ result = optarg
3345
+ result << optblk
3346
+ }
3347
+
3348
+ f_optarg: f_opt
3349
+ {
3350
+ opt, = val
3351
+ result = s(:block, opt).line opt.line
3352
+ }
3353
+ | f_optarg tCOMMA f_opt
3354
+ {
3355
+ result = self.block_append val[0], val[2]
3356
+ }
3357
+
3358
+ restarg_mark: tSTAR2 | tSTAR
3359
+
3360
+ f_rest_arg: restarg_mark tIDENTIFIER
3361
+ {
3362
+ # TODO: differs from parse.y - needs tests
3363
+ _, (id, line) = val
3364
+ name = id.to_sym
3365
+ self.assignable [name, line]
3366
+ result = [:"*#{name}", line]
3367
+ }
3368
+ | restarg_mark
3369
+ {
3370
+ name = :"*"
3371
+ self.env[name] = :lvar
3372
+ result = [name, lexer.lineno] # FIX: tSTAR to include lineno
3373
+ }
3374
+
3375
+ blkarg_mark: tAMPER2 | tAMPER
3376
+
3377
+ f_block_arg: blkarg_mark tIDENTIFIER
3378
+ {
3379
+ _, (id, line) = val
3380
+ identifier = id.to_sym
3381
+
3382
+ self.env[identifier] = :lvar
3383
+ result = ["&#{identifier}".to_sym, line]
3384
+ }
3385
+
3386
+ opt_f_block_arg: tCOMMA f_block_arg
3387
+ {
3388
+ _, arg = val
3389
+ result = arg
3390
+ }
3391
+ |
3392
+ {
3393
+ result = nil
3394
+ }
3395
+
3396
+ singleton: var_ref
3397
+ | tLPAREN2
3398
+ {
3399
+ lexer.lex_state = EXPR_BEG
3400
+ }
3401
+ expr rparen
3402
+ {
3403
+ result = val[2]
3404
+ yyerror "Can't define single method for literals." if
3405
+ result.sexp_type == :lit
3406
+ }
3407
+
3408
+ assoc_list: none
3409
+ {
3410
+ result = s(:array).line lexer.lineno
3411
+ }
3412
+ | assocs trailer
3413
+
3414
+ assocs: assoc
3415
+ | assocs tCOMMA assoc
3416
+ {
3417
+ list = val[0].dup
3418
+ more = val[2].sexp_body
3419
+ list.push(*more) unless more.empty?
3420
+ result = list
3421
+ result.sexp_type = :hash
3422
+ }
3423
+
3424
+ assoc: arg_value tASSOC arg_value
3425
+ {
3426
+ v1, _, v2 = val
3427
+ result = s(:array, v1, v2).line v1.line
3428
+ }
3429
+ | tLABEL arg_value
3430
+ {
3431
+ label, arg = val
3432
+
3433
+ lit = wrap :lit, label
3434
+ result = s(:array, lit, arg).line lit.line
3435
+ }
3436
+ #if V >= 22
3437
+ | tSTRING_BEG string_contents tLABEL_END arg_value
3438
+ {
3439
+ (_, line), sym, _, value = val
3440
+
3441
+ sym.sexp_type = :dsym
3442
+
3443
+ result = s(:array, sym, value).line line
3444
+ }
3445
+ #endif
3446
+ | tDSTAR arg_value
3447
+ {
3448
+ _, arg = val
3449
+ line = arg.line
3450
+ result = s(:array, s(:kwsplat, arg).line(line)).line line
3451
+ }
3452
+
3453
+ operation: tIDENTIFIER | tCONSTANT | tFID
3454
+ operation2: tIDENTIFIER | tCONSTANT | tFID | op
3455
+ operation3: tIDENTIFIER | tFID | op
3456
+ dot_or_colon: tDOT | tCOLON2
3457
+ call_op: tDOT
3458
+ #if V >= 23
3459
+ | tLONELY # TODO: rename tANDDOT?
3460
+ #endif
3461
+
3462
+ call_op2: call_op
3463
+ | tCOLON2
3464
+
3465
+ opt_terms: | terms
3466
+ opt_nl: | tNL
3467
+ rparen: opt_nl tRPAREN
3468
+ {
3469
+ _, close = val
3470
+ result = [close, lexer.lineno]
3471
+ }
3472
+ rbracket: opt_nl tRBRACK
3473
+ {
3474
+ _, close = val
3475
+ result = [close, lexer.lineno]
3476
+ }
3477
+ #if V >= 27
3478
+ rbrace: opt_nl tRCURLY
3479
+ #endif
3480
+ trailer: | tNL | tCOMMA
3481
+
3482
+ term: tSEMI { yyerrok }
3483
+ | tNL
3484
+
3485
+ terms: term
3486
+ | terms tSEMI { yyerrok }
3487
+
3488
+ none: { result = nil; }
3489
+ end
3490
+
3491
+ ---- inner
3492
+
3493
+ require "ruby_lexer"
3494
+ require "ruby_parser_extras"
3495
+ include RubyLexer::State::Values
3496
+
3497
+ # :stopdoc:
3498
+
3499
+ # Local Variables: **
3500
+ # racc-token-length-max:14 **
3501
+ # End: **