kinetic_sdk 5.0.18 → 5.0.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/README.md +1 -1
- data/gems/{mime-types-3.1/Code-of-Conduct.rdoc → mime-types-3.4.1/Code-of-Conduct.md} +29 -30
- data/gems/mime-types-3.4.1/Contributing.md +132 -0
- data/gems/mime-types-3.4.1/History.md +269 -0
- data/gems/{mime-types-3.1/Licence.rdoc → mime-types-3.4.1/Licence.md} +3 -3
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/Manifest.txt +4 -4
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/README.rdoc +6 -14
- data/gems/mime-types-3.4.1/Rakefile +270 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/type/columnar.rb +6 -4
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/type.rb +162 -101
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/_columnar.rb +22 -20
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/cache.rb +13 -11
- data/gems/mime-types-3.4.1/lib/mime/types/columnar.rb +3 -0
- data/gems/mime-types-3.4.1/lib/mime/types/container.rb +96 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/deprecations.rb +17 -13
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/full.rb +4 -2
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/loader.rb +29 -18
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/logger.rb +5 -5
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types/registry.rb +14 -5
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/lib/mime/types.rb +26 -21
- data/gems/mime-types-3.4.1/lib/mime-types.rb +3 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/test/bad-fixtures/malformed +0 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/test/fixture/json.json +0 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/test/fixture/old-data +0 -0
- data/gems/{mime-types-3.1 → mime-types-3.4.1}/test/fixture/yaml.yaml +0 -0
- data/gems/mime-types-3.4.1/test/minitest_helper.rb +11 -0
- data/gems/mime-types-3.4.1/test/test_mime_type.rb +621 -0
- data/gems/mime-types-3.4.1/test/test_mime_types.rb +169 -0
- data/gems/mime-types-3.4.1/test/test_mime_types_cache.rb +118 -0
- data/gems/mime-types-3.4.1/test/test_mime_types_class.rb +159 -0
- data/gems/mime-types-3.4.1/test/test_mime_types_lazy.rb +49 -0
- data/gems/mime-types-3.4.1/test/test_mime_types_loader.rb +32 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/Code-of-Conduct.md +22 -22
- data/gems/mime-types-data-3.2022.0105/Contributing.md +241 -0
- data/gems/mime-types-data-3.2022.0105/History.md +502 -0
- data/gems/{websocket-driver-0.6.5-java/LICENSE.md → mime-types-data-3.2022.0105/Licence.md} +7 -5
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/Manifest.txt +16 -0
- data/gems/mime-types-data-3.2022.0105/README.md +73 -0
- data/gems/mime-types-data-3.2022.0105/Rakefile +155 -0
- data/gems/mime-types-data-3.2022.0105/data/content_type_mime.db +878 -0
- data/gems/mime-types-data-3.2022.0105/data/ext_mime.db +1198 -0
- data/gems/mime-types-data-3.2022.0105/data/mime-types.json +1 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.content_type.column +432 -13
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.docs.column +419 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.encoding.column +419 -0
- data/gems/mime-types-data-3.2022.0105/data/mime.flags.column +2383 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.friendly.column +419 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.pext.column +419 -0
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.use_instead.column +420 -1
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/data/mime.xrefs.column +567 -148
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/lib/mime/types/data.rb +2 -2
- data/gems/{mime-types-data-3.2016.0521 → mime-types-data-3.2022.0105}/lib/mime-types-data.rb +1 -1
- data/gems/mime-types-data-3.2022.0105/types/application.yaml +17299 -0
- data/gems/mime-types-data-3.2022.0105/types/audio.yaml +1716 -0
- data/gems/mime-types-data-3.2022.0105/types/chemical.yaml +71 -0
- data/gems/mime-types-data-3.2022.0105/types/conference.yaml +9 -0
- data/gems/mime-types-data-3.2022.0105/types/drawing.yaml +15 -0
- data/gems/mime-types-data-3.2022.0105/types/font.yaml +65 -0
- data/gems/mime-types-data-3.2022.0105/types/image.yaml +1252 -0
- data/gems/mime-types-data-3.2022.0105/types/message.yaml +205 -0
- data/gems/mime-types-data-3.2022.0105/types/model.yaml +390 -0
- data/gems/mime-types-data-3.2022.0105/types/multipart.yaml +179 -0
- data/gems/mime-types-data-3.2022.0105/types/provisional-standard-types.yaml +145 -0
- data/gems/mime-types-data-3.2022.0105/types/text.yaml +1166 -0
- data/gems/mime-types-data-3.2022.0105/types/video.yaml +1121 -0
- data/gems/mime-types-data-3.2022.0105/types/world.yaml +8 -0
- data/gems/rake-13.0.1/CONTRIBUTING.rdoc +43 -0
- data/gems/rake-13.0.1/Gemfile +10 -0
- data/gems/rake-13.0.1/History.rdoc +2368 -0
- data/gems/{parallel-1.12.1/MIT-LICENSE.txt → rake-13.0.1/MIT-LICENSE} +2 -1
- data/gems/rake-13.0.1/README.rdoc +155 -0
- data/gems/rake-13.0.1/Rakefile +41 -0
- data/gems/rake-13.0.1/bin/bundle +105 -0
- data/gems/rake-13.0.1/bin/console +7 -0
- data/gems/rake-13.0.1/bin/rake +29 -0
- data/gems/rake-13.0.1/bin/rdoc +29 -0
- data/gems/rake-13.0.1/bin/rubocop +29 -0
- data/gems/rake-13.0.1/bin/setup +6 -0
- data/gems/rake-13.0.1/doc/command_line_usage.rdoc +158 -0
- data/gems/rake-13.0.1/doc/example/Rakefile1 +38 -0
- data/gems/rake-13.0.1/doc/example/Rakefile2 +35 -0
- data/gems/rake-13.0.1/doc/example/a.c +6 -0
- data/gems/rake-13.0.1/doc/example/b.c +6 -0
- data/gems/rake-13.0.1/doc/example/main.c +11 -0
- data/gems/rake-13.0.1/doc/glossary.rdoc +42 -0
- data/gems/rake-13.0.1/doc/jamis.rb +592 -0
- data/gems/rake-13.0.1/doc/proto_rake.rdoc +127 -0
- data/gems/rake-13.0.1/doc/rake.1 +156 -0
- data/gems/rake-13.0.1/doc/rakefile.rdoc +622 -0
- data/gems/rake-13.0.1/doc/rational.rdoc +151 -0
- data/gems/rake-13.0.1/exe/rake +27 -0
- data/gems/rake-13.0.1/lib/rake/application.rb +824 -0
- data/gems/rake-13.0.1/lib/rake/backtrace.rb +24 -0
- data/gems/rake-13.0.1/lib/rake/clean.rb +78 -0
- data/gems/rake-13.0.1/lib/rake/cloneable.rb +17 -0
- data/gems/rake-13.0.1/lib/rake/cpu_counter.rb +107 -0
- data/gems/rake-13.0.1/lib/rake/default_loader.rb +15 -0
- data/gems/rake-13.0.1/lib/rake/dsl_definition.rb +195 -0
- data/gems/rake-13.0.1/lib/rake/early_time.rb +22 -0
- data/gems/rake-13.0.1/lib/rake/ext/core.rb +26 -0
- data/gems/rake-13.0.1/lib/rake/ext/string.rb +176 -0
- data/gems/rake-13.0.1/lib/rake/file_creation_task.rb +25 -0
- data/gems/rake-13.0.1/lib/rake/file_list.rb +435 -0
- data/gems/rake-13.0.1/lib/rake/file_task.rb +54 -0
- data/gems/rake-13.0.1/lib/rake/file_utils.rb +134 -0
- data/gems/rake-13.0.1/lib/rake/file_utils_ext.rb +134 -0
- data/gems/rake-13.0.1/lib/rake/invocation_chain.rb +57 -0
- data/gems/rake-13.0.1/lib/rake/invocation_exception_mixin.rb +17 -0
- data/gems/rake-13.0.1/lib/rake/late_time.rb +18 -0
- data/gems/rake-13.0.1/lib/rake/linked_list.rb +112 -0
- data/gems/rake-13.0.1/lib/rake/loaders/makefile.rb +54 -0
- data/gems/rake-13.0.1/lib/rake/multi_task.rb +14 -0
- data/gems/rake-13.0.1/lib/rake/name_space.rb +38 -0
- data/gems/rake-13.0.1/lib/rake/packagetask.rb +222 -0
- data/gems/rake-13.0.1/lib/rake/phony.rb +16 -0
- data/gems/rake-13.0.1/lib/rake/private_reader.rb +21 -0
- data/gems/rake-13.0.1/lib/rake/promise.rb +100 -0
- data/gems/rake-13.0.1/lib/rake/pseudo_status.rb +30 -0
- data/gems/rake-13.0.1/lib/rake/rake_module.rb +67 -0
- data/gems/rake-13.0.1/lib/rake/rake_test_loader.rb +27 -0
- data/gems/rake-13.0.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/gems/rake-13.0.1/lib/rake/scope.rb +43 -0
- data/gems/rake-13.0.1/lib/rake/task.rb +434 -0
- data/gems/rake-13.0.1/lib/rake/task_argument_error.rb +8 -0
- data/gems/rake-13.0.1/lib/rake/task_arguments.rb +109 -0
- data/gems/rake-13.0.1/lib/rake/task_manager.rb +331 -0
- data/gems/rake-13.0.1/lib/rake/tasklib.rb +12 -0
- data/gems/rake-13.0.1/lib/rake/testtask.rb +224 -0
- data/gems/rake-13.0.1/lib/rake/thread_history_display.rb +49 -0
- data/gems/rake-13.0.1/lib/rake/thread_pool.rb +163 -0
- data/gems/rake-13.0.1/lib/rake/trace_output.rb +23 -0
- data/gems/rake-13.0.1/lib/rake/version.rb +10 -0
- data/gems/rake-13.0.1/lib/rake/win32.rb +51 -0
- data/gems/rake-13.0.1/lib/rake.rb +71 -0
- data/gems/rake-13.0.1/rake.gemspec +43 -0
- data/gems/yard-0.9.25/CHANGELOG.md +804 -0
- data/gems/yard-0.9.25/CODE_OF_CONDUCT.md +15 -0
- data/gems/yard-0.9.25/CONTRIBUTING.md +140 -0
- data/gems/yard-0.9.25/Dockerfile.samus +28 -0
- data/gems/yard-0.9.25/Gemfile +32 -0
- data/gems/yard-0.9.25/LEGAL +66 -0
- data/gems/yard-0.9.25/LICENSE +22 -0
- data/gems/yard-0.9.25/README.md +325 -0
- data/gems/yard-0.9.25/Rakefile +39 -0
- data/gems/yard-0.9.25/SECURITY.md +26 -0
- data/gems/yard-0.9.25/benchmarks/builtins_vs_eval.rb +24 -0
- data/gems/yard-0.9.25/benchmarks/concat_vs_join.rb +13 -0
- data/gems/yard-0.9.25/benchmarks/erb_vs_erubis.rb +54 -0
- data/gems/yard-0.9.25/benchmarks/format_args.rb +47 -0
- data/gems/yard-0.9.25/benchmarks/generation.rb +38 -0
- data/gems/yard-0.9.25/benchmarks/marshal_vs_dbm.rb +64 -0
- data/gems/yard-0.9.25/benchmarks/parsing.rb +46 -0
- data/gems/yard-0.9.25/benchmarks/pathname_vs_string.rb +51 -0
- data/gems/yard-0.9.25/benchmarks/rdoc_vs_yardoc.rb +11 -0
- data/gems/yard-0.9.25/benchmarks/registry_store_types.rb +49 -0
- data/gems/yard-0.9.25/benchmarks/ri_vs_yri.rb +19 -0
- data/gems/yard-0.9.25/benchmarks/ripper_parser.rb +13 -0
- data/gems/yard-0.9.25/benchmarks/splat_vs_flatten.rb +13 -0
- data/gems/yard-0.9.25/benchmarks/template_erb.rb +23 -0
- data/gems/yard-0.9.25/benchmarks/template_format.rb +7 -0
- data/gems/yard-0.9.25/benchmarks/template_profile.rb +18 -0
- data/gems/yard-0.9.25/benchmarks/yri_cache.rb +20 -0
- data/gems/yard-0.9.25/bin/yard +13 -0
- data/gems/yard-0.9.25/bin/yardoc +13 -0
- data/gems/yard-0.9.25/bin/yri +13 -0
- data/gems/yard-0.9.25/docs/CodeObjects.md +115 -0
- data/gems/yard-0.9.25/docs/GettingStarted.md +679 -0
- data/gems/yard-0.9.25/docs/Handlers.md +152 -0
- data/gems/yard-0.9.25/docs/Overview.md +61 -0
- data/gems/yard-0.9.25/docs/Parser.md +191 -0
- data/gems/yard-0.9.25/docs/Tags.md +283 -0
- data/gems/yard-0.9.25/docs/TagsArch.md +123 -0
- data/gems/yard-0.9.25/docs/Templates.md +496 -0
- data/gems/yard-0.9.25/docs/WhatsNew.md +1245 -0
- data/gems/yard-0.9.25/docs/images/code-objects-class-diagram.png +0 -0
- data/gems/yard-0.9.25/docs/images/handlers-class-diagram.png +0 -0
- data/gems/yard-0.9.25/docs/images/overview-class-diagram.png +0 -0
- data/gems/yard-0.9.25/docs/images/parser-class-diagram.png +0 -0
- data/gems/yard-0.9.25/docs/images/tags-class-diagram.png +0 -0
- data/gems/yard-0.9.25/docs/templates/default/fulldoc/html/full_list_tag.erb +9 -0
- data/gems/yard-0.9.25/docs/templates/default/fulldoc/html/setup.rb +6 -0
- data/gems/yard-0.9.25/docs/templates/default/layout/html/setup.rb +9 -0
- data/gems/yard-0.9.25/docs/templates/default/layout/html/tag_list.erb +11 -0
- data/gems/yard-0.9.25/docs/templates/default/yard_tags/html/list.erb +18 -0
- data/gems/yard-0.9.25/docs/templates/default/yard_tags/html/setup.rb +26 -0
- data/gems/yard-0.9.25/docs/templates/plugin.rb +70 -0
- data/gems/yard-0.9.25/lib/rubygems_plugin.rb +9 -0
- data/gems/yard-0.9.25/lib/yard/autoload.rb +308 -0
- data/gems/yard-0.9.25/lib/yard/cli/command.rb +85 -0
- data/gems/yard-0.9.25/lib/yard/cli/command_parser.rb +93 -0
- data/gems/yard-0.9.25/lib/yard/cli/config.rb +198 -0
- data/gems/yard-0.9.25/lib/yard/cli/diff.rb +273 -0
- data/gems/yard-0.9.25/lib/yard/cli/display.rb +69 -0
- data/gems/yard-0.9.25/lib/yard/cli/gems.rb +84 -0
- data/gems/yard-0.9.25/lib/yard/cli/graph.rb +125 -0
- data/gems/yard-0.9.25/lib/yard/cli/help.rb +20 -0
- data/gems/yard-0.9.25/lib/yard/cli/i18n.rb +70 -0
- data/gems/yard-0.9.25/lib/yard/cli/list.rb +23 -0
- data/gems/yard-0.9.25/lib/yard/cli/markup_types.rb +32 -0
- data/gems/yard-0.9.25/lib/yard/cli/server.rb +266 -0
- data/gems/yard-0.9.25/lib/yard/cli/stats.rb +231 -0
- data/gems/yard-0.9.25/lib/yard/cli/yardoc.rb +789 -0
- data/gems/yard-0.9.25/lib/yard/cli/yardopts_command.rb +110 -0
- data/gems/yard-0.9.25/lib/yard/cli/yri.rb +215 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/base.rb +622 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/class_object.rb +146 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/class_variable_object.rb +11 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/constant_object.rb +16 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/extended_method_object.rb +24 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/extra_file_object.rb +134 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/macro_object.rb +172 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/method_object.rb +196 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/module_object.rb +21 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/namespace_mapper.rb +141 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/namespace_object.rb +200 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/proxy.rb +245 -0
- data/gems/yard-0.9.25/lib/yard/code_objects/root_object.rb +19 -0
- data/gems/yard-0.9.25/lib/yard/config.rb +270 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/array.rb +16 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/file.rb +69 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/hash.rb +16 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/insertion.rb +63 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/module.rb +11 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/string.rb +68 -0
- data/gems/yard-0.9.25/lib/yard/core_ext/symbol_hash.rb +75 -0
- data/gems/yard-0.9.25/lib/yard/docstring.rb +386 -0
- data/gems/yard-0.9.25/lib/yard/docstring_parser.rb +345 -0
- data/gems/yard-0.9.25/lib/yard/gem_index.rb +29 -0
- data/gems/yard-0.9.25/lib/yard/globals.rb +22 -0
- data/gems/yard-0.9.25/lib/yard/handlers/base.rb +595 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/alias_handler.rb +16 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/attribute_handler.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/base.rb +164 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/class_handler.rb +27 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/constant_handler.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/handler_methods.rb +212 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/init_handler.rb +20 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/method_handler.rb +45 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/mixin_handler.rb +21 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/module_handler.rb +17 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/override_comment_handler.rb +31 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/path_handler.rb +11 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/struct_handler.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/handlers/c/symbol_handler.rb +8 -0
- data/gems/yard-0.9.25/lib/yard/handlers/common/method_handler.rb +19 -0
- data/gems/yard-0.9.25/lib/yard/handlers/processor.rb +200 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/alias_handler.rb +45 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/attribute_handler.rb +87 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/base.rb +165 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/class_condition_handler.rb +92 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/class_handler.rb +119 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/class_variable_handler.rb +17 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/comment_handler.rb +10 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/constant_handler.rb +55 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/decorator_handler_methods.rb +123 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/dsl_handler.rb +15 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/dsl_handler_methods.rb +96 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/exception_handler.rb +27 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/extend_handler.rb +22 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/alias_handler.rb +37 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/attribute_handler.rb +65 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/base.rb +245 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/class_condition_handler.rb +83 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/class_handler.rb +113 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/class_variable_handler.rb +15 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/comment_handler.rb +10 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/constant_handler.rb +29 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/dsl_handler.rb +17 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/exception_handler.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/extend_handler.rb +21 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/method_handler.rb +90 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/mixin_handler.rb +39 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/module_function_handler.rb +19 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/module_handler.rb +12 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/private_class_method_handler.rb +22 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/private_constant_handler.rb +22 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/visibility_handler.rb +17 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/legacy/yield_handler.rb +29 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/method_condition_handler.rb +9 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/method_handler.rb +104 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/mixin_handler.rb +49 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/module_function_handler.rb +27 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/module_handler.rb +12 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/private_class_method_handler.rb +14 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/private_constant_handler.rb +43 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/public_class_method_handler.rb +14 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/struct_handler_methods.rb +143 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/visibility_handler.rb +22 -0
- data/gems/yard-0.9.25/lib/yard/handlers/ruby/yield_handler.rb +31 -0
- data/gems/yard-0.9.25/lib/yard/i18n/locale.rb +67 -0
- data/gems/yard-0.9.25/lib/yard/i18n/message.rb +57 -0
- data/gems/yard-0.9.25/lib/yard/i18n/messages.rb +56 -0
- data/gems/yard-0.9.25/lib/yard/i18n/po_parser.rb +61 -0
- data/gems/yard-0.9.25/lib/yard/i18n/pot_generator.rb +290 -0
- data/gems/yard-0.9.25/lib/yard/i18n/text.rb +173 -0
- data/gems/yard-0.9.25/lib/yard/logging.rb +205 -0
- data/gems/yard-0.9.25/lib/yard/options.rb +217 -0
- data/gems/yard-0.9.25/lib/yard/parser/base.rb +57 -0
- data/gems/yard-0.9.25/lib/yard/parser/c/c_parser.rb +235 -0
- data/gems/yard-0.9.25/lib/yard/parser/c/comment_parser.rb +134 -0
- data/gems/yard-0.9.25/lib/yard/parser/c/statement.rb +66 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/ast_node.rb +551 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/irb/slex.rb +276 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/ruby_lex.rb +1345 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/ruby_parser.rb +32 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/statement.rb +68 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/statement_list.rb +394 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/legacy/token_list.rb +74 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/ruby_parser.rb +701 -0
- data/gems/yard-0.9.25/lib/yard/parser/ruby/token_resolver.rb +158 -0
- data/gems/yard-0.9.25/lib/yard/parser/source_parser.rb +526 -0
- data/gems/yard-0.9.25/lib/yard/rake/yardoc_task.rb +81 -0
- data/gems/yard-0.9.25/lib/yard/registry.rb +439 -0
- data/gems/yard-0.9.25/lib/yard/registry_resolver.rb +217 -0
- data/gems/yard-0.9.25/lib/yard/registry_store.rb +342 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/backports/LICENSE.txt +57 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/backports/MIT.txt +20 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/backports/gem.rb +10 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/backports/source_index.rb +365 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/backports.rb +10 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/doc_manager.rb +90 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/hook.rb +197 -0
- data/gems/yard-0.9.25/lib/yard/rubygems/specification.rb +50 -0
- data/gems/yard-0.9.25/lib/yard/serializers/base.rb +83 -0
- data/gems/yard-0.9.25/lib/yard/serializers/file_system_serializer.rb +123 -0
- data/gems/yard-0.9.25/lib/yard/serializers/process_serializer.rb +24 -0
- data/gems/yard-0.9.25/lib/yard/serializers/stdout_serializer.rb +34 -0
- data/gems/yard-0.9.25/lib/yard/serializers/yardoc_serializer.rb +152 -0
- data/gems/yard-0.9.25/lib/yard/server/adapter.rb +100 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/base.rb +209 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/display_file_command.rb +29 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/display_object_command.rb +65 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/frames_command.rb +16 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/library_command.rb +187 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/library_index_command.rb +28 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/list_command.rb +25 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/root_request_command.rb +15 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/search_command.rb +79 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/static_file_command.rb +23 -0
- data/gems/yard-0.9.25/lib/yard/server/commands/static_file_helpers.rb +61 -0
- data/gems/yard-0.9.25/lib/yard/server/doc_server_helper.rb +91 -0
- data/gems/yard-0.9.25/lib/yard/server/doc_server_serializer.rb +39 -0
- data/gems/yard-0.9.25/lib/yard/server/library_version.rb +277 -0
- data/gems/yard-0.9.25/lib/yard/server/rack_adapter.rb +89 -0
- data/gems/yard-0.9.25/lib/yard/server/router.rb +187 -0
- data/gems/yard-0.9.25/lib/yard/server/static_caching.rb +46 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/fulldoc/html/css/custom.css +127 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/fulldoc/html/images/processing.gif +0 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/fulldoc/html/js/autocomplete.js +12 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/layout/html/breadcrumb.erb +37 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/layout/html/script_setup.erb +7 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/layout/html/setup.rb +8 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/method_details/html/permalink.erb +4 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/default/method_details/html/setup.rb +5 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/library_list/html/headers.erb +8 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/library_list/html/library_list.erb +14 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/library_list/html/listing.erb +13 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/library_list/html/setup.rb +6 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/library_list/html/title.erb +2 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/processing/html/processing.erb +52 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/processing/html/setup.rb +4 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/search/html/search.erb +18 -0
- data/gems/yard-0.9.25/lib/yard/server/templates/doc_server/search/html/setup.rb +9 -0
- data/gems/yard-0.9.25/lib/yard/server/webrick_adapter.rb +45 -0
- data/gems/yard-0.9.25/lib/yard/server.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/tags/default_factory.rb +191 -0
- data/gems/yard-0.9.25/lib/yard/tags/default_tag.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/tags/directives.rb +616 -0
- data/gems/yard-0.9.25/lib/yard/tags/library.rb +633 -0
- data/gems/yard-0.9.25/lib/yard/tags/option_tag.rb +13 -0
- data/gems/yard-0.9.25/lib/yard/tags/overload_tag.rb +71 -0
- data/gems/yard-0.9.25/lib/yard/tags/ref_tag.rb +8 -0
- data/gems/yard-0.9.25/lib/yard/tags/ref_tag_list.rb +28 -0
- data/gems/yard-0.9.25/lib/yard/tags/tag.rb +71 -0
- data/gems/yard-0.9.25/lib/yard/tags/tag_format_error.rb +7 -0
- data/gems/yard-0.9.25/lib/yard/tags/types_explainer.rb +162 -0
- data/gems/yard-0.9.25/lib/yard/templates/engine.rb +186 -0
- data/gems/yard-0.9.25/lib/yard/templates/erb_cache.rb +23 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/base_helper.rb +215 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/filter_helper.rb +27 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/html_helper.rb +670 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/html_syntax_highlight_helper.rb +78 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/markup/rdoc_markdown.rb +23 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/markup/rdoc_markup.rb +110 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/markup_helper.rb +172 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/method_helper.rb +75 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/module_helper.rb +21 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/text_helper.rb +112 -0
- data/gems/yard-0.9.25/lib/yard/templates/helpers/uml_helper.rb +47 -0
- data/gems/yard-0.9.25/lib/yard/templates/section.rb +105 -0
- data/gems/yard-0.9.25/lib/yard/templates/template.rb +418 -0
- data/gems/yard-0.9.25/lib/yard/templates/template_options.rb +92 -0
- data/gems/yard-0.9.25/lib/yard/verifier.rb +151 -0
- data/gems/yard-0.9.25/lib/yard/version.rb +6 -0
- data/gems/yard-0.9.25/lib/yard.rb +69 -0
- data/gems/yard-0.9.25/po/ja.po +31108 -0
- data/gems/yard-0.9.25/samus.json +80 -0
- data/gems/yard-0.9.25/tasks/update_error_map.rake +53 -0
- data/gems/yard-0.9.25/templates/default/class/dot/setup.rb +7 -0
- data/gems/yard-0.9.25/templates/default/class/dot/superklass.erb +3 -0
- data/gems/yard-0.9.25/templates/default/class/html/constructor_details.erb +8 -0
- data/gems/yard-0.9.25/templates/default/class/html/setup.rb +2 -0
- data/gems/yard-0.9.25/templates/default/class/html/subclasses.erb +4 -0
- data/gems/yard-0.9.25/templates/default/class/setup.rb +36 -0
- data/gems/yard-0.9.25/templates/default/class/text/setup.rb +12 -0
- data/gems/yard-0.9.25/templates/default/class/text/subclasses.erb +5 -0
- data/gems/yard-0.9.25/templates/default/constant/text/header.erb +11 -0
- data/gems/yard-0.9.25/templates/default/constant/text/setup.rb +4 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/abstract.erb +4 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/deprecated.erb +1 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/index.erb +5 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/note.erb +6 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/private.erb +4 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/returns_void.erb +1 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/text.erb +1 -0
- data/gems/yard-0.9.25/templates/default/docstring/html/todo.erb +6 -0
- data/gems/yard-0.9.25/templates/default/docstring/setup.rb +52 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/abstract.erb +2 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/deprecated.erb +2 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/index.erb +2 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/note.erb +4 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/private.erb +2 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/returns_void.erb +1 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/text.erb +1 -0
- data/gems/yard-0.9.25/templates/default/docstring/text/todo.erb +4 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/css/common.css +1 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/css/full_list.css +58 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/css/style.css +496 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/frames.erb +17 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/full_list.erb +37 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/full_list_class.erb +2 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/full_list_file.erb +7 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/full_list_method.erb +10 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/js/app.js +314 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/js/full_list.js +216 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/js/jquery.js +4 -0
- data/gems/yard-0.9.25/templates/default/fulldoc/html/setup.rb +241 -0
- data/gems/yard-0.9.25/templates/default/layout/dot/header.erb +6 -0
- data/gems/yard-0.9.25/templates/default/layout/dot/setup.rb +15 -0
- data/gems/yard-0.9.25/templates/default/layout/html/breadcrumb.erb +11 -0
- data/gems/yard-0.9.25/templates/default/layout/html/files.erb +11 -0
- data/gems/yard-0.9.25/templates/default/layout/html/footer.erb +5 -0
- data/gems/yard-0.9.25/templates/default/layout/html/headers.erb +15 -0
- data/gems/yard-0.9.25/templates/default/layout/html/index.erb +2 -0
- data/gems/yard-0.9.25/templates/default/layout/html/layout.erb +24 -0
- data/gems/yard-0.9.25/templates/default/layout/html/listing.erb +4 -0
- data/gems/yard-0.9.25/templates/default/layout/html/objects.erb +32 -0
- data/gems/yard-0.9.25/templates/default/layout/html/script_setup.erb +4 -0
- data/gems/yard-0.9.25/templates/default/layout/html/search.erb +13 -0
- data/gems/yard-0.9.25/templates/default/layout/html/setup.rb +89 -0
- data/gems/yard-0.9.25/templates/default/method/html/header.erb +17 -0
- data/gems/yard-0.9.25/templates/default/method/setup.rb +4 -0
- data/gems/yard-0.9.25/templates/default/method/text/header.erb +1 -0
- data/gems/yard-0.9.25/templates/default/method_details/html/header.erb +3 -0
- data/gems/yard-0.9.25/templates/default/method_details/html/method_signature.erb +25 -0
- data/gems/yard-0.9.25/templates/default/method_details/html/source.erb +10 -0
- data/gems/yard-0.9.25/templates/default/method_details/setup.rb +11 -0
- data/gems/yard-0.9.25/templates/default/method_details/text/header.erb +10 -0
- data/gems/yard-0.9.25/templates/default/method_details/text/method_signature.erb +12 -0
- data/gems/yard-0.9.25/templates/default/method_details/text/setup.rb +11 -0
- data/gems/yard-0.9.25/templates/default/module/dot/child.erb +1 -0
- data/gems/yard-0.9.25/templates/default/module/dot/dependencies.erb +3 -0
- data/gems/yard-0.9.25/templates/default/module/dot/header.erb +6 -0
- data/gems/yard-0.9.25/templates/default/module/dot/info.erb +14 -0
- data/gems/yard-0.9.25/templates/default/module/dot/setup.rb +15 -0
- data/gems/yard-0.9.25/templates/default/module/html/attribute_details.erb +10 -0
- data/gems/yard-0.9.25/templates/default/module/html/attribute_summary.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/html/box_info.erb +43 -0
- data/gems/yard-0.9.25/templates/default/module/html/children.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/html/constant_summary.erb +17 -0
- data/gems/yard-0.9.25/templates/default/module/html/defines.erb +3 -0
- data/gems/yard-0.9.25/templates/default/module/html/header.erb +5 -0
- data/gems/yard-0.9.25/templates/default/module/html/inherited_attributes.erb +14 -0
- data/gems/yard-0.9.25/templates/default/module/html/inherited_constants.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/html/inherited_methods.erb +19 -0
- data/gems/yard-0.9.25/templates/default/module/html/item_summary.erb +40 -0
- data/gems/yard-0.9.25/templates/default/module/html/method_details_list.erb +9 -0
- data/gems/yard-0.9.25/templates/default/module/html/method_summary.erb +14 -0
- data/gems/yard-0.9.25/templates/default/module/html/methodmissing.erb +12 -0
- data/gems/yard-0.9.25/templates/default/module/html/pre_docstring.erb +1 -0
- data/gems/yard-0.9.25/templates/default/module/setup.rb +167 -0
- data/gems/yard-0.9.25/templates/default/module/text/children.erb +10 -0
- data/gems/yard-0.9.25/templates/default/module/text/class_meths_list.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/text/extends.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/text/header.erb +7 -0
- data/gems/yard-0.9.25/templates/default/module/text/includes.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/text/instance_meths_list.erb +8 -0
- data/gems/yard-0.9.25/templates/default/module/text/setup.rb +13 -0
- data/gems/yard-0.9.25/templates/default/onefile/html/files.erb +5 -0
- data/gems/yard-0.9.25/templates/default/onefile/html/headers.erb +6 -0
- data/gems/yard-0.9.25/templates/default/onefile/html/layout.erb +17 -0
- data/gems/yard-0.9.25/templates/default/onefile/html/readme.erb +3 -0
- data/gems/yard-0.9.25/templates/default/onefile/html/setup.rb +62 -0
- data/gems/yard-0.9.25/templates/default/root/dot/child.erb +3 -0
- data/gems/yard-0.9.25/templates/default/root/dot/setup.rb +6 -0
- data/gems/yard-0.9.25/templates/default/root/html/setup.rb +2 -0
- data/gems/yard-0.9.25/templates/default/tags/html/example.erb +11 -0
- data/gems/yard-0.9.25/templates/default/tags/html/index.erb +3 -0
- data/gems/yard-0.9.25/templates/default/tags/html/option.erb +24 -0
- data/gems/yard-0.9.25/templates/default/tags/html/overload.erb +14 -0
- data/gems/yard-0.9.25/templates/default/tags/html/see.erb +8 -0
- data/gems/yard-0.9.25/templates/default/tags/html/tag.erb +20 -0
- data/gems/yard-0.9.25/templates/default/tags/setup.rb +57 -0
- data/gems/yard-0.9.25/templates/default/tags/text/example.erb +12 -0
- data/gems/yard-0.9.25/templates/default/tags/text/index.erb +1 -0
- data/gems/yard-0.9.25/templates/default/tags/text/option.erb +20 -0
- data/gems/yard-0.9.25/templates/default/tags/text/overload.erb +19 -0
- data/gems/yard-0.9.25/templates/default/tags/text/see.erb +11 -0
- data/gems/yard-0.9.25/templates/default/tags/text/tag.erb +13 -0
- data/gems/yard-0.9.25/templates/guide/class/html/setup.rb +2 -0
- data/gems/yard-0.9.25/templates/guide/docstring/html/setup.rb +2 -0
- data/gems/yard-0.9.25/templates/guide/fulldoc/html/css/style.css +108 -0
- data/gems/yard-0.9.25/templates/guide/fulldoc/html/js/app.js +33 -0
- data/gems/yard-0.9.25/templates/guide/fulldoc/html/setup.rb +74 -0
- data/gems/yard-0.9.25/templates/guide/layout/html/layout.erb +81 -0
- data/gems/yard-0.9.25/templates/guide/layout/html/setup.rb +25 -0
- data/gems/yard-0.9.25/templates/guide/method/html/header.erb +18 -0
- data/gems/yard-0.9.25/templates/guide/method/html/setup.rb +22 -0
- data/gems/yard-0.9.25/templates/guide/module/html/header.erb +7 -0
- data/gems/yard-0.9.25/templates/guide/module/html/method_list.erb +5 -0
- data/gems/yard-0.9.25/templates/guide/module/html/setup.rb +27 -0
- data/gems/yard-0.9.25/templates/guide/onefile/html/files.erb +4 -0
- data/gems/yard-0.9.25/templates/guide/onefile/html/setup.rb +6 -0
- data/gems/yard-0.9.25/templates/guide/onefile/html/toc.erb +3 -0
- data/gems/yard-0.9.25/templates/guide/tags/html/setup.rb +9 -0
- data/gems/yard-0.9.25/yard.gemspec +24 -0
- data/kinetic_sdk.gemspec +3 -7
- data/lib/kinetic_sdk/core/lib/form.rb +55 -0
- data/lib/kinetic_sdk/core/lib/kapp.rb +52 -0
- data/lib/kinetic_sdk/core/lib/space.rb +51 -0
- data/lib/kinetic_sdk/task/lib/export.rb +22 -2
- data/lib/kinetic_sdk/task/lib/trees.rb +11 -0
- data/lib/kinetic_sdk/version.rb +1 -1
- data/lib/kinetic_sdk.rb +2 -22
- metadata +551 -229
- data/gems/kontena-websocket-client-0.1.1/Gemfile +0 -4
- data/gems/kontena-websocket-client-0.1.1/LICENSE +0 -190
- data/gems/kontena-websocket-client-0.1.1/README.md +0 -138
- data/gems/kontena-websocket-client-0.1.1/Rakefile +0 -6
- data/gems/kontena-websocket-client-0.1.1/benchmark/benchmark-client.rb +0 -45
- data/gems/kontena-websocket-client-0.1.1/benchmark/benchmark-em.rb +0 -66
- data/gems/kontena-websocket-client-0.1.1/benchmark/benchmark.rb +0 -161
- data/gems/kontena-websocket-client-0.1.1/benchmark/benchmark.sh +0 -17
- data/gems/kontena-websocket-client-0.1.1/benchmark/websocket-echo-server.go +0 -207
- data/gems/kontena-websocket-client-0.1.1/examples/websocket-echo-client.rb +0 -80
- data/gems/kontena-websocket-client-0.1.1/kontena-websocket-client.gemspec +0 -24
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/client/connection.rb +0 -119
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/client/version.rb +0 -13
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/client.rb +0 -848
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/error.rb +0 -81
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/logging.rb +0 -55
- data/gems/kontena-websocket-client-0.1.1/lib/kontena/websocket/openssl_patch.rb +0 -10
- data/gems/kontena-websocket-client-0.1.1/lib/kontena-websocket-client.rb +0 -15
- data/gems/mime-types-3.1/Contributing.rdoc +0 -130
- data/gems/mime-types-3.1/History.rdoc +0 -658
- data/gems/mime-types-3.1/Rakefile +0 -254
- data/gems/mime-types-3.1/lib/mime/types/columnar.rb +0 -1
- data/gems/mime-types-3.1/lib/mime/types/container.rb +0 -30
- data/gems/mime-types-3.1/lib/mime-types.rb +0 -1
- data/gems/mime-types-3.1/test/minitest_helper.rb +0 -13
- data/gems/mime-types-3.1/test/test_mime_type.rb +0 -603
- data/gems/mime-types-3.1/test/test_mime_types.rb +0 -161
- data/gems/mime-types-3.1/test/test_mime_types_cache.rb +0 -109
- data/gems/mime-types-3.1/test/test_mime_types_class.rb +0 -155
- data/gems/mime-types-3.1/test/test_mime_types_lazy.rb +0 -43
- data/gems/mime-types-3.1/test/test_mime_types_loader.rb +0 -32
- data/gems/mime-types-data-3.2016.0521/Contributing.md +0 -157
- data/gems/mime-types-data-3.2016.0521/History.md +0 -351
- data/gems/mime-types-data-3.2016.0521/Licence.md +0 -25
- data/gems/mime-types-data-3.2016.0521/README.md +0 -61
- data/gems/mime-types-data-3.2016.0521/Rakefile +0 -80
- data/gems/mime-types-data-3.2016.0521/data/mime-types.json +0 -1
- data/gems/mime-types-data-3.2016.0521/data/mime.flags.column +0 -1964
- data/gems/parallel-1.12.1/lib/parallel/processor_count.rb +0 -93
- data/gems/parallel-1.12.1/lib/parallel/version.rb +0 -3
- data/gems/parallel-1.12.1/lib/parallel.rb +0 -500
- data/gems/ruby-progressbar-1.9.0/LICENSE.txt +0 -19
- data/gems/ruby-progressbar-1.9.0/README.md +0 -38
- data/gems/ruby-progressbar-1.9.0/Rakefile +0 -2
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/base.rb +0 -183
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/calculators/length.rb +0 -99
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/calculators/running_average.rb +0 -9
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/bar.rb +0 -96
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/percentage.rb +0 -29
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/rate.rb +0 -43
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/time.rb +0 -107
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components/title.rb +0 -13
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/components.rb +0 -5
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/errors/invalid_progress_error.rb +0 -4
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/formatter.rb +0 -27
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/molecule.rb +0 -59
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format/string.rb +0 -36
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/format.rb +0 -3
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/output.rb +0 -68
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/non_tty.rb +0 -47
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/null.rb +0 -33
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/outputs/tty.rb +0 -32
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/progress.rb +0 -118
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/refinements/enumerator.rb +0 -25
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/refinements.rb +0 -1
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/throttle.rb +0 -25
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/time.rb +0 -30
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/timer.rb +0 -72
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar/version.rb +0 -3
- data/gems/ruby-progressbar-1.9.0/lib/ruby-progressbar.rb +0 -18
- data/gems/websocket-driver-0.6.5/CHANGELOG.md +0 -123
- data/gems/websocket-driver-0.6.5/LICENSE.md +0 -22
- data/gems/websocket-driver-0.6.5/README.md +0 -369
- data/gems/websocket-driver-0.6.5/examples/tcp_server.rb +0 -28
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/Makefile +0 -264
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/WebsocketMaskService.java +0 -55
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/extconf.rb +0 -4
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/websocket_mask.bundle +0 -0
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/websocket_mask.c +0 -41
- data/gems/websocket-driver-0.6.5/ext/websocket-driver/websocket_mask.o +0 -0
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/client.rb +0 -140
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/draft75.rb +0 -102
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/draft76.rb +0 -96
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/event_emitter.rb +0 -54
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/headers.rb +0 -45
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/hybi/frame.rb +0 -20
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/hybi/message.rb +0 -31
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/hybi.rb +0 -406
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/proxy.rb +0 -68
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/server.rb +0 -80
- data/gems/websocket-driver-0.6.5/lib/websocket/driver/stream_reader.rb +0 -55
- data/gems/websocket-driver-0.6.5/lib/websocket/driver.rb +0 -199
- data/gems/websocket-driver-0.6.5/lib/websocket/http/headers.rb +0 -112
- data/gems/websocket-driver-0.6.5/lib/websocket/http/request.rb +0 -45
- data/gems/websocket-driver-0.6.5/lib/websocket/http/response.rb +0 -29
- data/gems/websocket-driver-0.6.5/lib/websocket/http.rb +0 -15
- data/gems/websocket-driver-0.6.5/lib/websocket/mask.rb +0 -14
- data/gems/websocket-driver-0.6.5/lib/websocket/websocket_mask.rb +0 -2
- data/gems/websocket-driver-0.6.5/lib/websocket_mask.bundle +0 -0
- data/gems/websocket-driver-0.6.5-java/CHANGELOG.md +0 -123
- data/gems/websocket-driver-0.6.5-java/README.md +0 -369
- data/gems/websocket-driver-0.6.5-java/examples/tcp_server.rb +0 -28
- data/gems/websocket-driver-0.6.5-java/ext/websocket-driver/WebsocketMaskService.java +0 -55
- data/gems/websocket-driver-0.6.5-java/ext/websocket-driver/extconf.rb +0 -4
- data/gems/websocket-driver-0.6.5-java/ext/websocket-driver/websocket_mask.c +0 -41
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/client.rb +0 -140
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/draft75.rb +0 -102
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/draft76.rb +0 -96
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/event_emitter.rb +0 -54
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/headers.rb +0 -45
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/hybi/frame.rb +0 -20
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/hybi/message.rb +0 -31
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/hybi.rb +0 -406
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/proxy.rb +0 -68
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/server.rb +0 -80
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver/stream_reader.rb +0 -55
- data/gems/websocket-driver-0.6.5-java/lib/websocket/driver.rb +0 -199
- data/gems/websocket-driver-0.6.5-java/lib/websocket/http/headers.rb +0 -112
- data/gems/websocket-driver-0.6.5-java/lib/websocket/http/request.rb +0 -45
- data/gems/websocket-driver-0.6.5-java/lib/websocket/http/response.rb +0 -29
- data/gems/websocket-driver-0.6.5-java/lib/websocket/http.rb +0 -15
- data/gems/websocket-driver-0.6.5-java/lib/websocket/mask.rb +0 -14
- data/gems/websocket-driver-0.6.5-java/lib/websocket/websocket_mask.rb +0 -2
- data/gems/websocket-driver-0.6.5-java/lib/websocket_mask.jar +0 -0
- data/gems/websocket-extensions-0.1.3/CHANGELOG.md +0 -15
- data/gems/websocket-extensions-0.1.3/LICENSE.md +0 -20
- data/gems/websocket-extensions-0.1.3/README.md +0 -313
- data/gems/websocket-extensions-0.1.3/lib/websocket/extensions/parser.rb +0 -111
- data/gems/websocket-extensions-0.1.3/lib/websocket/extensions.rb +0 -181
- data/lib/kinetic_sdk/discussions/lib/websockets.rb +0 -96
@@ -0,0 +1,1345 @@
|
|
1
|
+
require_relative 'irb/slex'
|
2
|
+
|
3
|
+
module YARD
|
4
|
+
module Parser::Ruby::Legacy
|
5
|
+
# Legacy lexical tokenizer module.
|
6
|
+
module RubyToken
|
7
|
+
EXPR_BEG = :EXPR_BEG
|
8
|
+
EXPR_MID = :EXPR_MID
|
9
|
+
EXPR_END = :EXPR_END
|
10
|
+
EXPR_ARG = :EXPR_ARG
|
11
|
+
EXPR_FNAME = :EXPR_FNAME
|
12
|
+
EXPR_DOT = :EXPR_DOT
|
13
|
+
EXPR_CLASS = :EXPR_CLASS
|
14
|
+
|
15
|
+
# Represents a token in the Ruby lexer
|
16
|
+
class Token
|
17
|
+
# @return [Integer] the line number in the file/stream the token is
|
18
|
+
# located.
|
19
|
+
attr_reader :line_no
|
20
|
+
|
21
|
+
# @return [Integer] the character number in the file/stream the token
|
22
|
+
# is located.
|
23
|
+
attr_reader :char_no
|
24
|
+
|
25
|
+
# @return [String] the token text value
|
26
|
+
attr_reader :text
|
27
|
+
|
28
|
+
# @return [Symbol] the lexical state at the token
|
29
|
+
attr_accessor :lex_state
|
30
|
+
|
31
|
+
# @private
|
32
|
+
NO_TEXT = "??".freeze
|
33
|
+
|
34
|
+
# Creates a new Token object
|
35
|
+
# @param [Integer] line_no the line number to initialize the token to
|
36
|
+
# @param [Integer] char_no the char number to initialize the token to
|
37
|
+
def initialize(line_no, char_no)
|
38
|
+
@line_no = line_no
|
39
|
+
@char_no = char_no
|
40
|
+
@text = NO_TEXT
|
41
|
+
end
|
42
|
+
|
43
|
+
# Chainable way to sets the text attribute
|
44
|
+
#
|
45
|
+
# @param [String] text the new text
|
46
|
+
# @return [Token] this token object
|
47
|
+
def set_text(text)
|
48
|
+
@text = text
|
49
|
+
self
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
# Represents a block
|
54
|
+
class TkBlockContents < Token
|
55
|
+
def text; '...' end
|
56
|
+
end
|
57
|
+
|
58
|
+
# Represents an end statement
|
59
|
+
class TkStatementEnd < Token
|
60
|
+
def text; '' end
|
61
|
+
end
|
62
|
+
|
63
|
+
class TkNode < Token
|
64
|
+
attr :node
|
65
|
+
end
|
66
|
+
|
67
|
+
# Represents whitespace
|
68
|
+
class TkWhitespace < Token
|
69
|
+
end
|
70
|
+
|
71
|
+
# Represents a Ruby identifier
|
72
|
+
class TkId < Token
|
73
|
+
def initialize(line_no, char_no, name)
|
74
|
+
super(line_no, char_no)
|
75
|
+
@name = name
|
76
|
+
end
|
77
|
+
attr :name
|
78
|
+
end
|
79
|
+
|
80
|
+
# Represents a Ruby keyword
|
81
|
+
class TkKW < TkId
|
82
|
+
end
|
83
|
+
|
84
|
+
# Represents a Ruby value
|
85
|
+
class TkVal < Token
|
86
|
+
def initialize(line_no, char_no, value = nil)
|
87
|
+
super(line_no, char_no)
|
88
|
+
set_text(value)
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
class TkOp < Token
|
93
|
+
def name
|
94
|
+
self.class.op_name
|
95
|
+
end
|
96
|
+
end
|
97
|
+
|
98
|
+
class TkOPASGN < TkOp
|
99
|
+
def initialize(line_no, char_no, op)
|
100
|
+
super(line_no, char_no)
|
101
|
+
op = TkReading2Token[op] unless op.is_a?(Symbol)
|
102
|
+
@op = op
|
103
|
+
end
|
104
|
+
attr :op
|
105
|
+
end
|
106
|
+
|
107
|
+
class TkUnknownChar < Token
|
108
|
+
def initialize(line_no, char_no, _id)
|
109
|
+
super(line_no, char_no)
|
110
|
+
@name = char_no > 255 ? '?' : char_no.chr
|
111
|
+
end
|
112
|
+
attr :name
|
113
|
+
end
|
114
|
+
|
115
|
+
class TkError < Token
|
116
|
+
end
|
117
|
+
|
118
|
+
# @private
|
119
|
+
def set_token_position(line, char)
|
120
|
+
@prev_line_no = line
|
121
|
+
@prev_char_no = char
|
122
|
+
end
|
123
|
+
|
124
|
+
# @private
|
125
|
+
def Token(token, value = nil) # rubocop:disable Style/MethodName
|
126
|
+
tk = nil
|
127
|
+
case token
|
128
|
+
when String, Symbol
|
129
|
+
source = token.is_a?(String) ? TkReading2Token : TkSymbol2Token
|
130
|
+
if (tk = source[token]).nil?
|
131
|
+
raise "no key #{token}"
|
132
|
+
end
|
133
|
+
tk = Token(tk[0], value)
|
134
|
+
else
|
135
|
+
if token
|
136
|
+
tk = if (token.ancestors & [TkId, TkVal, TkOPASGN, TkUnknownChar]).empty?
|
137
|
+
token.new(@prev_line_no, @prev_char_no)
|
138
|
+
else
|
139
|
+
token.new(@prev_line_no, @prev_char_no, value)
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
tk
|
144
|
+
end
|
145
|
+
|
146
|
+
# @private
|
147
|
+
TokenDefinitions = [
|
148
|
+
[:TkCLASS, TkKW, "class", EXPR_CLASS],
|
149
|
+
[:TkMODULE, TkKW, "module", EXPR_BEG],
|
150
|
+
[:TkDEF, TkKW, "def", EXPR_FNAME],
|
151
|
+
[:TkUNDEF, TkKW, "undef", EXPR_FNAME],
|
152
|
+
[:TkBEGIN, TkKW, "begin", EXPR_BEG],
|
153
|
+
[:TkRESCUE, TkKW, "rescue", EXPR_MID],
|
154
|
+
[:TkENSURE, TkKW, "ensure", EXPR_BEG],
|
155
|
+
[:TkEND, TkKW, "end", EXPR_END],
|
156
|
+
[:TkIF, TkKW, "if", EXPR_BEG, :TkIF_MOD],
|
157
|
+
[:TkUNLESS, TkKW, "unless", EXPR_BEG, :TkUNLESS_MOD],
|
158
|
+
[:TkTHEN, TkKW, "then", EXPR_BEG],
|
159
|
+
[:TkELSIF, TkKW, "elsif", EXPR_BEG],
|
160
|
+
[:TkELSE, TkKW, "else", EXPR_BEG],
|
161
|
+
[:TkCASE, TkKW, "case", EXPR_BEG],
|
162
|
+
[:TkWHEN, TkKW, "when", EXPR_BEG],
|
163
|
+
[:TkWHILE, TkKW, "while", EXPR_BEG, :TkWHILE_MOD],
|
164
|
+
[:TkUNTIL, TkKW, "until", EXPR_BEG, :TkUNTIL_MOD],
|
165
|
+
[:TkFOR, TkKW, "for", EXPR_BEG],
|
166
|
+
[:TkBREAK, TkKW, "break", EXPR_END],
|
167
|
+
[:TkNEXT, TkKW, "next", EXPR_END],
|
168
|
+
[:TkREDO, TkKW, "redo", EXPR_END],
|
169
|
+
[:TkRETRY, TkKW, "retry", EXPR_END],
|
170
|
+
[:TkIN, TkKW, "in", EXPR_BEG],
|
171
|
+
[:TkDO, TkKW, "do", EXPR_BEG],
|
172
|
+
[:TkRETURN, TkKW, "return", EXPR_MID],
|
173
|
+
[:TkYIELD, TkKW, "yield", EXPR_END],
|
174
|
+
[:TkSUPER, TkKW, "super", EXPR_END],
|
175
|
+
[:TkSELF, TkKW, "self", EXPR_END],
|
176
|
+
[:TkNIL, TkKW, "nil", EXPR_END],
|
177
|
+
[:TkTRUE, TkKW, "true", EXPR_END],
|
178
|
+
[:TkFALSE, TkKW, "false", EXPR_END],
|
179
|
+
[:TkAND, TkKW, "and", EXPR_BEG],
|
180
|
+
[:TkOR, TkKW, "or", EXPR_BEG],
|
181
|
+
[:TkNOT, TkKW, "not", EXPR_BEG],
|
182
|
+
[:TkIF_MOD, TkKW],
|
183
|
+
[:TkUNLESS_MOD, TkKW],
|
184
|
+
[:TkWHILE_MOD, TkKW],
|
185
|
+
[:TkUNTIL_MOD, TkKW],
|
186
|
+
[:TkALIAS, TkKW, "alias", EXPR_FNAME],
|
187
|
+
[:TkDEFINED, TkKW, "defined?", EXPR_END],
|
188
|
+
[:TklBEGIN, TkKW, "BEGIN", EXPR_END],
|
189
|
+
[:TklEND, TkKW, "END", EXPR_END],
|
190
|
+
[:Tk__LINE__, TkKW, "__LINE__", EXPR_END],
|
191
|
+
[:Tk__FILE__, TkKW, "__FILE__", EXPR_END],
|
192
|
+
[:TkIDENTIFIER, TkId],
|
193
|
+
[:TkFID, TkId],
|
194
|
+
[:TkGVAR, TkId],
|
195
|
+
[:TkIVAR, TkId],
|
196
|
+
[:TkCONSTANT, TkId],
|
197
|
+
[:TkINTEGER, TkVal],
|
198
|
+
[:TkFLOAT, TkVal],
|
199
|
+
[:TkSYMBOL, TkVal],
|
200
|
+
[:TkLABEL, TkVal],
|
201
|
+
[:TkSTRING, TkVal],
|
202
|
+
[:TkXSTRING, TkVal],
|
203
|
+
[:TkREGEXP, TkVal],
|
204
|
+
[:TkCOMMENT, TkVal],
|
205
|
+
[:TkDSTRING, TkNode],
|
206
|
+
[:TkDXSTRING, TkNode],
|
207
|
+
[:TkDREGEXP, TkNode],
|
208
|
+
[:TkNTH_REF, TkId],
|
209
|
+
[:TkBACK_REF, TkId],
|
210
|
+
[:TkUPLUS, TkOp, "+@"],
|
211
|
+
[:TkUMINUS, TkOp, "-@"],
|
212
|
+
[:TkPOW, TkOp, "**"],
|
213
|
+
[:TkCMP, TkOp, "<=>"],
|
214
|
+
[:TkEQ, TkOp, "=="],
|
215
|
+
[:TkEQQ, TkOp, "==="],
|
216
|
+
[:TkNEQ, TkOp, "!="],
|
217
|
+
[:TkGEQ, TkOp, ">="],
|
218
|
+
[:TkLEQ, TkOp, "<="],
|
219
|
+
[:TkANDOP, TkOp, "&&"],
|
220
|
+
[:TkOROP, TkOp, "||"],
|
221
|
+
[:TkMATCH, TkOp, "=~"],
|
222
|
+
[:TkNMATCH, TkOp, "!~"],
|
223
|
+
[:TkDOT2, TkOp, ".."],
|
224
|
+
[:TkDOT3, TkOp, "..."],
|
225
|
+
[:TkAREF, TkOp, "[]"],
|
226
|
+
[:TkASET, TkOp, "[]="],
|
227
|
+
[:TkLSHFT, TkOp, "<<"],
|
228
|
+
[:TkRSHFT, TkOp, ">>"],
|
229
|
+
[:TkCOLON2, TkOp],
|
230
|
+
[:TkCOLON3, TkOp],
|
231
|
+
[:OPASGN, TkOp], # +=, -= etc. #
|
232
|
+
[:TkASSOC, TkOp, "=>"],
|
233
|
+
[:TkQUESTION, TkOp, "?"], #?
|
234
|
+
[:TkCOLON, TkOp, ":"], #:
|
235
|
+
[:TkSTAR], # *arg
|
236
|
+
[:TkAMPER], # &arg #
|
237
|
+
[:TkSYMBEG, TkId],
|
238
|
+
[:TkGT, TkOp, ">"],
|
239
|
+
[:TkLT, TkOp, "<"],
|
240
|
+
[:TkPLUS, TkOp, "+"],
|
241
|
+
[:TkMINUS, TkOp, "-"],
|
242
|
+
[:TkMULT, TkOp, "*"],
|
243
|
+
[:TkDIV, TkOp, "/"],
|
244
|
+
[:TkMOD, TkOp, "%"],
|
245
|
+
[:TkBITOR, TkOp, "|"],
|
246
|
+
[:TkBITXOR, TkOp, "^"],
|
247
|
+
[:TkBITAND, TkOp, "&"],
|
248
|
+
[:TkBITNOT, TkOp, "~"],
|
249
|
+
[:TkNOTOP, TkOp, "!"],
|
250
|
+
[:TkBACKQUOTE, TkOp, "`"],
|
251
|
+
[:TkASSIGN, Token, "="],
|
252
|
+
[:TkDOT, Token, "."],
|
253
|
+
[:TkLPAREN, Token, "("], # (exp)
|
254
|
+
[:TkLBRACK, Token, "["], # [arry]
|
255
|
+
[:TkLBRACE, Token, "{"], # {hash}
|
256
|
+
[:TkRPAREN, Token, ")"],
|
257
|
+
[:TkRBRACK, Token, "]"],
|
258
|
+
[:TkRBRACE, Token, "}"],
|
259
|
+
[:TkCOMMA, Token, ","],
|
260
|
+
[:TkSEMICOLON, Token, ";"],
|
261
|
+
[:TkSPACE, TkWhitespace],
|
262
|
+
[:TkNL, TkWhitespace],
|
263
|
+
[:TkEND_OF_SCRIPT, TkWhitespace],
|
264
|
+
[:TkBACKSLASH, TkUnknownChar, "\\"],
|
265
|
+
[:TkAT, TkUnknownChar, "@"],
|
266
|
+
[:TkDOLLAR, TkUnknownChar, "\$"]
|
267
|
+
]
|
268
|
+
|
269
|
+
# { reading => token_class }
|
270
|
+
# { reading => [token_class, *opt] }
|
271
|
+
TkReading2Token = {}
|
272
|
+
TkSymbol2Token = {}
|
273
|
+
|
274
|
+
# @private
|
275
|
+
def self.def_token(token_n, super_token = Token, reading = nil, *opts)
|
276
|
+
token_n = token_n.id2name unless token_n.is_a?(String)
|
277
|
+
if RubyToken.const_defined?(token_n)
|
278
|
+
# IRB.fail AlreadyDefinedToken, token_n
|
279
|
+
end
|
280
|
+
|
281
|
+
token_c = Class.new super_token
|
282
|
+
RubyToken.const_set token_n, token_c
|
283
|
+
# token_c.inspect
|
284
|
+
|
285
|
+
if reading
|
286
|
+
if TkReading2Token[reading]
|
287
|
+
raise "duplicate #{token_n} #{reading}"
|
288
|
+
end
|
289
|
+
if opts.empty?
|
290
|
+
TkReading2Token[reading] = [token_c]
|
291
|
+
else
|
292
|
+
TkReading2Token[reading] = [token_c].concat(opts)
|
293
|
+
end
|
294
|
+
end
|
295
|
+
TkSymbol2Token[token_n.intern] = token_c
|
296
|
+
|
297
|
+
if token_c <= TkOp
|
298
|
+
token_c.class_eval %{
|
299
|
+
def self.op_name; "#{reading}"; end
|
300
|
+
}
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
for defs in TokenDefinitions
|
305
|
+
def_token(*defs)
|
306
|
+
end
|
307
|
+
|
308
|
+
NEWLINE_TOKEN = TkNL.new(0, 0)
|
309
|
+
NEWLINE_TOKEN.set_text("\n")
|
310
|
+
end
|
311
|
+
|
312
|
+
# Lexical analyzer for Ruby source
|
313
|
+
# @private
|
314
|
+
class RubyLex
|
315
|
+
# Read an input stream character by character. We allow for unlimited
|
316
|
+
# ungetting of characters just read.
|
317
|
+
#
|
318
|
+
# We simplify the implementation greatly by reading the entire input
|
319
|
+
# into a buffer initially, and then simply traversing it using
|
320
|
+
# pointers.
|
321
|
+
#
|
322
|
+
# We also have to allow for the <i>here document diversion</i>. This
|
323
|
+
# little gem comes about when the lexer encounters a here
|
324
|
+
# document. At this point we effectively need to split the input
|
325
|
+
# stream into two parts: one to read the body of the here document,
|
326
|
+
# the other to read the rest of the input line where the here
|
327
|
+
# document was initially encountered. For example, we might have
|
328
|
+
#
|
329
|
+
# do_something(<<-A, <<-B)
|
330
|
+
# stuff
|
331
|
+
# for
|
332
|
+
# A
|
333
|
+
# stuff
|
334
|
+
# for
|
335
|
+
# B
|
336
|
+
#
|
337
|
+
# When the lexer encounters the <<A, it reads until the end of the
|
338
|
+
# line, and keeps it around for later. It then reads the body of the
|
339
|
+
# here document. Once complete, it needs to read the rest of the
|
340
|
+
# original line, but then skip the here document body.
|
341
|
+
#
|
342
|
+
# @private
|
343
|
+
class BufferedReader
|
344
|
+
attr_reader :line_num
|
345
|
+
|
346
|
+
def initialize(content)
|
347
|
+
if /\t/ =~ content
|
348
|
+
tab_width = 2
|
349
|
+
content = content.split(/\n/).map do |line|
|
350
|
+
1 while line.gsub!(/\t+/) { ' ' * (tab_width * $&.length - $`.length % tab_width) } && $~ #`
|
351
|
+
line
|
352
|
+
end .join("\n")
|
353
|
+
end
|
354
|
+
@content = String.new(content)
|
355
|
+
@content << "\n" unless @content[-1, 1] == "\n"
|
356
|
+
@size = @content.size
|
357
|
+
@offset = 0
|
358
|
+
@hwm = 0
|
359
|
+
@line_num = 1
|
360
|
+
@read_back_offset = 0
|
361
|
+
@last_newline = 0
|
362
|
+
@newline_pending = false
|
363
|
+
end
|
364
|
+
|
365
|
+
def column
|
366
|
+
@offset - @last_newline
|
367
|
+
end
|
368
|
+
|
369
|
+
def getc
|
370
|
+
return nil if @offset >= @size
|
371
|
+
ch = @content[@offset, 1]
|
372
|
+
|
373
|
+
@offset += 1
|
374
|
+
@hwm = @offset if @hwm < @offset
|
375
|
+
|
376
|
+
if @newline_pending
|
377
|
+
@line_num += 1
|
378
|
+
@last_newline = @offset - 1
|
379
|
+
@newline_pending = false
|
380
|
+
end
|
381
|
+
|
382
|
+
if ch == "\n"
|
383
|
+
@newline_pending = true
|
384
|
+
end
|
385
|
+
ch
|
386
|
+
end
|
387
|
+
|
388
|
+
def getc_already_read
|
389
|
+
getc
|
390
|
+
end
|
391
|
+
|
392
|
+
def ungetc(_ch)
|
393
|
+
raise "unget past beginning of file" if @offset <= 0
|
394
|
+
@offset -= 1
|
395
|
+
if @content[@offset] == ?\n
|
396
|
+
@newline_pending = false
|
397
|
+
end
|
398
|
+
end
|
399
|
+
|
400
|
+
def get_read
|
401
|
+
res = @content[@read_back_offset...@offset]
|
402
|
+
@read_back_offset = @offset
|
403
|
+
res
|
404
|
+
end
|
405
|
+
|
406
|
+
def peek(at)
|
407
|
+
pos = @offset + at
|
408
|
+
if pos >= @size
|
409
|
+
nil
|
410
|
+
else
|
411
|
+
@content[pos, 1]
|
412
|
+
end
|
413
|
+
end
|
414
|
+
|
415
|
+
def peek_equal(str)
|
416
|
+
@content[@offset, str.length] == str
|
417
|
+
end
|
418
|
+
|
419
|
+
def divert_read_from(reserve)
|
420
|
+
@content[@offset, 0] = reserve
|
421
|
+
@size = @content.size
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
# end of nested class BufferedReader
|
426
|
+
|
427
|
+
include RubyToken
|
428
|
+
include IRB
|
429
|
+
|
430
|
+
attr_reader :continue
|
431
|
+
attr_reader :lex_state
|
432
|
+
|
433
|
+
def self.debug?
|
434
|
+
false
|
435
|
+
end
|
436
|
+
|
437
|
+
def initialize(content)
|
438
|
+
lex_init
|
439
|
+
|
440
|
+
@reader = BufferedReader.new(content)
|
441
|
+
|
442
|
+
@exp_line_no = @line_no = 1
|
443
|
+
@base_char_no = 0
|
444
|
+
@indent = 0
|
445
|
+
|
446
|
+
@ltype = nil
|
447
|
+
@quoted = nil
|
448
|
+
@lex_state = EXPR_BEG
|
449
|
+
@space_seen = false
|
450
|
+
|
451
|
+
@continue = false
|
452
|
+
@line = ""
|
453
|
+
|
454
|
+
@skip_space = false
|
455
|
+
@read_auto_clean_up = false
|
456
|
+
@exception_on_syntax_error = true
|
457
|
+
|
458
|
+
@colonblock_seen = false
|
459
|
+
end
|
460
|
+
|
461
|
+
attr_accessor :skip_space
|
462
|
+
attr_accessor :read_auto_clean_up
|
463
|
+
attr_accessor :exception_on_syntax_error
|
464
|
+
|
465
|
+
attr :indent
|
466
|
+
|
467
|
+
# io functions
|
468
|
+
def line_no
|
469
|
+
@reader.line_num
|
470
|
+
end
|
471
|
+
|
472
|
+
def char_no
|
473
|
+
@reader.column
|
474
|
+
end
|
475
|
+
|
476
|
+
def get_read
|
477
|
+
@reader.get_read
|
478
|
+
end
|
479
|
+
|
480
|
+
def getc
|
481
|
+
@reader.getc
|
482
|
+
end
|
483
|
+
|
484
|
+
def getc_of_rests
|
485
|
+
@reader.getc_already_read
|
486
|
+
end
|
487
|
+
|
488
|
+
def gets
|
489
|
+
(c = getc) || return
|
490
|
+
l = ""
|
491
|
+
begin
|
492
|
+
l.concat c unless c == "\r"
|
493
|
+
break if c == "\n"
|
494
|
+
end while c = getc # rubocop:disable Lint/Loop
|
495
|
+
l
|
496
|
+
end
|
497
|
+
|
498
|
+
def ungetc(c = nil)
|
499
|
+
@reader.ungetc(c)
|
500
|
+
end
|
501
|
+
|
502
|
+
def peek_equal?(str)
|
503
|
+
@reader.peek_equal(str)
|
504
|
+
end
|
505
|
+
|
506
|
+
def peek(i = 0)
|
507
|
+
@reader.peek(i)
|
508
|
+
end
|
509
|
+
|
510
|
+
def lex
|
511
|
+
catch(:eof) do
|
512
|
+
until ((tk = token).is_a?(TkNL) || tk.is_a?(TkEND_OF_SCRIPT)) &&
|
513
|
+
!@continue ||
|
514
|
+
tk.nil?
|
515
|
+
end
|
516
|
+
line = get_read
|
517
|
+
|
518
|
+
if line == "" && tk.is_a?(TkEND_OF_SCRIPT) || tk.nil?
|
519
|
+
nil
|
520
|
+
else
|
521
|
+
line
|
522
|
+
end
|
523
|
+
end
|
524
|
+
end
|
525
|
+
|
526
|
+
def token
|
527
|
+
set_token_position(line_no, char_no)
|
528
|
+
catch(:eof) do
|
529
|
+
begin
|
530
|
+
begin
|
531
|
+
tk = @OP.match(self)
|
532
|
+
@space_seen = tk.is_a?(TkSPACE)
|
533
|
+
rescue SyntaxError
|
534
|
+
abort if @exception_on_syntax_error
|
535
|
+
tk = TkError.new(line_no, char_no)
|
536
|
+
end
|
537
|
+
end while @skip_space && tk.is_a?(TkSPACE)
|
538
|
+
if @read_auto_clean_up
|
539
|
+
get_read
|
540
|
+
end
|
541
|
+
# throw :eof unless tk
|
542
|
+
p tk if $DEBUG
|
543
|
+
tk.lex_state = lex_state if tk
|
544
|
+
tk
|
545
|
+
end
|
546
|
+
end
|
547
|
+
|
548
|
+
ENINDENT_CLAUSE = [
|
549
|
+
"case", "class", "def", "do", "for", "if",
|
550
|
+
"module", "unless", "until", "while", "begin"
|
551
|
+
] #, "when"
|
552
|
+
ACCEPTS_COLON = ["if", "for", "unless", "until", "while"]
|
553
|
+
DEINDENT_CLAUSE = ["end"] #, "when"
|
554
|
+
|
555
|
+
PERCENT_LTYPE = {
|
556
|
+
"q" => "\'",
|
557
|
+
"Q" => "\"",
|
558
|
+
"x" => "\`",
|
559
|
+
"r" => "/",
|
560
|
+
"w" => "]",
|
561
|
+
"W" => "]"
|
562
|
+
}
|
563
|
+
|
564
|
+
PERCENT_PAREN = {
|
565
|
+
"{" => "}",
|
566
|
+
"[" => "]",
|
567
|
+
"<" => ">",
|
568
|
+
"(" => ")"
|
569
|
+
}
|
570
|
+
|
571
|
+
Ltype2Token = {
|
572
|
+
"\'" => TkSTRING,
|
573
|
+
"\"" => TkSTRING,
|
574
|
+
"\`" => TkXSTRING,
|
575
|
+
"/" => TkREGEXP,
|
576
|
+
"]" => TkDSTRING
|
577
|
+
}
|
578
|
+
Ltype2Token.default = TkSTRING
|
579
|
+
|
580
|
+
DLtype2Token = {
|
581
|
+
"\"" => TkDSTRING,
|
582
|
+
"\`" => TkDXSTRING,
|
583
|
+
"/" => TkDREGEXP
|
584
|
+
}
|
585
|
+
|
586
|
+
def lex_init()
|
587
|
+
@OP = SLex.new
|
588
|
+
@OP.def_rules("\0", "\004", "\032") do |chars, _io|
|
589
|
+
Token(TkEND_OF_SCRIPT).set_text(chars)
|
590
|
+
end
|
591
|
+
|
592
|
+
@OP.def_rules(" ", "\t", "\f", "\r", "\13") do |chars, _io|
|
593
|
+
@space_seen = true
|
594
|
+
while (ch = getc) =~ /[ \t\f\r\13]/
|
595
|
+
chars << ch
|
596
|
+
end
|
597
|
+
ungetc
|
598
|
+
Token(TkSPACE).set_text(chars)
|
599
|
+
end
|
600
|
+
|
601
|
+
@OP.def_rule("#") do |_op, _io|
|
602
|
+
identify_comment
|
603
|
+
end
|
604
|
+
|
605
|
+
@OP.def_rule("=begin", proc { @prev_char_no == 0 && peek(0) =~ /\s/ }) do |op, _io|
|
606
|
+
str = String.new(op)
|
607
|
+
@ltype = "="
|
608
|
+
|
609
|
+
begin
|
610
|
+
line = String.new
|
611
|
+
begin
|
612
|
+
ch = getc
|
613
|
+
line << ch
|
614
|
+
end until ch == "\n"
|
615
|
+
str << line
|
616
|
+
end until line =~ /^=end/
|
617
|
+
|
618
|
+
ungetc
|
619
|
+
|
620
|
+
@ltype = nil
|
621
|
+
|
622
|
+
if str =~ /\A=begin\s+rdoc/i
|
623
|
+
str.sub!(/\A=begin.*\n/, '')
|
624
|
+
str.sub!(/^=end.*/m, '')
|
625
|
+
Token(TkCOMMENT).set_text(str)
|
626
|
+
else
|
627
|
+
Token(TkCOMMENT).set_text(str)
|
628
|
+
end
|
629
|
+
end
|
630
|
+
|
631
|
+
@OP.def_rule("\n") do
|
632
|
+
print "\\n\n" if RubyLex.debug?
|
633
|
+
@colonblock_seen = false
|
634
|
+
case @lex_state
|
635
|
+
when EXPR_BEG, EXPR_FNAME, EXPR_DOT
|
636
|
+
@continue = true
|
637
|
+
else
|
638
|
+
@continue = false
|
639
|
+
@lex_state = EXPR_BEG
|
640
|
+
end
|
641
|
+
Token(TkNL).set_text("\n")
|
642
|
+
end
|
643
|
+
|
644
|
+
@OP.def_rules("*", "**",
|
645
|
+
"!", "!=", "!~",
|
646
|
+
"=", "==", "===",
|
647
|
+
"=~", "<=>",
|
648
|
+
"<", "<=",
|
649
|
+
">", ">=", ">>") do |op, _io|
|
650
|
+
@lex_state = EXPR_BEG
|
651
|
+
Token(op).set_text(op)
|
652
|
+
end
|
653
|
+
|
654
|
+
@OP.def_rules("<<") do |op, _io|
|
655
|
+
tk = nil
|
656
|
+
if @lex_state != EXPR_END && @lex_state != EXPR_CLASS &&
|
657
|
+
(@lex_state != EXPR_ARG || @space_seen)
|
658
|
+
c = peek(0)
|
659
|
+
tk = identify_here_document if /[-\w\"\'\`]/ =~ c
|
660
|
+
end
|
661
|
+
if !tk
|
662
|
+
@lex_state = EXPR_BEG
|
663
|
+
tk = Token(op).set_text(op)
|
664
|
+
end
|
665
|
+
tk
|
666
|
+
end
|
667
|
+
|
668
|
+
@OP.def_rules("'", '"') do |op, _io|
|
669
|
+
identify_string(op)
|
670
|
+
end
|
671
|
+
|
672
|
+
@OP.def_rules("`") do |op, _io|
|
673
|
+
if @lex_state == EXPR_FNAME
|
674
|
+
Token(op).set_text(op)
|
675
|
+
else
|
676
|
+
identify_string(op)
|
677
|
+
end
|
678
|
+
end
|
679
|
+
|
680
|
+
@OP.def_rules('?') do |op, _io|
|
681
|
+
if @lex_state == EXPR_END
|
682
|
+
@lex_state = EXPR_BEG
|
683
|
+
Token(TkQUESTION).set_text(op)
|
684
|
+
else
|
685
|
+
ch = getc
|
686
|
+
if @lex_state == EXPR_ARG && ch !~ /\s/
|
687
|
+
ungetc
|
688
|
+
@lex_state = EXPR_BEG
|
689
|
+
Token(TkQUESTION).set_text(op)
|
690
|
+
else
|
691
|
+
str = String.new(op)
|
692
|
+
str << ch
|
693
|
+
if ch == '\\' #'
|
694
|
+
str << read_escape
|
695
|
+
end
|
696
|
+
@lex_state = EXPR_END
|
697
|
+
Token(TkINTEGER).set_text(str)
|
698
|
+
end
|
699
|
+
end
|
700
|
+
end
|
701
|
+
|
702
|
+
@OP.def_rules("&", "&&", "|", "||") do |op, _io|
|
703
|
+
@lex_state = EXPR_BEG
|
704
|
+
Token(op).set_text(op)
|
705
|
+
end
|
706
|
+
|
707
|
+
@OP.def_rules("+=", "-=", "*=", "**=",
|
708
|
+
"&=", "|=", "^=", "<<=", ">>=", "||=", "&&=") do |op, _io|
|
709
|
+
@lex_state = EXPR_BEG
|
710
|
+
op =~ /^(.*)=$/
|
711
|
+
Token(TkOPASGN, $1).set_text(op)
|
712
|
+
end
|
713
|
+
|
714
|
+
@OP.def_rule("+@", proc { @lex_state == EXPR_FNAME }) do |op, _io|
|
715
|
+
Token(TkUPLUS).set_text(op)
|
716
|
+
end
|
717
|
+
|
718
|
+
@OP.def_rule("-@", proc { @lex_state == EXPR_FNAME }) do |op, _io|
|
719
|
+
Token(TkUMINUS).set_text(op)
|
720
|
+
end
|
721
|
+
|
722
|
+
@OP.def_rules("+", "-") do |op, _io|
|
723
|
+
catch(:RET) do
|
724
|
+
if @lex_state == EXPR_ARG
|
725
|
+
if @space_seen && peek(0) =~ /[0-9]/
|
726
|
+
throw :RET, identify_number(op)
|
727
|
+
else
|
728
|
+
@lex_state = EXPR_BEG
|
729
|
+
end
|
730
|
+
elsif @lex_state != EXPR_END && peek(0) =~ /[0-9]/
|
731
|
+
throw :RET, identify_number(op)
|
732
|
+
else
|
733
|
+
@lex_state = EXPR_BEG
|
734
|
+
end
|
735
|
+
Token(op).set_text(op)
|
736
|
+
end
|
737
|
+
end
|
738
|
+
|
739
|
+
@OP.def_rule(".") do
|
740
|
+
@lex_state = EXPR_BEG
|
741
|
+
if peek(0) =~ /[0-9]/
|
742
|
+
ungetc
|
743
|
+
identify_number("")
|
744
|
+
else
|
745
|
+
# for obj.if
|
746
|
+
@lex_state = EXPR_DOT
|
747
|
+
Token(TkDOT).set_text(".")
|
748
|
+
end
|
749
|
+
end
|
750
|
+
|
751
|
+
@OP.def_rules("..", "...") do |op, _io|
|
752
|
+
@lex_state = EXPR_BEG
|
753
|
+
Token(op).set_text(op)
|
754
|
+
end
|
755
|
+
|
756
|
+
lex_int2
|
757
|
+
end
|
758
|
+
|
759
|
+
def lex_int2
|
760
|
+
@OP.def_rules("]", "}", ")") do |op, _io|
|
761
|
+
@lex_state = EXPR_END
|
762
|
+
@indent -= 1
|
763
|
+
Token(op).set_text(op)
|
764
|
+
end
|
765
|
+
|
766
|
+
@OP.def_rule(":") do
|
767
|
+
if (@colonblock_seen && @lex_state != EXPR_BEG) || peek(0) =~ /\s/
|
768
|
+
@lex_state = EXPR_BEG
|
769
|
+
tk = Token(TkCOLON)
|
770
|
+
else
|
771
|
+
@lex_state = EXPR_FNAME
|
772
|
+
tk = Token(TkSYMBEG)
|
773
|
+
end
|
774
|
+
tk.set_text(":")
|
775
|
+
end
|
776
|
+
|
777
|
+
@OP.def_rule("::") do
|
778
|
+
# p @lex_state.id2name, @space_seen
|
779
|
+
if @lex_state == EXPR_BEG || @lex_state == EXPR_ARG && @space_seen
|
780
|
+
@lex_state = EXPR_BEG
|
781
|
+
tk = Token(TkCOLON3)
|
782
|
+
else
|
783
|
+
@lex_state = EXPR_DOT
|
784
|
+
tk = Token(TkCOLON2)
|
785
|
+
end
|
786
|
+
tk.set_text("::")
|
787
|
+
end
|
788
|
+
|
789
|
+
@OP.def_rule("/") do |op, _io|
|
790
|
+
if @lex_state == EXPR_BEG || @lex_state == EXPR_MID
|
791
|
+
identify_string(op)
|
792
|
+
elsif peek(0) == '='
|
793
|
+
getc
|
794
|
+
@lex_state = EXPR_BEG
|
795
|
+
Token(TkOPASGN, :/).set_text("/=") #")
|
796
|
+
elsif @lex_state == EXPR_ARG && @space_seen && peek(0) !~ /\s/
|
797
|
+
identify_string(op)
|
798
|
+
else
|
799
|
+
@lex_state = EXPR_BEG
|
800
|
+
Token("/").set_text(op)
|
801
|
+
end
|
802
|
+
end
|
803
|
+
|
804
|
+
@OP.def_rules("^") do
|
805
|
+
@lex_state = EXPR_BEG
|
806
|
+
Token("^").set_text("^")
|
807
|
+
end
|
808
|
+
|
809
|
+
# @OP.def_rules("^=") do
|
810
|
+
# @lex_state = EXPR_BEG
|
811
|
+
# Token(TkOPASGN, :^)
|
812
|
+
# end
|
813
|
+
|
814
|
+
@OP.def_rules(",", ";") do |op, _io|
|
815
|
+
@colonblock_seen = false
|
816
|
+
@lex_state = EXPR_BEG
|
817
|
+
Token(op).set_text(op)
|
818
|
+
end
|
819
|
+
|
820
|
+
@OP.def_rule("~") do
|
821
|
+
@lex_state = EXPR_BEG
|
822
|
+
Token("~").set_text("~")
|
823
|
+
end
|
824
|
+
|
825
|
+
@OP.def_rule("~@", proc { @lex_state = EXPR_FNAME }) do
|
826
|
+
@lex_state = EXPR_BEG
|
827
|
+
Token("~").set_text("~@")
|
828
|
+
end
|
829
|
+
|
830
|
+
@OP.def_rule("(") do
|
831
|
+
@indent += 1
|
832
|
+
# if @lex_state == EXPR_BEG || @lex_state == EXPR_MID
|
833
|
+
# @lex_state = EXPR_BEG
|
834
|
+
# tk = Token(TkfLPAREN)
|
835
|
+
# else
|
836
|
+
@lex_state = EXPR_BEG
|
837
|
+
tk = Token(TkLPAREN)
|
838
|
+
# end
|
839
|
+
tk.set_text("(")
|
840
|
+
end
|
841
|
+
|
842
|
+
@OP.def_rule("[]", proc { @lex_state == EXPR_FNAME }) do
|
843
|
+
Token("[]").set_text("[]")
|
844
|
+
end
|
845
|
+
|
846
|
+
@OP.def_rule("[]=", proc { @lex_state == EXPR_FNAME }) do
|
847
|
+
Token("[]=").set_text("[]=")
|
848
|
+
end
|
849
|
+
|
850
|
+
@OP.def_rule("[") do
|
851
|
+
@indent += 1
|
852
|
+
# if @lex_state == EXPR_FNAME
|
853
|
+
# t = Token(TkfLBRACK)
|
854
|
+
# else
|
855
|
+
# if @lex_state == EXPR_BEG || @lex_state == EXPR_MID
|
856
|
+
# t = Token(TkLBRACK)
|
857
|
+
# elsif @lex_state == EXPR_ARG && @space_seen
|
858
|
+
# else
|
859
|
+
# t = Token(TkfLBRACK)
|
860
|
+
# end
|
861
|
+
# end
|
862
|
+
t = Token(TkLBRACK)
|
863
|
+
@lex_state = EXPR_BEG
|
864
|
+
t.set_text("[")
|
865
|
+
end
|
866
|
+
|
867
|
+
@OP.def_rule("{") do
|
868
|
+
@indent += 1
|
869
|
+
# if @lex_state != EXPR_END && @lex_state != EXPR_ARG
|
870
|
+
# t = Token(TkLBRACE)
|
871
|
+
# else
|
872
|
+
# t = Token(TkfLBRACE)
|
873
|
+
# end
|
874
|
+
t = Token(TkLBRACE)
|
875
|
+
@lex_state = EXPR_BEG
|
876
|
+
t.set_text("{")
|
877
|
+
end
|
878
|
+
|
879
|
+
@OP.def_rule('\\') do #'
|
880
|
+
if getc == "\n"
|
881
|
+
@space_seen = true
|
882
|
+
@continue = true
|
883
|
+
Token(TkSPACE).set_text("\\\n")
|
884
|
+
else
|
885
|
+
ungetc
|
886
|
+
Token("\\").set_text("\\") #"
|
887
|
+
end
|
888
|
+
end
|
889
|
+
|
890
|
+
@OP.def_rule('%') do |_op, _io|
|
891
|
+
if @lex_state == EXPR_BEG || @lex_state == EXPR_MID
|
892
|
+
identify_quotation('%')
|
893
|
+
elsif peek(0) == '='
|
894
|
+
getc
|
895
|
+
Token(TkOPASGN, "%").set_text("%=")
|
896
|
+
elsif @lex_state == EXPR_ARG && @space_seen && peek(0) !~ /\s/
|
897
|
+
identify_quotation('%')
|
898
|
+
else
|
899
|
+
@lex_state = EXPR_BEG
|
900
|
+
Token("%").set_text("%")
|
901
|
+
end
|
902
|
+
end
|
903
|
+
|
904
|
+
@OP.def_rule('$') do #'
|
905
|
+
identify_gvar
|
906
|
+
end
|
907
|
+
|
908
|
+
@OP.def_rule('@') do
|
909
|
+
if peek(0) =~ /[@\w]/
|
910
|
+
ungetc
|
911
|
+
identify_identifier
|
912
|
+
else
|
913
|
+
Token("@").set_text("@")
|
914
|
+
end
|
915
|
+
end
|
916
|
+
|
917
|
+
# @OP.def_rule("def", proc{|op, io| /\s/ =~ io.peek(0)}) do
|
918
|
+
# |op, io|
|
919
|
+
# @indent += 1
|
920
|
+
# @lex_state = EXPR_FNAME
|
921
|
+
# # @lex_state = EXPR_END
|
922
|
+
# # until @rests[0] == "\n" or @rests[0] == ";"
|
923
|
+
# # rests.shift
|
924
|
+
# # end
|
925
|
+
# end
|
926
|
+
|
927
|
+
@OP.def_rule("__END__", proc { @prev_char_no == 0 && peek(0) =~ /[\r\n]/ }) do
|
928
|
+
throw :eof
|
929
|
+
end
|
930
|
+
|
931
|
+
@OP.def_rule("") do |op, io|
|
932
|
+
printf "MATCH: start %s: %s\n", op, io.inspect if RubyLex.debug?
|
933
|
+
if peek(0) =~ /[0-9]/
|
934
|
+
t = identify_number("")
|
935
|
+
elsif peek(0) =~ /[\w]/
|
936
|
+
t = identify_identifier
|
937
|
+
end
|
938
|
+
printf "MATCH: end %s: %s\n", op, io.inspect if RubyLex.debug?
|
939
|
+
t
|
940
|
+
end
|
941
|
+
|
942
|
+
p @OP if RubyLex.debug?
|
943
|
+
end
|
944
|
+
|
945
|
+
def identify_gvar
|
946
|
+
@lex_state = EXPR_END
|
947
|
+
str = String.new("$")
|
948
|
+
|
949
|
+
tk = case ch = getc
|
950
|
+
when %r{[~_*$?!@/\\;,=:<>".]}
|
951
|
+
str << ch
|
952
|
+
Token(TkGVAR, str)
|
953
|
+
|
954
|
+
when "-"
|
955
|
+
str << "-" << getc
|
956
|
+
Token(TkGVAR, str)
|
957
|
+
|
958
|
+
when "&", "`", "'", "+"
|
959
|
+
str << ch
|
960
|
+
Token(TkBACK_REF, str)
|
961
|
+
|
962
|
+
when /[1-9]/
|
963
|
+
str << ch
|
964
|
+
while (ch = getc) =~ /[0-9]/
|
965
|
+
str << ch
|
966
|
+
end
|
967
|
+
ungetc
|
968
|
+
Token(TkNTH_REF)
|
969
|
+
when /\w/
|
970
|
+
ungetc
|
971
|
+
ungetc
|
972
|
+
return identify_identifier
|
973
|
+
else
|
974
|
+
ungetc
|
975
|
+
Token("$")
|
976
|
+
end
|
977
|
+
tk.set_text(str)
|
978
|
+
end
|
979
|
+
|
980
|
+
def identify_identifier
|
981
|
+
token = ""
|
982
|
+
token.concat getc if peek(0) =~ /[$@]/
|
983
|
+
token.concat getc if peek(0) == "@"
|
984
|
+
|
985
|
+
while (ch = getc) =~ /\w|_/
|
986
|
+
print ":", ch, ":" if RubyLex.debug?
|
987
|
+
token.concat ch
|
988
|
+
end
|
989
|
+
ungetc
|
990
|
+
|
991
|
+
if ch == "!" || ch == "?"
|
992
|
+
token.concat getc
|
993
|
+
end
|
994
|
+
# fix token
|
995
|
+
|
996
|
+
# $stderr.puts "identifier - #{token}, state = #@lex_state"
|
997
|
+
|
998
|
+
case token
|
999
|
+
when /^\$/
|
1000
|
+
return Token(TkGVAR, token).set_text(token)
|
1001
|
+
when /^\@/
|
1002
|
+
@lex_state = EXPR_END
|
1003
|
+
return Token(TkIVAR, token).set_text(token)
|
1004
|
+
end
|
1005
|
+
|
1006
|
+
if @lex_state != EXPR_DOT
|
1007
|
+
print token, "\n" if RubyLex.debug?
|
1008
|
+
|
1009
|
+
token_c, *trans = TkReading2Token[token]
|
1010
|
+
if token_c
|
1011
|
+
# reserved word?
|
1012
|
+
|
1013
|
+
if @lex_state != EXPR_BEG &&
|
1014
|
+
@lex_state != EXPR_FNAME &&
|
1015
|
+
trans[1]
|
1016
|
+
# modifiers
|
1017
|
+
token_c = TkSymbol2Token[trans[1]]
|
1018
|
+
@lex_state = trans[0]
|
1019
|
+
else
|
1020
|
+
if @lex_state != EXPR_FNAME
|
1021
|
+
if ENINDENT_CLAUSE.include?(token)
|
1022
|
+
@indent += 1
|
1023
|
+
|
1024
|
+
if ACCEPTS_COLON.include?(token)
|
1025
|
+
@colonblock_seen = true
|
1026
|
+
else
|
1027
|
+
@colonblock_seen = false
|
1028
|
+
end
|
1029
|
+
elsif DEINDENT_CLAUSE.include?(token)
|
1030
|
+
@indent -= 1
|
1031
|
+
@colonblock_seen = false
|
1032
|
+
end
|
1033
|
+
@lex_state = trans[0]
|
1034
|
+
else
|
1035
|
+
@lex_state = EXPR_END
|
1036
|
+
end
|
1037
|
+
end
|
1038
|
+
return Token(token_c, token).set_text(token)
|
1039
|
+
end
|
1040
|
+
end
|
1041
|
+
|
1042
|
+
if @lex_state == EXPR_FNAME
|
1043
|
+
@lex_state = EXPR_END
|
1044
|
+
if peek(0) == '='
|
1045
|
+
token.concat getc
|
1046
|
+
end
|
1047
|
+
elsif @lex_state == EXPR_BEG || @lex_state == EXPR_DOT
|
1048
|
+
@lex_state = EXPR_ARG
|
1049
|
+
else
|
1050
|
+
@lex_state = EXPR_END
|
1051
|
+
end
|
1052
|
+
|
1053
|
+
if token[0, 1] =~ /[A-Z]/
|
1054
|
+
return Token(TkCONSTANT, token).set_text(token)
|
1055
|
+
elsif token[token.size - 1, 1] =~ /[!?]/
|
1056
|
+
return Token(TkFID, token).set_text(token)
|
1057
|
+
else
|
1058
|
+
return Token(TkIDENTIFIER, token).set_text(token)
|
1059
|
+
end
|
1060
|
+
end
|
1061
|
+
|
1062
|
+
def identify_here_document
|
1063
|
+
ch = getc
|
1064
|
+
if ch == "-"
|
1065
|
+
ch = getc
|
1066
|
+
indent = true
|
1067
|
+
end
|
1068
|
+
if /['"`]/ =~ ch # '
|
1069
|
+
lt = ch
|
1070
|
+
quoted = ""
|
1071
|
+
while (c = getc) && c != lt
|
1072
|
+
quoted.concat c
|
1073
|
+
end
|
1074
|
+
else
|
1075
|
+
lt = '"'
|
1076
|
+
quoted = ch.dup
|
1077
|
+
while (c = getc) && c =~ /\w/
|
1078
|
+
quoted.concat c
|
1079
|
+
end
|
1080
|
+
ungetc
|
1081
|
+
end
|
1082
|
+
|
1083
|
+
ltback, @ltype = @ltype, lt
|
1084
|
+
reserve = String.new
|
1085
|
+
|
1086
|
+
while ch = getc
|
1087
|
+
reserve << ch
|
1088
|
+
if ch == "\\" #"
|
1089
|
+
ch = getc
|
1090
|
+
reserve << ch
|
1091
|
+
elsif ch == "\n"
|
1092
|
+
break
|
1093
|
+
end
|
1094
|
+
end
|
1095
|
+
|
1096
|
+
str = String.new
|
1097
|
+
while (l = gets)
|
1098
|
+
l.chomp!
|
1099
|
+
l.strip! if indent
|
1100
|
+
break if l == quoted
|
1101
|
+
str << l.chomp << "\n"
|
1102
|
+
end
|
1103
|
+
|
1104
|
+
@reader.divert_read_from(reserve)
|
1105
|
+
|
1106
|
+
@ltype = ltback
|
1107
|
+
@lex_state = EXPR_END
|
1108
|
+
Token(Ltype2Token[lt], str).set_text(str.dump)
|
1109
|
+
end
|
1110
|
+
|
1111
|
+
def identify_quotation(initial_char)
|
1112
|
+
ch = getc
|
1113
|
+
if lt = PERCENT_LTYPE[ch]
|
1114
|
+
initial_char += ch
|
1115
|
+
ch = getc
|
1116
|
+
elsif ch =~ /\W/
|
1117
|
+
lt = "\""
|
1118
|
+
else
|
1119
|
+
# RubyLex.fail SyntaxError, "unknown type of %string ('#{ch}')"
|
1120
|
+
end
|
1121
|
+
# if ch !~ /\W/
|
1122
|
+
# ungetc
|
1123
|
+
# next
|
1124
|
+
# end
|
1125
|
+
# @ltype = lt
|
1126
|
+
@quoted = ch unless @quoted = PERCENT_PAREN[ch]
|
1127
|
+
identify_string(lt, @quoted, ch, initial_char) if lt
|
1128
|
+
end
|
1129
|
+
|
1130
|
+
def identify_number(start)
|
1131
|
+
str = start.dup
|
1132
|
+
|
1133
|
+
if start == "+" || start == "-" || start == ""
|
1134
|
+
start = getc
|
1135
|
+
str << start
|
1136
|
+
end
|
1137
|
+
|
1138
|
+
@lex_state = EXPR_END
|
1139
|
+
|
1140
|
+
if start == "0"
|
1141
|
+
if peek(0) == "x"
|
1142
|
+
ch = getc
|
1143
|
+
str << ch
|
1144
|
+
match = /[0-9a-f_]/
|
1145
|
+
else
|
1146
|
+
match = /[0-7_]/
|
1147
|
+
end
|
1148
|
+
while ch = getc
|
1149
|
+
if ch !~ match
|
1150
|
+
ungetc
|
1151
|
+
break
|
1152
|
+
else
|
1153
|
+
str << ch
|
1154
|
+
end
|
1155
|
+
end
|
1156
|
+
return Token(TkINTEGER).set_text(str)
|
1157
|
+
end
|
1158
|
+
|
1159
|
+
type = TkINTEGER
|
1160
|
+
allow_point = true
|
1161
|
+
allow_e = true
|
1162
|
+
while ch = getc
|
1163
|
+
case ch
|
1164
|
+
when /[0-9_]/
|
1165
|
+
str << ch
|
1166
|
+
|
1167
|
+
when allow_point && "."
|
1168
|
+
type = TkFLOAT
|
1169
|
+
if peek(0) !~ /[0-9]/
|
1170
|
+
ungetc
|
1171
|
+
break
|
1172
|
+
end
|
1173
|
+
str << ch
|
1174
|
+
allow_point = false
|
1175
|
+
|
1176
|
+
when allow_e && "e", allow_e && "E"
|
1177
|
+
str << ch
|
1178
|
+
type = TkFLOAT
|
1179
|
+
if peek(0) =~ /[+-]/
|
1180
|
+
str << getc
|
1181
|
+
end
|
1182
|
+
allow_e = false
|
1183
|
+
allow_point = false
|
1184
|
+
else
|
1185
|
+
ungetc
|
1186
|
+
break
|
1187
|
+
end
|
1188
|
+
end
|
1189
|
+
Token(type).set_text(str)
|
1190
|
+
end
|
1191
|
+
|
1192
|
+
def identify_string(ltype, quoted = ltype, opener = nil, initial_char = nil)
|
1193
|
+
@ltype = ltype
|
1194
|
+
@quoted = quoted
|
1195
|
+
subtype = nil
|
1196
|
+
|
1197
|
+
str = String.new
|
1198
|
+
str << initial_char if initial_char
|
1199
|
+
str << (opener || quoted)
|
1200
|
+
|
1201
|
+
nest = 0
|
1202
|
+
begin
|
1203
|
+
while ch = getc
|
1204
|
+
str << ch
|
1205
|
+
if @quoted == ch
|
1206
|
+
if nest == 0
|
1207
|
+
break
|
1208
|
+
else
|
1209
|
+
nest -= 1
|
1210
|
+
end
|
1211
|
+
elsif opener == ch
|
1212
|
+
nest += 1
|
1213
|
+
elsif @ltype != "'" && @ltype != "]" && ch == "#"
|
1214
|
+
ch = getc
|
1215
|
+
if ch == "{"
|
1216
|
+
subtype = true
|
1217
|
+
str << ch << skip_inner_expression
|
1218
|
+
else
|
1219
|
+
ungetc(ch)
|
1220
|
+
end
|
1221
|
+
elsif ch == '\\' #'
|
1222
|
+
str << read_escape
|
1223
|
+
end
|
1224
|
+
end
|
1225
|
+
if @ltype == "/"
|
1226
|
+
if peek(0) =~ /i|o|n|e|s/
|
1227
|
+
str << getc
|
1228
|
+
end
|
1229
|
+
end
|
1230
|
+
if subtype
|
1231
|
+
Token(DLtype2Token[ltype], str)
|
1232
|
+
else
|
1233
|
+
Token(Ltype2Token[ltype], str)
|
1234
|
+
end.set_text(str)
|
1235
|
+
ensure
|
1236
|
+
@ltype = nil
|
1237
|
+
@quoted = nil
|
1238
|
+
@lex_state = EXPR_END
|
1239
|
+
end
|
1240
|
+
end
|
1241
|
+
|
1242
|
+
def skip_inner_expression
|
1243
|
+
res = String.new
|
1244
|
+
nest = 0
|
1245
|
+
while (ch = getc)
|
1246
|
+
res << ch
|
1247
|
+
if ch == '}'
|
1248
|
+
break if nest == 0
|
1249
|
+
nest -= 1
|
1250
|
+
elsif ch == '{'
|
1251
|
+
nest += 1
|
1252
|
+
end
|
1253
|
+
end
|
1254
|
+
res
|
1255
|
+
end
|
1256
|
+
|
1257
|
+
def identify_comment
|
1258
|
+
@ltype = "#"
|
1259
|
+
comment = String.new("#")
|
1260
|
+
while ch = getc
|
1261
|
+
if ch == "\\"
|
1262
|
+
ch = getc
|
1263
|
+
if ch == "\n"
|
1264
|
+
ch = " "
|
1265
|
+
else
|
1266
|
+
comment << "\\"
|
1267
|
+
end
|
1268
|
+
else
|
1269
|
+
if ch == "\n"
|
1270
|
+
@ltype = nil
|
1271
|
+
ungetc
|
1272
|
+
break
|
1273
|
+
end
|
1274
|
+
end
|
1275
|
+
comment << ch
|
1276
|
+
end
|
1277
|
+
Token(TkCOMMENT).set_text(comment)
|
1278
|
+
end
|
1279
|
+
|
1280
|
+
def read_escape
|
1281
|
+
res = String.new
|
1282
|
+
case ch = getc
|
1283
|
+
when /[0-7]/
|
1284
|
+
ungetc ch
|
1285
|
+
3.times do
|
1286
|
+
case ch = getc
|
1287
|
+
when /[0-7]/
|
1288
|
+
when nil
|
1289
|
+
break
|
1290
|
+
else
|
1291
|
+
ungetc
|
1292
|
+
break
|
1293
|
+
end
|
1294
|
+
res << ch
|
1295
|
+
end
|
1296
|
+
|
1297
|
+
when "x"
|
1298
|
+
res << ch
|
1299
|
+
2.times do
|
1300
|
+
case ch = getc
|
1301
|
+
when /[0-9a-fA-F]/
|
1302
|
+
when nil
|
1303
|
+
break
|
1304
|
+
else
|
1305
|
+
ungetc
|
1306
|
+
break
|
1307
|
+
end
|
1308
|
+
res << ch
|
1309
|
+
end
|
1310
|
+
|
1311
|
+
when "M"
|
1312
|
+
res << ch
|
1313
|
+
if (ch = getc) != '-'
|
1314
|
+
ungetc
|
1315
|
+
else
|
1316
|
+
res << ch
|
1317
|
+
if (ch = getc) == "\\" #"
|
1318
|
+
res << ch
|
1319
|
+
res << read_escape
|
1320
|
+
else
|
1321
|
+
res << ch
|
1322
|
+
end
|
1323
|
+
end
|
1324
|
+
|
1325
|
+
when "C", "c" #, "^"
|
1326
|
+
res << ch
|
1327
|
+
if ch == "C" && (ch = getc) != "-"
|
1328
|
+
ungetc
|
1329
|
+
else
|
1330
|
+
res << ch
|
1331
|
+
if (ch = getc) == "\\" #"
|
1332
|
+
res << ch
|
1333
|
+
res << read_escape
|
1334
|
+
else
|
1335
|
+
res << ch
|
1336
|
+
end
|
1337
|
+
end
|
1338
|
+
else
|
1339
|
+
res << ch
|
1340
|
+
end
|
1341
|
+
res
|
1342
|
+
end
|
1343
|
+
end
|
1344
|
+
end
|
1345
|
+
end
|