marty 0.5.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +84 -0
- data/Rakefile +29 -0
- data/app/assets/javascripts/marty/application.js +15 -0
- data/app/assets/stylesheets/marty/application.css +13 -0
- data/app/components/marty/api_auth_view.rb +32 -0
- data/app/components/marty/auth_app.rb +55 -0
- data/app/components/marty/auth_app.rb~ +51 -0
- data/app/components/marty/auth_app/javascripts/auth_app.js +91 -0
- data/app/components/marty/auth_app/javascripts/auth_app.js~ +91 -0
- data/app/components/marty/cm_form_panel.rb~ +5 -0
- data/app/components/marty/cm_grid_panel.rb~ +35 -0
- data/app/components/marty/data_import_view.rb~ +142 -0
- data/app/components/marty/extras/layout.rb +46 -0
- data/app/components/marty/extras/layout.rb~ +46 -0
- data/app/components/marty/extras/misc.rb +18 -0
- data/app/components/marty/form.rb +6 -0
- data/app/components/marty/grid.rb +45 -0
- data/app/components/marty/grid_append_only.rb +12 -0
- data/app/components/marty/import_type_view.rb +53 -0
- data/app/components/marty/live_search_grid_panel.rb +46 -0
- data/app/components/marty/live_search_grid_panel.rb~ +49 -0
- data/app/components/marty/main_auth_app.rb +269 -0
- data/app/components/marty/main_auth_app.rb~ +238 -0
- data/app/components/marty/mcfly_grid_panel.rb +62 -0
- data/app/components/marty/mcfly_grid_panel.rb~ +80 -0
- data/app/components/marty/new_posting_form.rb +46 -0
- data/app/components/marty/new_posting_form.rb~ +46 -0
- data/app/components/marty/new_posting_window.rb +21 -0
- data/app/components/marty/new_posting_window.rb~ +21 -0
- data/app/components/marty/panel.rb +12 -0
- data/app/components/marty/pivot_grid.rb +52 -0
- data/app/components/marty/pivot_grid/endpoints.rb +45 -0
- data/app/components/marty/pivot_grid/javascripts/extensions.js +150 -0
- data/app/components/marty/pivot_grid/javascripts/pivot_grid.js +86 -0
- data/app/components/marty/pivot_grid/services.rb +44 -0
- data/app/components/marty/posting_grid.rb +139 -0
- data/app/components/marty/posting_grid.rb~ +140 -0
- data/app/components/marty/posting_window.rb +27 -0
- data/app/components/marty/promise_view.rb +177 -0
- data/app/components/marty/promise_view.rb~ +157 -0
- data/app/components/marty/promise_view/stylesheets/promise_view.css +26 -0
- data/app/components/marty/promise_view/stylesheets/promise_view.css~ +15 -0
- data/app/components/marty/report_form.rb +225 -0
- data/app/components/marty/report_form.rb~ +217 -0
- data/app/components/marty/report_select.rb +145 -0
- data/app/components/marty/report_select.rb~ +133 -0
- data/app/components/marty/reporting.rb +39 -0
- data/app/components/marty/reporting.rb~ +39 -0
- data/app/components/marty/script_detail.rb~ +430 -0
- data/app/components/marty/script_form.rb +233 -0
- data/app/components/marty/script_form.rb~ +233 -0
- data/app/components/marty/script_form/javascripts/Ext.ux.form.field.CodeMirror.js +698 -0
- data/app/components/marty/script_form/javascripts/Ext.ux.form.field.CodeMirror.js~ +909 -0
- data/app/components/marty/script_form/javascripts/codemirror.js +3130 -0
- data/app/components/marty/script_form/javascripts/mode/clike/clike.js +284 -0
- data/app/components/marty/script_form/javascripts/mode/clike/index.html +102 -0
- data/app/components/marty/script_form/javascripts/mode/clike/scala.html +766 -0
- data/app/components/marty/script_form/javascripts/mode/clojure/clojure.js +206 -0
- data/app/components/marty/script_form/javascripts/mode/clojure/index.html +67 -0
- data/app/components/marty/script_form/javascripts/mode/coffeescript/LICENSE +22 -0
- data/app/components/marty/script_form/javascripts/mode/coffeescript/coffeescript.js +346 -0
- data/app/components/marty/script_form/javascripts/mode/coffeescript/index.html +728 -0
- data/app/components/marty/script_form/javascripts/mode/commonlisp/commonlisp.js +101 -0
- data/app/components/marty/script_form/javascripts/mode/commonlisp/index.html +165 -0
- data/app/components/marty/script_form/javascripts/mode/css/css.js +448 -0
- data/app/components/marty/script_form/javascripts/mode/css/index.html +58 -0
- data/app/components/marty/script_form/javascripts/mode/css/test.js +501 -0
- data/app/components/marty/script_form/javascripts/mode/delorean/delorean.js +189 -0
- data/app/components/marty/script_form/javascripts/mode/diff/diff.js +32 -0
- data/app/components/marty/script_form/javascripts/mode/diff/index.html +105 -0
- data/app/components/marty/script_form/javascripts/mode/ecl/ecl.js +203 -0
- data/app/components/marty/script_form/javascripts/mode/ecl/index.html +42 -0
- data/app/components/marty/script_form/javascripts/mode/erlang/erlang.js +463 -0
- data/app/components/marty/script_form/javascripts/mode/erlang/index.html +63 -0
- data/app/components/marty/script_form/javascripts/mode/gfm/gfm.js +150 -0
- data/app/components/marty/script_form/javascripts/mode/gfm/index.html +48 -0
- data/app/components/marty/script_form/javascripts/mode/go/go.js +170 -0
- data/app/components/marty/script_form/javascripts/mode/go/index.html +73 -0
- data/app/components/marty/script_form/javascripts/mode/groovy/groovy.js +210 -0
- data/app/components/marty/script_form/javascripts/mode/groovy/index.html +72 -0
- data/app/components/marty/script_form/javascripts/mode/haskell/haskell.js +242 -0
- data/app/components/marty/script_form/javascripts/mode/haskell/index.html +61 -0
- data/app/components/marty/script_form/javascripts/mode/haxe/haxe.js +429 -0
- data/app/components/marty/script_form/javascripts/mode/haxe/index.html +91 -0
- data/app/components/marty/script_form/javascripts/mode/htmlembedded/htmlembedded.js +72 -0
- data/app/components/marty/script_form/javascripts/mode/htmlembedded/index.html +50 -0
- data/app/components/marty/script_form/javascripts/mode/htmlmixed/htmlmixed.js +84 -0
- data/app/components/marty/script_form/javascripts/mode/htmlmixed/index.html +52 -0
- data/app/components/marty/script_form/javascripts/mode/javascript/index.html +78 -0
- data/app/components/marty/script_form/javascripts/mode/javascript/javascript.js +361 -0
- data/app/components/marty/script_form/javascripts/mode/jinja2/index.html +38 -0
- data/app/components/marty/script_form/javascripts/mode/jinja2/jinja2.js +42 -0
- data/app/components/marty/script_form/javascripts/mode/less/index.html +740 -0
- data/app/components/marty/script_form/javascripts/mode/less/less.js +266 -0
- data/app/components/marty/script_form/javascripts/mode/lua/index.html +73 -0
- data/app/components/marty/script_form/javascripts/mode/lua/lua.js +140 -0
- data/app/components/marty/script_form/javascripts/mode/markdown/index.html +343 -0
- data/app/components/marty/script_form/javascripts/mode/markdown/markdown.js +382 -0
- data/app/components/marty/script_form/javascripts/mode/markdown/test.js +1084 -0
- data/app/components/marty/script_form/javascripts/mode/mysql/index.html +42 -0
- data/app/components/marty/script_form/javascripts/mode/mysql/mysql.js +186 -0
- data/app/components/marty/script_form/javascripts/mode/ntriples/index.html +33 -0
- data/app/components/marty/script_form/javascripts/mode/ntriples/ntriples.js +172 -0
- data/app/components/marty/script_form/javascripts/mode/ocaml/index.html +130 -0
- data/app/components/marty/script_form/javascripts/mode/ocaml/ocaml.js +114 -0
- data/app/components/marty/script_form/javascripts/mode/pascal/LICENSE +7 -0
- data/app/components/marty/script_form/javascripts/mode/pascal/index.html +49 -0
- data/app/components/marty/script_form/javascripts/mode/pascal/pascal.js +94 -0
- data/app/components/marty/script_form/javascripts/mode/perl/LICENSE +19 -0
- data/app/components/marty/script_form/javascripts/mode/perl/index.html +63 -0
- data/app/components/marty/script_form/javascripts/mode/perl/perl.js +816 -0
- data/app/components/marty/script_form/javascripts/mode/php/index.html +49 -0
- data/app/components/marty/script_form/javascripts/mode/php/php.js +148 -0
- data/app/components/marty/script_form/javascripts/mode/pig/index.html +43 -0
- data/app/components/marty/script_form/javascripts/mode/pig/pig.js +172 -0
- data/app/components/marty/script_form/javascripts/mode/plsql/index.html +63 -0
- data/app/components/marty/script_form/javascripts/mode/plsql/plsql.js +217 -0
- data/app/components/marty/script_form/javascripts/mode/properties/index.html +41 -0
- data/app/components/marty/script_form/javascripts/mode/properties/properties.js +63 -0
- data/app/components/marty/script_form/javascripts/mode/python/LICENSE.txt +21 -0
- data/app/components/marty/script_form/javascripts/mode/python/index.html +123 -0
- data/app/components/marty/script_form/javascripts/mode/python/python.js +338 -0
- data/app/components/marty/script_form/javascripts/mode/r/LICENSE +24 -0
- data/app/components/marty/script_form/javascripts/mode/r/index.html +74 -0
- data/app/components/marty/script_form/javascripts/mode/r/r.js +141 -0
- data/app/components/marty/script_form/javascripts/mode/rpm/changes/changes.js +19 -0
- data/app/components/marty/script_form/javascripts/mode/rpm/changes/index.html +54 -0
- data/app/components/marty/script_form/javascripts/mode/rpm/spec/index.html +100 -0
- data/app/components/marty/script_form/javascripts/mode/rpm/spec/spec.css +5 -0
- data/app/components/marty/script_form/javascripts/mode/rpm/spec/spec.js +66 -0
- data/app/components/marty/script_form/javascripts/mode/rst/index.html +526 -0
- data/app/components/marty/script_form/javascripts/mode/rst/rst.js +326 -0
- data/app/components/marty/script_form/javascripts/mode/ruby/LICENSE +24 -0
- data/app/components/marty/script_form/javascripts/mode/ruby/index.html +172 -0
- data/app/components/marty/script_form/javascripts/mode/ruby/ruby.js +195 -0
- data/app/components/marty/script_form/javascripts/mode/rust/index.html +49 -0
- data/app/components/marty/script_form/javascripts/mode/rust/rust.js +432 -0
- data/app/components/marty/script_form/javascripts/mode/scheme/index.html +65 -0
- data/app/components/marty/script_form/javascripts/mode/scheme/scheme.js +230 -0
- data/app/components/marty/script_form/javascripts/mode/shell/index.html +50 -0
- data/app/components/marty/script_form/javascripts/mode/shell/shell.js +118 -0
- data/app/components/marty/script_form/javascripts/mode/sieve/LICENSE +23 -0
- data/app/components/marty/script_form/javascripts/mode/sieve/index.html +81 -0
- data/app/components/marty/script_form/javascripts/mode/sieve/sieve.js +156 -0
- data/app/components/marty/script_form/javascripts/mode/smalltalk/index.html +56 -0
- data/app/components/marty/script_form/javascripts/mode/smalltalk/smalltalk.js +139 -0
- data/app/components/marty/script_form/javascripts/mode/smarty/index.html +83 -0
- data/app/components/marty/script_form/javascripts/mode/smarty/smarty.js +148 -0
- data/app/components/marty/script_form/javascripts/mode/sparql/index.html +41 -0
- data/app/components/marty/script_form/javascripts/mode/sparql/sparql.js +143 -0
- data/app/components/marty/script_form/javascripts/mode/stex/index.html +98 -0
- data/app/components/marty/script_form/javascripts/mode/stex/stex.js +182 -0
- data/app/components/marty/script_form/javascripts/mode/stex/test.js +343 -0
- data/app/components/marty/script_form/javascripts/mode/tiddlywiki/index.html +141 -0
- data/app/components/marty/script_form/javascripts/mode/tiddlywiki/tiddlywiki.css +14 -0
- data/app/components/marty/script_form/javascripts/mode/tiddlywiki/tiddlywiki.js +384 -0
- data/app/components/marty/script_form/javascripts/mode/tiki/index.html +83 -0
- data/app/components/marty/script_form/javascripts/mode/tiki/tiki.css +26 -0
- data/app/components/marty/script_form/javascripts/mode/tiki/tiki.js +309 -0
- data/app/components/marty/script_form/javascripts/mode/vb/LICENSE.txt +21 -0
- data/app/components/marty/script_form/javascripts/mode/vb/index.html +89 -0
- data/app/components/marty/script_form/javascripts/mode/vb/vb.js +260 -0
- data/app/components/marty/script_form/javascripts/mode/vbscript/index.html +43 -0
- data/app/components/marty/script_form/javascripts/mode/vbscript/vbscript.js +26 -0
- data/app/components/marty/script_form/javascripts/mode/velocity/index.html +104 -0
- data/app/components/marty/script_form/javascripts/mode/velocity/velocity.js +146 -0
- data/app/components/marty/script_form/javascripts/mode/verilog/index.html +211 -0
- data/app/components/marty/script_form/javascripts/mode/verilog/verilog.js +194 -0
- data/app/components/marty/script_form/javascripts/mode/xml/index.html +45 -0
- data/app/components/marty/script_form/javascripts/mode/xml/xml.js +318 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/LICENSE +20 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/index.html +223 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/index.html +27 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testBase.js +42 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testEmptySequenceKeyword.js +16 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testMultiAttr.js +16 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testNamespaces.js +91 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testProcessingInstructions.js +16 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/test/testQuotes.js +19 -0
- data/app/components/marty/script_form/javascripts/mode/xquery/xquery.js +451 -0
- data/app/components/marty/script_form/javascripts/mode/yaml/index.html +68 -0
- data/app/components/marty/script_form/javascripts/mode/yaml/yaml.js +95 -0
- data/app/components/marty/script_form/javascripts/util/closetag.js +164 -0
- data/app/components/marty/script_form/javascripts/util/dialog.css +27 -0
- data/app/components/marty/script_form/javascripts/util/dialog.js +70 -0
- data/app/components/marty/script_form/javascripts/util/foldcode.js +196 -0
- data/app/components/marty/script_form/javascripts/util/formatting.js +193 -0
- data/app/components/marty/script_form/javascripts/util/javascript-hint.js +134 -0
- data/app/components/marty/script_form/javascripts/util/loadmode.js +51 -0
- data/app/components/marty/script_form/javascripts/util/match-highlighter.js +44 -0
- data/app/components/marty/script_form/javascripts/util/multiplex.js +77 -0
- data/app/components/marty/script_form/javascripts/util/overlay.js +54 -0
- data/app/components/marty/script_form/javascripts/util/pig-hint.js +123 -0
- data/app/components/marty/script_form/javascripts/util/runmode-standalone.js +90 -0
- data/app/components/marty/script_form/javascripts/util/runmode.js +53 -0
- data/app/components/marty/script_form/javascripts/util/search.js +118 -0
- data/app/components/marty/script_form/javascripts/util/searchcursor.js +119 -0
- data/app/components/marty/script_form/javascripts/util/simple-hint.css +16 -0
- data/app/components/marty/script_form/javascripts/util/simple-hint.js +97 -0
- data/app/components/marty/script_form/javascripts/util/xml-hint.js +137 -0
- data/app/components/marty/script_form/stylesheets/codemirror.css +172 -0
- data/app/components/marty/script_form/stylesheets/delorean.css +10 -0
- data/app/components/marty/script_form/stylesheets/theme/ambiance.css +81 -0
- data/app/components/marty/script_form/stylesheets/theme/blackboard.css +25 -0
- data/app/components/marty/script_form/stylesheets/theme/cobalt.css +18 -0
- data/app/components/marty/script_form/stylesheets/theme/eclipse.css +25 -0
- data/app/components/marty/script_form/stylesheets/theme/elegant.css +10 -0
- data/app/components/marty/script_form/stylesheets/theme/erlang-dark.css +21 -0
- data/app/components/marty/script_form/stylesheets/theme/lesser-dark.css +44 -0
- data/app/components/marty/script_form/stylesheets/theme/monokai.css +28 -0
- data/app/components/marty/script_form/stylesheets/theme/neat.css +9 -0
- data/app/components/marty/script_form/stylesheets/theme/night.css +21 -0
- data/app/components/marty/script_form/stylesheets/theme/rubyblue.css +21 -0
- data/app/components/marty/script_form/stylesheets/theme/vibrant-ink.css +27 -0
- data/app/components/marty/script_form/stylesheets/theme/xq-dark.css +46 -0
- data/app/components/marty/script_grid.rb +104 -0
- data/app/components/marty/script_grid.rb~ +99 -0
- data/app/components/marty/script_tester.rb +114 -0
- data/app/components/marty/script_tester.rb~ +213 -0
- data/app/components/marty/scripting.rb +132 -0
- data/app/components/marty/scripting.rb~ +124 -0
- data/app/components/marty/select_report.rb~ +143 -0
- data/app/components/marty/simple_app.rb +97 -0
- data/app/components/marty/simple_app.rb~ +101 -0
- data/app/components/marty/simple_app/javascripts/simple_app.js +50 -0
- data/app/components/marty/simple_app/javascripts/statusbar_ext.js +8 -0
- data/app/components/marty/tag_grid.rb +83 -0
- data/app/components/marty/tag_grid.rb~ +89 -0
- data/app/components/marty/tree_panel.rb~ +256 -0
- data/app/components/marty/tree_panel/javascripts/tree_panel.js~ +317 -0
- data/app/components/marty/user_pivot.rb +128 -0
- data/app/components/marty/user_view.rb +181 -0
- data/app/components/marty/user_view.rb~ +188 -0
- data/app/controllers/marty/application_controller.rb +124 -0
- data/app/controllers/marty/application_controller.rb~ +133 -0
- data/app/controllers/marty/components_controller.rb +41 -0
- data/app/controllers/marty/components_controller.rb~ +37 -0
- data/app/controllers/marty/job_controller.rb +28 -0
- data/app/controllers/marty/job_controller.rb~ +28 -0
- data/app/controllers/marty/rpc_controller.rb +64 -0
- data/app/controllers/marty/rpc_controller.rb~ +61 -0
- data/app/helpers/marty/application_helper.rb +4 -0
- data/app/helpers/marty/script_set.rb +57 -0
- data/app/helpers/marty/script_set.rb~ +59 -0
- data/app/models/marty/api_auth.rb +44 -0
- data/app/models/marty/api_auth.rb~ +48 -0
- data/app/models/marty/base.rb +4 -0
- data/app/models/marty/data_change.rb +179 -0
- data/app/models/marty/data_change.rb~ +141 -0
- data/app/models/marty/enum.rb +22 -0
- data/app/models/marty/enum.rb~ +16 -0
- data/app/models/marty/import_type.rb +44 -0
- data/app/models/marty/import_type.rb~ +48 -0
- data/app/models/marty/poop.rb~ +169 -0
- data/app/models/marty/posting.rb +101 -0
- data/app/models/marty/posting.rb~ +86 -0
- data/app/models/marty/posting_type.rb +12 -0
- data/app/models/marty/posting_type.rb~ +21 -0
- data/app/models/marty/promise.rb +252 -0
- data/app/models/marty/promise.rb~ +196 -0
- data/app/models/marty/role.rb +6 -0
- data/app/models/marty/role.rb~ +10 -0
- data/app/models/marty/script.rb +144 -0
- data/app/models/marty/script.rb~ +62 -0
- data/app/models/marty/tag.rb +96 -0
- data/app/models/marty/tag.rb~ +91 -0
- data/app/models/marty/token.rb +30 -0
- data/app/models/marty/user.rb +146 -0
- data/app/models/marty/user.rb~ +148 -0
- data/app/models/marty/user_role.rb +7 -0
- data/app/models/marty/user_role.rb~ +13 -0
- data/app/views/layouts/marty/application.html.erb +12 -0
- data/app/views/layouts/marty/application.html.erb~ +11 -0
- data/config/locales/en.yml +134 -0
- data/config/routes.rb +6 -0
- data/config/routes.rb~ +10 -0
- data/db/migrate/001_create_marty_scripts.rb +14 -0
- data/db/migrate/003_create_marty_users.rb +12 -0
- data/db/migrate/004_create_marty_roles.rb +7 -0
- data/db/migrate/005_create_marty_user_roles.rb +14 -0
- data/db/migrate/006_create_marty_tokens.rb +14 -0
- data/db/migrate/008_create_marty_posting_types.rb +7 -0
- data/db/migrate/019_create_marty_postings.rb +18 -0
- data/db/migrate/019_create_marty_postings.rb~ +19 -0
- data/db/migrate/068_create_marty_import_types.rb +12 -0
- data/db/migrate/069_create_marty_import_synonyms.rb +15 -0
- data/db/migrate/070_create_versions.rb +18 -0
- data/db/migrate/071_add_object_changes_column_to_versions.rb +9 -0
- data/db/migrate/072_add_validation_function_to_import_types.rb +6 -0
- data/db/migrate/073_add_preprocess_function_to_import_types.rb +5 -0
- data/db/migrate/090_create_delayed_jobs.rb +22 -0
- data/db/migrate/091_create_marty_promises.rb +36 -0
- data/db/migrate/095_create_marty_tags.rb +14 -0
- data/db/migrate/095_create_marty_tags.rb~ +19 -0
- data/db/migrate/096_add_user_roles_to_import_types.rb +11 -0
- data/db/migrate/097_drop_versions.rb +9 -0
- data/db/migrate/098_create_marty_api_auths.rb +20 -0
- data/db/seeds.rb +48 -0
- data/lib/marty.rb +18 -0
- data/lib/marty.rb~ +13 -0
- data/lib/marty/content_handler.rb +97 -0
- data/lib/marty/content_handler.rb~ +93 -0
- data/lib/marty/data_conversion.rb +298 -0
- data/lib/marty/data_exporter.rb +150 -0
- data/lib/marty/data_exporter.rb~ +137 -0
- data/lib/marty/data_importer.rb +122 -0
- data/lib/marty/data_importer.rb~ +114 -0
- data/lib/marty/data_row_processor.rb~ +206 -0
- data/lib/marty/drop_folder_hook.rb~ +17 -0
- data/lib/marty/engine.rb +10 -0
- data/lib/marty/folder_hook.rb~ +9 -0
- data/lib/marty/lazy_column_loader.rb +57 -0
- data/lib/marty/lazy_column_loader.rb~ +47 -0
- data/lib/marty/mcfly_query.rb +189 -0
- data/lib/marty/mcfly_query.rb~ +188 -0
- data/lib/marty/migrations.rb +108 -0
- data/lib/marty/migrations.rb~ +65 -0
- data/lib/marty/monkey.rb +163 -0
- data/lib/marty/monkey.rb~ +160 -0
- data/lib/marty/permissions.rb +64 -0
- data/lib/marty/permissions.rb~ +69 -0
- data/lib/marty/promise.rb~ +41 -0
- data/lib/marty/promise_job.rb +123 -0
- data/lib/marty/promise_job.rb~ +121 -0
- data/lib/marty/promise_proxy.rb +94 -0
- data/lib/marty/promise_proxy.rb~ +69 -0
- data/lib/marty/railtie.rb +5 -0
- data/lib/marty/relation.rb +39 -0
- data/lib/marty/util.rb +110 -0
- data/lib/marty/util.rb~ +80 -0
- data/lib/marty/version.rb +3 -0
- data/lib/marty/version.rb~ +3 -0
- data/lib/marty/xl.rb +527 -0
- data/lib/marty/xl.rb~ +526 -0
- data/lib/pyxll/README.txt +19 -0
- data/lib/pyxll/README.txt~ +16 -0
- data/lib/pyxll/gemini.py +155 -0
- data/lib/pyxll/gemini.py~ +110 -0
- data/lib/pyxll/pyxll.cfg +12 -0
- data/lib/pyxll/pyxll.cfg~ +12 -0
- data/lib/pyxll/sample.xlsx +0 -0
- data/lib/tasks/marty_tasks.rake +37 -0
- metadata +517 -0
@@ -0,0 +1,114 @@
|
|
1
|
+
CodeMirror.defineMode('ocaml', function(config) {
|
2
|
+
|
3
|
+
var words = {
|
4
|
+
'true': 'atom',
|
5
|
+
'false': 'atom',
|
6
|
+
'let': 'keyword',
|
7
|
+
'rec': 'keyword',
|
8
|
+
'in': 'keyword',
|
9
|
+
'of': 'keyword',
|
10
|
+
'and': 'keyword',
|
11
|
+
'succ': 'keyword',
|
12
|
+
'if': 'keyword',
|
13
|
+
'then': 'keyword',
|
14
|
+
'else': 'keyword',
|
15
|
+
'for': 'keyword',
|
16
|
+
'to': 'keyword',
|
17
|
+
'while': 'keyword',
|
18
|
+
'do': 'keyword',
|
19
|
+
'done': 'keyword',
|
20
|
+
'fun': 'keyword',
|
21
|
+
'function': 'keyword',
|
22
|
+
'val': 'keyword',
|
23
|
+
'type': 'keyword',
|
24
|
+
'mutable': 'keyword',
|
25
|
+
'match': 'keyword',
|
26
|
+
'with': 'keyword',
|
27
|
+
'try': 'keyword',
|
28
|
+
'raise': 'keyword',
|
29
|
+
'begin': 'keyword',
|
30
|
+
'end': 'keyword',
|
31
|
+
'open': 'builtin',
|
32
|
+
'trace': 'builtin',
|
33
|
+
'ignore': 'builtin',
|
34
|
+
'exit': 'builtin',
|
35
|
+
'print_string': 'builtin',
|
36
|
+
'print_endline': 'builtin'
|
37
|
+
};
|
38
|
+
|
39
|
+
function tokenBase(stream, state) {
|
40
|
+
var sol = stream.sol();
|
41
|
+
var ch = stream.next();
|
42
|
+
|
43
|
+
if (ch === '"') {
|
44
|
+
state.tokenize = tokenString;
|
45
|
+
return state.tokenize(stream, state);
|
46
|
+
}
|
47
|
+
if (ch === '(') {
|
48
|
+
if (stream.eat('*')) {
|
49
|
+
state.commentLevel++;
|
50
|
+
state.tokenize = tokenComment;
|
51
|
+
return state.tokenize(stream, state);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
if (ch === '~') {
|
55
|
+
stream.eatWhile(/\w/);
|
56
|
+
return 'variable-2';
|
57
|
+
}
|
58
|
+
if (ch === '`') {
|
59
|
+
stream.eatWhile(/\w/);
|
60
|
+
return 'quote';
|
61
|
+
}
|
62
|
+
if (/\d/.test(ch)) {
|
63
|
+
stream.eatWhile(/[\d]/);
|
64
|
+
if (stream.eat('.')) {
|
65
|
+
stream.eatWhile(/[\d]/);
|
66
|
+
}
|
67
|
+
return 'number';
|
68
|
+
}
|
69
|
+
if ( /[+\-*&%=<>!?|]/.test(ch)) {
|
70
|
+
return 'operator';
|
71
|
+
}
|
72
|
+
stream.eatWhile(/\w/);
|
73
|
+
var cur = stream.current();
|
74
|
+
return words[cur] || 'variable';
|
75
|
+
}
|
76
|
+
|
77
|
+
function tokenString(stream, state) {
|
78
|
+
var next, end = false, escaped = false;
|
79
|
+
while ((next = stream.next()) != null) {
|
80
|
+
if (next === '"' && !escaped) {
|
81
|
+
end = true;
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
escaped = !escaped && next === '\\';
|
85
|
+
}
|
86
|
+
if (end && !escaped) {
|
87
|
+
state.tokenize = tokenBase;
|
88
|
+
}
|
89
|
+
return 'string';
|
90
|
+
};
|
91
|
+
|
92
|
+
function tokenComment(stream, state) {
|
93
|
+
var prev, next;
|
94
|
+
while(state.commentLevel > 0 && (next = stream.next()) != null) {
|
95
|
+
if (prev === '(' && next === '*') state.commentLevel++;
|
96
|
+
if (prev === '*' && next === ')') state.commentLevel--;
|
97
|
+
prev = next;
|
98
|
+
}
|
99
|
+
if (state.commentLevel <= 0) {
|
100
|
+
state.tokenize = tokenBase;
|
101
|
+
}
|
102
|
+
return 'comment';
|
103
|
+
}
|
104
|
+
|
105
|
+
return {
|
106
|
+
startState: function() {return {tokenize: tokenBase, commentLevel: 0};},
|
107
|
+
token: function(stream, state) {
|
108
|
+
if (stream.eatSpace()) return null;
|
109
|
+
return state.tokenize(stream, state);
|
110
|
+
}
|
111
|
+
};
|
112
|
+
});
|
113
|
+
|
114
|
+
CodeMirror.defineMIME('text/x-ocaml', 'ocaml');
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2011 souceLair <support@sourcelair.com>
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Pascal mode</title>
|
6
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
7
|
+
<script src="../../lib/codemirror.js"></script>
|
8
|
+
<script src="pascal.js"></script>
|
9
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
10
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<h1>CodeMirror: Pascal mode</h1>
|
14
|
+
|
15
|
+
<div><textarea id="code" name="code">
|
16
|
+
(* Example Pascal code *)
|
17
|
+
|
18
|
+
while a <> b do writeln('Waiting');
|
19
|
+
|
20
|
+
if a > b then
|
21
|
+
writeln('Condition met')
|
22
|
+
else
|
23
|
+
writeln('Condition not met');
|
24
|
+
|
25
|
+
for i := 1 to 10 do
|
26
|
+
writeln('Iteration: ', i:1);
|
27
|
+
|
28
|
+
repeat
|
29
|
+
a := a + 1
|
30
|
+
until a = 10;
|
31
|
+
|
32
|
+
case i of
|
33
|
+
0: write('zero');
|
34
|
+
1: write('one');
|
35
|
+
2: write('two')
|
36
|
+
end;
|
37
|
+
</textarea></div>
|
38
|
+
|
39
|
+
<script>
|
40
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
41
|
+
lineNumbers: true,
|
42
|
+
matchBrackets: true,
|
43
|
+
mode: "text/x-pascal"
|
44
|
+
});
|
45
|
+
</script>
|
46
|
+
|
47
|
+
<p><strong>MIME types defined:</strong> <code>text/x-pascal</code>.</p>
|
48
|
+
</body>
|
49
|
+
</html>
|
@@ -0,0 +1,94 @@
|
|
1
|
+
CodeMirror.defineMode("pascal", function(config) {
|
2
|
+
function words(str) {
|
3
|
+
var obj = {}, words = str.split(" ");
|
4
|
+
for (var i = 0; i < words.length; ++i) obj[words[i]] = true;
|
5
|
+
return obj;
|
6
|
+
}
|
7
|
+
var keywords = words("and array begin case const div do downto else end file for forward integer " +
|
8
|
+
"boolean char function goto if in label mod nil not of or packed procedure " +
|
9
|
+
"program record repeat set string then to type until var while with");
|
10
|
+
var atoms = {"null": true};
|
11
|
+
|
12
|
+
var isOperatorChar = /[+\-*&%=<>!?|\/]/;
|
13
|
+
|
14
|
+
function tokenBase(stream, state) {
|
15
|
+
var ch = stream.next();
|
16
|
+
if (ch == "#" && state.startOfLine) {
|
17
|
+
stream.skipToEnd();
|
18
|
+
return "meta";
|
19
|
+
}
|
20
|
+
if (ch == '"' || ch == "'") {
|
21
|
+
state.tokenize = tokenString(ch);
|
22
|
+
return state.tokenize(stream, state);
|
23
|
+
}
|
24
|
+
if (ch == "(" && stream.eat("*")) {
|
25
|
+
state.tokenize = tokenComment;
|
26
|
+
return tokenComment(stream, state);
|
27
|
+
}
|
28
|
+
if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
|
29
|
+
return null;
|
30
|
+
}
|
31
|
+
if (/\d/.test(ch)) {
|
32
|
+
stream.eatWhile(/[\w\.]/);
|
33
|
+
return "number";
|
34
|
+
}
|
35
|
+
if (ch == "/") {
|
36
|
+
if (stream.eat("/")) {
|
37
|
+
stream.skipToEnd();
|
38
|
+
return "comment";
|
39
|
+
}
|
40
|
+
}
|
41
|
+
if (isOperatorChar.test(ch)) {
|
42
|
+
stream.eatWhile(isOperatorChar);
|
43
|
+
return "operator";
|
44
|
+
}
|
45
|
+
stream.eatWhile(/[\w\$_]/);
|
46
|
+
var cur = stream.current();
|
47
|
+
if (keywords.propertyIsEnumerable(cur)) return "keyword";
|
48
|
+
if (atoms.propertyIsEnumerable(cur)) return "atom";
|
49
|
+
return "variable";
|
50
|
+
}
|
51
|
+
|
52
|
+
function tokenString(quote) {
|
53
|
+
return function(stream, state) {
|
54
|
+
var escaped = false, next, end = false;
|
55
|
+
while ((next = stream.next()) != null) {
|
56
|
+
if (next == quote && !escaped) {end = true; break;}
|
57
|
+
escaped = !escaped && next == "\\";
|
58
|
+
}
|
59
|
+
if (end || !escaped) state.tokenize = null;
|
60
|
+
return "string";
|
61
|
+
};
|
62
|
+
}
|
63
|
+
|
64
|
+
function tokenComment(stream, state) {
|
65
|
+
var maybeEnd = false, ch;
|
66
|
+
while (ch = stream.next()) {
|
67
|
+
if (ch == ")" && maybeEnd) {
|
68
|
+
state.tokenize = null;
|
69
|
+
break;
|
70
|
+
}
|
71
|
+
maybeEnd = (ch == "*");
|
72
|
+
}
|
73
|
+
return "comment";
|
74
|
+
}
|
75
|
+
|
76
|
+
// Interface
|
77
|
+
|
78
|
+
return {
|
79
|
+
startState: function(basecolumn) {
|
80
|
+
return {tokenize: null};
|
81
|
+
},
|
82
|
+
|
83
|
+
token: function(stream, state) {
|
84
|
+
if (stream.eatSpace()) return null;
|
85
|
+
var style = (state.tokenize || tokenBase)(stream, state);
|
86
|
+
if (style == "comment" || style == "meta") return style;
|
87
|
+
return style;
|
88
|
+
},
|
89
|
+
|
90
|
+
electricChars: "{}"
|
91
|
+
};
|
92
|
+
});
|
93
|
+
|
94
|
+
CodeMirror.defineMIME("text/x-pascal", "pascal");
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (C) 2011 by Sabaca <mail@sabaca.com> under the MIT license.
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -0,0 +1,63 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>CodeMirror: Perl mode</title>
|
6
|
+
<link rel="stylesheet" href="../../lib/codemirror.css">
|
7
|
+
<script src="../../lib/codemirror.js"></script>
|
8
|
+
<script src="perl.js"></script>
|
9
|
+
<link rel="stylesheet" href="../../doc/docs.css">
|
10
|
+
<style type="text/css">.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
|
11
|
+
</head>
|
12
|
+
<body>
|
13
|
+
<h1>CodeMirror: Perl mode</h1>
|
14
|
+
|
15
|
+
<div><textarea id="code" name="code">
|
16
|
+
#!/usr/bin/perl
|
17
|
+
|
18
|
+
use Something qw(func1 func2);
|
19
|
+
|
20
|
+
# strings
|
21
|
+
my $s1 = qq'single line';
|
22
|
+
our $s2 = q(multi-
|
23
|
+
line);
|
24
|
+
|
25
|
+
=item Something
|
26
|
+
Example.
|
27
|
+
=cut
|
28
|
+
|
29
|
+
my $html=<<'HTML'
|
30
|
+
<html>
|
31
|
+
<title>hi!</title>
|
32
|
+
</html>
|
33
|
+
HTML
|
34
|
+
|
35
|
+
print "first,".join(',', 'second', qq~third~);
|
36
|
+
|
37
|
+
if($s1 =~ m[(?<!\s)(l.ne)\z]o) {
|
38
|
+
$h->{$1}=$$.' predefined variables';
|
39
|
+
$s2 =~ s/\-line//ox;
|
40
|
+
$s1 =~ s[
|
41
|
+
line ]
|
42
|
+
[
|
43
|
+
block
|
44
|
+
]ox;
|
45
|
+
}
|
46
|
+
|
47
|
+
1; # numbers and comments
|
48
|
+
|
49
|
+
__END__
|
50
|
+
something...
|
51
|
+
|
52
|
+
</textarea></div>
|
53
|
+
|
54
|
+
<script>
|
55
|
+
var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
56
|
+
lineNumbers: true,
|
57
|
+
matchBrackets: true
|
58
|
+
});
|
59
|
+
</script>
|
60
|
+
|
61
|
+
<p><strong>MIME types defined:</strong> <code>text/x-perl</code>.</p>
|
62
|
+
</body>
|
63
|
+
</html>
|
@@ -0,0 +1,816 @@
|
|
1
|
+
// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08)
|
2
|
+
// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com)
|
3
|
+
CodeMirror.defineMode("perl",function(config,parserConfig){
|
4
|
+
// http://perldoc.perl.org
|
5
|
+
var PERL={ // null - magic touch
|
6
|
+
// 1 - keyword
|
7
|
+
// 2 - def
|
8
|
+
// 3 - atom
|
9
|
+
// 4 - operator
|
10
|
+
// 5 - variable-2 (predefined)
|
11
|
+
// [x,y] - x=1,2,3; y=must be defined if x{...}
|
12
|
+
// PERL operators
|
13
|
+
'->' : 4,
|
14
|
+
'++' : 4,
|
15
|
+
'--' : 4,
|
16
|
+
'**' : 4,
|
17
|
+
// ! ~ \ and unary + and -
|
18
|
+
'=~' : 4,
|
19
|
+
'!~' : 4,
|
20
|
+
'*' : 4,
|
21
|
+
'/' : 4,
|
22
|
+
'%' : 4,
|
23
|
+
'x' : 4,
|
24
|
+
'+' : 4,
|
25
|
+
'-' : 4,
|
26
|
+
'.' : 4,
|
27
|
+
'<<' : 4,
|
28
|
+
'>>' : 4,
|
29
|
+
// named unary operators
|
30
|
+
'<' : 4,
|
31
|
+
'>' : 4,
|
32
|
+
'<=' : 4,
|
33
|
+
'>=' : 4,
|
34
|
+
'lt' : 4,
|
35
|
+
'gt' : 4,
|
36
|
+
'le' : 4,
|
37
|
+
'ge' : 4,
|
38
|
+
'==' : 4,
|
39
|
+
'!=' : 4,
|
40
|
+
'<=>' : 4,
|
41
|
+
'eq' : 4,
|
42
|
+
'ne' : 4,
|
43
|
+
'cmp' : 4,
|
44
|
+
'~~' : 4,
|
45
|
+
'&' : 4,
|
46
|
+
'|' : 4,
|
47
|
+
'^' : 4,
|
48
|
+
'&&' : 4,
|
49
|
+
'||' : 4,
|
50
|
+
'//' : 4,
|
51
|
+
'..' : 4,
|
52
|
+
'...' : 4,
|
53
|
+
'?' : 4,
|
54
|
+
':' : 4,
|
55
|
+
'=' : 4,
|
56
|
+
'+=' : 4,
|
57
|
+
'-=' : 4,
|
58
|
+
'*=' : 4, // etc. ???
|
59
|
+
',' : 4,
|
60
|
+
'=>' : 4,
|
61
|
+
'::' : 4,
|
62
|
+
// list operators (rightward)
|
63
|
+
'not' : 4,
|
64
|
+
'and' : 4,
|
65
|
+
'or' : 4,
|
66
|
+
'xor' : 4,
|
67
|
+
// PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)
|
68
|
+
'BEGIN' : [5,1],
|
69
|
+
'END' : [5,1],
|
70
|
+
'PRINT' : [5,1],
|
71
|
+
'PRINTF' : [5,1],
|
72
|
+
'GETC' : [5,1],
|
73
|
+
'READ' : [5,1],
|
74
|
+
'READLINE' : [5,1],
|
75
|
+
'DESTROY' : [5,1],
|
76
|
+
'TIE' : [5,1],
|
77
|
+
'TIEHANDLE' : [5,1],
|
78
|
+
'UNTIE' : [5,1],
|
79
|
+
'STDIN' : 5,
|
80
|
+
'STDIN_TOP' : 5,
|
81
|
+
'STDOUT' : 5,
|
82
|
+
'STDOUT_TOP' : 5,
|
83
|
+
'STDERR' : 5,
|
84
|
+
'STDERR_TOP' : 5,
|
85
|
+
'$ARG' : 5,
|
86
|
+
'$_' : 5,
|
87
|
+
'@ARG' : 5,
|
88
|
+
'@_' : 5,
|
89
|
+
'$LIST_SEPARATOR' : 5,
|
90
|
+
'$"' : 5,
|
91
|
+
'$PROCESS_ID' : 5,
|
92
|
+
'$PID' : 5,
|
93
|
+
'$$' : 5,
|
94
|
+
'$REAL_GROUP_ID' : 5,
|
95
|
+
'$GID' : 5,
|
96
|
+
'$(' : 5,
|
97
|
+
'$EFFECTIVE_GROUP_ID' : 5,
|
98
|
+
'$EGID' : 5,
|
99
|
+
'$)' : 5,
|
100
|
+
'$PROGRAM_NAME' : 5,
|
101
|
+
'$0' : 5,
|
102
|
+
'$SUBSCRIPT_SEPARATOR' : 5,
|
103
|
+
'$SUBSEP' : 5,
|
104
|
+
'$;' : 5,
|
105
|
+
'$REAL_USER_ID' : 5,
|
106
|
+
'$UID' : 5,
|
107
|
+
'$<' : 5,
|
108
|
+
'$EFFECTIVE_USER_ID' : 5,
|
109
|
+
'$EUID' : 5,
|
110
|
+
'$>' : 5,
|
111
|
+
'$a' : 5,
|
112
|
+
'$b' : 5,
|
113
|
+
'$COMPILING' : 5,
|
114
|
+
'$^C' : 5,
|
115
|
+
'$DEBUGGING' : 5,
|
116
|
+
'$^D' : 5,
|
117
|
+
'${^ENCODING}' : 5,
|
118
|
+
'$ENV' : 5,
|
119
|
+
'%ENV' : 5,
|
120
|
+
'$SYSTEM_FD_MAX' : 5,
|
121
|
+
'$^F' : 5,
|
122
|
+
'@F' : 5,
|
123
|
+
'${^GLOBAL_PHASE}' : 5,
|
124
|
+
'$^H' : 5,
|
125
|
+
'%^H' : 5,
|
126
|
+
'@INC' : 5,
|
127
|
+
'%INC' : 5,
|
128
|
+
'$INPLACE_EDIT' : 5,
|
129
|
+
'$^I' : 5,
|
130
|
+
'$^M' : 5,
|
131
|
+
'$OSNAME' : 5,
|
132
|
+
'$^O' : 5,
|
133
|
+
'${^OPEN}' : 5,
|
134
|
+
'$PERLDB' : 5,
|
135
|
+
'$^P' : 5,
|
136
|
+
'$SIG' : 5,
|
137
|
+
'%SIG' : 5,
|
138
|
+
'$BASETIME' : 5,
|
139
|
+
'$^T' : 5,
|
140
|
+
'${^TAINT}' : 5,
|
141
|
+
'${^UNICODE}' : 5,
|
142
|
+
'${^UTF8CACHE}' : 5,
|
143
|
+
'${^UTF8LOCALE}' : 5,
|
144
|
+
'$PERL_VERSION' : 5,
|
145
|
+
'$^V' : 5,
|
146
|
+
'${^WIN32_SLOPPY_STAT}' : 5,
|
147
|
+
'$EXECUTABLE_NAME' : 5,
|
148
|
+
'$^X' : 5,
|
149
|
+
'$1' : 5, // - regexp $1, $2...
|
150
|
+
'$MATCH' : 5,
|
151
|
+
'$&' : 5,
|
152
|
+
'${^MATCH}' : 5,
|
153
|
+
'$PREMATCH' : 5,
|
154
|
+
'$`' : 5,
|
155
|
+
'${^PREMATCH}' : 5,
|
156
|
+
'$POSTMATCH' : 5,
|
157
|
+
"$'" : 5,
|
158
|
+
'${^POSTMATCH}' : 5,
|
159
|
+
'$LAST_PAREN_MATCH' : 5,
|
160
|
+
'$+' : 5,
|
161
|
+
'$LAST_SUBMATCH_RESULT' : 5,
|
162
|
+
'$^N' : 5,
|
163
|
+
'@LAST_MATCH_END' : 5,
|
164
|
+
'@+' : 5,
|
165
|
+
'%LAST_PAREN_MATCH' : 5,
|
166
|
+
'%+' : 5,
|
167
|
+
'@LAST_MATCH_START' : 5,
|
168
|
+
'@-' : 5,
|
169
|
+
'%LAST_MATCH_START' : 5,
|
170
|
+
'%-' : 5,
|
171
|
+
'$LAST_REGEXP_CODE_RESULT' : 5,
|
172
|
+
'$^R' : 5,
|
173
|
+
'${^RE_DEBUG_FLAGS}' : 5,
|
174
|
+
'${^RE_TRIE_MAXBUF}' : 5,
|
175
|
+
'$ARGV' : 5,
|
176
|
+
'@ARGV' : 5,
|
177
|
+
'ARGV' : 5,
|
178
|
+
'ARGVOUT' : 5,
|
179
|
+
'$OUTPUT_FIELD_SEPARATOR' : 5,
|
180
|
+
'$OFS' : 5,
|
181
|
+
'$,' : 5,
|
182
|
+
'$INPUT_LINE_NUMBER' : 5,
|
183
|
+
'$NR' : 5,
|
184
|
+
'$.' : 5,
|
185
|
+
'$INPUT_RECORD_SEPARATOR' : 5,
|
186
|
+
'$RS' : 5,
|
187
|
+
'$/' : 5,
|
188
|
+
'$OUTPUT_RECORD_SEPARATOR' : 5,
|
189
|
+
'$ORS' : 5,
|
190
|
+
'$\\' : 5,
|
191
|
+
'$OUTPUT_AUTOFLUSH' : 5,
|
192
|
+
'$|' : 5,
|
193
|
+
'$ACCUMULATOR' : 5,
|
194
|
+
'$^A' : 5,
|
195
|
+
'$FORMAT_FORMFEED' : 5,
|
196
|
+
'$^L' : 5,
|
197
|
+
'$FORMAT_PAGE_NUMBER' : 5,
|
198
|
+
'$%' : 5,
|
199
|
+
'$FORMAT_LINES_LEFT' : 5,
|
200
|
+
'$-' : 5,
|
201
|
+
'$FORMAT_LINE_BREAK_CHARACTERS' : 5,
|
202
|
+
'$:' : 5,
|
203
|
+
'$FORMAT_LINES_PER_PAGE' : 5,
|
204
|
+
'$=' : 5,
|
205
|
+
'$FORMAT_TOP_NAME' : 5,
|
206
|
+
'$^' : 5,
|
207
|
+
'$FORMAT_NAME' : 5,
|
208
|
+
'$~' : 5,
|
209
|
+
'${^CHILD_ERROR_NATIVE}' : 5,
|
210
|
+
'$EXTENDED_OS_ERROR' : 5,
|
211
|
+
'$^E' : 5,
|
212
|
+
'$EXCEPTIONS_BEING_CAUGHT' : 5,
|
213
|
+
'$^S' : 5,
|
214
|
+
'$WARNING' : 5,
|
215
|
+
'$^W' : 5,
|
216
|
+
'${^WARNING_BITS}' : 5,
|
217
|
+
'$OS_ERROR' : 5,
|
218
|
+
'$ERRNO' : 5,
|
219
|
+
'$!' : 5,
|
220
|
+
'%OS_ERROR' : 5,
|
221
|
+
'%ERRNO' : 5,
|
222
|
+
'%!' : 5,
|
223
|
+
'$CHILD_ERROR' : 5,
|
224
|
+
'$?' : 5,
|
225
|
+
'$EVAL_ERROR' : 5,
|
226
|
+
'$@' : 5,
|
227
|
+
'$OFMT' : 5,
|
228
|
+
'$#' : 5,
|
229
|
+
'$*' : 5,
|
230
|
+
'$ARRAY_BASE' : 5,
|
231
|
+
'$[' : 5,
|
232
|
+
'$OLD_PERL_VERSION' : 5,
|
233
|
+
'$]' : 5,
|
234
|
+
// PERL blocks
|
235
|
+
'if' :[1,1],
|
236
|
+
elsif :[1,1],
|
237
|
+
'else' :[1,1],
|
238
|
+
'while' :[1,1],
|
239
|
+
unless :[1,1],
|
240
|
+
'for' :[1,1],
|
241
|
+
foreach :[1,1],
|
242
|
+
// PERL functions
|
243
|
+
'abs' :1, // - absolute value function
|
244
|
+
accept :1, // - accept an incoming socket connect
|
245
|
+
alarm :1, // - schedule a SIGALRM
|
246
|
+
'atan2' :1, // - arctangent of Y/X in the range -PI to PI
|
247
|
+
bind :1, // - binds an address to a socket
|
248
|
+
binmode :1, // - prepare binary files for I/O
|
249
|
+
bless :1, // - create an object
|
250
|
+
bootstrap :1, //
|
251
|
+
'break' :1, // - break out of a "given" block
|
252
|
+
caller :1, // - get context of the current subroutine call
|
253
|
+
chdir :1, // - change your current working directory
|
254
|
+
chmod :1, // - changes the permissions on a list of files
|
255
|
+
chomp :1, // - remove a trailing record separator from a string
|
256
|
+
chop :1, // - remove the last character from a string
|
257
|
+
chown :1, // - change the owership on a list of files
|
258
|
+
chr :1, // - get character this number represents
|
259
|
+
chroot :1, // - make directory new root for path lookups
|
260
|
+
close :1, // - close file (or pipe or socket) handle
|
261
|
+
closedir :1, // - close directory handle
|
262
|
+
connect :1, // - connect to a remote socket
|
263
|
+
'continue' :[1,1], // - optional trailing block in a while or foreach
|
264
|
+
'cos' :1, // - cosine function
|
265
|
+
crypt :1, // - one-way passwd-style encryption
|
266
|
+
dbmclose :1, // - breaks binding on a tied dbm file
|
267
|
+
dbmopen :1, // - create binding on a tied dbm file
|
268
|
+
'default' :1, //
|
269
|
+
defined :1, // - test whether a value, variable, or function is defined
|
270
|
+
'delete' :1, // - deletes a value from a hash
|
271
|
+
die :1, // - raise an exception or bail out
|
272
|
+
'do' :1, // - turn a BLOCK into a TERM
|
273
|
+
dump :1, // - create an immediate core dump
|
274
|
+
each :1, // - retrieve the next key/value pair from a hash
|
275
|
+
endgrent :1, // - be done using group file
|
276
|
+
endhostent :1, // - be done using hosts file
|
277
|
+
endnetent :1, // - be done using networks file
|
278
|
+
endprotoent :1, // - be done using protocols file
|
279
|
+
endpwent :1, // - be done using passwd file
|
280
|
+
endservent :1, // - be done using services file
|
281
|
+
eof :1, // - test a filehandle for its end
|
282
|
+
'eval' :1, // - catch exceptions or compile and run code
|
283
|
+
'exec' :1, // - abandon this program to run another
|
284
|
+
exists :1, // - test whether a hash key is present
|
285
|
+
exit :1, // - terminate this program
|
286
|
+
'exp' :1, // - raise I to a power
|
287
|
+
fcntl :1, // - file control system call
|
288
|
+
fileno :1, // - return file descriptor from filehandle
|
289
|
+
flock :1, // - lock an entire file with an advisory lock
|
290
|
+
fork :1, // - create a new process just like this one
|
291
|
+
format :1, // - declare a picture format with use by the write() function
|
292
|
+
formline :1, // - internal function used for formats
|
293
|
+
getc :1, // - get the next character from the filehandle
|
294
|
+
getgrent :1, // - get next group record
|
295
|
+
getgrgid :1, // - get group record given group user ID
|
296
|
+
getgrnam :1, // - get group record given group name
|
297
|
+
gethostbyaddr :1, // - get host record given its address
|
298
|
+
gethostbyname :1, // - get host record given name
|
299
|
+
gethostent :1, // - get next hosts record
|
300
|
+
getlogin :1, // - return who logged in at this tty
|
301
|
+
getnetbyaddr :1, // - get network record given its address
|
302
|
+
getnetbyname :1, // - get networks record given name
|
303
|
+
getnetent :1, // - get next networks record
|
304
|
+
getpeername :1, // - find the other end of a socket connection
|
305
|
+
getpgrp :1, // - get process group
|
306
|
+
getppid :1, // - get parent process ID
|
307
|
+
getpriority :1, // - get current nice value
|
308
|
+
getprotobyname :1, // - get protocol record given name
|
309
|
+
getprotobynumber :1, // - get protocol record numeric protocol
|
310
|
+
getprotoent :1, // - get next protocols record
|
311
|
+
getpwent :1, // - get next passwd record
|
312
|
+
getpwnam :1, // - get passwd record given user login name
|
313
|
+
getpwuid :1, // - get passwd record given user ID
|
314
|
+
getservbyname :1, // - get services record given its name
|
315
|
+
getservbyport :1, // - get services record given numeric port
|
316
|
+
getservent :1, // - get next services record
|
317
|
+
getsockname :1, // - retrieve the sockaddr for a given socket
|
318
|
+
getsockopt :1, // - get socket options on a given socket
|
319
|
+
given :1, //
|
320
|
+
glob :1, // - expand filenames using wildcards
|
321
|
+
gmtime :1, // - convert UNIX time into record or string using Greenwich time
|
322
|
+
'goto' :1, // - create spaghetti code
|
323
|
+
grep :1, // - locate elements in a list test true against a given criterion
|
324
|
+
hex :1, // - convert a string to a hexadecimal number
|
325
|
+
'import' :1, // - patch a module's namespace into your own
|
326
|
+
index :1, // - find a substring within a string
|
327
|
+
'int' :1, // - get the integer portion of a number
|
328
|
+
ioctl :1, // - system-dependent device control system call
|
329
|
+
'join' :1, // - join a list into a string using a separator
|
330
|
+
keys :1, // - retrieve list of indices from a hash
|
331
|
+
kill :1, // - send a signal to a process or process group
|
332
|
+
last :1, // - exit a block prematurely
|
333
|
+
lc :1, // - return lower-case version of a string
|
334
|
+
lcfirst :1, // - return a string with just the next letter in lower case
|
335
|
+
length :1, // - return the number of bytes in a string
|
336
|
+
'link' :1, // - create a hard link in the filesytem
|
337
|
+
listen :1, // - register your socket as a server
|
338
|
+
local : 2, // - create a temporary value for a global variable (dynamic scoping)
|
339
|
+
localtime :1, // - convert UNIX time into record or string using local time
|
340
|
+
lock :1, // - get a thread lock on a variable, subroutine, or method
|
341
|
+
'log' :1, // - retrieve the natural logarithm for a number
|
342
|
+
lstat :1, // - stat a symbolic link
|
343
|
+
m :null, // - match a string with a regular expression pattern
|
344
|
+
map :1, // - apply a change to a list to get back a new list with the changes
|
345
|
+
mkdir :1, // - create a directory
|
346
|
+
msgctl :1, // - SysV IPC message control operations
|
347
|
+
msgget :1, // - get SysV IPC message queue
|
348
|
+
msgrcv :1, // - receive a SysV IPC message from a message queue
|
349
|
+
msgsnd :1, // - send a SysV IPC message to a message queue
|
350
|
+
my : 2, // - declare and assign a local variable (lexical scoping)
|
351
|
+
'new' :1, //
|
352
|
+
next :1, // - iterate a block prematurely
|
353
|
+
no :1, // - unimport some module symbols or semantics at compile time
|
354
|
+
oct :1, // - convert a string to an octal number
|
355
|
+
open :1, // - open a file, pipe, or descriptor
|
356
|
+
opendir :1, // - open a directory
|
357
|
+
ord :1, // - find a character's numeric representation
|
358
|
+
our : 2, // - declare and assign a package variable (lexical scoping)
|
359
|
+
pack :1, // - convert a list into a binary representation
|
360
|
+
'package' :1, // - declare a separate global namespace
|
361
|
+
pipe :1, // - open a pair of connected filehandles
|
362
|
+
pop :1, // - remove the last element from an array and return it
|
363
|
+
pos :1, // - find or set the offset for the last/next m//g search
|
364
|
+
print :1, // - output a list to a filehandle
|
365
|
+
printf :1, // - output a formatted list to a filehandle
|
366
|
+
prototype :1, // - get the prototype (if any) of a subroutine
|
367
|
+
push :1, // - append one or more elements to an array
|
368
|
+
q :null, // - singly quote a string
|
369
|
+
qq :null, // - doubly quote a string
|
370
|
+
qr :null, // - Compile pattern
|
371
|
+
quotemeta :null, // - quote regular expression magic characters
|
372
|
+
qw :null, // - quote a list of words
|
373
|
+
qx :null, // - backquote quote a string
|
374
|
+
rand :1, // - retrieve the next pseudorandom number
|
375
|
+
read :1, // - fixed-length buffered input from a filehandle
|
376
|
+
readdir :1, // - get a directory from a directory handle
|
377
|
+
readline :1, // - fetch a record from a file
|
378
|
+
readlink :1, // - determine where a symbolic link is pointing
|
379
|
+
readpipe :1, // - execute a system command and collect standard output
|
380
|
+
recv :1, // - receive a message over a Socket
|
381
|
+
redo :1, // - start this loop iteration over again
|
382
|
+
ref :1, // - find out the type of thing being referenced
|
383
|
+
rename :1, // - change a filename
|
384
|
+
require :1, // - load in external functions from a library at runtime
|
385
|
+
reset :1, // - clear all variables of a given name
|
386
|
+
'return' :1, // - get out of a function early
|
387
|
+
reverse :1, // - flip a string or a list
|
388
|
+
rewinddir :1, // - reset directory handle
|
389
|
+
rindex :1, // - right-to-left substring search
|
390
|
+
rmdir :1, // - remove a directory
|
391
|
+
s :null, // - replace a pattern with a string
|
392
|
+
say :1, // - print with newline
|
393
|
+
scalar :1, // - force a scalar context
|
394
|
+
seek :1, // - reposition file pointer for random-access I/O
|
395
|
+
seekdir :1, // - reposition directory pointer
|
396
|
+
select :1, // - reset default output or do I/O multiplexing
|
397
|
+
semctl :1, // - SysV semaphore control operations
|
398
|
+
semget :1, // - get set of SysV semaphores
|
399
|
+
semop :1, // - SysV semaphore operations
|
400
|
+
send :1, // - send a message over a socket
|
401
|
+
setgrent :1, // - prepare group file for use
|
402
|
+
sethostent :1, // - prepare hosts file for use
|
403
|
+
setnetent :1, // - prepare networks file for use
|
404
|
+
setpgrp :1, // - set the process group of a process
|
405
|
+
setpriority :1, // - set a process's nice value
|
406
|
+
setprotoent :1, // - prepare protocols file for use
|
407
|
+
setpwent :1, // - prepare passwd file for use
|
408
|
+
setservent :1, // - prepare services file for use
|
409
|
+
setsockopt :1, // - set some socket options
|
410
|
+
shift :1, // - remove the first element of an array, and return it
|
411
|
+
shmctl :1, // - SysV shared memory operations
|
412
|
+
shmget :1, // - get SysV shared memory segment identifier
|
413
|
+
shmread :1, // - read SysV shared memory
|
414
|
+
shmwrite :1, // - write SysV shared memory
|
415
|
+
shutdown :1, // - close down just half of a socket connection
|
416
|
+
'sin' :1, // - return the sine of a number
|
417
|
+
sleep :1, // - block for some number of seconds
|
418
|
+
socket :1, // - create a socket
|
419
|
+
socketpair :1, // - create a pair of sockets
|
420
|
+
'sort' :1, // - sort a list of values
|
421
|
+
splice :1, // - add or remove elements anywhere in an array
|
422
|
+
'split' :1, // - split up a string using a regexp delimiter
|
423
|
+
sprintf :1, // - formatted print into a string
|
424
|
+
'sqrt' :1, // - square root function
|
425
|
+
srand :1, // - seed the random number generator
|
426
|
+
stat :1, // - get a file's status information
|
427
|
+
state :1, // - declare and assign a state variable (persistent lexical scoping)
|
428
|
+
study :1, // - optimize input data for repeated searches
|
429
|
+
'sub' :1, // - declare a subroutine, possibly anonymously
|
430
|
+
'substr' :1, // - get or alter a portion of a stirng
|
431
|
+
symlink :1, // - create a symbolic link to a file
|
432
|
+
syscall :1, // - execute an arbitrary system call
|
433
|
+
sysopen :1, // - open a file, pipe, or descriptor
|
434
|
+
sysread :1, // - fixed-length unbuffered input from a filehandle
|
435
|
+
sysseek :1, // - position I/O pointer on handle used with sysread and syswrite
|
436
|
+
system :1, // - run a separate program
|
437
|
+
syswrite :1, // - fixed-length unbuffered output to a filehandle
|
438
|
+
tell :1, // - get current seekpointer on a filehandle
|
439
|
+
telldir :1, // - get current seekpointer on a directory handle
|
440
|
+
tie :1, // - bind a variable to an object class
|
441
|
+
tied :1, // - get a reference to the object underlying a tied variable
|
442
|
+
time :1, // - return number of seconds since 1970
|
443
|
+
times :1, // - return elapsed time for self and child processes
|
444
|
+
tr :null, // - transliterate a string
|
445
|
+
truncate :1, // - shorten a file
|
446
|
+
uc :1, // - return upper-case version of a string
|
447
|
+
ucfirst :1, // - return a string with just the next letter in upper case
|
448
|
+
umask :1, // - set file creation mode mask
|
449
|
+
undef :1, // - remove a variable or function definition
|
450
|
+
unlink :1, // - remove one link to a file
|
451
|
+
unpack :1, // - convert binary structure into normal perl variables
|
452
|
+
unshift :1, // - prepend more elements to the beginning of a list
|
453
|
+
untie :1, // - break a tie binding to a variable
|
454
|
+
use :1, // - load in a module at compile time
|
455
|
+
utime :1, // - set a file's last access and modify times
|
456
|
+
values :1, // - return a list of the values in a hash
|
457
|
+
vec :1, // - test or set particular bits in a string
|
458
|
+
wait :1, // - wait for any child process to die
|
459
|
+
waitpid :1, // - wait for a particular child process to die
|
460
|
+
wantarray :1, // - get void vs scalar vs list context of current subroutine call
|
461
|
+
warn :1, // - print debugging info
|
462
|
+
when :1, //
|
463
|
+
write :1, // - print a picture record
|
464
|
+
y :null}; // - transliterate a string
|
465
|
+
|
466
|
+
var RXstyle="string-2";
|
467
|
+
var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type
|
468
|
+
|
469
|
+
function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;)
|
470
|
+
state.chain=null; // 12 3tail
|
471
|
+
state.style=null;
|
472
|
+
state.tail=null;
|
473
|
+
state.tokenize=function(stream,state){
|
474
|
+
var e=false,c,i=0;
|
475
|
+
while(c=stream.next()){
|
476
|
+
if(c===chain[i]&&!e){
|
477
|
+
if(chain[++i]!==undefined){
|
478
|
+
state.chain=chain[i];
|
479
|
+
state.style=style;
|
480
|
+
state.tail=tail;}
|
481
|
+
else if(tail)
|
482
|
+
stream.eatWhile(tail);
|
483
|
+
state.tokenize=tokenPerl;
|
484
|
+
return style;}
|
485
|
+
e=!e&&c=="\\";}
|
486
|
+
return style;};
|
487
|
+
return state.tokenize(stream,state);}
|
488
|
+
|
489
|
+
function tokenSOMETHING(stream,state,string){
|
490
|
+
state.tokenize=function(stream,state){
|
491
|
+
if(stream.string==string)
|
492
|
+
state.tokenize=tokenPerl;
|
493
|
+
stream.skipToEnd();
|
494
|
+
return "string";};
|
495
|
+
return state.tokenize(stream,state);}
|
496
|
+
|
497
|
+
function tokenPerl(stream,state){
|
498
|
+
if(stream.eatSpace())
|
499
|
+
return null;
|
500
|
+
if(state.chain)
|
501
|
+
return tokenChain(stream,state,state.chain,state.style,state.tail);
|
502
|
+
if(stream.match(/^\-?[\d\.]/,false))
|
503
|
+
if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/))
|
504
|
+
return 'number';
|
505
|
+
if(stream.match(/^<<(?=\w)/)){ // NOTE: <<SOMETHING\n...\nSOMETHING\n
|
506
|
+
stream.eatWhile(/\w/);
|
507
|
+
return tokenSOMETHING(stream,state,stream.current().substr(2));}
|
508
|
+
if(stream.sol()&&stream.match(/^\=item(?!\w)/)){// NOTE: \n=item...\n=cut\n
|
509
|
+
return tokenSOMETHING(stream,state,'=cut');}
|
510
|
+
var ch=stream.next();
|
511
|
+
if(ch=='"'||ch=="'"){ // NOTE: ' or " or <<'SOMETHING'\n...\nSOMETHING\n or <<"SOMETHING"\n...\nSOMETHING\n
|
512
|
+
if(stream.prefix(3)=="<<"+ch){
|
513
|
+
var p=stream.pos;
|
514
|
+
stream.eatWhile(/\w/);
|
515
|
+
var n=stream.current().substr(1);
|
516
|
+
if(n&&stream.eat(ch))
|
517
|
+
return tokenSOMETHING(stream,state,n);
|
518
|
+
stream.pos=p;}
|
519
|
+
return tokenChain(stream,state,[ch],"string");}
|
520
|
+
if(ch=="q"){
|
521
|
+
var c=stream.look(-2);
|
522
|
+
if(!(c&&/\w/.test(c))){
|
523
|
+
c=stream.look(0);
|
524
|
+
if(c=="x"){
|
525
|
+
c=stream.look(1);
|
526
|
+
if(c=="("){
|
527
|
+
stream.eatSuffix(2);
|
528
|
+
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
|
529
|
+
if(c=="["){
|
530
|
+
stream.eatSuffix(2);
|
531
|
+
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
|
532
|
+
if(c=="{"){
|
533
|
+
stream.eatSuffix(2);
|
534
|
+
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
|
535
|
+
if(c=="<"){
|
536
|
+
stream.eatSuffix(2);
|
537
|
+
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
|
538
|
+
if(/[\^'"!~\/]/.test(c)){
|
539
|
+
stream.eatSuffix(1);
|
540
|
+
return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
|
541
|
+
else if(c=="q"){
|
542
|
+
c=stream.look(1);
|
543
|
+
if(c=="("){
|
544
|
+
stream.eatSuffix(2);
|
545
|
+
return tokenChain(stream,state,[")"],"string");}
|
546
|
+
if(c=="["){
|
547
|
+
stream.eatSuffix(2);
|
548
|
+
return tokenChain(stream,state,["]"],"string");}
|
549
|
+
if(c=="{"){
|
550
|
+
stream.eatSuffix(2);
|
551
|
+
return tokenChain(stream,state,["}"],"string");}
|
552
|
+
if(c=="<"){
|
553
|
+
stream.eatSuffix(2);
|
554
|
+
return tokenChain(stream,state,[">"],"string");}
|
555
|
+
if(/[\^'"!~\/]/.test(c)){
|
556
|
+
stream.eatSuffix(1);
|
557
|
+
return tokenChain(stream,state,[stream.eat(c)],"string");}}
|
558
|
+
else if(c=="w"){
|
559
|
+
c=stream.look(1);
|
560
|
+
if(c=="("){
|
561
|
+
stream.eatSuffix(2);
|
562
|
+
return tokenChain(stream,state,[")"],"bracket");}
|
563
|
+
if(c=="["){
|
564
|
+
stream.eatSuffix(2);
|
565
|
+
return tokenChain(stream,state,["]"],"bracket");}
|
566
|
+
if(c=="{"){
|
567
|
+
stream.eatSuffix(2);
|
568
|
+
return tokenChain(stream,state,["}"],"bracket");}
|
569
|
+
if(c=="<"){
|
570
|
+
stream.eatSuffix(2);
|
571
|
+
return tokenChain(stream,state,[">"],"bracket");}
|
572
|
+
if(/[\^'"!~\/]/.test(c)){
|
573
|
+
stream.eatSuffix(1);
|
574
|
+
return tokenChain(stream,state,[stream.eat(c)],"bracket");}}
|
575
|
+
else if(c=="r"){
|
576
|
+
c=stream.look(1);
|
577
|
+
if(c=="("){
|
578
|
+
stream.eatSuffix(2);
|
579
|
+
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
|
580
|
+
if(c=="["){
|
581
|
+
stream.eatSuffix(2);
|
582
|
+
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
|
583
|
+
if(c=="{"){
|
584
|
+
stream.eatSuffix(2);
|
585
|
+
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
|
586
|
+
if(c=="<"){
|
587
|
+
stream.eatSuffix(2);
|
588
|
+
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}
|
589
|
+
if(/[\^'"!~\/]/.test(c)){
|
590
|
+
stream.eatSuffix(1);
|
591
|
+
return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}}
|
592
|
+
else if(/[\^'"!~\/(\[{<]/.test(c)){
|
593
|
+
if(c=="("){
|
594
|
+
stream.eatSuffix(1);
|
595
|
+
return tokenChain(stream,state,[")"],"string");}
|
596
|
+
if(c=="["){
|
597
|
+
stream.eatSuffix(1);
|
598
|
+
return tokenChain(stream,state,["]"],"string");}
|
599
|
+
if(c=="{"){
|
600
|
+
stream.eatSuffix(1);
|
601
|
+
return tokenChain(stream,state,["}"],"string");}
|
602
|
+
if(c=="<"){
|
603
|
+
stream.eatSuffix(1);
|
604
|
+
return tokenChain(stream,state,[">"],"string");}
|
605
|
+
if(/[\^'"!~\/]/.test(c)){
|
606
|
+
return tokenChain(stream,state,[stream.eat(c)],"string");}}}}
|
607
|
+
if(ch=="m"){
|
608
|
+
var c=stream.look(-2);
|
609
|
+
if(!(c&&/\w/.test(c))){
|
610
|
+
c=stream.eat(/[(\[{<\^'"!~\/]/);
|
611
|
+
if(c){
|
612
|
+
if(/[\^'"!~\/]/.test(c)){
|
613
|
+
return tokenChain(stream,state,[c],RXstyle,RXmodifiers);}
|
614
|
+
if(c=="("){
|
615
|
+
return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);}
|
616
|
+
if(c=="["){
|
617
|
+
return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);}
|
618
|
+
if(c=="{"){
|
619
|
+
return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);}
|
620
|
+
if(c=="<"){
|
621
|
+
return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}}
|
622
|
+
if(ch=="s"){
|
623
|
+
var c=/[\/>\]})\w]/.test(stream.look(-2));
|
624
|
+
if(!c){
|
625
|
+
c=stream.eat(/[(\[{<\^'"!~\/]/);
|
626
|
+
if(c){
|
627
|
+
if(c=="[")
|
628
|
+
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
|
629
|
+
if(c=="{")
|
630
|
+
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
|
631
|
+
if(c=="<")
|
632
|
+
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
|
633
|
+
if(c=="(")
|
634
|
+
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
|
635
|
+
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
|
636
|
+
if(ch=="y"){
|
637
|
+
var c=/[\/>\]})\w]/.test(stream.look(-2));
|
638
|
+
if(!c){
|
639
|
+
c=stream.eat(/[(\[{<\^'"!~\/]/);
|
640
|
+
if(c){
|
641
|
+
if(c=="[")
|
642
|
+
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
|
643
|
+
if(c=="{")
|
644
|
+
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
|
645
|
+
if(c=="<")
|
646
|
+
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
|
647
|
+
if(c=="(")
|
648
|
+
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
|
649
|
+
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}
|
650
|
+
if(ch=="t"){
|
651
|
+
var c=/[\/>\]})\w]/.test(stream.look(-2));
|
652
|
+
if(!c){
|
653
|
+
c=stream.eat("r");if(c){
|
654
|
+
c=stream.eat(/[(\[{<\^'"!~\/]/);
|
655
|
+
if(c){
|
656
|
+
if(c=="[")
|
657
|
+
return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers);
|
658
|
+
if(c=="{")
|
659
|
+
return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers);
|
660
|
+
if(c=="<")
|
661
|
+
return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers);
|
662
|
+
if(c=="(")
|
663
|
+
return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers);
|
664
|
+
return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}}
|
665
|
+
if(ch=="`"){
|
666
|
+
return tokenChain(stream,state,[ch],"variable-2");}
|
667
|
+
if(ch=="/"){
|
668
|
+
if(!/~\s*$/.test(stream.prefix()))
|
669
|
+
return "operator";
|
670
|
+
else
|
671
|
+
return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);}
|
672
|
+
if(ch=="$"){
|
673
|
+
var p=stream.pos;
|
674
|
+
if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}"))
|
675
|
+
return "variable-2";
|
676
|
+
else
|
677
|
+
stream.pos=p;}
|
678
|
+
if(/[$@%]/.test(ch)){
|
679
|
+
var p=stream.pos;
|
680
|
+
if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(stream.look(-2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){
|
681
|
+
var c=stream.current();
|
682
|
+
if(PERL[c])
|
683
|
+
return "variable-2";}
|
684
|
+
stream.pos=p;}
|
685
|
+
if(/[$@%&]/.test(ch)){
|
686
|
+
if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){
|
687
|
+
var c=stream.current();
|
688
|
+
if(PERL[c])
|
689
|
+
return "variable-2";
|
690
|
+
else
|
691
|
+
return "variable";}}
|
692
|
+
if(ch=="#"){
|
693
|
+
if(stream.look(-2)!="$"){
|
694
|
+
stream.skipToEnd();
|
695
|
+
return "comment";}}
|
696
|
+
if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){
|
697
|
+
var p=stream.pos;
|
698
|
+
stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
|
699
|
+
if(PERL[stream.current()])
|
700
|
+
return "operator";
|
701
|
+
else
|
702
|
+
stream.pos=p;}
|
703
|
+
if(ch=="_"){
|
704
|
+
if(stream.pos==1){
|
705
|
+
if(stream.suffix(6)=="_END__"){
|
706
|
+
return tokenChain(stream,state,['\0'],"comment");}
|
707
|
+
else if(stream.suffix(7)=="_DATA__"){
|
708
|
+
return tokenChain(stream,state,['\0'],"variable-2");}
|
709
|
+
else if(stream.suffix(7)=="_C__"){
|
710
|
+
return tokenChain(stream,state,['\0'],"string");}}}
|
711
|
+
if(/\w/.test(ch)){
|
712
|
+
var p=stream.pos;
|
713
|
+
if(stream.look(-2)=="{"&&(stream.look(0)=="}"||stream.eatWhile(/\w/)&&stream.look(0)=="}"))
|
714
|
+
return "string";
|
715
|
+
else
|
716
|
+
stream.pos=p;}
|
717
|
+
if(/[A-Z]/.test(ch)){
|
718
|
+
var l=stream.look(-2);
|
719
|
+
var p=stream.pos;
|
720
|
+
stream.eatWhile(/[A-Z_]/);
|
721
|
+
if(/[\da-z]/.test(stream.look(0))){
|
722
|
+
stream.pos=p;}
|
723
|
+
else{
|
724
|
+
var c=PERL[stream.current()];
|
725
|
+
if(!c)
|
726
|
+
return "meta";
|
727
|
+
if(c[1])
|
728
|
+
c=c[0];
|
729
|
+
if(l!=":"){
|
730
|
+
if(c==1)
|
731
|
+
return "keyword";
|
732
|
+
else if(c==2)
|
733
|
+
return "def";
|
734
|
+
else if(c==3)
|
735
|
+
return "atom";
|
736
|
+
else if(c==4)
|
737
|
+
return "operator";
|
738
|
+
else if(c==5)
|
739
|
+
return "variable-2";
|
740
|
+
else
|
741
|
+
return "meta";}
|
742
|
+
else
|
743
|
+
return "meta";}}
|
744
|
+
if(/[a-zA-Z_]/.test(ch)){
|
745
|
+
var l=stream.look(-2);
|
746
|
+
stream.eatWhile(/\w/);
|
747
|
+
var c=PERL[stream.current()];
|
748
|
+
if(!c)
|
749
|
+
return "meta";
|
750
|
+
if(c[1])
|
751
|
+
c=c[0];
|
752
|
+
if(l!=":"){
|
753
|
+
if(c==1)
|
754
|
+
return "keyword";
|
755
|
+
else if(c==2)
|
756
|
+
return "def";
|
757
|
+
else if(c==3)
|
758
|
+
return "atom";
|
759
|
+
else if(c==4)
|
760
|
+
return "operator";
|
761
|
+
else if(c==5)
|
762
|
+
return "variable-2";
|
763
|
+
else
|
764
|
+
return "meta";}
|
765
|
+
else
|
766
|
+
return "meta";}
|
767
|
+
return null;}
|
768
|
+
|
769
|
+
return{
|
770
|
+
startState:function(){
|
771
|
+
return{
|
772
|
+
tokenize:tokenPerl,
|
773
|
+
chain:null,
|
774
|
+
style:null,
|
775
|
+
tail:null};},
|
776
|
+
token:function(stream,state){
|
777
|
+
return (state.tokenize||tokenPerl)(stream,state);},
|
778
|
+
electricChars:"{}"};});
|
779
|
+
|
780
|
+
CodeMirror.defineMIME("text/x-perl", "perl");
|
781
|
+
|
782
|
+
// it's like "peek", but need for look-ahead or look-behind if index < 0
|
783
|
+
CodeMirror.StringStream.prototype.look=function(c){
|
784
|
+
return this.string.charAt(this.pos+(c||0));};
|
785
|
+
|
786
|
+
// return a part of prefix of current stream from current position
|
787
|
+
CodeMirror.StringStream.prototype.prefix=function(c){
|
788
|
+
if(c){
|
789
|
+
var x=this.pos-c;
|
790
|
+
return this.string.substr((x>=0?x:0),c);}
|
791
|
+
else{
|
792
|
+
return this.string.substr(0,this.pos-1);}};
|
793
|
+
|
794
|
+
// return a part of suffix of current stream from current position
|
795
|
+
CodeMirror.StringStream.prototype.suffix=function(c){
|
796
|
+
var y=this.string.length;
|
797
|
+
var x=y-this.pos+1;
|
798
|
+
return this.string.substr(this.pos,(c&&c<y?c:x));};
|
799
|
+
|
800
|
+
// return a part of suffix of current stream from current position and change current position
|
801
|
+
CodeMirror.StringStream.prototype.nsuffix=function(c){
|
802
|
+
var p=this.pos;
|
803
|
+
var l=c||(this.string.length-this.pos+1);
|
804
|
+
this.pos+=l;
|
805
|
+
return this.string.substr(p,l);};
|
806
|
+
|
807
|
+
// eating and vomiting a part of stream from current position
|
808
|
+
CodeMirror.StringStream.prototype.eatSuffix=function(c){
|
809
|
+
var x=this.pos+c;
|
810
|
+
var y;
|
811
|
+
if(x<=0)
|
812
|
+
this.pos=0;
|
813
|
+
else if(x>=(y=this.string.length-1))
|
814
|
+
this.pos=y;
|
815
|
+
else
|
816
|
+
this.pos=x;};
|